armoha / euddraft

System for pluginizing eudplib codes.
Other
29 stars 4 forks source link

Disabled "preserveTrigger()" are enabled after compiling #82

Closed Chromowolf closed 1 year ago

Chromowolf commented 1 year ago

Write following trigger in SCMD

Trigger {
    players = {P1},
    actions = {
        DisplayText("Test");
        Disabled(PreserveTrigger());
    },
}

Compile it using euddraft In game: image

armoha commented 1 year ago

Thanks for reporting!

Related code in eudplib: NoWaitAndPreserved, a discriminant function to move TRIG trigger to STRx (inlining), correctly handle Enable flag of action (0b10), https://github.com/armoha/eudplib/blob/e1ab3421076fe7ed04b4a2b2ea933362b885a288/eudplib/maprw/inlinecode/btInliner.py#L62-L75

... while RawTrigger(trigSection=byteTrigger) constructor forgot to handle disable flag, looking at disabled PreserveTrigger action and initializing itself with preserved=True: https://github.com/armoha/eudplib/blob/0371ead628a5f2d4b949e1eaf63d43b18a790210/eudplib/core/rawtrigger/rawtriggerdef.py#L124-L144