-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix for text describing the FACTION command, in the presence of MARTIAL #157
Fix for text describing the FACTION command, in the presence of MARTIAL #157
Conversation
…L (merged WAR and TRADE) faction type
snapshot failed, can you please update it |
f << enclose(class_tag("div", "rule"), true) << '\n' << enclose("div", false); | ||
f << anchor("faction") << '\n'; | ||
|
||
const bool martial_faction = Globals->FACTION_ACTIVITY == FactionActivityRules::MARTIAL_MERGED; |
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 looks like this test is slightly wrong as it's resulting in the neworigins code generating rules which reference war/trade/magic rather than martial/magic.
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.
you need to add parens around the (Globals->FACTION_ACTIIVITY == )..
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.
Ugh.. I'm an idiot.. the code is correct.. the snapshot test is diffing backwards which led me to read it wrong.. I will fix that in one of my upcoming commits.. Regardless you need to regenerate the rules snapshots and include them as part of the diff in order to allow the tests to pass.
<< example_end(); | ||
|
||
if (martial_faction) | ||
{ |
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 strongly dislike having open braces on new lines. it's just a waste of space and does not (imho) improve readability of the code.. please use
if (condition) {
} else {
}
:)
I am pulling this into an upcoming merge which will clean up/complete a bunch of other PRs (this is being merged into my working branch for that and this PR closed) |
c1d6d72
into
Atlantis-PBEM:jt-cleanup-various-prs
Changes are in PR #186 |
No description provided.