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

Add leather addon #1720

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Conversation

ottml
Copy link
Contributor

@ottml ottml commented Dec 1, 2024

Fixes #1711

Copy link
Member

@Flamefire Flamefire left a 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

libs/s25main/Loader.cpp Outdated Show resolved Hide resolved
@@ -512,6 +521,9 @@ bool Loader::LoadFilesAtGame(const std::string& mapGfxPath, bool isWinterGFX, co
if(!LoadResources({"wine_bobs"}))
return false;

if(!LoadResources({"leather_bobs"}))
Copy link
Member

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?

libs/s25main/Loader.cpp Outdated Show resolved Hide resolved
libs/s25main/SerializedGameData.cpp Show resolved Hide resolved
libs/s25main/desktops/dskCredits.cpp Outdated Show resolved Hide resolved
@@ -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));
Copy link
Member

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

libs/s25main/figures/nofLeatherWorker.h Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/iwBuildings.cpp Outdated Show resolved Hide resolved
libs/s25main/ingameWindows/iwShip.cpp Outdated Show resolved Hide resolved
// Leatherworks building
gettext_noop("The leatherworker makes armor from finely "
"tanned leather. This is used to bolster "
"your soldiers' defence."),
Copy link

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Addon: Leather Economy (new buildings/jobs/wares)
3 participants