From 1ec8471b32b6c44f35274283ea6e0d15c8dfdf7b Mon Sep 17 00:00:00 2001 From: Waverunner Date: Thu, 27 Mar 2014 18:08:04 -0400 Subject: [PATCH] Changed holo-emote script checks, fixed playerobject version, fixed hair check --- scripts/commands/holoemote.py | 15 ++++++++++----- scripts/commands/imagedesign.py | 2 +- src/resources/objects/player/PlayerObject.java | 2 +- src/services/EntertainmentService.java | 5 ++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/commands/holoemote.py b/scripts/commands/holoemote.py index e4266155..44f848c3 100644 --- a/scripts/commands/holoemote.py +++ b/scripts/commands/holoemote.py @@ -9,9 +9,17 @@ def run(core, actor, target, commandString): if player is None: return - commandString = commandString.lower() - installedEmote = player.getHoloEmote().replace('holoemote_','') + if commandString is not None: + commandString = commandString.lower() + installedEmote = '' + + if player.getHoloEmote() is not None: + installedEmote = player.getHoloEmote().replace('holoemote_','') + + if commandString is None or commandString == "": + commandString == installedEmote + if installedEmote == None or installedEmote == "": actor.sendSystemMessage('@image_designer:no_holoemote', 0) return @@ -28,9 +36,6 @@ def run(core, actor, target, commandString): if commandString == "kitty": commandString = "technokitty" - if commandString is None or commandString == "": - commandString == installedEmote - if commandString != installedEmote and installedEmote != 'all': actor.sendSystemMessage('Your installed Holo-Emote generator does not support that emote.', 0) return diff --git a/scripts/commands/imagedesign.py b/scripts/commands/imagedesign.py index aabb16af..d9a87e92 100644 --- a/scripts/commands/imagedesign.py +++ b/scripts/commands/imagedesign.py @@ -8,7 +8,7 @@ def setup(): def run(core, actor, target, commandString): if target is None and commandString is None: - design = ImageDesignStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId()) + design = ImageDesignStartMessage(actor.getObjectId(), actor.getObjectId(), actor.getObjectId()) obj = ObjControllerMessage(11, design) actor.getClient().getSession().write(obj.serialize()) return diff --git a/src/resources/objects/player/PlayerObject.java b/src/resources/objects/player/PlayerObject.java index fb284587..6c8160dc 100644 --- a/src/resources/objects/player/PlayerObject.java +++ b/src/resources/objects/player/PlayerObject.java @@ -43,7 +43,7 @@ import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Persistent(version=7) +@Persistent(version=8) public class PlayerObject extends IntangibleObject { // PLAY 3 diff --git a/src/services/EntertainmentService.java b/src/services/EntertainmentService.java index fe39d10d..56a83aa0 100644 --- a/src/services/EntertainmentService.java +++ b/src/services/EntertainmentService.java @@ -872,10 +872,9 @@ public class EntertainmentService implements INetworkDispatch { private void handleImageDesign(CreatureObject designer, CreatureObject designTarget, Vector colorAttributes, Vector bodyAttributes, String hairTemplate, String holoEmote) { - if(!hairTemplate.startsWith("object/tangible/hair/")) return; - if (hairTemplate != null && !hairTemplate.equals("")) { - System.out.println(hairTemplate); + if(!hairTemplate.startsWith("object/tangible/hair/")) + return; String sharedHairTemplate = hairTemplate.replace("/hair_", "/shared_hair_"); TangibleObject hairObject = (TangibleObject) core.objectService.createObject(sharedHairTemplate, designTarget.getPlanet());