Don't let designer change or delete the pit/barrier terrain
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user