Browse Source

fix `location` in `$npc`

Stephan Fuchs 10 months ago
parent
commit
b05bcedb48
1 changed files with 5 additions and 0 deletions
  1. 5 0
      sugarcube/src/npcs/_system/NPC.js

+ 5 - 0
sugarcube/src/npcs/_system/NPC.js

@@ -99,6 +99,11 @@ class NPC{
 		return Math.max(Math.ceil(ds_average / 5),0);
 	}
 	get fullname(){return this.get('firstname')+' '+this.get('lastname');}
+
+	get location(){
+		return NPC.DICT.location(this._npcID);
+	}
+
 	get title(){
 		switch (this.get('gender')) {
 			case 0: