改写战斗中替换group的逻辑
This commit is contained in:
commit
7f89eb0db8
3890 changed files with 82290 additions and 0 deletions
18
extract_scene.py
Normal file
18
extract_scene.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from mower.data import scene_list
|
||||
|
||||
scene_class = "class Scene:"
|
||||
scene_comment = "SceneComment = {"
|
||||
|
||||
|
||||
for scene, data in scene_list.items():
|
||||
id = int(scene)
|
||||
label = data["label"]
|
||||
comment = data["comment"]
|
||||
scene_class += f'\n {label} = {id}\n "{comment}"'
|
||||
scene_comment += f'\n {id}: "{comment}",'
|
||||
|
||||
scene_comment += "\n}"
|
||||
code = scene_class + "\n\n\n" + scene_comment + "\n"
|
||||
|
||||
with open("./mower/utils/scene.py", "w", encoding="utf-8") as f:
|
||||
f.write(code)
|
Loading…
Add table
Add a link
Reference in a new issue