@@ -103,9 +103,9 @@ class APItem {
103103 this .isException = true ;
104104 }
105105
106- if (APEntryState . gonnaRunSync && this .toSync ) {
106+ if (APGameState . isSync && this .toSync ) {
107107 allItems .push (this ); trace (' Item to sync: ${this .name }' );
108- } else if (! APEntryState . gonnaRunSync ) {
108+ } else if (! APGameState . isSync ) {
109109 allItems .push (this ); trace (' Item: ${this .name }' );
110110 }
111111
@@ -179,23 +179,45 @@ class APItem {
179179 }
180180
181181 public function trigger (): Void {
182- trace (" Triggering item: " + this .name );
183- trace (" Is exception: " + this .isException );
184- trace (" Condition type: " + this .condition .type );
185- trace (" Condition check result: " + this .condition .checkFn ());
186-
187- if (! this .isException && this .condition .type != ConditionType . Everywhere && this .condition .checkFn ()) {
188- trace (" Setting active item to: " + this .name );
189- APItem .activeItem = this ;
190- } else {
191- trace (" Active item not set due to condition, exception rules, or being an Everywhere item." );
192- }
182+ trace (' is Gonna Run Sync: ${APGameState .isSync }' );
183+ if (APGameState .isSync && ! this .toSync ) {
184+ trace (" Triggering item: " + this .name );
185+ trace (" Is exception: " + this .isException );
186+ trace (" Condition type: " + this .condition .type );
187+ trace (" Condition check result: " + this .condition .checkFn ());
188+
189+ if (! this .isException && this .condition .type != ConditionType . Everywhere && this .condition .checkFn ()) {
190+ trace (" Setting active item to: " + this .name );
191+ APItem .activeItem = this ;
192+ } else {
193+ trace (" Active item not set due to condition, exception rules, or being an Everywhere item." );
194+ }
195+
196+ if (this .condition .checkFn ()) {
197+ trace (" Condition passed, executing onTrigger for item: " + this .name );
198+ onTrigger ();
199+ } else {
200+ trace (" Condition failed, onTrigger not executed for item: " + this .name );
201+ }
202+ } else if (! APGameState .isSync ) {
203+ trace (" Triggering item: " + this .name );
204+ trace (" Is exception: " + this .isException );
205+ trace (" Condition type: " + this .condition .type );
206+ trace (" Condition check result: " + this .condition .checkFn ());
207+
208+ if (! this .isException && this .condition .type != ConditionType . Everywhere && this .condition .checkFn ()) {
209+ trace (" Setting active item to: " + this .name );
210+ APItem .activeItem = this ;
211+ } else {
212+ trace (" Active item not set due to condition, exception rules, or being an Everywhere item." );
213+ }
193214
194- if (this .condition .checkFn ()) {
195- trace (" Condition passed, executing onTrigger for item: " + this .name );
196- onTrigger ();
197- } else {
198- trace (" Condition failed, onTrigger not executed for item: " + this .name );
215+ if (this .condition .checkFn ()) {
216+ trace (" Condition passed, executing onTrigger for item: " + this .name );
217+ onTrigger ();
218+ } else {
219+ trace (" Condition failed, onTrigger not executed for item: " + this .name );
220+ }
199221 }
200222
201223 trace (" Removing item from allItems: " + this .name );
0 commit comments