Remove built-in stop and done events
Events are plain again: no built-in names offered, locked or listed in the Events window, and the game's copy of a trigger keeps its first event. The list rows' rename lock and event_id_resolve go with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f01e8065d
commit
4141c53681
12 files changed
+21
-112
No files matched your search
+4
-15
@@ -438,25 +438,14 @@ TEST_CASE("skew reads from the old Shear attributes too")
|
||||
CHECK(frames[0].extras.attributes.empty());
|
||||
}
|
||||
|
||||
TEST_CASE("a trigger fires several events; built-in events join a file when first used")
|
||||
TEST_CASE("a trigger fires several events; the game's copy keeps the first")
|
||||
{
|
||||
auto model = fixture_load("02_items.anm2");
|
||||
auto stopId = edit::event_id_resolve(model, model::EVENT_BUILT_IN_ID_FIRST);
|
||||
CHECK(model::item_get(model.content.events, stopId)->name == "stop");
|
||||
CHECK(edit::event_id_resolve(model, model::EVENT_BUILT_IN_ID_FIRST) == stopId);
|
||||
CHECK(edit::event_id_resolve(model, 1) == 1);
|
||||
|
||||
model.frame_edit({0, TRIGGER, -1, 0})->eventIds = {0, stopId, 1};
|
||||
model.frame_edit({0, TRIGGER, -1, 0})->eventIds = {1, 0};
|
||||
auto text = model::model_to_string(model);
|
||||
CHECK(model_load(text).frame_get({0, TRIGGER, -1, 0})->eventIds == std::vector{0, stopId, 1});
|
||||
CHECK(model_load(game_document_get(text)).frame_get({0, TRIGGER, -1, 0})->eventIds == std::vector{0});
|
||||
CHECK(model_load(text).frame_get({0, TRIGGER, -1, 0})->eventIds == std::vector{1, 0});
|
||||
CHECK(model_load(game_document_get(text)).frame_get({0, TRIGGER, -1, 0})->eventIds == std::vector{1});
|
||||
CHECK(model::isaac_issues_get(model).extraEvents == 1);
|
||||
|
||||
// The game's copy skips built-in events for the first custom one.
|
||||
model.frame_edit({0, TRIGGER, -1, 0})->eventIds = {stopId, 1};
|
||||
CHECK(model_load(game_document_get(model::model_to_string(model))).frame_get({0, TRIGGER, -1, 0})->eventIds ==
|
||||
std::vector{1});
|
||||
CHECK(model::isaac_issues_get(model).extraEvents == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("SVG spritesheets pack and merge into SVGs")
|
||||
|
||||
Reference in new issue
Block a user