Don't let designer change or delete the pit/barrier terrain

This commit is contained in:
2025-05-19 18:46:46 -05:00
parent 1bfc435499
commit 946a396343

View File

@@ -1280,6 +1280,10 @@ static bool handle_terpal_action(location cur_point, bool option_hit) {
short size_before = scenario.ter_types.size(), pos_before = pal_sbar->getPosition();
i += pos_before * 16;
if(i > size_before) return true;
if(i == 90){
showWarning("The pit/barrier terrain cannot be changed.");
return true;
}
if(option_hit) {
if(i == size_before - 1 && !scenario.is_ter_used(i))
scenario.ter_types.pop_back();