add dependency checks for card.linked_card_x

This commit is contained in:
GenevensiS
2026-04-10 00:31:59 +02:00
parent 4d1c7aae96
commit c167272ae6
27 changed files with 140 additions and 22 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ ScriptValueP Context::dependencies(const Dependency& dep, const Script& script)
// - member operator; and it signals a dependency.
// - looper construction
// - + for function composition
// Variable assignments are performed as normall.
// Variable assignments are performed as normal.
// Jumps are tricky:
// - I_LOOP: We want to prevent infinite loops, the solution is that after the first
// iteration we set the looper to a dummy value, so the loop is only executed once.
+10
View File
@@ -202,11 +202,21 @@ void SetScriptManager::onAction(const Action& action, bool undone) {
TYPE_CASE_(action, KeywordListAction) {
updateAllDependend(set.game->dependent_scripts_keywords);
return;
}
TYPE_CASE(action, OneWayLinkCardsAction) {
updateAllDependend(set.game->dependent_scripts_links, action.card);
return;
}
TYPE_CASE_(action, ChangeKeywordModeAction) {
updateAllDependend(set.game->dependent_scripts_keywords);
return;
}
TYPE_CASE(action, ChangeCardNotesAction) {
updateAllDependend(set.game->dependent_scripts_notes, action.card);
}
TYPE_CASE(action, ChangeCardUIDAction) {
updateAllDependend(set.game->dependent_scripts_uid, action.card);
}
TYPE_CASE(action, ChangeCardStyleAction) {
updateAllDependend(set.game->dependent_scripts_stylesheet, action.card);
}