mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-23 00:54:47 +00:00
Add a setting to disable the warning before killing a friendly monster
This commit is contained in:
@@ -3522,6 +3522,9 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
|
||||
->set_sets([] { dialog::bound_low(1); })
|
||||
->set_reaction([] { if(game_active) { stop_game(); start_game(); } });
|
||||
|
||||
param_enum(warn_before_killing_friends, "warn_before_killing_friends", 2)
|
||||
->editable({{"OFF", "never warn"}, {"TAME_BOMBERBIRDS", "warn only for Tame Bomberbirds"}, {"ON", "always warn"}}, "warn before killing friendly monsters", 'W');
|
||||
|
||||
param_i(curse_percentage, "curse_percentage")->editable(0, 100, 1,
|
||||
"curse percentage",
|
||||
"The percentage of towers in Cursed Walls mode to be manned by Canyon Hags", 'R')
|
||||
|
||||
@@ -1474,7 +1474,10 @@ EX bool warningprotection(const string& s) {
|
||||
return true;
|
||||
}
|
||||
|
||||
EX int warn_before_killing_friends;
|
||||
|
||||
EX bool warningprotection_hit(eMonster m) {
|
||||
if(warn_before_killing_friends < (m == moTameBomberbird ? 1 : 2)) return false;
|
||||
if(m && warningprotection(XLAT("Are you sure you want to hit %the1?", m)))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user