-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add leather addon #1720
base: master
Are you sure you want to change the base?
Add leather addon #1720
Conversation
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.
Thanks for working on this! I added some inline notes
@@ -512,6 +521,9 @@ bool Loader::LoadFilesAtGame(const std::string& mapGfxPath, bool isWinterGFX, co | |||
if(!LoadResources({"wine_bobs"})) | |||
return false; | |||
|
|||
if(!LoadResources({"leather_bobs"})) |
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.
Is it possible to condition those on the enabled addons? Feels wasteful but maybe the remaining code can't handle those to not be present?
The idea was also to integrate those with the "regular" files and have them be loaded automatically if the addon is enable (see the above TODO and initResourceFolders
(addon argument)). Do you see any sensible archive for that?
@@ -179,6 +182,15 @@ std::unique_ptr<noFigure> JobFactory::CreateJob(const Job job_id, const MapPoint | |||
case Job::TempleServant: | |||
RTTR_Assert(dynamic_cast<nobUsual*>(goal)); | |||
return std::make_unique<nofTempleServant>(pt, player, static_cast<nobUsual*>(goal)); | |||
case Job::Skinner: | |||
RTTR_Assert(dynamic_cast<nobUsual*>(goal)); |
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.
all that C&P...
Maybe a function for the assert-dynamic_cast-then-static_cast would be useful? Can't think of a good name though
// Leatherworks building | ||
gettext_noop("The leatherworker makes armor from finely " | ||
"tanned leather. This is used to bolster " | ||
"your soldiers' defence."), |
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 realised in the military menu they have "defense" for strong defense so we should probably spell it the American way for consistency. Wondering if it is worth having an extra part below explaining the benefits of armor as well.
So maybe we could go with:
"The leatherworker crafts armor from finely tanned leather. The armor is then transported to military buildings to bolster your soldiers' defense.
A soldier wearing armor can withstand an additional hit in battle, but the armor is lost once struck. When every soldier in a military building is armored, they can sometimes survive a catapult strike."
…ly died our died by the hunter)
…s for coins - Order, upgrade, enable/disable - Add armor member to nofSoldier, reduce first armor before hitpoints
- refactor gui to handle adding new stuff more easily
… save game and replays
…t by a catapult (losing his armor)
Fixes #1711