1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

config:: hooks for extending the config file, added asonov/nilv settings

This commit is contained in:
Zeno Rogue 2019-11-16 01:39:58 +01:00
parent 90c0260d5f
commit cba1408021

View File

@ -108,6 +108,11 @@ template<> struct saver<ld> : dsaver<ld> {
#endif
EX void addparam(ld& val, const string s) {
addsaver(val, s);
params.emplace(s, val);
}
EX ld bounded_mine_percentage = 0.1;
EX int bounded_mine_quantity, bounded_mine_max;
@ -252,6 +257,8 @@ EX void savecolortable(colortable& ct, string name) {
addsaver(ct[i], "color:" + name + ":" + its(i));
}
EX purehookset hooks_configfile;
EX void initConfig() {
// basic config
@ -609,6 +616,14 @@ EX void initConfig() {
multi::initConfig();
#endif
addsaver(asonov::period_xy, "asonov:period_xy");
addsaver(asonov::period_z, "asonov:period_z");
addsaver(nilv::nilperiod[0], "nilperiod_x");
addsaver(nilv::nilperiod[1], "nilperiod_y");
addsaver(nilv::nilperiod[2], "nilperiod_z");
callhooks(hooks_configfile);
#if CAP_CONFIG
for(auto s: savers) s->reset();
#endif