2 Commits 7e99ec6bcb ... 1d7094c4c0

Author SHA1 Message Date
  Stephan Fuchs 1d7094c4c0 [breaking] `$location` gets updated in `setup.navigationOverride` 3 months ago
  Stephan Fuchs d449230a97 add `set locationIdentifier` to `GameLocation` 3 months ago

+ 1 - 0
sugarcube/src/events/_system/NavigationOverride.ts

@@ -11,6 +11,7 @@ setup.navigationOverride = (destinationPassageName:string)=>{
 		!requestedLocation.tags.includesAny(tagsWithEventsDisabled)
 	){
 		State.variables.eventReturnLocation = requestedLocation;
+		State.variables.location.locationIdentifier = requestedLocation;
 		return 'event';
 	}
 }

+ 4 - 0
sugarcube/src/locations/_system/Location.ts

@@ -16,6 +16,10 @@ class GameLocation{
 		return new LocationIdentifier(this.passage,this.passageArguments);
 	}
 
+	set locationIdentifier(v:LocationIdentifier){
+		this.update(v.passage,v.passageArguments);
+	}
+
 	get passage(){return this._passage;}
 	set passage(v:string){
 		if(typeof v != "string")