Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #71338 #73841

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions lang/string_extractor/parsers/trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@


def parse_trap(json, origin):
write_text(json["name"], origin, comment="Name of a trap")
name = json["name"]
write_text(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(json["name"]))
.format(name))

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

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

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