-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Mortars #79303
base: master
Are you sure you want to change the base?
Mortars #79303
Conversation
Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details. Click to expand
This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to Hints for adding a new word to the dictionary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope you are accepting reviews right now - just a few things I noticed.
src/iexamine_actors.h
Outdated
std::map<int, int> booster_ranges; | ||
std::function<bool( const_dialogue const & )> condition; | ||
bool has_condition = false; | ||
std::string condition_fail_msg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is probably better to use a translation than a raw string. It also is not extracted for translation (lang/string_extractor).
std::string condition_fail_msg; | |
translation condition_fail_msg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff --git a/lang/string_extractor/parsers/examine_action.py b/lang/string_extractor/parsers/examine_action.py
index 3e62ed3856..a689961d39 100644
--- a/lang/string_extractor/parsers/examine_action.py
+++ b/lang/string_extractor/parsers/examine_action.py
@@ -3,17 +3,20 @@ from .effect import parse_effect_on_condition
def parse_examine_action(json, origin, name):
+ ename="{}'s examine action".format(name)
if "query_msg" in json:
write_text(json["query_msg"], origin,
- comment="Query message of {}".format(name))
+ comment="Query message for {}".format(ename))
if "success_msg" in json:
write_text(json["success_msg"], origin,
- comment="Success message of {}".format(name))
+ comment="Message when {} succeeds".format(ename))
if "redundant_msg" in json:
write_text(json["redundant_msg"], origin,
- comment="Redundant message of {}".format(name))
+ comment="Message when {} would be redundant".format(ename))
+ if "condition_fail_msg" in json:
+ write_text(json["condition_fail_msg"], origin,
+ comment="Message when {} fails its condition".format(ename))
if "effect_on_conditions" in json:
for eoc in json["effect_on_conditions"]:
if type(eoc) is dict:
- parse_effect_on_condition(eoc, origin,
- "examine action of {}".format(name))
+ parse_effect_on_condition(eoc, origin, ename)
Adding the condition_fail_msg translation extraction and improving existing translation comments to make it more obvious what they relate to (longest line is 79 characters which is exactly the cap so hopefully flake8 is chill with the change)
Summary
Content "Mortar. Like, the real one"
Purpose of change
I can
Describe the solution
TBD
Testing
TBD
Additional context
Draft because of #79291 (comment)