forked from townforge/townforge
cc: prevent more than one enable clause per choice
This commit is contained in:
parent
780435ab3e
commit
1eeb66ed57
@ -501,6 +501,11 @@ void set_partial_state_choice_enabled(script_partial_state_t *state)
|
||||
tfscript_error("Choice condition requires at least one condition");
|
||||
return;
|
||||
}
|
||||
if (!state->choice.enabled.empty())
|
||||
{
|
||||
tfscript_error("There must not be more than one choice condition");
|
||||
return;
|
||||
}
|
||||
auto &c = state->expressions.back();
|
||||
state->choice.enabled.push_back(std::move(c));
|
||||
state->expressions.pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user