Skip to content

Commit

Permalink
Remove string extractors expectation for traps name not to be copied
Browse files Browse the repository at this point in the history
  • Loading branch information
Procyonae committed Oct 30, 2024
1 parent a4a752f commit 61e48e8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lang/string_extractor/parsers/trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@


def parse_trap(json, origin):
name = json["name"]
write_text(name, origin, comment="Name of a trap")
id = json["id"]

if "name" in json:
write_text(json["name"], origin, comment="Name of a trap")
if "vehicle_data" in json and "sound" in json["vehicle_data"]:
write_text(json["vehicle_data"]["sound"], origin,
comment="Trap-vehicle collision message for trap '{}'"
.format(name))
.format(id))

for key in ["memorial_male", "memorial_female"]:
if key in json:
write_text(json[key], origin,
comment="Memorial message of trap \"{}\"".format(name))
comment="Memorial message of trap \"{}\"".format(id))

if "trigger_message_u" in json:
write_text(json["trigger_message_u"], origin,
comment="Message when player triggers trap \"{}\""
.format(name))
.format(id))

if "trigger_message_npc" in json:
write_text(json["trigger_message_npc"], origin,
comment="Message when NPC triggers trap \"{}\""
.format(name))
.format(id))

0 comments on commit 61e48e8

Please sign in to comment.