Skip to content

Commit 51d3cfb

Browse files
Add config option to include drop fixes (#313)
* add config option to include drop fixes easier * amend comment and rename fix directories * check for 1013 before applying 1013 fixes
1 parent 8df263a commit 51d3cfb

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

config.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ motd=Welcome to OpenFusion!
4747
# requires to run. You can override them by changing their values and
4848
# uncommenting them (removing the leading # character from that line).
4949

50+
# Should drop fixes be enabled?
51+
# This will add drops to (mostly Academy-specific) mobs that don't have drops
52+
# and rearrange drop tables that are either unassigned or stranded in difficult to reach mobs
53+
# e.g. Hyper Fusionfly and Fusion Numbuh Four drops will become more accessible.
54+
# This is a polish option that is slightly inauthentic to the original game.
55+
#dropfixesenabled=true
56+
5057
# location of the tabledata folder
5158
#tdatadir=tdata/
5259
# location of the patch folder

src/settings.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ int settings::EVENTMODE = 0;
7474
// race settings
7575
bool settings::IZRACESCORECAPPED = true;
7676

77+
// drop fixes enabled
78+
bool settings::DROPFIXESENABLED = false;
79+
7780
void settings::init() {
7881
INIReader reader("config.ini");
7982

@@ -117,6 +120,7 @@ void settings::init() {
117120
TDATADIR = reader.Get("shard", "tdatadir", TDATADIR);
118121
PATCHDIR = reader.Get("shard", "patchdir", PATCHDIR);
119122
ENABLEDPATCHES = reader.Get("shard", "enabledpatches", ENABLEDPATCHES);
123+
DROPFIXESENABLED = reader.GetBoolean("shard", "dropfixesenabled", DROPFIXESENABLED);
120124
ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL);
121125
EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE);
122126
DISABLEFIRSTUSEFLAG = reader.GetBoolean("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG);
@@ -126,4 +130,16 @@ void settings::init() {
126130
MONITORPORT = reader.GetInteger("monitor", "port", MONITORPORT);
127131
MONITORLISTENIP = reader.Get("monitor", "listenip", MONITORLISTENIP);
128132
MONITORINTERVAL = reader.GetInteger("monitor", "interval", MONITORINTERVAL);
133+
134+
if (DROPFIXESENABLED) {
135+
std::cout << "[INFO] Drop fixes enabled" << std::endl;
136+
if (ENABLEDPATCHES.empty()) {
137+
ENABLEDPATCHES = "0104-fixes";
138+
} else {
139+
ENABLEDPATCHES += " 0104-fixes";
140+
if (ENABLEDPATCHES.find("1013") != std::string::npos) {
141+
ENABLEDPATCHES += " 1013-fixes";
142+
}
143+
}
144+
}
129145
}

src/settings.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ namespace settings {
4545
extern int MONITORINTERVAL;
4646
extern bool DISABLEFIRSTUSEFLAG;
4747
extern bool IZRACESCORECAPPED;
48+
extern bool DROPFIXESENABLED;
4849

4950
void init();
5051
}

0 commit comments

Comments
 (0)