Skip to content

Commit

Permalink
#56 根据 1224910892 反馈调整部分路线;增加路线作者署名
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorReid committed Oct 26, 2023
1 parent 2ef6e5e commit 8091d1c
Show file tree
Hide file tree
Showing 45 changed files with 100 additions and 11 deletions.
1 change: 1 addition & 0 deletions config/world_patrol/P01_KJZHT/R02_JZCD_R01_JKS.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '空间站黑塔'
region: '基座舱段'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P01_KJZHT/R03_SRCD_R01_HMZL.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '空间站黑塔'
region: '收容舱段'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P01_KJZHT/R03_SRCD_R02_KZZXW.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '空间站黑塔'
region: '收容舱段'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P01_KJZHT/R03_SRCD_R03_ZT.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '空间站黑塔'
region: '收容舱段'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P01_KJZHT/R04_ZYCD_R01_DLS.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '空间站黑塔'
region: '支援舱段'
level: 2
Expand Down
7 changes: 5 additions & 2 deletions config/world_patrol/P01_KJZHT/R04_ZYCD_R02_CHZL.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
author: ['DoctorReid', '1224910892']
planet: '空间站黑塔'
region: '支援舱段'
level: 2
tp: '存护之蕾'
route:
- op: 'move'
data: [500, 388]
data: [473, 388]
- op: 'move'
data: [503, 388]
- op: 'interact'
data: '配控装置'
- op: 'wait'
data: 'in_world'
- op: 'update_pos'
data: [500, 388, 1]
data: [503, 388, 1]
- op: 'move'
data: [482, 274]
- op: 'patrol'
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R02_CJXY_R01_HYZL.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '城郊雪原'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R03_BYTL_R01_GDJZ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '边缘通路'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R05_CXHL_R01_ZCLY.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '残响回廊'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R05_CXHL_R02_MLZX.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '残响回廊'
level: 0
Expand Down
3 changes: 3 additions & 0 deletions config/world_patrol/P02_YLL6/R05_CXHL_R03_MLZX_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '雅利洛'
region: '残响回廊'
level: 0
Expand All @@ -18,4 +19,6 @@ route:
data: [740, 627]
- op: 'move'
data: [718, 647]
- op: 'move'
data: [697, 663]
- op: 'patrol'
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R05_CXHL_R04_ZZZHS.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '残响回廊'
level: 0
Expand Down
4 changes: 3 additions & 1 deletion config/world_patrol/P02_YLL6/R05_CXHL_R05_GZCQX.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '雅利洛'
region: '残响回廊'
level: 0
Expand All @@ -7,6 +8,7 @@ route:
data: [490, 1232]
- op: 'move'
data: [488, 1176]
- op: 'patrol'
- op: 'move'
data: [373, 1176]
- op: 'patrol'
Expand All @@ -15,5 +17,5 @@ route:
- op: 'move'
data: [265, 1190]
- op: 'move'
data: [270, 1280]
data: [265, 1320]
- op: 'patrol'
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R06_YDL_R01_GZC.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '永冬岭'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R06_YDL_R02_RZZJ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '永冬岭'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R10_DKQ_R01_FMZX.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '大矿区'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R10_DKQ_R02_FKD.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '大矿区'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R11_MDZ_R01_GEY.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '铆钉镇'
level: 1
Expand Down
4 changes: 4 additions & 0 deletions config/world_patrol/P02_YLL6/R11_MDZ_R02_XFZX.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '雅利洛'
region: '铆钉镇'
level: 1
Expand All @@ -15,3 +16,6 @@ route:
- op: 'move'
data: [732, 479]
- op: 'patrol'
- op: 'move'
data: [733, 515]
- op: 'patrol'
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R11_MDZ_R03_FQSJ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '铆钉镇'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P02_YLL6/R12_JXJL_R01_TXZL.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '雅利洛'
region: '机械聚落'
level: 1
Expand Down
3 changes: 3 additions & 0 deletions config/world_patrol/P03_XZLF/R02_LYD_R01_JYF.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '仙舟罗浮'
region: '流云渡'
level: 1
Expand All @@ -11,4 +12,6 @@ route:
data: [597, 661, 2]
- op: 'move'
data: [555, 660]
- op: 'move'
data: [539, 676]
- op: 'patrol'
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R02_LYD_R02_JYF_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '流云渡'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R02_LYD_R03_JYF_3.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '流云渡'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R03_HXG_R01_FXXZ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '廻星港'
level: 2
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R03_HXG_R02_ZCQMJ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '廻星港'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R03_HXG_R03_ZCQMJ_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '廻星港'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R03_HXG_R04_ZCQMJ_3.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '廻星港'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R06_TBS_R01_JHZ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '太卜司'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R06_TBS_R02_JHZ_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '太卜司'
level: 1
Expand Down
9 changes: 8 additions & 1 deletion config/world_patrol/P03_XZLF/R06_TBS_R03_XT.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '仙舟罗浮'
region: '太卜司'
level: 2
Expand Down Expand Up @@ -31,7 +32,13 @@ route:
data: [565, 918]
- op: 'patrol'
- op: 'move'
data: [495, 918]
data: [573, 885]
- op: 'move'
data: [572, 842]
- op: 'move'
data: [535, 841]
- op: 'move'
data: [493, 841]
- op: 'move'
data: [490, 882]
- op: 'move'
Expand Down
4 changes: 4 additions & 0 deletions config/world_patrol/P03_XZLF/R07_GZS_R01_RJFTD.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '仙舟罗浮'
region: '工造司'
level: 0
Expand Down Expand Up @@ -74,3 +75,6 @@ route:
- op: 'move'
data: [343, 392]
- op: 'patrol'
- op: 'move'
data: [346, 427]
- op: 'patrol'
4 changes: 4 additions & 0 deletions config/world_patrol/P03_XZLF/R07_GZS_R02_GWYTD.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '仙舟罗浮'
region: '工造司'
level: 0
Expand Down Expand Up @@ -40,3 +41,6 @@ route:
- op: 'move'
data: [426, 1210]
- op: 'patrol'
- op: 'move'
data: [449, 1217]
- op: 'patrol'
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R07_GZS_R03_ZHHL.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '工造司'
level: 0
Expand Down
9 changes: 8 additions & 1 deletion config/world_patrol/P03_XZLF/R08_DDS_R01_TZDS.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid', '1224910892']
planet: '仙舟罗浮'
region: '丹鼎司'
level: 1
Expand Down Expand Up @@ -27,7 +28,13 @@ route:
- op: 'move'
data: [292, 444]
- op: 'move'
data: [313, 427]
data: [267, 444]
- op: 'move'
data: [269, 413]
- op: 'move'
data: [305, 411]
- op: 'move'
data: [311, 430]
- op: 'patrol'
- op: 'move'
data: [380, 430]
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R08_DDS_R02_GYT.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '丹鼎司'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R08_DDS_R03_GYT_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '丹鼎司'
level: 1
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R08_DDS_R04_YSZJ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '丹鼎司'
level: 2
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R08_DDS_R05_XYSJ.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '丹鼎司'
level: 2
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R09_LYJ_R01_NSZX.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '鳞渊境'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R09_LYJ_R02_GXSC.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '鳞渊境'
level: 0
Expand Down
1 change: 1 addition & 0 deletions config/world_patrol/P03_XZLF/R09_LYJ_R03_GHGX.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
author: ['DoctorReid']
planet: '仙舟罗浮'
region: '鳞渊境'
level: 0
Expand Down
17 changes: 16 additions & 1 deletion src/gui/world_patrol_draft_route_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from basic import config_utils, os_utils
from basic.img import cv2_utils
from basic.img.os import get_debug_world_patrol_dir
from basic.log_utils import log
from sr.app.world_patrol import load_all_route_id, WorldPatrolRoute, WorldPatrol, WorldPatrolRouteId
from sr.constants.map import Planet, get_planet_by_cn, PLANET_LIST, PLANET_2_REGION, get_region_by_cn, Region, \
Expand All @@ -24,6 +23,12 @@ def __init__(self, page: ft.Page, ctx: Context):
self.page = page
self.ctx = ctx

