Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ motd=Welcome to OpenFusion!
# requires to run. You can override them by changing their values and
# uncommenting them (removing the leading # character from that line).

# should drop fixes be enabled?
# this includes changes that fix stuff like Fusionfly and Freakosaurus Rex drops
# and also fix Academy-specific mobs with no drops
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would re-word this to clarify what exactly "fix" means. Something like: "This adds drops to mobs that previously didn't have any or drops that weren't in the drop table. This is polish that is slightly inauthentic to the original game."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much clearer, thanks!

#dropfixesenabled=true

# location of the tabledata folder
#tdatadir=tdata/
# location of the patch folder
Expand Down
13 changes: 13 additions & 0 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ int settings::EVENTMODE = 0;
// race settings
bool settings::IZRACESCORECAPPED = true;

// drop fixes enabled
bool settings::DROPFIXESENABLED = false;

void settings::init() {
INIReader reader("config.ini");

Expand Down Expand Up @@ -117,6 +120,7 @@ void settings::init() {
TDATADIR = reader.Get("shard", "tdatadir", TDATADIR);
PATCHDIR = reader.Get("shard", "patchdir", PATCHDIR);
ENABLEDPATCHES = reader.Get("shard", "enabledpatches", ENABLEDPATCHES);
DROPFIXESENABLED = reader.GetBoolean("shard", "dropfixesenabled", DROPFIXESENABLED);
ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL);
EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE);
DISABLEFIRSTUSEFLAG = reader.GetBoolean("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG);
Expand All @@ -126,4 +130,13 @@ void settings::init() {
MONITORPORT = reader.GetInteger("monitor", "port", MONITORPORT);
MONITORLISTENIP = reader.Get("monitor", "listenip", MONITORLISTENIP);
MONITORINTERVAL = reader.GetInteger("monitor", "interval", MONITORINTERVAL);

if (DROPFIXESENABLED) {
std::cout << "[INFO] Drop fixes enabled" << std::endl;
if (ENABLEDPATCHES.empty()) {
ENABLEDPATCHES = "0104-fix";
} else {
ENABLEDPATCHES += " 0104-fix 1013-fix";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would rename these to 0104-fixes to make it extra clear that this is a plurality of miscellaneous adjustments; especially if we keep adding to these patches in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, makes sense.

}
}
}
1 change: 1 addition & 0 deletions src/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace settings {
extern int MONITORINTERVAL;
extern bool DISABLEFIRSTUSEFLAG;
extern bool IZRACESCORECAPPED;
extern bool DROPFIXESENABLED;

void init();
}