Require cb_ prefix for plans

This commit is contained in:
2021-12-28 14:07:15 -05:00
parent 2e543984e6
commit 3b9dc2c495
4 changed files with 20 additions and 21 deletions

View File

@@ -529,6 +529,11 @@ void World::invoke_plan(int64_t actor_id, int64_t place_id, const std::string &a
return;
}
// Make sure the action starts with "cb_"
if (!util::has_prefix(action, "cb_")) {
return;
}
// Get the actor and place. Make sure both exist.
Tangible *tactor = tangible_get(actor_id);
Tangible *tplace = tangible_get(place_id);