self.author_text = ft.TextField(label='作者署名', width=200, value='DoctorReid')
author_row = ft.Row(spacing=10, controls=[
self.author_text,
ft.Text(value='留下您的大名可以让大家知道您的贡献,匿名提供也替大家谢谢您')
])

self.route_id_list: List[WorldPatrolRouteId] = None
self.existed_route_dropdown = ft.Dropdown(
label='编辑已有路线',
Expand Down Expand Up @@ -84,6 +89,7 @@ def __init__(self, page: ft.Page, ctx: Context):

display_part = ft.Column(
controls=[
ft.Container(content=author_row, padding=20),
ft.Container(content=load_existed_row, padding=20),
ft.Container(content=choose_row, padding=20),
ft.Container(content=ctrl_row, padding=20),
Expand All @@ -103,6 +109,7 @@ def __init__(self, page: ft.Page, ctx: Context):
]
)

self.author_list: List[str] = [self.author_text.value]
self.route_list: List = []
self.chosen_planet: Planet = None
self.chosen_region: Region = None
Expand Down Expand Up @@ -244,6 +251,9 @@ def on_map_click(self, e):
x = int(e.local_x / scale)
y = int(e.local_y / scale)

if x > original_width or y > original_height:
return

self.route_list.append({'op': 'move', 'data': (x, y, int(self.switch_level.value))})
self.draw_route_and_display()

Expand All @@ -267,6 +277,10 @@ def get_route_config_str(self) -> str:
if self.chosen_sp is None:
return
last_level = int(self.level_dropdown.value)
display_auth_list = self.author_list.copy()
if self.author_text.value not in display_auth_list:
display_auth_list.append(self.author_text.value)
cfg += "author: %s\n" % display_auth_list
cfg += "planet: '%s'\n" % self.chosen_planet.cn
cfg += "region: '%s'\n" % self.chosen_region.cn
cfg += "level: %d\n" % last_level
Expand Down Expand Up @@ -382,6 +396,7 @@ def on_existed_route_changed(self, e):
self.tp_dropdown.value = route.tp.cn
self.chosen_sp = route.tp

self.author_list = route.author_list
self.route_list = route.route_list
self.init_route_list_from_outer_data()
self.draw_route_and_display()
Expand Down
5 changes: 4 additions & 1 deletion src/sr/app/world_patrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def file_path(self):
class WorldPatrolRoute(ConfigHolder):

def __init__(self, route_id: WorldPatrolRouteId):
self.author_list: List[str] = None
self.tp: TransportPoint = None
self.route_list: List = None
self.route_id: WorldPatrolRouteId = route_id
Expand All @@ -85,7 +86,8 @@ def __init__(self, route_id: WorldPatrolRouteId):
def init(self):
self.init_from_data(**self.data)

def init_from_data(self, planet: str, region: str, tp: str, level: int, route: List):
def init_from_data(self, author: List[str], planet: str, region: str, tp: str, level: int, route: List):
self.author_list = author
self.tp: TransportPoint = constants.map.get_sp_by_cn(planet, region, level, tp)
self.route_list = route

Expand Down Expand Up @@ -174,6 +176,7 @@ def run_one_route(self, route_id: WorldPatrolRouteId) -> bool:
"""
route: WorldPatrolRoute = WorldPatrolRoute(route_id)
log.info('准备执行线路 %s %s %s %s', route_id, route.tp.planet.cn, route.tp.region.cn, route.tp.cn)
log.info('感谢以下人员提供本路线 %s', route.author_list)
if self.record is not None and route_id.display_name in self.record.finished:
log.info('线路 %s 之前已执行 跳过', route_id.display_name)
return False
Expand Down
Loading

0 comments on commit 8091d1c

Please sign in to comment.