diff --git a/scripts/loot/lootItems/re_junk/wiring_red_yellow.py b/scripts/loot/lootItems/re_junk/wiring_red_yellow.py index 88fd2f59..aa17d304 100644 --- a/scripts/loot/lootItems/re_junk/wiring_red_yellow.py +++ b/scripts/loot/lootItems/re_junk/wiring_red_yellow.py @@ -13,11 +13,11 @@ def lootDescriptor(): def customizationAttributes(): - return ['/private/index_color_1'] + return ['/private/index_color_1','/private/index_color_2'] def customizationValues(): - return [13] #not correct + return [6,12] def reverse_engineering_name(): diff --git a/src/services/LootService.java b/src/services/LootService.java index 35aec14e..e26e4443 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -2805,8 +2805,67 @@ public class LootService implements INetworkDispatch { item24b.setUses(399); core.objectService.addStackableItem(item24b,playerInventory); + TangibleObject item25a = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_wiring_generic.iff", player.getPlanet()); + item25a.setCustomName("Wiring"); + item25a.setAttachment("reverse_engineering_name", "Red/Yellow"); + item25a.setStackable(true); + item25a.setUses(299); + Vector customizationAttributes = new Vector(); + customizationAttributes.add("/private/index_color_1"); + customizationAttributes.add("/private/index_color_2"); + Vector customizationValues = new Vector(); + customizationValues.add(6); + customizationValues.add(12); + item25a.setAttachment("lootDescriptor", "customattributes"); + setCustomization(item25a,"Wiring", customizationAttributes, customizationValues); + core.objectService.addStackableItem(item25a,playerInventory); + + TangibleObject item25b = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_launcher_tube_generic.iff", player.getPlanet()); + item25b.setCustomName("Launcher Tube"); + item25b.setStackable(true); + item25b.setUses(399); + core.objectService.addStackableItem(item25b,playerInventory); + + TangibleObject item27b = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_small_motor_generic.iff", player.getPlanet()); + item27b.setCustomName("Locomotor"); + item27b.setStackable(true); + item27b.setUses(399); + core.objectService.addStackableItem(item27b,playerInventory); + + TangibleObject item26a = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_copper_battery_generic.iff", player.getPlanet()); + item26a.setCustomName("Droid Battery"); + item26a.setAttachment("reverse_engineering_name", "Black/Green"); + item26a.setStackable(true); + item26a.setUses(299); + customizationAttributes = new Vector(); + customizationAttributes.add("/private/index_color_1"); + customizationAttributes.add("/private/index_color_2"); + customizationValues = new Vector(); + customizationValues.add(0); + customizationValues.add(15); + item26a.setAttachment("lootDescriptor", "customattributes"); + setCustomization(item26a,"Droid Battery", customizationAttributes, customizationValues); + core.objectService.addStackableItem(item26a,playerInventory); + + + TangibleObject item26b = (TangibleObject)core.objectService.createObject("object/tangible/loot/npc_loot/shared_copper_battery_generic.iff", player.getPlanet()); + item26b.setCustomName("Droid Battery"); + item26b.setAttachment("reverse_engineering_name", "Purple/Green"); + item26b.setStackable(true); + item26b.setUses(299); + customizationAttributes = new Vector(); + customizationAttributes.add("/private/index_color_1"); + customizationAttributes.add("/private/index_color_2"); + customizationValues = new Vector(); + customizationValues.add(33); + customizationValues.add(15); + item26b.setAttachment("lootDescriptor", "customattributes"); + setCustomization(item26b,"Droid Battery", customizationAttributes, customizationValues); + core.objectService.addStackableItem(item26b,playerInventory); + + String modifierBitTemplate = "object/tangible/component/reverse_engineering/shared_modifier_bit.iff"; TangibleObject modifierBit = (TangibleObject) core.objectService.createObject(modifierBitTemplate, player.getPlanet()); modifierBit.setCustomName("Droid Experimentation"); diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java index 63860a89..dfa0e154 100644 --- a/src/services/housing/HousingService.java +++ b/src/services/housing/HousingService.java @@ -113,7 +113,8 @@ public class HousingService implements INetworkDispatch { HouseTemplate houseTemplate = housingTemplates.get(deed.getTemplate()); int structureLotCost = houseTemplate.getLotCost(); String structureTemplate = houseTemplate.getBuildingTemplate(); - PlayerCity city = core.playerCityService.getCityPositionIsIn(new Point3D(positionX, 0, positionZ)); + //PlayerCity city = core.playerCityService.getCityPositionIsIn(new Point3D(positionX, 0, positionZ)); + PlayerCity city = null; if (!houseTemplate.canBePlacedOn(actor.getPlanet().getName())) { actor.sendSystemMessage("You may not place this structure on this planet.", (byte) 0); // should probably load this from an stf diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index 475f7155..fba26116 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -1439,8 +1439,23 @@ public class ObjectService implements INetworkDispatch { @Override public void process(SWGObject obj) { if (obj.getTemplate().equals(item.getTemplate())){ - alikeItemsInContainer.add(obj); - System.out.println(obj.getTemplate()); + // Check if items are Droid Motors or Wirings + if (obj.getTemplate().equals("object/tangible/loot/npc_loot/shared_wiring_generic.iff")){ + if (obj.getAttachment("reverse_engineering_name")!=null){ + if (obj.getAttachment("reverse_engineering_name").equals(item.getAttachment("reverse_engineering_name"))){ + alikeItemsInContainer.add(obj); + } + } + } else if (obj.getTemplate().equals("object/tangible/loot/npc_loot/shared_copper_battery_generic.iff")){ + if (obj.getAttachment("reverse_engineering_name")!=null){ + if (obj.getAttachment("reverse_engineering_name").equals(item.getAttachment("reverse_engineering_name"))){ + alikeItemsInContainer.add(obj); + } + } + } else { + alikeItemsInContainer.add(obj); + } + } } });