|
@@ -639,6 +639,15 @@ class NPCsDict{
|
|
|
return locationInformation.activity.includes(activity);
|
|
|
}
|
|
|
|
|
|
+ endActivity(npcId,activity=undefined){
|
|
|
+ const currentLocationData = this.location(npcId);
|
|
|
+ if(activity && !this.atActivity(npcId,activity))
|
|
|
+ return;
|
|
|
+ const timeWhenNextActivityStarts = new Date(currentLocationData.end.getTime()+1);
|
|
|
+ this._updateLocation(npcId,timeWhenNextActivityStarts);
|
|
|
+ return this.location(npcId);
|
|
|
+ }
|
|
|
+
|
|
|
location(npcId){
|
|
|
let locationInformation = this.get(npcId,'location',{});
|
|
|
|