the npcToggleValues value in data.json can also be called npcFunctions
This commit is contained in:
parent
da4e46497c
commit
0f17060b49
2 changed files with 6 additions and 1 deletions
|
@ -132,7 +132,7 @@ public class ZNpcImporter implements DataImporter {
|
||||||
npc.setProperty(propertyRegistry.getByName("skin", SkinDescriptor.class), new PrefetchedDescriptor(new SkinImpl(model.getSkin(), model.getSignature())));
|
npc.setProperty(propertyRegistry.getByName("skin", SkinDescriptor.class), new PrefetchedDescriptor(new SkinImpl(model.getSkin(), model.getSignature())));
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> toggleValues = model.getNpcToggleValues();
|
Map<String, Object> toggleValues = model.getNpcToggleValues() == null ? model.getNpcFunctions() : model.getNpcToggleValues();
|
||||||
if (toggleValues != null) {
|
if (toggleValues != null) {
|
||||||
if (toggleValues.containsKey("look")) {
|
if (toggleValues.containsKey("look")) {
|
||||||
npc.setProperty(propertyRegistry.getByName("look", LookType.class), LookType.CLOSEST_PLAYER);
|
npc.setProperty(propertyRegistry.getByName("look", LookType.class), LookType.CLOSEST_PLAYER);
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class ZNpcsModel {
|
||||||
private List<ZNpcsAction> clickActions;
|
private List<ZNpcsAction> clickActions;
|
||||||
private Map<String, String> npcEquip;
|
private Map<String, String> npcEquip;
|
||||||
private Map<String, Object> npcToggleValues;
|
private Map<String, Object> npcToggleValues;
|
||||||
|
private Map<String, Object> npcFunctions;
|
||||||
private Map<String, String[]> customizationMap;
|
private Map<String, String[]> customizationMap;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
@ -62,6 +63,10 @@ public class ZNpcsModel {
|
||||||
return npcToggleValues;
|
return npcToggleValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getNpcFunctions() {
|
||||||
|
return npcFunctions;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, String[]> getCustomizationMap() {
|
public Map<String, String[]> getCustomizationMap() {
|
||||||
return customizationMap;
|
return customizationMap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue