python-library-ff14-the-hunt 0.0.6__tar.gz → 0.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/.cursor/skills/ff14_the_hunt-package-preload/SKILL.md +25 -25
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/PKG-INFO +1 -1
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/README.md +2 -2
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/enrich.py +7 -11
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/spawn_points.py +8 -12
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/ff14_the_hunt.py +1 -1
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/cn.py +1 -1
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/models.py +2 -2
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/points.py +3 -5
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/pyproject.toml +1 -1
- python_library_ff14_the_hunt-0.0.7/tests/test_recent_spawn_detection.py +59 -0
- python_library_ff14_the_hunt-0.0.7/tests/test_spawn_map_points.py +44 -0
- python_library_ff14_the_hunt-0.0.6/tests/test_spawn_map_points.py +0 -21
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/.cursor/skills/ff14_the_hunt-package-changelog/SKILL.md +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/.cursor/skills/ff14_the_hunt-package-design/SKILL.md +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/.gitignore +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/example/__main__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/example/spawn_map_io.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/example.bat +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/client.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/fate_timer.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/resources.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/spawn_window.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/bear_tracker/timer_theme.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/common/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/common/urlopen_retry.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/data/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/data/hunts_zh.json +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/data/regions_zh.json +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/detect.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/display.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/en.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/names.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/spawn_map_display.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/tag.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/loop.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/monitor_mode.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/scheduler.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/sleep_plan.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/sleep_settings.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/spawn_dedup.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/window_remaining.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/attach.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/coordinates.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/layout.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/png_meta.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/region_fetch.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/spawn_map/region_image.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/test.bat +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/__init__.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_fate_timer.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_ff14_the_hunt_service.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_locale_cn.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_monitor_mode.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_poll_scheduler.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_poll_sleep.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_spawn_dedup.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_spawn_map_data.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_spawn_window.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_untimed_marks_filter.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_urlopen_retry.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tools/build_locale_data.py +0 -0
- {python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/update.bat +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ff14-the-hunt-package-preload
|
|
3
|
-
description: ff14_the_hunt 包:会话预加载;改本包源码前 Read。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# ff14_the_hunt · 会话预加载
|
|
7
|
-
|
|
8
|
-
## 初始化加载(Session preload)
|
|
9
|
-
|
|
10
|
-
在 **`packages/ff14_the_hunt/`** 下改源码、测试或 `pyproject.toml` 时,按序 **Read**:
|
|
11
|
-
|
|
12
|
-
1. `~/.cursor/skills/project-skill-manifest-policy/SKILL.md`
|
|
13
|
-
2. `~/.cursor/skills/forbidden-doc-comment-vocabulary/SKILL.md`
|
|
14
|
-
3. `~/.cursor/skills/markdown-authoring-zh/SKILL.md`
|
|
15
|
-
4. `~/.cursor/skills/python-project-ai/SKILL.md`
|
|
16
|
-
5. `~/.cursor/skills/python-doc-comments/SKILL.md`
|
|
17
|
-
6. `~/.cursor/skills/agent-codegen-self-review/SKILL.md`
|
|
18
|
-
7. `.cursor/skills/ff14_the_hunt-package-design/SKILL.md`
|
|
19
|
-
8. `.cursor/skills/ff14_the_hunt-package-changelog/SKILL.md`
|
|
20
|
-
|
|
21
|
-
整库约定见仓库根 `.cursor/skills/python-library-session-manifest/SKILL.md`。
|
|
22
|
-
|
|
23
|
-
## 用过的 skill(追加记录)
|
|
24
|
-
|
|
25
|
-
(初始为空。)
|
|
1
|
+
---
|
|
2
|
+
name: ff14-the-hunt-package-preload
|
|
3
|
+
description: ff14_the_hunt 包:会话预加载;改本包源码前 Read。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ff14_the_hunt · 会话预加载
|
|
7
|
+
|
|
8
|
+
## 初始化加载(Session preload)
|
|
9
|
+
|
|
10
|
+
在 **`packages/ff14_the_hunt/`** 下改源码、测试或 `pyproject.toml` 时,按序 **Read**:
|
|
11
|
+
|
|
12
|
+
1. `~/.cursor/skills/project-skill-manifest-policy/SKILL.md`
|
|
13
|
+
2. `~/.cursor/skills/forbidden-doc-comment-vocabulary/SKILL.md`
|
|
14
|
+
3. `~/.cursor/skills/markdown-authoring-zh/SKILL.md`
|
|
15
|
+
4. `~/.cursor/skills/python-project-ai/SKILL.md`
|
|
16
|
+
5. `~/.cursor/skills/python-doc-comments/SKILL.md`
|
|
17
|
+
6. `~/.cursor/skills/agent-codegen-self-review/SKILL.md`
|
|
18
|
+
7. `.cursor/skills/ff14_the_hunt-package-design/SKILL.md`
|
|
19
|
+
8. `.cursor/skills/ff14_the_hunt-package-changelog/SKILL.md`
|
|
20
|
+
|
|
21
|
+
整库约定见仓库根 `.cursor/skills/python-library-session-manifest/SKILL.md`。
|
|
22
|
+
|
|
23
|
+
## 用过的 skill(追加记录)
|
|
24
|
+
|
|
25
|
+
(初始为空。)
|
|
@@ -66,9 +66,9 @@ example.bat
|
|
|
66
66
|
| --- | --- |
|
|
67
67
|
| `POST /api/syncSession` | 狩猎库、刷点坐标、数据中心/世界列表 |
|
|
68
68
|
| `POST /api/lastDeathTimers` | 计时行;`RankType` 为 `aRank` / `sRank` / `fate` |
|
|
69
|
-
| `POST /api/querySpawnPoints` |
|
|
69
|
+
| `POST /api/querySpawnPoints` | 刚刷新记录的非触发点认证状态(需 `LastDeath`) |
|
|
70
70
|
|
|
71
|
-
刚刷新记录才填充 ``spawn_points``、``spawn_map_layout`` 与 ``region_map``。包内不标点、不裁剪;``region_map`` 为站点 ``HuntRegions`` 原图 base64
|
|
71
|
+
刚刷新记录才填充 ``spawn_points``、``spawn_map_layout`` 与 ``region_map``。包内不标点、不裁剪;``region_map`` 为站点 ``HuntRegions`` 原图 base64。刷点仅保留未被 Sonar 或玩家认证为非触发的绿色候选点,含 ``地图X/Y``、``格点X/Y``、``像素X/Y``(按原图尺寸算好);``地图布局`` 含格点尺度与归一化公式。默认 ``include_spawn_maps=True`` 拉取原图。示例 ``python -m example`` 将 PNG 写入 ``example/output/maps/``,JSON 用 ``区域地图.地图文件`` 引用。
|
|
72
72
|
|
|
73
73
|
`QueryDeathTimers` 为世界名列表(由所选数据中心展开)。
|
|
74
74
|
|
|
@@ -7,10 +7,9 @@ from ff14_the_hunt.models import HuntMarkRecord, HuntQueryFilter
|
|
|
7
7
|
|
|
8
8
|
from ff14_the_hunt.bear_tracker.fate_timer import compute_fate_timer
|
|
9
9
|
from ff14_the_hunt.bear_tracker.resources import BearResources
|
|
10
|
-
from ff14_the_hunt.bear_tracker.spawn_window import (
|
|
11
|
-
compute_trigger_timer,
|
|
12
|
-
|
|
13
|
-
)
|
|
10
|
+
from ff14_the_hunt.bear_tracker.spawn_window import (
|
|
11
|
+
compute_trigger_timer,
|
|
12
|
+
)
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
def mark_has_display_timer(record: HuntMarkRecord) -> bool:
|
|
@@ -88,13 +87,10 @@ def build_hunt_record(
|
|
|
88
87
|
now=now,
|
|
89
88
|
)
|
|
90
89
|
|
|
91
|
-
recently =
|
|
92
|
-
if last_mark
|
|
93
|
-
if now
|
|
94
|
-
|
|
95
|
-
elif last_mark:
|
|
96
|
-
if time.time() - float(last_mark) <= recent_grace_seconds:
|
|
97
|
-
recently = True
|
|
90
|
+
recently = False
|
|
91
|
+
if last_mark:
|
|
92
|
+
reference_now = time.time() if now is None else now
|
|
93
|
+
recently = reference_now - float(last_mark) <= recent_grace_seconds
|
|
98
94
|
|
|
99
95
|
region = meta.get("Region", "")
|
|
100
96
|
return HuntMarkRecord(
|
|
@@ -40,21 +40,17 @@ def list_map_coordinates(
|
|
|
40
40
|
grid_y = float(raw[1])
|
|
41
41
|
norm_x = (grid_x - 1.0) / scale
|
|
42
42
|
norm_y = (grid_y - 1.0) / scale
|
|
43
|
-
state = None
|
|
44
|
-
if api_states
|
|
45
|
-
|
|
46
|
-
if isinstance(entry, dict):
|
|
47
|
-
state_val = entry.get("State")
|
|
48
|
-
if state_val is not None:
|
|
49
|
-
state = bool(state_val)
|
|
43
|
+
state = None
|
|
44
|
+
if api_states is not None:
|
|
45
|
+
state = key not in api_states
|
|
50
46
|
coordinates.append(
|
|
51
47
|
MapCoordinate(
|
|
52
48
|
point_key=key,
|
|
53
49
|
x=norm_x,
|
|
54
50
|
y=norm_y,
|
|
55
|
-
grid_x=grid_x,
|
|
56
|
-
grid_y=grid_y,
|
|
57
|
-
active=state,
|
|
58
|
-
)
|
|
59
|
-
)
|
|
51
|
+
grid_x=grid_x,
|
|
52
|
+
grid_y=grid_y,
|
|
53
|
+
active=state,
|
|
54
|
+
)
|
|
55
|
+
)
|
|
60
56
|
return coordinates
|
|
@@ -67,7 +67,7 @@ class FF14TheHunt:
|
|
|
67
67
|
min_wakeup_seconds: 全未开窗时睡到最近开窗的下限(秒),默认 2 分钟。
|
|
68
68
|
poll_interval_seconds: 已废弃;等同 ``fallback_poll_interval_seconds``。
|
|
69
69
|
recent_grace_seconds: 「刚刷新」宽限秒数。
|
|
70
|
-
include_spawn_states:
|
|
70
|
+
include_spawn_states: 已废弃;刚刷新记录的候选点会在补全刷点时自动查询。
|
|
71
71
|
include_spawn_maps: 为刚刷新记录拉取站点区域原图 PNG base64。
|
|
72
72
|
include_untimed_marks: 是否保留无计时的占位行(SS 级噬灵王、维护占位等)。
|
|
73
73
|
"""
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/models.py
RENAMED
|
@@ -58,7 +58,7 @@ class MapCoordinate(BaseModel):
|
|
|
58
58
|
default=None,
|
|
59
59
|
description="区域原图上的 Y 像素;norm_y * 图高",
|
|
60
60
|
)
|
|
61
|
-
active: bool | None = Field(default=None, description="
|
|
61
|
+
active: bool | None = Field(default=None, description="是否仍是可能触发点位")
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
class SpawnMapLayout(BaseModel):
|
|
@@ -127,7 +127,7 @@ class HuntMarkRecord(BaseModel):
|
|
|
127
127
|
fate_timer: TimerDisplay | None = None
|
|
128
128
|
spawn_points: list[MapCoordinate] = Field(
|
|
129
129
|
default_factory=list,
|
|
130
|
-
description="
|
|
130
|
+
description="仅刚刷新记录填充;只保留可能触发点位",
|
|
131
131
|
)
|
|
132
132
|
spawn_map_layout: SpawnMapLayout | None = Field(
|
|
133
133
|
default=None,
|
|
@@ -3,12 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
from ff14_the_hunt.models import MapCoordinate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
def select_display_spawn_points(points: list[MapCoordinate]) -> list[MapCoordinate]:
|
|
7
|
-
"""
|
|
6
|
+
def select_display_spawn_points(points: list[MapCoordinate]) -> list[MapCoordinate]:
|
|
7
|
+
"""刚刷新记录上只展示仍可能触发的绿色候选点。"""
|
|
8
8
|
active = [point for point in points if point.active is True]
|
|
9
|
-
|
|
10
|
-
return active
|
|
11
|
-
return list(points)
|
|
9
|
+
return active
|
|
12
10
|
|
|
13
11
|
|
|
14
12
|
def resolve_region_name(region: str | list[str]) -> str:
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from ff14_the_hunt.bear_tracker.enrich import build_hunt_record
|
|
2
|
+
from ff14_the_hunt.bear_tracker.resources import BearResources
|
|
3
|
+
from ff14_the_hunt.models import HuntQueryFilter
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
_RESOURCES = BearResources(
|
|
7
|
+
{
|
|
8
|
+
"DatabaseHunt": {
|
|
9
|
+
"Sansheya": {
|
|
10
|
+
"Patch": "DT",
|
|
11
|
+
"Region": "Shaaloani",
|
|
12
|
+
"Rank": 3,
|
|
13
|
+
"RespawnTimer": [46.0, 2.0],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
"SpawnPoint": {},
|
|
17
|
+
"DataCenters": {},
|
|
18
|
+
},
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _row(**overrides) -> dict:
|
|
23
|
+
row = {
|
|
24
|
+
"huntKey": "Sansheya",
|
|
25
|
+
"huntName": "Sansheya",
|
|
26
|
+
"worldName": "Test",
|
|
27
|
+
"isMaint": False,
|
|
28
|
+
"lastDeathTime": 1_000_000.0,
|
|
29
|
+
}
|
|
30
|
+
row.update(overrides)
|
|
31
|
+
return row
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_open_window_without_last_mark_is_not_recently_spawned() -> None:
|
|
35
|
+
record = build_hunt_record(
|
|
36
|
+
timer_row=_row(),
|
|
37
|
+
resources=_RESOURCES,
|
|
38
|
+
query=HuntQueryFilter(),
|
|
39
|
+
now=1_000_000.0 + 46 * 3600 + 60,
|
|
40
|
+
recent_grace_seconds=900.0,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
assert record is not None
|
|
44
|
+
assert record.trigger_timer is not None
|
|
45
|
+
assert record.recently_spawned is False
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def test_recent_last_mark_is_recently_spawned() -> None:
|
|
49
|
+
now = 1_000_000.0 + 46 * 3600 + 60
|
|
50
|
+
record = build_hunt_record(
|
|
51
|
+
timer_row=_row(lastMarkTime=now - 30),
|
|
52
|
+
resources=_RESOURCES,
|
|
53
|
+
query=HuntQueryFilter(),
|
|
54
|
+
now=now,
|
|
55
|
+
recent_grace_seconds=900.0,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
assert record is not None
|
|
59
|
+
assert record.recently_spawned is True
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from ff14_the_hunt.models import MapCoordinate
|
|
2
|
+
from ff14_the_hunt.bear_tracker.spawn_points import list_map_coordinates
|
|
3
|
+
from ff14_the_hunt.spawn_map.points import select_display_spawn_points
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_select_display_spawn_points_keeps_only_possible_points() -> None:
|
|
7
|
+
points = [
|
|
8
|
+
MapCoordinate(point_key="SpawnPoint01", x=0.1, y=0.2, active=False),
|
|
9
|
+
MapCoordinate(point_key="SpawnPoint02", x=0.3, y=0.4, active=True),
|
|
10
|
+
]
|
|
11
|
+
selected = select_display_spawn_points(points)
|
|
12
|
+
assert len(selected) == 1
|
|
13
|
+
assert selected[0].point_key == "SpawnPoint02"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_select_display_spawn_points_does_not_fallback_to_excluded_points() -> None:
|
|
17
|
+
points = [
|
|
18
|
+
MapCoordinate(point_key="SpawnPoint01", x=0.1, y=0.2, active=None),
|
|
19
|
+
MapCoordinate(point_key="SpawnPoint02", x=0.3, y=0.4, active=False),
|
|
20
|
+
]
|
|
21
|
+
selected = select_display_spawn_points(points)
|
|
22
|
+
assert selected == []
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_list_map_coordinates_marks_unreported_points_as_possible() -> None:
|
|
26
|
+
points = list_map_coordinates(
|
|
27
|
+
{
|
|
28
|
+
"Dimensions": [41, 41],
|
|
29
|
+
"DisplayPoints": 3,
|
|
30
|
+
"SpawnPoint01": [1, 1],
|
|
31
|
+
"SpawnPoint02": [2, 2],
|
|
32
|
+
"SpawnPoint03": [3, 3],
|
|
33
|
+
},
|
|
34
|
+
api_states={
|
|
35
|
+
"SpawnPoint01": {"State": True, "Verified": True},
|
|
36
|
+
"SpawnPoint02": {"State": False, "Verified": True},
|
|
37
|
+
},
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
assert [(point.point_key, point.active) for point in points] == [
|
|
41
|
+
("SpawnPoint01", False),
|
|
42
|
+
("SpawnPoint02", False),
|
|
43
|
+
("SpawnPoint03", True),
|
|
44
|
+
]
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
from ff14_the_hunt.models import MapCoordinate
|
|
2
|
-
from ff14_the_hunt.spawn_map.points import select_display_spawn_points
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_select_display_spawn_points_prefers_active() -> None:
|
|
6
|
-
points = [
|
|
7
|
-
MapCoordinate(point_key="SpawnPoint01", x=0.1, y=0.2, active=False),
|
|
8
|
-
MapCoordinate(point_key="SpawnPoint02", x=0.3, y=0.4, active=True),
|
|
9
|
-
]
|
|
10
|
-
selected = select_display_spawn_points(points)
|
|
11
|
-
assert len(selected) == 1
|
|
12
|
-
assert selected[0].point_key == "SpawnPoint02"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def test_select_display_spawn_points_keeps_all_when_no_active() -> None:
|
|
16
|
-
points = [
|
|
17
|
-
MapCoordinate(point_key="SpawnPoint01", x=0.1, y=0.2, active=None),
|
|
18
|
-
MapCoordinate(point_key="SpawnPoint02", x=0.3, y=0.4, active=False),
|
|
19
|
-
]
|
|
20
|
-
selected = select_display_spawn_points(points)
|
|
21
|
-
assert len(selected) == 2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/example/__main__.py
RENAMED
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/example/spawn_map_io.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/locale/en.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/ff14_the_hunt/poll/loop.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_fate_timer.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_locale_cn.py
RENAMED
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_monitor_mode.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_poll_sleep.py
RENAMED
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_spawn_dedup.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tests/test_spawn_window.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_library_ff14_the_hunt-0.0.6 → python_library_ff14_the_hunt-0.0.7}/tools/build_locale_data.py
RENAMED
|
File without changes
|
|
File without changes
|