Fixed tuning of color crystals

This commit is contained in:
Seefo
2014-05-06 13:30:31 -04:00
parent f394dd6e19
commit 16a05bd73c
2 changed files with 15 additions and 16 deletions
+11 -12
View File
@@ -21,13 +21,10 @@ def handleSelection(core, owner, target, option):
#owner.sendSystemMessage('You are not attuned enough with the force yet.',1)
if target.getAttachment("tunerId") == None or target.getAttachment("tunerId") == 0:
if target.getAttributes().get("@obj_attr_n:color") is None:
owner.setAttachment("TunableObject", target.getObjectID())
handleSUIWindow(core, owner, target, option)
owner.setAttachment("TunableObject", target.getObjectID())
handleSUIWindow(core, owner, target, option)
else:
owner.sendSystemMessage("You cannot tune this crystal.",1)
return
@@ -45,16 +42,18 @@ def handleSUIWindow(core, owner, target, option):
def handleSUI(owner, window, eventType, returnList):
if eventType == 0:
time.sleep(3)
time.sleep(1)
objectID = long(owner.getAttachment("TunableObject"))
tunableObject = main.NGECore.getInstance().objectService.getObject(objectID)
if tunableObject:
tunableObject.getAttributes().put("@obj_attr_n:crystal_owner", owner.getCustomName())
tunableObject.setAttachment("tunerId", int(owner.getObjectId()))
main.NGECore.getInstance().lootService.tuneProcess(tunableObject)
time.sleep(0.5)
if tunableObject.getAttributes().get("@obj_attr_n:color") is None:
main.NGECore.getInstance().lootService.tuneProcess(tunableObject)
time.sleep(0.5)
owner.sendSystemMessage('@jedi_spam:crystal_tune_success',1)
return
+4 -4
View File
@@ -1034,16 +1034,16 @@ public class DevService implements INetworkDispatch {
TangibleObject colorCrystal = (TangibleObject) core.objectService.createObject("object/tangible/component/weapon/lightsaber/shared_lightsaber_module_force_crystal.iff", planet);
colorCrystal.getAttributes().put("@obj_attr_n:condition", "100/100");
//colorCrystal.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF ");
//colorCrystal.setAttachment("radial_filename", "item/tunable");
colorCrystal.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF ");
colorCrystal.setAttachment("radial_filename", "item/tunable");
core.lootService.setCustomization(colorCrystal, "colorcrystal");
inventory.add(colorCrystal);
TangibleObject lavaCrystal = (TangibleObject) core.objectService.createObject("object/tangible/component/weapon/lightsaber/shared_lightsaber_module_lava_crystal.iff", planet);
lavaCrystal.getAttributes().put("@obj_attr_n:condition", "100/100");
//lavaCrystal.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF ");
lavaCrystal.getAttributes().put("@obj_attr_n:crystal_owner", "\\#D1F56F UNTUNED \\#FFFFFF ");
lavaCrystal.getAttributes().put("@obj_attr_n:color", "Lava");
//lavaCrystal.setAttachment("radial_filename", "item/tunable");
lavaCrystal.setAttachment("radial_filename", "item/tunable");
inventory.add(lavaCrystal);
return;