diff --git a/.gitignore b/.gitignore index 63147709..ab30f143 100644 --- a/.gitignore +++ b/.gitignore @@ -60,7 +60,8 @@ odb/chatRooms/je.info.* odb/resourcehistory/je.info.* odb/resourceroots/je.info.* odb/resources/je.info.* -odb/auction/je.info.* +odb/auction/je.info.* +odb/bounties/je.info.* # External tool builders .externalToolBuilders/ diff --git a/scripts/commands/harvesteractivate.py b/scripts/commands/harvesteractivate.py index 5411445a..f05ede73 100644 --- a/scripts/commands/harvesteractivate.py +++ b/scripts/commands/harvesteractivate.py @@ -2,7 +2,7 @@ import sys def setup(): return - + def run(core, actor, target, commandString): core.harvesterService.handleHarvesterActivateCommand(actor, target, commandString) return diff --git a/scripts/commands/harvesterdeactivate.py b/scripts/commands/harvesterdeactivate.py index 3a225b3f..7989148f 100644 --- a/scripts/commands/harvesterdeactivate.py +++ b/scripts/commands/harvesterdeactivate.py @@ -2,9 +2,7 @@ import sys def setup(): return - + def run(core, actor, target, commandString): core.harvesterService.handleHarvesterDeactivateCommand(actor, target, commandString) return - - \ No newline at end of file diff --git a/scripts/commands/harvesterdiscardhopper.py b/scripts/commands/harvesterdiscardhopper.py index 3a52f754..6ae345b9 100644 --- a/scripts/commands/harvesterdiscardhopper.py +++ b/scripts/commands/harvesterdiscardhopper.py @@ -2,10 +2,8 @@ import sys def setup(): return - + def run(core, actor, target, commandString): actor.sendSystemMessage('handleEmptyHarvester', 0) core.harvesterService.handleEmptyHarvester(actor, target, commandString) return - - \ No newline at end of file diff --git a/scripts/commands/harvesterselectresource.py b/scripts/commands/harvesterselectresource.py index 69c8c725..cc1c18aa 100644 --- a/scripts/commands/harvesterselectresource.py +++ b/scripts/commands/harvesterselectresource.py @@ -2,9 +2,7 @@ import sys def setup(): return - + def run(core, actor, target, commandString): core.harvesterService.handleHarvesterSelectResourceCommand(actor, target, commandString) return - - \ No newline at end of file diff --git a/scripts/commands/movefurniture.py b/scripts/commands/movefurniture.py index 1f4a7148..d07ea1da 100644 --- a/scripts/commands/movefurniture.py +++ b/scripts/commands/movefurniture.py @@ -3,7 +3,7 @@ from engine.resources.scene import Point3D def setup(): return - + def run(core, actor, target, commandString): tarObj = core.objectService.getObject(actor.getTargetId()) container = actor.getContainer() @@ -28,10 +28,8 @@ def run(core, actor, target, commandString): elif parsedMsg[0] == "left": core.simulationService.transform(tarObj, Point3D(float(parsedMsg[1]) * -0.01, 0, 0)) return - elif container.getTemplate() == "object/cell/shared_cell.iff": actor.sendSystemMessage("You do not have permission to access that container!", 0) return - + return - \ No newline at end of file diff --git a/scripts/commands/permissionlistmodify.py b/scripts/commands/permissionlistmodify.py index 8c0108ba..5d75a1e2 100644 --- a/scripts/commands/permissionlistmodify.py +++ b/scripts/commands/permissionlistmodify.py @@ -2,7 +2,7 @@ import sys def setup(): return - + def run(core, actor, target, commandString): permissionType = 'Undetermined' commandArgs = commandString.split(' ') diff --git a/scripts/commands/placestructure.py b/scripts/commands/placestructure.py index f6f5c122..fa7bc65a 100644 --- a/scripts/commands/placestructure.py +++ b/scripts/commands/placestructure.py @@ -1,32 +1,25 @@ import sys -import resources.objects.deed.Harvester_Deed def setup(): return - + def run(core, actor, target, commandString): cmdArgs = commandString.split(" ") deedId = long(cmdArgs[0]) deed = core.objectService.getObject(deedId) - - if (actor.getAttachment('UsingHarvesterDeed') == '1'): - actor.setAttachment('UsingHarvesterDeed', '0'); + + if deed == actor: + deed = actor.getUseTarget() + + if deed.getTemplate().startswith('object/tangible/deed/harvester_deed') is True or deed.getTemplate().startswith('object/tangible/deed/generator_deed') is True: core.harvesterService.handlePlaceStructureCommand(actor, target, commandString) return - + positionX = float(cmdArgs[1]) positionZ = float(cmdArgs[2]) - #positionY = core.terrainService.getHeight(actor.getPlanetId(), positionX, positionZ) + 2 - rotation = float(cmdArgs[3]) - - #structureTemplate = deed.getAttachment("structureTemplate") - core.housingService.placeStructure(actor, deed, positionX, positionZ, rotation) - #building = core.objectService.createObject(structureTemplate, actor.getPlanet(), positionX, positionZ, positionY); - #core.simulationService.add(building, building.getPosition().x, building.getPosition().z); - - return \ No newline at end of file + return diff --git a/scripts/commands/pvp.py b/scripts/commands/pvp.py index 8fbdc155..1260a24c 100644 --- a/scripts/commands/pvp.py +++ b/scripts/commands/pvp.py @@ -17,7 +17,8 @@ def run(core, actor, target, commandString): if commandString != '' and commandString != faction: if commandString == 'rebel' or commandString == 'imperial' or commandString == 'neutral': - actor.sendSystemMessage('@faction_recruiter:sui_resig_complete_in_5', 0) + if faction != 'neutral': + actor.sendSystemMessage('@faction_recruiter:sui_resig_complete_in_5', 0) if actor.getFactionStatus() == FactionStatus.SpecialForces: actor.setPvpStatus(PvpStatus.GoingCovert, True) diff --git a/scripts/commands/resourceemptyhopper.py b/scripts/commands/resourceemptyhopper.py index 3a225b3f..7989148f 100644 --- a/scripts/commands/resourceemptyhopper.py +++ b/scripts/commands/resourceemptyhopper.py @@ -2,9 +2,7 @@ import sys def setup(): return - + def run(core, actor, target, commandString): core.harvesterService.handleHarvesterDeactivateCommand(actor, target, commandString) return - - \ No newline at end of file diff --git a/scripts/commands/rotatefurniture.py b/scripts/commands/rotatefurniture.py index 9d019d0c..18fbfe35 100644 --- a/scripts/commands/rotatefurniture.py +++ b/scripts/commands/rotatefurniture.py @@ -3,7 +3,7 @@ from engine.resources.scene import Point3D def setup(): return - + def run(core, actor, target, commandString): tarObj = core.objectService.getObject(actor.getTargetId()) @@ -20,10 +20,8 @@ def run(core, actor, target, commandString): elif parsedMsg[0] == "roll": core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(0, 0, 1)) # this is messed up ??? return - elif container.getTemplate() == "object/cell/shared_cell.iff": actor.sendSystemMessage("You do not have permission to access that container!", 0) return - + return - \ No newline at end of file diff --git a/scripts/commands/setgodmode.py b/scripts/commands/setgodmode.py index e66d7982..63019d92 100644 --- a/scripts/commands/setgodmode.py +++ b/scripts/commands/setgodmode.py @@ -99,11 +99,9 @@ def run(core, actor, target, commandString): if (actor.isInStealth()): actor.setInStealth(False) actor.setRadarVisible(True) - actor.sendSystemMessage('You are now visible to other players.', 0) else: actor.setInStealth(True) actor.setRadarVisible(False) - actor.sendSystemMessage('You are now hidden from players. "Stealth Effect" is not implemented, however players still won\'t be able to see you. Type /setgodmode stealth again to be visible.', 0) elif command == 'holoEmote' and arg1: playerObject.setHoloEmote('holoemote_' + arg1) @@ -114,5 +112,12 @@ def run(core, actor, target, commandString): if playerObject.getGodLevel > 0: actor.removeAbility("admin") playerObject.setGodLevel(0) - + + elif command == 'setBounty' and arg1: + if not core.missionService.addToExistingBounty(actor, int(arg1)): + core.missionService.createNewBounty(actor, int(arg1)) + + actor.sendSystemMessage('Your bounty has been set to an additional ' + str(arg1) + ' credits.', 0) + return + return diff --git a/scripts/conversation/imp_recruiter.py b/scripts/conversation/imp_recruiter.py index 0cd82394..399294b1 100644 --- a/scripts/conversation/imp_recruiter.py +++ b/scripts/conversation/imp_recruiter.py @@ -199,10 +199,7 @@ def handleFirstScreen(core, actor, npc, selection): if selection == 1: percent = core.guildService.getGuildObject().getCurrentServerGCWTotalPercentMap().get(actor.getPlanet().getName()).getPercent().intValue() - outOfBand = OutOfBand() - prose1 = ProsePackage("conversation/faction_recruiter_imperial", 's_412',0,"percent,@conversation/faction_recruiter_imperial:s_412", "TO", str(100 - percent)) - outOfBand.addProsePackage(prose1) - convSvc.sendConversationMessage(actor, npc, outOfBand) + convSvc.sendConversationMessage(actor, npc, OutOfBand.ProsePackage("@conversation/faction_recruiter_imperial:s_412", percent, "TO", str(100 - percent))) return if selection == 2: diff --git a/scripts/conversation/missions/deliver.py b/scripts/conversation/missions/deliver.py index 5caef3fa..f8ee5667 100644 --- a/scripts/conversation/missions/deliver.py +++ b/scripts/conversation/missions/deliver.py @@ -44,8 +44,8 @@ def handlePickupStage(core, actor, npc, objective, mission): return core.conversationService.sendStopConversation(actor, npc, mission.getMissionDescription(), 'm' + str(mission.getMissionId()) + 'p') - objective.createDeliveryItem() - objective.update() + objective.createDeliveryItem(core, actor) + objective.update(core, actor) return def handleDeliveryStage(core, actor, npc, objective, mission): @@ -56,7 +56,7 @@ def handleDeliveryStage(core, actor, npc, objective, mission): core.conversationService.sendStopConversation(actor, npc, mission.getMissionDescription(), 'm' + str(mission.getMissionId()) + 'r') core.objectService.destroyObject(objective.getDeliveryObject()) - objective.update() + objective.update(core, actor) return def handleCompletionStage(core, actor, npc, objective, mission): @@ -66,5 +66,5 @@ def handleCompletionStage(core, actor, npc, objective, mission): return core.conversationService.sendStopConversation(actor, npc, mission.getMissionDescription(), 'm' + str(mission.getMissionId()) + 's') - objective.complete() + objective.complete(core, actor) return \ No newline at end of file diff --git a/scripts/expertise/expertise_bh_dread_strike_1.py b/scripts/expertise/expertise_bh_dread_strike_1.py index ae817cd0..8b2f96c9 100644 --- a/scripts/expertise/expertise_bh_dread_strike_1.py +++ b/scripts/expertise/expertise_bh_dread_strike_1.py @@ -1,22 +1,9 @@ import sys def addAbilities(core, actor, player): - if actor.getLevel() >= 26: - actor.addAbility("bh_dread_strike_1") - if actor.getLevel() >= 34: - actor.addAbility("bh_dread_strike_2") - if actor.getLevel() >= 48: - actor.addAbility("bh_dread_strike_3") - if actor.getLevel() >= 62: - actor.addAbility("bh_dread_strike_4") - if actor.getLevel() >= 76: - actor.addAbility("bh_dread_strike_5") + actor.addAbility("bh_dread_strike_1") return def removeAbilities(core, actor, player): actor.removeAbility("bh_dread_strike_1") - actor.removeAbility("bh_dread_strike_2") - actor.removeAbility("bh_dread_strike_3") - actor.removeAbility("bh_dread_strike_4") - actor.removeAbility("bh_dread_strike_5") return diff --git a/scripts/expertise/expertise_bh_fumble_1.py b/scripts/expertise/expertise_bh_fumble_1.py index c9f10511..f39cdd09 100644 --- a/scripts/expertise/expertise_bh_fumble_1.py +++ b/scripts/expertise/expertise_bh_fumble_1.py @@ -1,25 +1,9 @@ import sys def addAbilities(core, actor, player): - if actor.getLevel() >= 26: - actor.addAbility("bh_fumble_1") - if actor.getLevel() >= 34: - actor.addAbility("bh_fumble_2") - if actor.getLevel() >= 48: - actor.addAbility("bh_fumble_3") - if actor.getLevel() >= 62: - actor.addAbility("bh_fumble_4") - if actor.getLevel() >= 76: - actor.addAbility("bh_fumble_5") - if actor.getLevel() >= 90: - actor.addAbility("bh_fumble_6") + actor.addAbility("bh_fumble_1") return def removeAbilities(core, actor, player): actor.removeAbility("bh_fumble_1") - actor.removeAbility("bh_fumble_2") - actor.removeAbility("bh_fumble_3") - actor.removeAbility("bh_fumble_4") - actor.removeAbility("bh_fumble_5") - actor.removeAbility("bh_fumble_6") return diff --git a/scripts/houses/player_cityhall_corellia_style_01.py b/scripts/houses/player_cityhall_corellia_style_01.py index 7b9e070b..ff396cb0 100644 --- a/scripts/houses/player_cityhall_corellia_style_01.py +++ b/scripts/houses/player_cityhall_corellia_style_01.py @@ -2,13 +2,15 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_corellia_deed.iff", "object/building/player/city/shared_cityhall_corellia.iff", 0) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(308) + + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) - core.housingService.addHousingTemplate(houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_cityhall_naboo_style_01.py b/scripts/houses/player_cityhall_naboo_style_01.py index 0e9a8335..8bb52c69 100644 --- a/scripts/houses/player_cityhall_naboo_style_01.py +++ b/scripts/houses/player_cityhall_naboo_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_naboo_deed.iff", "object/building/player/city/shared_cityhall_naboo.iff", 0) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(308) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_cityhall_tatooine_style_01.py b/scripts/houses/player_cityhall_tatooine_style_01.py index da337900..766ed7cf 100644 --- a/scripts/houses/player_cityhall_tatooine_style_01.py +++ b/scripts/houses/player_cityhall_tatooine_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff", "object/building/player/city/shared_cityhall_tatooine.iff", 0) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(1, 2, 3)) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(308) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_guildhall_corellia_style_01.py b/scripts/houses/player_guildhall_corellia_style_01.py index d48d14e0..31cb89f8 100644 --- a/scripts/houses/player_guildhall_corellia_style_01.py +++ b/scripts/houses/player_guildhall_corellia_style_01.py @@ -2,13 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_corellia_guild_deed.iff", "object/building/player/shared_player_guildhall_corellia_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(100) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_guildhall_generic_style_01.py b/scripts/houses/player_guildhall_generic_style_01.py index a52507ea..a60c94d6 100644 --- a/scripts/houses/player_guildhall_generic_style_01.py +++ b/scripts/houses/player_guildhall_generic_style_01.py @@ -2,8 +2,8 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): - houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_generic_guild_deed.iff", "object/building/player/shared_player_guildhall_generic_style_01.iff", 2) +def setup(housingTemplates): + houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_generic_guild_deed.iff", "object/building/player/shared_player_guildhall_generic_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4))) houseTemplate.addPlaceablePlanet("tatooine") @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(100) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_guildhall_naboo_style_01.py b/scripts/houses/player_guildhall_naboo_style_01.py index 61304374..c9a2777e 100644 --- a/scripts/houses/player_guildhall_naboo_style_01.py +++ b/scripts/houses/player_guildhall_naboo_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_naboo_guild_deed.iff", "object/building/player/shared_player_guildhall_naboo_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4))) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(100) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_guildhall_tatooine_style_01.py b/scripts/houses/player_guildhall_tatooine_style_01.py index edae69a7..05a70c0c 100644 --- a/scripts/houses/player_guildhall_tatooine_style_01.py +++ b/scripts/houses/player_guildhall_tatooine_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_tatooine_guild_deed.iff", "object/building/player/shared_player_guildhall_tatooine_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(18.4))) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(100) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_guildhall_tatooine_style_02.py b/scripts/houses/player_guildhall_tatooine_style_02.py index 395b56d6..451bb05a 100644 --- a/scripts/houses/player_guildhall_tatooine_style_02.py +++ b/scripts/houses/player_guildhall_tatooine_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/guild_deed/shared_tatooine_guild_style_02_deed.iff", "object/building/player/shared_player_guildhall_tatooine_style_02.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.5), float(4), float(12.7))) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(400) + houseTemplate.setBaseMaintenanceRate(100) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_atat.py b/scripts/houses/player_house_atat.py index 3d0b04d2..1ff4e466 100644 --- a/scripts/houses/player_house_atat.py +++ b/scripts/houses/player_house_atat.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/tcg/series5/shared_structure_deed_player_house_atat.iff", "object/building/player/shared_player_house_atat.iff", 3) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-3.8), float(5.86), float(15.1))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_large_style_01.py b/scripts/houses/player_house_corellia_large_style_01.py index 44d9fd81..9c1382ce 100644 --- a/scripts/houses/player_house_corellia_large_style_01.py +++ b/scripts/houses/player_house_corellia_large_style_01.py @@ -2,13 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_large_deed.iff", "object/building/player/shared_player_house_corellia_large_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(13.4))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_large_style_02.py b/scripts/houses/player_house_corellia_large_style_02.py index 7d35d0de..7bc5f2da 100644 --- a/scripts/houses/player_house_corellia_large_style_02.py +++ b/scripts/houses/player_house_corellia_large_style_02.py @@ -2,12 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_large_style_02_deed.iff", "object/building/player/shared_player_house_generic_large_style_02.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-13.4), float(3), float(9.1))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") - houseTemplate.setDefaultItemLimit(500) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) + + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_medium_style_01.py b/scripts/houses/player_house_corellia_medium_style_01.py index 27988156..48167fda 100644 --- a/scripts/houses/player_house_corellia_medium_style_01.py +++ b/scripts/houses/player_house_corellia_medium_style_01.py @@ -2,12 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_medium_deed.iff", "object/building/player/shared_player_house_corellia_medium_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3),float(2.26),float(7.7))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_medium_style_02.py b/scripts/houses/player_house_corellia_medium_style_02.py index a0472e2e..41559ba0 100644 --- a/scripts/houses/player_house_corellia_medium_style_02.py +++ b/scripts/houses/player_house_corellia_medium_style_02.py @@ -2,12 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_medium_style_02_deed.iff", "object/building/player/shared_player_house_corellia_medium_style_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3), float(2.26), float(7.7))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) + return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_01.py b/scripts/houses/player_house_corellia_small_style_01.py index acae7c15..96de8802 100644 --- a/scripts/houses/player_house_corellia_small_style_01.py +++ b/scripts/houses/player_house_corellia_small_style_01.py @@ -2,13 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_deed.iff", "object/building/player/shared_player_house_corellia_small_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py b/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py index 5781e8eb..bf670367 100644 --- a/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py +++ b/scripts/houses/player_house_corellia_small_style_01_floorplan_02.py @@ -2,13 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_floor_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_01_floorplan_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_02.py b/scripts/houses/player_house_corellia_small_style_02.py index 1e55a1ed..5baf48fd 100644 --- a/scripts/houses/player_house_corellia_small_style_02.py +++ b/scripts/houses/player_house_corellia_small_style_02.py @@ -2,13 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py b/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py index 6e7feff8..914fa313 100644 --- a/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py +++ b/scripts/houses/player_house_corellia_small_style_02_floorplan_02.py @@ -2,13 +2,14 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_floor_02_deed.iff", "object/building/player/shared_player_house_corellia_small_style_02_floorplan_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35))) houseTemplate.addPlaceablePlanet("corellia") houseTemplate.addPlaceablePlanet("talus") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_large_style_01.py b/scripts/houses/player_house_generic_large_style_01.py index 645038ca..aa933d9d 100644 --- a/scripts/houses/player_house_generic_large_style_01.py +++ b/scripts/houses/player_house_generic_large_style_01.py @@ -2,8 +2,8 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): - houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_style_02_deed.iff", "object/building/player/shared_player_house_generic_large_style_02.iff", 2) +def setup(housingTemplates): + houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_style_02_deed.iff", "object/building/player/shared_player_house_generic_large_style_02.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(6), float(3), float(13.4))) houseTemplate.addPlaceablePlanet("tatooine") @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_large_style_02.py b/scripts/houses/player_house_generic_large_style_02.py index 6ee98363..a64b27dc 100644 --- a/scripts/houses/player_house_generic_large_style_02.py +++ b/scripts/houses/player_house_generic_large_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_deed.iff", "object/building/player/shared_player_house_generic_large_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-13.4), float(3), float(9.1))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_large_window_s01.py b/scripts/houses/player_house_generic_large_window_s01.py index 66c1b69a..031f8296 100644 --- a/scripts/houses/player_house_generic_large_window_s01.py +++ b/scripts/houses/player_house_generic_large_window_s01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_window_s01_deed.iff", "object/building/player/shared_player_house_generic_large_window_s01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-13.7), float(3), float(9.1))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_large_window_s02.py b/scripts/houses/player_house_generic_large_window_s02.py index fba62f6c..d5919f4d 100644 --- a/scripts/houses/player_house_generic_large_window_s02.py +++ b/scripts/houses/player_house_generic_large_window_s02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_large_window_s02_deed.iff", "object/building/player/shared_player_house_generic_large_window_s02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(10.4), float(3), float(-11))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_medium_style_01.py b/scripts/houses/player_house_generic_medium_style_01.py index e8473868..3d0beb4e 100644 --- a/scripts/houses/player_house_generic_medium_style_01.py +++ b/scripts/houses/player_house_generic_medium_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_deed.iff", "object/building/player/shared_player_house_generic_medium_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3),float(2.26),float(7.7))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(18) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_medium_style_02.py b/scripts/houses/player_house_generic_medium_style_02.py index 7bd2db7b..b8aa1bf6 100644 --- a/scripts/houses/player_house_generic_medium_style_02.py +++ b/scripts/houses/player_house_generic_medium_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_style_02_deed.iff", "object/building/player/shared_player_house_generic_medium_style_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.3), float(2.26), float(7.7))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(18) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_medium_windowed.py b/scripts/houses/player_house_generic_medium_windowed.py index e10c4b17..9ddc528a 100644 --- a/scripts/houses/player_house_generic_medium_windowed.py +++ b/scripts/houses/player_house_generic_medium_windowed.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_windowed_deed.iff", "object/building/player/shared_player_house_generic_medium_windowed.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.5), float(2.26), float(7.8))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(18) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_medium_windowed_s02.py b/scripts/houses/player_house_generic_medium_windowed_s02.py index 9c69e156..692f620b 100644 --- a/scripts/houses/player_house_generic_medium_windowed_s02.py +++ b/scripts/houses/player_house_generic_medium_windowed_s02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_medium_windowed_s02_deed.iff", "object/building/player/shared_player_house_generic_medium_windowed_s02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(5.5), float(2.26), float(7.8))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(18) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_01.py b/scripts/houses/player_house_generic_small_style_01.py index 778d50da..3c225c31 100644 --- a/scripts/houses/player_house_generic_small_style_01.py +++ b/scripts/houses/player_house_generic_small_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", "object/building/player/shared_player_house_generic_small_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_01_floorplan_02.py b/scripts/houses/player_house_generic_small_style_01_floorplan_02.py index e20ec536..e06a6316 100644 --- a/scripts/houses/player_house_generic_small_style_01_floorplan_02.py +++ b/scripts/houses/player_house_generic_small_style_01_floorplan_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_floor_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_01_floorplan_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_02.py b/scripts/houses/player_house_generic_small_style_02.py index 87121425..c32a0b84 100644 --- a/scripts/houses/player_house_generic_small_style_02.py +++ b/scripts/houses/player_house_generic_small_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_style_02_floorplan_02.py b/scripts/houses/player_house_generic_small_style_02_floorplan_02.py index 72ef35ac..a2ffe757 100644 --- a/scripts/houses/player_house_generic_small_style_02_floorplan_02.py +++ b/scripts/houses/player_house_generic_small_style_02_floorplan_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_floor_02_deed.iff", "object/building/player/shared_player_house_generic_small_style_02_floorplan_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.9), float(2.86), float(8.35))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_window_style_03.py b/scripts/houses/player_house_generic_small_window_style_03.py index 260c2476..9adf8ff0 100644 --- a/scripts/houses/player_house_generic_small_window_style_03.py +++ b/scripts/houses/player_house_generic_small_window_style_03.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_window_style_03_deed.iff", "object/building/player/shared_player_house_generic_small_window_style_03.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-6.6), float(2.36), float(6.3))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_generic_small_windowed.py b/scripts/houses/player_house_generic_small_windowed.py index 4f2293ab..71439b6a 100644 --- a/scripts/houses/player_house_generic_small_windowed.py +++ b/scripts/houses/player_house_generic_small_windowed.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_generic_house_small_window_deed.iff", "object/building/player/shared_player_house_generic_small_windowed.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7.39), float(2.36), float(2))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_hangar.py b/scripts/houses/player_house_hangar.py index f3eab890..01373883 100644 --- a/scripts/houses/player_house_hangar.py +++ b/scripts/houses/player_house_hangar.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/tcg/series5/shared_structure_deed_player_house_hangar.iff", "object/building/player/shared_player_house_hangar.iff", 3) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(9.2), float(2.86), float(0.8))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_jabbas_sail_barge.py b/scripts/houses/player_house_jabbas_sail_barge.py index abc84451..c39e9c25 100644 --- a/scripts/houses/player_house_jabbas_sail_barge.py +++ b/scripts/houses/player_house_jabbas_sail_barge.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_jabbas_sail_barge_deed.iff", "object/building/player/shared_player_house_jabbas_sail_barge.iff", 3) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(0), float(2.86), float(-3.5))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_jedi_meditation_room.py b/scripts/houses/player_house_jedi_meditation_room.py index df257c29..6ed97065 100644 --- a/scripts/houses/player_house_jedi_meditation_room.py +++ b/scripts/houses/player_house_jedi_meditation_room.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/tcg/series3/shared_structure_deed_jedi_meditation_room_deed.iff", "object/building/player/shared_player_house_jedi_meditation_room.iff", 3) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(0), float(2.86), float(-3.5))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_mustafar_lg.py b/scripts/houses/player_house_mustafar_lg.py index 8d04566e..891c9e09 100644 --- a/scripts/houses/player_house_mustafar_lg.py +++ b/scripts/houses/player_house_mustafar_lg.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_mustafar_house_lg.iff", "object/building/player/shared_player_house_mustafar_lg.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(1.5), float(2.86), float(13.7))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_naboo_large_style_01.py b/scripts/houses/player_house_naboo_large_style_01.py index afaf05dd..a75ee9c9 100644 --- a/scripts/houses/player_house_naboo_large_style_01.py +++ b/scripts/houses/player_house_naboo_large_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_naboo_house_large_deed.iff", "object/building/player/shared_player_house_naboo_large_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-7), float(3), float(-15.5))) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_naboo_medium_style_01.py b/scripts/houses/player_house_naboo_medium_style_01.py index fd16fd70..c5cf6211 100644 --- a/scripts/houses/player_house_naboo_medium_style_01.py +++ b/scripts/houses/player_house_naboo_medium_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_naboo_house_medium_deed.iff", "object/building/player/shared_player_house_naboo_medium_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-2.2),float(3),float(-11.5))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_naboo_small_style_01.py b/scripts/houses/player_house_naboo_small_style_01.py index eb092bce..7fdd3716 100644 --- a/scripts/houses/player_house_naboo_small_style_01.py +++ b/scripts/houses/player_house_naboo_small_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_naboo_house_small_deed.iff", "object/building/player/shared_player_house_naboo_small_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.7),float(3),float(8.2))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_naboo_small_style_02.py b/scripts/houses/player_house_naboo_small_style_02.py index f5f35f0f..05f46d81 100644 --- a/scripts/houses/player_house_naboo_small_style_02.py +++ b/scripts/houses/player_house_naboo_small_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_naboo_house_small_style_02_deed.iff", "object/building/player/shared_player_house_naboo_small_style_02.iff", 1) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(8.4),float(3),float(7.2))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(100) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_naboo_small_window_style_01.py b/scripts/houses/player_house_naboo_small_window_style_01.py index 7ffa7dec..375af434 100644 --- a/scripts/houses/player_house_naboo_small_window_style_01.py +++ b/scripts/houses/player_house_naboo_small_window_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_naboo_house_small_window_deed.iff", "object/building/player/shared_player_house_naboo_small_window_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.7),float(3),float(8.2))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("rori") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_sandcrawler.py b/scripts/houses/player_house_sandcrawler.py index c14d2b8c..3d33b10f 100644 --- a/scripts/houses/player_house_sandcrawler.py +++ b/scripts/houses/player_house_sandcrawler.py @@ -2,8 +2,8 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): - houseTemplate = HouseTemplate("object/tangible/saga_system/rewards/shared_structure_deed_player_house_sandcrawler.iff", "object/building/player/shared_player_house_sandcrawler.iff", 3) +def setup(housingTemplates): + houseTemplate = HouseTemplate("object/tangible/saga_system/rewards/shared_structure_deed_player_house_sandcrawler.iff", "object/building/player/shared_player_house_sandcrawler.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-8.75), float(3.86), float(1))) houseTemplate.addPlaceablePlanet("tatooine") @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_sith_meditation_room.py b/scripts/houses/player_house_sith_meditation_room.py index 6e75e875..e1e6a892 100644 --- a/scripts/houses/player_house_sith_meditation_room.py +++ b/scripts/houses/player_house_sith_meditation_room.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/tcg/series3/shared_structure_deed_sith_meditation_room_deed.iff", "object/building/player/shared_player_house_sith_meditation_room.iff", 3) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(3), float(2.86), float(5.7))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_tatooine_large_style_01.py b/scripts/houses/player_house_tatooine_large_style_01.py index 3085eb20..37a9b894 100644 --- a/scripts/houses/player_house_tatooine_large_style_01.py +++ b/scripts/houses/player_house_tatooine_large_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_tatooine_house_large_deed.iff", "object/building/player/shared_player_house_tatooine_large_style_01.iff", 5) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-3), float(3), float(15.8))) @@ -10,6 +10,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("lok") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(500) + houseTemplate.setBaseMaintenanceRate(26) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_tatooine_medium_style_01.py b/scripts/houses/player_house_tatooine_medium_style_01.py index d173048d..959cbb7e 100644 --- a/scripts/houses/player_house_tatooine_medium_style_01.py +++ b/scripts/houses/player_house_tatooine_medium_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_tatooine_house_medium_deed.iff", "object/building/player/shared_player_house_tatooine_medium_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(4.3),float(2.26),float(12.5))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("lok") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(18) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_tatooine_small_style_01.py b/scripts/houses/player_house_tatooine_small_style_01.py index eff8a21d..1e2579c2 100644 --- a/scripts/houses/player_house_tatooine_small_style_01.py +++ b/scripts/houses/player_house_tatooine_small_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_tatooine_house_small_deed.iff", "object/building/player/shared_player_house_tatooine_small_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.7),float(3),float(7.9))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("lok") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(8) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_tatooine_small_style_02.py b/scripts/houses/player_house_tatooine_small_style_02.py index e5484c22..8c953386 100644 --- a/scripts/houses/player_house_tatooine_small_style_02.py +++ b/scripts/houses/player_house_tatooine_small_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_tatooine_house_small_style_02_deed.iff", "object/building/player/shared_player_house_tatooine_small_style_02.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.7),float(3),float(8.2))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("lok") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(8) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_tatooine_small_window_style_01.py b/scripts/houses/player_house_tatooine_small_window_style_01.py index eff8a21d..1e2579c2 100644 --- a/scripts/houses/player_house_tatooine_small_window_style_01.py +++ b/scripts/houses/player_house_tatooine_small_window_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_tatooine_house_small_deed.iff", "object/building/player/shared_player_house_tatooine_small_style_01.iff", 2) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(-1.7),float(3),float(7.9))) @@ -10,5 +10,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("lok") houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(8) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_house_tcg_8_bespin_house.py b/scripts/houses/player_house_tcg_8_bespin_house.py index c7ac7d0b..2f37c85a 100644 --- a/scripts/houses/player_house_tcg_8_bespin_house.py +++ b/scripts/houses/player_house_tcg_8_bespin_house.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_player_house_tcg_8_bespin_house_deed.iff", "object/building/player/shared_player_house_tcg_8_bespin_house.iff", 3) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(0), float(2.86), float(-3.5))) @@ -14,6 +14,7 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(350) + houseTemplate.setBaseMaintenanceRate(8) - core.housingService.addHousingTemplate(houseTemplate) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_merchant_tent_style_01.py b/scripts/houses/player_merchant_tent_style_01.py index 3eef6c91..684cbcb6 100644 --- a/scripts/houses/player_merchant_tent_style_01.py +++ b/scripts/houses/player_merchant_tent_style_01.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_merchant_tent_style_01_deed.iff", "object/building/player/shared_player_merchant_tent_style_01.iff", 1) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(3.5),float(-0.3),float(3.5))) @@ -14,5 +14,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(8) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_merchant_tent_style_02.py b/scripts/houses/player_merchant_tent_style_02.py index 811c5a5e..96668f8d 100644 --- a/scripts/houses/player_merchant_tent_style_02.py +++ b/scripts/houses/player_merchant_tent_style_02.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_merchant_tent_style_02_deed.iff", "object/building/player/shared_player_merchant_tent_style_02.iff", 1) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(3.5),float(-0.3),float(3.5))) @@ -14,5 +14,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(8) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/houses/player_merchant_tent_style_03.py b/scripts/houses/player_merchant_tent_style_03.py index d908b947..abfa4196 100644 --- a/scripts/houses/player_merchant_tent_style_03.py +++ b/scripts/houses/player_merchant_tent_style_03.py @@ -2,7 +2,7 @@ import sys from services.housing import HouseTemplate from engine.resources.scene import Point3D -def setup(core): +def setup(housingTemplates): houseTemplate = HouseTemplate("object/tangible/deed/player_house_deed/shared_merchant_tent_style_03_deed.iff", "object/building/player/shared_player_merchant_tent_style_03.iff", 1) houseTemplate.addBuildingSign("object/tangible/sign/player/shared_house_address.iff", Point3D(float(3.5),float(-0.3),float(3.5))) @@ -14,5 +14,6 @@ def setup(core): houseTemplate.addPlaceablePlanet("dantooine") houseTemplate.addPlaceablePlanet("lok") houseTemplate.setDefaultItemLimit(200) - core.housingService.addHousingTemplate(houseTemplate) + houseTemplate.setBaseMaintenanceRate(8) + housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate) return \ No newline at end of file diff --git a/scripts/loot/lootItems/clothing/robes/apprentice_robe.py b/scripts/loot/lootItems/clothing/robes/apprentice_robe.py index 25d13f68..a717ac1b 100644 --- a/scripts/loot/lootItems/clothing/robes/apprentice_robe.py +++ b/scripts/loot/lootItems/clothing/robes/apprentice_robe.py @@ -1,7 +1,6 @@ - def itemTemplate(): - return ['object/tangible/loot/creature_loot/collections/shared_jedi_holocron_01.iff'] + return ['object/tangible/wearables/robe/shared_robe_jedi_light_s02.iff'] def customItemName(): diff --git a/scripts/mobiles/lairgroups/tatooine_starter.py b/scripts/mobiles/lairgroups/tatooine_starter.py index 55242c03..55016760 100644 --- a/scripts/mobiles/lairgroups/tatooine_starter.py +++ b/scripts/mobiles/lairgroups/tatooine_starter.py @@ -5,9 +5,13 @@ from java.util import Vector def addLairGroup(core): spawnTemplate1 = LairSpawnTemplate(-1, 'tatooine_kreetle_lair_neutral_small', 5, 20) spawnTemplate2 = LairSpawnTemplate(-1, 'tatooine_womprat_lair_neutral_small', 5, 15) - + spawnTemplate3 = LairSpawnTemplate(-1, 'tatooine_rill_lair_neutral_small', 5, 15) + spawnTemplate4 = LairSpawnTemplate(-1, 'tatooine_worrt_lair_neutral_small', 5, 15) spawnTemplates = Vector() - #spawnTemplates.add(spawnTemplate1) + spawnTemplates.add(spawnTemplate1) spawnTemplates.add(spawnTemplate2) + spawnTemplates.add(spawnTemplate3) + spawnTemplates.add(spawnTemplate4) - core.spawnService.addLairGroup('tatooine_starter', spawnTemplates) \ No newline at end of file + core.spawnService.addLairGroup('tatooine_starter', spawnTemplates) + return \ No newline at end of file diff --git a/scripts/mobiles/spawnareas/mos_eisley_lair.py b/scripts/mobiles/spawnareas/mos_eisley_lair.py index fe0b5291..6b2de98f 100644 --- a/scripts/mobiles/spawnareas/mos_eisley_lair.py +++ b/scripts/mobiles/spawnareas/mos_eisley_lair.py @@ -1,6 +1,5 @@ import sys def addSpawnArea(core): - core.spawnService.addLairSpawnArea('tatooine_starter', 3400, -4775, 2048, 'tatooine') - - + core.spawnService.addLairSpawnArea('tatooine_starter', 3730, -4655, 1024, 'tatooine') + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/bantha.py b/scripts/mobiles/tatooine/bantha.py index 4d5ee1e7..19ee591f 100644 --- a/scripts/mobiles/tatooine/bantha.py +++ b/scripts/mobiles/tatooine/bantha.py @@ -1,15 +1,30 @@ import sys from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('bantha') + mobileTemplate.setLevel(14) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(5) + mobileTemplate.setWeaponType(6) + mobileTemplate.setAttackSpeed(1.0) + templates = Vector() templates.add('object/mobile/shared_bantha_hue.iff') - mobileTemplate.setCreatureName('bantha') mobileTemplate.setTemplates(templates) - mobileTemplate.setLevel(14) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', 6, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + attacks = Vector() mobileTemplate.setDefaultAttack('creatureMeleeAttack') mobileTemplate.setAttacks(attacks) - core.spawnService.addMobileTemplate('bantha', mobileTemplate) \ No newline at end of file + + core.spawnService.addMobileTemplate('bantha', mobileTemplate) + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/dewback.py b/scripts/mobiles/tatooine/dewback.py index f2c2bb79..086b3fee 100644 --- a/scripts/mobiles/tatooine/dewback.py +++ b/scripts/mobiles/tatooine/dewback.py @@ -1,16 +1,30 @@ import sys from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('dewback') + mobileTemplate.setLevel(17) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(5) + mobileTemplate.setWeaponType(6) + mobileTemplate.setAttackSpeed(1.0) + templates = Vector() templates.add('object/mobile/shared_dewback.iff') - mobileTemplate.setCreatureName('dewback') mobileTemplate.setTemplates(templates) - mobileTemplate.setLevel(17) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', 6, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + attacks = Vector() mobileTemplate.setDefaultAttack('creatureMeleeAttack') mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('dewback', mobileTemplate) - \ No newline at end of file + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/krayt_dragon.py b/scripts/mobiles/tatooine/krayt_dragon.py index aded5429..6af77734 100644 --- a/scripts/mobiles/tatooine/krayt_dragon.py +++ b/scripts/mobiles/tatooine/krayt_dragon.py @@ -1,19 +1,30 @@ import sys from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('krayt_dragon') + mobileTemplate.setLevel(10) + mobileTemplate.setDifficulty(2) + mobileTemplate.setAttackRange(12) + mobileTemplate.setWeaponType(6) + mobileTemplate.setAttackSpeed(1.0) + templates = Vector() templates.add('object/mobile/shared_krayt_dragon.iff') mobileTemplate.setTemplates(templates) - mobileTemplate.setLevel(10) - mobileTemplate.setDifficulty(2) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', 6, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + attacks = Vector() mobileTemplate.setDefaultAttack('creatureMeleeAttack') mobileTemplate.setAttacks(attacks) - mobileTemplate.setCreatureName('krayt_dragon') - mobileTemplate.setScale(2) - mobileTemplate.setAttackRange(12) + core.spawnService.addMobileTemplate('krayt_dragon', mobileTemplate) - \ No newline at end of file + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/krayt_dragon_ancient.py b/scripts/mobiles/tatooine/krayt_dragon_ancient.py index a65f6786..b8450ec0 100644 --- a/scripts/mobiles/tatooine/krayt_dragon_ancient.py +++ b/scripts/mobiles/tatooine/krayt_dragon_ancient.py @@ -1,19 +1,30 @@ import sys from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('krayt_dragon_ancient') + mobileTemplate.setLevel(90) + mobileTemplate.setDifficulty(2) + mobileTemplate.setAttackRange(12) + mobileTemplate.setWeaponType(6) + mobileTemplate.setAttackSpeed(1.0) + templates = Vector() templates.add('object/mobile/shared_krayt_dragon.iff') mobileTemplate.setTemplates(templates) - mobileTemplate.setLevel(90) - mobileTemplate.setDifficulty(2) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', 6, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + attacks = Vector() mobileTemplate.setDefaultAttack('creatureMeleeAttack') mobileTemplate.setAttacks(attacks) - mobileTemplate.setCreatureName('krayt_dragon_ancient') - mobileTemplate.setScale(2) - mobileTemplate.setAttackRange(12) + core.spawnService.addMobileTemplate('krayt_dragon_ancient', mobileTemplate) - \ No newline at end of file + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/kreetle.py b/scripts/mobiles/tatooine/kreetle.py index 376add57..a118c107 100644 --- a/scripts/mobiles/tatooine/kreetle.py +++ b/scripts/mobiles/tatooine/kreetle.py @@ -1,18 +1,30 @@ import sys from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('kreetle') + mobileTemplate.setLevel(5) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(5) + mobileTemplate.setWeaponType(6) + mobileTemplate.setAttackSpeed(1.0) + templates = Vector() templates.add('object/mobile/shared_kreetle.iff') - mobileTemplate.setCreatureName('kreetle') mobileTemplate.setTemplates(templates) - mobileTemplate.setAttackRange(5) - mobileTemplate.setAttackSpeed(5) - mobileTemplate.setLevel(5) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', 6, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) + attacks = Vector() mobileTemplate.setDefaultAttack('creatureMeleeAttack') mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('kreetle', mobileTemplate) - \ No newline at end of file + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/tusken_raider.py b/scripts/mobiles/tatooine/tusken_raider.py index f3a3e867..4c2a2277 100644 --- a/scripts/mobiles/tatooine/tusken_raider.py +++ b/scripts/mobiles/tatooine/tusken_raider.py @@ -26,4 +26,4 @@ def addTemplate(core): mobileTemplate.setAttacks(attacks) core.spawnService.addMobileTemplate('tusken_raider', mobileTemplate) - \ No newline at end of file + return \ No newline at end of file diff --git a/scripts/mobiles/tatooine/womprat.py b/scripts/mobiles/tatooine/womprat.py index f4277933..7852829b 100644 --- a/scripts/mobiles/tatooine/womprat.py +++ b/scripts/mobiles/tatooine/womprat.py @@ -1,22 +1,30 @@ import sys from services.spawn import MobileTemplate +from services.spawn import WeaponTemplate from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() + + mobileTemplate.setCreatureName('womprat') + mobileTemplate.setLevel(5) + mobileTemplate.setDifficulty(0) + mobileTemplate.setAttackRange(5) + mobileTemplate.setWeaponType(6) + mobileTemplate.setAttackSpeed(1.0) + templates = Vector() templates.add('object/mobile/shared_womp_rat.iff') - mobileTemplate.setCreatureName('womprat') mobileTemplate.setTemplates(templates) - mobileTemplate.setAttackRange(5) - mobileTemplate.setAttackSpeed(5) - mobileTemplate.setLevel(5) - mobileTemplate.setAttackRange(3) - mobileTemplate.setAttackSpeed(1.0) - mobileTemplate.setWeaponType(6) + + weaponTemplates = Vector() + weapontemplate = WeaponTemplate('object/weapon/melee/unarmed/shared_unarmed_default.iff', 6, 1.0) + weaponTemplates.add(weapontemplate) + mobileTemplate.setWeaponTemplateVector(weaponTemplates) attacks = Vector() mobileTemplate.setDefaultAttack('creatureMeleeAttack') mobileTemplate.setAttacks(attacks) + core.spawnService.addMobileTemplate('womprat', mobileTemplate) - \ No newline at end of file + return \ No newline at end of file diff --git a/scripts/object/mobile/dressed_fs_junk_dealer.py b/scripts/object/mobile/dressed_fs_junk_dealer.py index ccad8904..6fed84e5 100644 --- a/scripts/object/mobile/dressed_fs_junk_dealer.py +++ b/scripts/object/mobile/dressed_fs_junk_dealer.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dealer_f_01.py b/scripts/object/mobile/junk_dealer_f_01.py index ccad8904..6fed84e5 100644 --- a/scripts/object/mobile/junk_dealer_f_01.py +++ b/scripts/object/mobile/junk_dealer_f_01.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dealer_f_02.py b/scripts/object/mobile/junk_dealer_f_02.py index ccad8904..6e9644e2 100644 --- a/scripts/object/mobile/junk_dealer_f_02.py +++ b/scripts/object/mobile/junk_dealer_f_02.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_smuggler') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dealer_f_03.py b/scripts/object/mobile/junk_dealer_f_03.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_dealer_f_03.py +++ b/scripts/object/mobile/junk_dealer_f_03.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dealer_m_01.py b/scripts/object/mobile/junk_dealer_m_01.py index ccad8904..6fed84e5 100644 --- a/scripts/object/mobile/junk_dealer_m_01.py +++ b/scripts/object/mobile/junk_dealer_m_01.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dealer_m_02.py b/scripts/object/mobile/junk_dealer_m_02.py index ccad8904..6e9644e2 100644 --- a/scripts/object/mobile/junk_dealer_m_02.py +++ b/scripts/object/mobile/junk_dealer_m_02.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_smuggler') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dealer_m_03.py b/scripts/object/mobile/junk_dealer_m_03.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_dealer_m_03.py +++ b/scripts/object/mobile/junk_dealer_m_03.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_dender.py b/scripts/object/mobile/junk_dender.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_dender.py +++ b/scripts/object/mobile/junk_dender.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_lila.py b/scripts/object/mobile/junk_lila.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_lila.py +++ b/scripts/object/mobile/junk_lila.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_malik.py b/scripts/object/mobile/junk_malik.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_malik.py +++ b/scripts/object/mobile/junk_malik.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_nado.py b/scripts/object/mobile/junk_nado.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_nado.py +++ b/scripts/object/mobile/junk_nado.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_nathan.py b/scripts/object/mobile/junk_nathan.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_nathan.py +++ b/scripts/object/mobile/junk_nathan.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_ollobo.py b/scripts/object/mobile/junk_ollobo.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_ollobo.py +++ b/scripts/object/mobile/junk_ollobo.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_quich.py b/scripts/object/mobile/junk_quich.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_quich.py +++ b/scripts/object/mobile/junk_quich.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_reggi.py b/scripts/object/mobile/junk_reggi.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_reggi.py +++ b/scripts/object/mobile/junk_reggi.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_sheani.py b/scripts/object/mobile/junk_sheani.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_sheani.py +++ b/scripts/object/mobile/junk_sheani.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/junk_sneg.py b/scripts/object/mobile/junk_sneg.py index ccad8904..9ed1eded 100644 --- a/scripts/object/mobile/junk_sneg.py +++ b/scripts/object/mobile/junk_sneg.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('junk_dealer_special') return \ No newline at end of file diff --git a/scripts/object/mobile/outbreak_junk_dealer_f_01.py b/scripts/object/mobile/outbreak_junk_dealer_f_01.py index ccad8904..8d5252a1 100644 --- a/scripts/object/mobile/outbreak_junk_dealer_f_01.py +++ b/scripts/object/mobile/outbreak_junk_dealer_f_01.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('outbreak_junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/outbreak_junk_dealer_f_02.py b/scripts/object/mobile/outbreak_junk_dealer_f_02.py index ccad8904..8d5252a1 100644 --- a/scripts/object/mobile/outbreak_junk_dealer_f_02.py +++ b/scripts/object/mobile/outbreak_junk_dealer_f_02.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('outbreak_junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/outbreak_junk_dealer_m_01.py b/scripts/object/mobile/outbreak_junk_dealer_m_01.py index ccad8904..8d5252a1 100644 --- a/scripts/object/mobile/outbreak_junk_dealer_m_01.py +++ b/scripts/object/mobile/outbreak_junk_dealer_m_01.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('outbreak_junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/outbreak_junk_dealer_m_02.py b/scripts/object/mobile/outbreak_junk_dealer_m_02.py index ccad8904..8d5252a1 100644 --- a/scripts/object/mobile/outbreak_junk_dealer_m_02.py +++ b/scripts/object/mobile/outbreak_junk_dealer_m_02.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('outbreak_junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/outbreak_junk_dealer_m_03.py b/scripts/object/mobile/outbreak_junk_dealer_m_03.py index ccad8904..8d5252a1 100644 --- a/scripts/object/mobile/outbreak_junk_dealer_m_03.py +++ b/scripts/object/mobile/outbreak_junk_dealer_m_03.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('outbreak_junk_dealer') return \ No newline at end of file diff --git a/scripts/object/mobile/respec_seller_f_1.py b/scripts/object/mobile/respec_seller_f_1.py index c7327815..1af596e0 100644 --- a/scripts/object/mobile/respec_seller_f_1.py +++ b/scripts/object/mobile/respec_seller_f_1.py @@ -4,4 +4,7 @@ from resources.datatables import Options def setup(core, object): object.setAttachment('radial_filename', 'object/conversation') object.setAttachment('conversationFile', 'respec') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + object.setStfName('respec_seller') return \ No newline at end of file diff --git a/scripts/object/mobile/som/must_junk.py b/scripts/object/mobile/som/must_junk.py index ccad8904..d33eab84 100644 --- a/scripts/object/mobile/som/must_junk.py +++ b/scripts/object/mobile/som/must_junk.py @@ -1,4 +1,10 @@ import sys +from resources.datatables import Options def setup(core, object): + object.setAttachment('radial_filename', 'object/conversation'); + object.setAttachment('conversationFile','junk_dealer') + object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) + object.setStfFilename('mob/creature_names') + junkdealer.setStfName('som_mustafarian_junk') return \ No newline at end of file diff --git a/scripts/object/tangible/deed/city_deed/cityhall_corellia_deed.py b/scripts/object/tangible/deed/city_deed/cityhall_corellia_deed.py index d76c4b31..07ab9319 100644 --- a/scripts/object/tangible/deed/city_deed/cityhall_corellia_deed.py +++ b/scripts/object/tangible/deed/city_deed/cityhall_corellia_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/city_deed/shared_cityhall_corellia_deed.iff') - #object.setLotRequirement(5) - object.setBMR(308) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/city_deed/cityhall_naboo_deed.py b/scripts/object/tangible/deed/city_deed/cityhall_naboo_deed.py index 51249c92..07ab9319 100644 --- a/scripts/object/tangible/deed/city_deed/cityhall_naboo_deed.py +++ b/scripts/object/tangible/deed/city_deed/cityhall_naboo_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/city_deed/shared_cityhall_naboo_deed.iff') - #object.setLotRequirement(5) - object.setBMR(308) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/city_deed/cityhall_tatooine_deed.py b/scripts/object/tangible/deed/city_deed/cityhall_tatooine_deed.py index d0afdb68..07ab9319 100644 --- a/scripts/object/tangible/deed/city_deed/cityhall_tatooine_deed.py +++ b/scripts/object/tangible/deed/city_deed/cityhall_tatooine_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff') - #object.setLotRequirement(5) - object.setBMR(308) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/guild_deed/corellia_guild_deed.py b/scripts/object/tangible/deed/guild_deed/corellia_guild_deed.py index 4551ea56..07ab9319 100644 --- a/scripts/object/tangible/deed/guild_deed/corellia_guild_deed.py +++ b/scripts/object/tangible/deed/guild_deed/corellia_guild_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_guildhall_corellia_style_01.iff') - object.setStructureTemplate('object/tangible/deed/guild_deed/shared_corellia_guild_deed.iff') - object.setLotRequirement(5) - object.setBMR(100) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/guild_deed/generic_guild_deed.py b/scripts/object/tangible/deed/guild_deed/generic_guild_deed.py index e7bc0a46..07ab9319 100644 --- a/scripts/object/tangible/deed/guild_deed/generic_guild_deed.py +++ b/scripts/object/tangible/deed/guild_deed/generic_guild_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_guildhall_corellia_style_01.iff') - object.setStructureTemplate('object/tangible/deed/guild_deed/shared_generic_guild_deed.iff') - object.setLotRequirement(5) - object.setBMR(100) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/guild_deed/naboo_guild_deed.py b/scripts/object/tangible/deed/guild_deed/naboo_guild_deed.py index 773614bf..07ab9319 100644 --- a/scripts/object/tangible/deed/guild_deed/naboo_guild_deed.py +++ b/scripts/object/tangible/deed/guild_deed/naboo_guild_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_guildhall_naboo_style_01.iff') - object.setStructureTemplate('object/tangible/deed/guild_deed/shared_naboo_guild_deed.iff') - object.setLotRequirement(5) - object.setBMR(100) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/guild_deed/tatooine_guild_deed.py b/scripts/object/tangible/deed/guild_deed/tatooine_guild_deed.py index fe254f2c..07ab9319 100644 --- a/scripts/object/tangible/deed/guild_deed/tatooine_guild_deed.py +++ b/scripts/object/tangible/deed/guild_deed/tatooine_guild_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_guildhall_tatooine_style_01.iff') - object.setStructureTemplate('object/tangible/deed/guild_deed/shared_tatooine_guild_deed.iff') - object.setLotRequirement(5) - object.setBMR(100) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/guild_deed/tatooine_guild_style_02_deed.py b/scripts/object/tangible/deed/guild_deed/tatooine_guild_style_02_deed.py index 8560e4bb..07ab9319 100644 --- a/scripts/object/tangible/deed/guild_deed/tatooine_guild_style_02_deed.py +++ b/scripts/object/tangible/deed/guild_deed/tatooine_guild_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_guildhall_tatooine_style_02.iff') - object.setStructureTemplate('object/tangible/deed/guild_deed/shared_tatooine_guild_style_02_deed.iff') - object.setLotRequirement(5) - object.setBMR(100) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py index bc69c878..10d24ebd 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') - object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm.iff') - object.setLotRequirement(1) - object.setBMR(16) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_organic/shared_mining_organic_flora_farm.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py index 3bda16b3..8a14fe9a 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_elite.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm_elite.iff') - object.setLotRequirement(3) - object.setBMR(120) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_organic/shared_mining_organic_flora_farm_elite.iff') + object.setAttachment('LotRequirement', 3) + object.setIntAttribute('examine_maintenance_rate', 120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py index 419f60f5..1006c18b 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_heavy.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm_heavy.iff') - object.setLotRequirement(1) - object.setBMR(90) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_organic/shared_mining_organic_flora_farm_heavy.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py index 9eb27e8b..41c49098 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_flora_deed_medium.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') - object.setStructureTemplate('object/installation/mining_organic/shared_mining_organic_flora_farm_medium.iff') - object.setLotRequirement(1) - object.setBMR(60) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_organic/shared_mining_organic_flora_farm_medium.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py index 5a4a2404..d11eb62d 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') - object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_1.iff') - object.setLotRequirement(1) - object.setBMR(16) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_gas/shared_mining_gas_harvester_style_1.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py index f560acdf..0ea574be 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_elite.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_4.iff') - object.setLotRequirement(3) - object.setBMR(120) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_gas/shared_mining_gas_harvester_style_4.iff') + object.setAttachment('LotRequirement', 3) + object.setIntAttribute('examine_maintenance_rate', 120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py index c9bbd64b..d77581cf 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_heavy.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_3.iff') - object.setLotRequirement(1) - object.setBMR(90) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_gas/shared_mining_gas_harvester_style_3.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py index 10a7007a..4e999ccb 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_gas_deed_medium.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') - object.setStructureTemplate('object/installation/mining_gas/shared_mining_gas_harvester_style_2.iff') - object.setLotRequirement(1) - object.setBMR(60) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_gas/shared_mining_gas_harvester_style_2.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py index b0455145..39590829 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_1.iff') - object.setLotRequirement(1) - object.setBMR(16) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_harvester_style_1.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py index 723f3eab..b3eaba78 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_elite.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_4.iff') - object.setLotRequirement(3) - object.setBMR(120) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_harvester_style_4.iff') + object.setAttachment('LotRequirement', 3) + object.setIntAttribute('examine_maintenance_rate', 120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py index 773e722d..48a97f35 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_heavy.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_3.iff') - object.setLotRequirement(1) - object.setBMR(90) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_harvester_style_3.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py index 1f40b563..3ece7d28 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_liquid_deed_medium.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_harvester_style_2.iff') - object.setLotRequirement(1) - object.setBMR(60) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_harvester_style_2.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py index 0241a524..213a8d53 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester.iff') - object.setLotRequirement(1) - object.setBMR(16) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_moisture_harvester.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py index e008e004..ba7cf3f9 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_elite.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_elite.iff') - object.setLotRequirement(3) - object.setBMR(120) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_elite.iff') + object.setAttachment('LotRequirement', 3) + object.setIntAttribute('examine_maintenance_rate', 120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py index e9206a11..5ca18dc4 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_heavy.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_heavy.iff') - object.setLotRequirement(1) - object.setBMR(90) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_heavy.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py index 2d1b24d2..e14043d2 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_moisture_deed_medium.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') - object.setStructureTemplate('object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_medium.iff') - object.setLotRequirement(1) - object.setBMR(60) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_liquid/shared_mining_liquid_moisture_harvester_medium.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py index b8f86d6e..6c3db03a 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_deed_elite.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_elite.iff') - object.setLotRequirement(3) - object.setBMR(120) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_ore/shared_mining_ore_harvester_elite.iff') + object.setAttachment('LotRequirement', 3) + object.setIntAttribute('examine_maintenance_rate', 120) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py index 28978e9c..e15fd8b4 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_heavy_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') - object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_heavy.iff') - object.setLotRequirement(1) - object.setBMR(90) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_heavy.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_ore/shared_mining_ore_harvester_heavy.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 90) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py index ca897eb7..42fbafc3 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s1_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') - object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff') - object.setLotRequirement(1) - object.setBMR(16) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 16) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py index 97ca86a7..e619c2ee 100644 --- a/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py +++ b/scripts/object/tangible/deed/harvester_deed/harvester_ore_s2_deed.py @@ -2,8 +2,8 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/harvesterDeed') - object.setConstructorTemplate('object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') - object.setStructureTemplate('object/installation/mining_ore/shared_mining_ore_harvester_style_2.iff') - object.setLotRequirement(1) - object.setBMR(60) + object.setAttachment('ConstructorTemplate', 'object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_2.iff') + object.setAttachment('StructureTemplate', 'object/installation/mining_ore/shared_mining_ore_harvester_style_2.iff') + object.setAttachment('LotRequirement', 1) + object.setIntAttribute('examine_maintenance_rate', 60) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_large_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_large_deed.py index 7110ddc2..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_large_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_large_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_large_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_large_deed.iff') - object.setLotRequirement(5) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_large_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_large_style_02_deed.py index fd316e06..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_large_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_large_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_large_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_large_style_02_deed.iff') - object.setLotRequirement(5) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_deed.py index 0794bf6a..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_player_house_corellia_medium_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_medium_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_style_02_deed.py index ff561136..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_medium_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_player_house_corellia_medium_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_medium_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py index 412cb41f..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py index d7c943c8..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_floor_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_floor_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py index 5d4d2b6a..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py index af5a8c82..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/corellia_house_small_style_02_floor_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_small_style_02_floor_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_large_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_large_deed.py index 8762d716..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_large_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_large_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_large_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_large_deed.iff') - object.setLotRequirement(5) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_large_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_large_style_02_deed.py index 33ac2fb5..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_large_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_large_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_large_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_large_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s01_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s01_deed.py index 5c5fe535..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s01_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s01_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_large_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_large_window_s01_deed.iff') - object.setLotRequirement(2) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s02_deed.py index 8ad15d4e..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_large_window_s02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_large_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_large_window_s02_deed.iff') - object.setLotRequirement(2) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_deed.py index 98fbe311..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_medium_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_medium_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_style_02_deed.py index f8941dc1..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_medium_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_medium_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_deed.py index 28949069..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_medium_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_medium_windowed_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_s02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_s02_deed.py index b784b441..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_s02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_s02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_medium_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_medium_windowed_s02_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py index 15cdd156..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py index 830af4dc..5483eb6d 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_floor_02_deed.py @@ -2,8 +2,4 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_floor_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py index 54ae2ecb..29729ab1 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_deed.py @@ -2,8 +2,4 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_floor_02_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_floor_02_deed.py index 4ca8c73e..29729ab1 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_floor_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_style_02_floor_02_deed.py @@ -2,8 +2,4 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_style_02_floor_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_deed.py index 5bad5b8e..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_window_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_style_03_deed.py b/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_style_03_deed.py index 3666b630..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_style_03_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/generic_house_small_window_style_03_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_generic_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_generic_house_small_window_style_03_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/jabbas_sail_barge_deed.py b/scripts/object/tangible/deed/player_house_deed/jabbas_sail_barge_deed.py index 515f876b..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/jabbas_sail_barge_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/jabbas_sail_barge_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_jabbas_sail_barge.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_jabbas_sail_barge_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_01_deed.py b/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_01_deed.py index 39fa9d08..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_01_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_01_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_merchant_tent_style_01_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_02_deed.py index 387a8928..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_merchant_tent_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_03_deed.py b/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_03_deed.py index 38c8003f..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_03_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/merchant_tent_style_03_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_merchant_tent_style_03_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/mustafar_house_lg.py b/scripts/object/tangible/deed/player_house_deed/mustafar_house_lg.py index 9232137e..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/mustafar_house_lg.py +++ b/scripts/object/tangible/deed/player_house_deed/mustafar_house_lg.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_mustafar_house_lg.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/naboo_house_large_deed.py b/scripts/object/tangible/deed/player_house_deed/naboo_house_large_deed.py index 0f0a6353..5483eb6d 100644 --- a/scripts/object/tangible/deed/player_house_deed/naboo_house_large_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/naboo_house_large_deed.py @@ -2,12 +2,4 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_naboo_large_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_naboo_house_large_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) - return - - - - + return \ No newline at end of file diff --git a/scripts/object/tangible/deed/player_house_deed/naboo_house_medium_deed.py b/scripts/object/tangible/deed/player_house_deed/naboo_house_medium_deed.py index 22d9b33e..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/naboo_house_medium_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/naboo_house_medium_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_naboo_medium_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_naboo_house_medium_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/naboo_house_small_deed.py b/scripts/object/tangible/deed/player_house_deed/naboo_house_small_deed.py index edff2158..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/naboo_house_small_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/naboo_house_small_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_naboo_small_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_naboo_house_small_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/naboo_house_small_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/naboo_house_small_style_02_deed.py index adeca170..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/naboo_house_small_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/naboo_house_small_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_naboo_small_style_02.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_naboo_house_small_style_02_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/naboo_house_small_window_deed.py b/scripts/object/tangible/deed/player_house_deed/naboo_house_small_window_deed.py index 8ebc7feb..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/naboo_house_small_window_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/naboo_house_small_window_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_player_house_naboo_small_window_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_naboo_house_small_window_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/player_house_tcg_8_bespin_house_deed.py b/scripts/object/tangible/deed/player_house_deed/player_house_tcg_8_bespin_house_deed.py index 937edeb4..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/player_house_tcg_8_bespin_house_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/player_house_tcg_8_bespin_house_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_player_house_tcg_8_bespin_house_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/tatooine_house_large_deed.py b/scripts/object/tangible/deed/player_house_deed/tatooine_house_large_deed.py index 7110ddc2..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/tatooine_house_large_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/tatooine_house_large_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_corellia_large_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_corellia_house_large_deed.iff') - object.setLotRequirement(5) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/tatooine_house_medium_deed.py b/scripts/object/tangible/deed/player_house_deed/tatooine_house_medium_deed.py index b9918233..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/tatooine_house_medium_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/tatooine_house_medium_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_tatooine_medium_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_tatooine_house_medium_deed.iff') - object.setLotRequirement(2) - object.setBMR(18) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_deed.py b/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_deed.py index dd23d101..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_house_tatooine_small_style_01.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_tatooine_house_small_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_style_02_deed.py b/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_style_02_deed.py index 31de820d..07ab9319 100644 --- a/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_style_02_deed.py +++ b/scripts/object/tangible/deed/player_house_deed/tatooine_house_small_style_02_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_tatooine_house_small_style_02_deed.iff') - object.setStructureTemplate('object/tangible/deed/player_house_deed/shared_tatooine_house_small_deed.iff') - object.setLotRequirement(2) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/saga_system/rewards/structure_deed_player_house_sandcrawler.py b/scripts/object/tangible/saga_system/rewards/structure_deed_player_house_sandcrawler.py index 5a653b5c..07ab9319 100644 --- a/scripts/object/tangible/saga_system/rewards/structure_deed_player_house_sandcrawler.py +++ b/scripts/object/tangible/saga_system/rewards/structure_deed_player_house_sandcrawler.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/shared_construction_structure.iff') - object.setStructureTemplate('object/tangible/saga_system/rewards/shared_structure_deed_player_house_sandcrawler.iff') - object.setLotRequirement(5) - object.setBMR(26) return def use(core, actor, object): diff --git a/scripts/object/tangible/tcg/series3/structure_deed_jedi_meditation_room_deed.py b/scripts/object/tangible/tcg/series3/structure_deed_jedi_meditation_room_deed.py index 3abde0fa..01e3b335 100644 --- a/scripts/object/tangible/tcg/series3/structure_deed_jedi_meditation_room_deed.py +++ b/scripts/object/tangible/tcg/series3/structure_deed_jedi_meditation_room_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_jedi_meditation_room.iff') - object.setStructureTemplate('object/tangible/tcg/series3/shared_structure_deed_jedi_meditation_room_deed.iff') - object.setLotRequirement(3) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/tcg/series3/structure_deed_sith_meditation_room_deed.py b/scripts/object/tangible/tcg/series3/structure_deed_sith_meditation_room_deed.py index d069e412..01e3b335 100644 --- a/scripts/object/tangible/tcg/series3/structure_deed_sith_meditation_room_deed.py +++ b/scripts/object/tangible/tcg/series3/structure_deed_sith_meditation_room_deed.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_sith_meditation_room.iff') - object.setStructureTemplate('object/tangible/tcg/series3/shared_structure_deed_sith_meditation_room_deed.iff') - object.setLotRequirement(3) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/tcg/series5/structure_deed_player_house_hangar.py b/scripts/object/tangible/tcg/series5/structure_deed_player_house_hangar.py index 3abde0fa..01e3b335 100644 --- a/scripts/object/tangible/tcg/series5/structure_deed_player_house_hangar.py +++ b/scripts/object/tangible/tcg/series5/structure_deed_player_house_hangar.py @@ -2,10 +2,6 @@ import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') - object.setConstructorTemplate('object/building/player/construction/shared_construction_player_jedi_meditation_room.iff') - object.setStructureTemplate('object/tangible/tcg/series3/shared_structure_deed_jedi_meditation_room_deed.iff') - object.setLotRequirement(3) - object.setBMR(8) return def use(core, actor, object): diff --git a/scripts/object/tangible/terminal/terminal_mission.py b/scripts/object/tangible/terminal/terminal_mission.py index ccf684c0..10fe46c8 100644 --- a/scripts/object/tangible/terminal/terminal_mission.py +++ b/scripts/object/tangible/terminal/terminal_mission.py @@ -1,9 +1,7 @@ -from resources.common import TerminalType import sys def setup(core, object): - - core.mapService.addLocation(object.getPlanet(), 'Mission Terminal', object.getPosition().x, object.getPosition().z, 41, 44, 0) - object.setAttachment("terminalType", TerminalType.MISSION_GENERIC) + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:terminal_mission', object.getPosition().x, object.getPosition().z, 41, 44, 0) + object.setAttachment("terminalType", 1) return \ No newline at end of file diff --git a/scripts/object/tangible/terminal/terminal_mission_bounty.py b/scripts/object/tangible/terminal/terminal_mission_bounty.py index ccad8904..f97abb2a 100644 --- a/scripts/object/tangible/terminal/terminal_mission_bounty.py +++ b/scripts/object/tangible/terminal/terminal_mission_bounty.py @@ -1,4 +1,6 @@ import sys def setup(core, object): + object.setAttachment("terminalType", 2) + core.mapService.addLocation(object.getPlanet(), '@map_loc_cat_n:terminal_mission_bounty', object.getPosition().x, object.getPosition().z, 41, 78, 0) return \ No newline at end of file diff --git a/scripts/radial/deeds/harvesterDeed.py b/scripts/radial/deeds/harvesterDeed.py index cc8fdc7a..9d85158b 100644 --- a/scripts/radial/deeds/harvesterDeed.py +++ b/scripts/radial/deeds/harvesterDeed.py @@ -3,20 +3,18 @@ import sys def createRadial(core, owner, target, radials): radials.clear() - radials.add(RadialOptions(0, 21, 1, 'Use Deed')) + radials.add(RadialOptions(0, 21, 3, 'Use Deed')) #radials.add(RadialOptions(0, 7, 1, '111111')) #radials.add(RadialOptions(0, 15, 1, '')) #radials.add(RadialOptions(0, 61, 1, '')) return def handleSelection(core, owner, target, option): - if option == 21 and target: - owner.setAttachment('UsingHarvesterDeed', '1'); - core.harvesterService.enterStructurePlacementMode(target,owner) - if option == 61 and target: - object5 = core.harvesterService.constructionSite(owner,target) core.objectService.useObject(owner, target) + core.harvesterService.enterStructurePlacementMode(owner, target) + if option == 61 and target: + object5 = core.harvesterService.constructionSite(owner, target) if option == 15 and target: core.objectService.destroyObject(target) return diff --git a/scripts/static_spawns/kaas.py b/scripts/static_spawns/kaas.py index 7bcd17d9..b576e2da 100644 --- a/scripts/static_spawns/kaas.py +++ b/scripts/static_spawns/kaas.py @@ -68,7 +68,7 @@ def addPlanetSpawns(core, planet): stcSvc.spawnObject('object/building/general/shared_cave_01.iff', 'kaas', long(0), float(-6135.3), float(185), float(6575.0), float(0), float(0)) #Abandoned Separatist Base - stcSvc.spawnObject('object/building/military/shared_military_base_police_station_rebel_style_01.iff', 'kaas', long(0), float(-3509), float(77), float(6800), float(0), float(0)) + stcSvc.spawnObject('object/building/military/shared_military_base_police_station_rebel_style_01.iff', 'kaas', long(0), float(-3538), float(80), float(6758), float(0), float(0)) #Sith Meditation Chamber stcSvc.spawnObject('object/building/player/shared_player_house_sith_meditation_room.iff', 'kaas', long(0), float(4766), float(126), float(-7307), float(0), float(0)) @@ -82,6 +82,7 @@ def addPlanetSpawns(core, planet): stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_wall_1.iff', 'kaas', long(0), float(-58), float(77), float(6321), float(-0.71), float(0.71)) stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_wall_2.iff', 'kaas', long(0), float(-71), float(77), float(6312), float(0), float(0)) stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_temple_pillar.iff', 'kaas', long(0), float(-71.0), float(78), float(6320.8), float(0), float(0)) + stcSvc.spawnObject('object/static/structure/dantooine/shared_dant_jedi_main_structure.iff', 'kaas', long(0), float(-97), float(78), float(6376), float(0), float(0)) return diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index b376cf1f..1d7b383b 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -3,20 +3,26 @@ from resources.datatables import Options from resources.datatables import StateStatus def addPlanetSpawns(core, planet): - + stcSvc = core.staticService - #this script is no longer for NPC spawning usage. - Levarris - #stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid_red.iff', 'tatooine', long(26582), float(-14.3), float(2.0), float(47.4), float(0.70), float(0.71)) + # Objects + stcSvc.spawnObject('object/tangible/terminal/shared_terminal_character_builder.iff', 'tatooine', long(0), float(3525), float(4), float(-4801), float(0.70), float(0.71)) - #object = stcSvc.spawnObject('object/mobile/shared_respec_seller_f_1.iff', 'tatooine', long(0), float(3533.14), float(5), float(-4788.86), float(-0.3327), float(0.9288)) - #object.setOptionsBitmask(264) - junkdealer = stcSvc.spawnObject('object/mobile/shared_junk_dealer_m_01.iff', 'tatooine', long(0), float(3525), float(4), float(-4804), float(0.70), float(0.71)) - junkdealer.setOptionsBitmask(264) - junkdealer.setCustomName('a Junk Dealer') - junkdealer.setAttachment('radial_filename', 'object/conversation'); - junkdealer.setAttachment('conversationFile','junk_dealer') + # Buildings + + # Example + #building = stcSvc.spawnObject('object/building/myThatchedHut.iff', 'tatooine', long(0), float(3525), float(4), float(-4804), float(0.70), float(0.71)) + #stcSvc.spawnObject('object/mobile/shared_my_npc.iff', 'tatooine', building.getCellByCellNumber(7), float(3525), float(4), float(-4804), float(0.70), float(0.71)) + + # NPCs + + stcSvc.spawnObject('object/mobile/shared_respec_seller_f_1.iff', 'tatooine', long(0), float(3533.14), float(5), float(-4788.86), float(-0.3327), float(0.9288)) + + stcSvc.spawnObject('object/mobile/shared_junk_dealer_m_01.iff', 'tatooine', long(0), float(3525), float(4), float(-4804), float(0.70), float(0.71)) + + #stcSvc.spawnObject('object/mobile/shared_3po_protocol_droid_red.iff', 'tatooine', long(26582), float(-14.3), float(2.0), float(47.4), float(0.70), float(0.71)) return diff --git a/src/main/NGECore.java b/src/main/NGECore.java index c99d4912..18f15e3d 100644 --- a/src/main/NGECore.java +++ b/src/main/NGECore.java @@ -213,6 +213,7 @@ public class NGECore { private ObjectDatabase resourcesODB; private ObjectDatabase resourceRootsODB; private ObjectDatabase resourceHistoryODB; + private ObjectDatabase bountiesODB; public static boolean PACKET_DEBUG = false; @@ -274,6 +275,7 @@ public class NGECore { resourceRootsODB = new ObjectDatabase("resourceroots", true, false, true); resourceHistoryODB = new ObjectDatabase("resourcehistory", true, false, true); auctionODB = new ObjectDatabase("auction", true, false, true); + bountiesODB = new ObjectDatabase("bounties", true, false, true); // Services loginService = new LoginService(this); @@ -363,6 +365,7 @@ public class NGECore { zoneDispatch.addService(bazaarService); zoneDispatch.addService(lootService); zoneDispatch.addService(mountService); + zoneDispatch.addService(housingService); zoneDispatch.addService(playerCityService); if (optionsConfigLoaded && options.getInt("LOAD.RESOURCE.SYSTEM") == 1) { @@ -482,7 +485,6 @@ public class NGECore { spawnService.loadLairGroups(); spawnService.loadSpawnAreas(); - housingService.loadHousingTemplates(); equipmentService.loadBonusSets(); retroService.run(); @@ -626,6 +628,10 @@ public class NGECore { return chatRoomODB; } + public ObjectDatabase getBountiesODB() { + return bountiesODB; + } + public ObjectDatabase getResourcesODB() { return resourcesODB; } diff --git a/src/protocol/swg/EnterStructurePlacementModeMessage.java b/src/protocol/swg/EnterStructurePlacementModeMessage.java index 3f12cf0a..b46ed3db 100644 --- a/src/protocol/swg/EnterStructurePlacementModeMessage.java +++ b/src/protocol/swg/EnterStructurePlacementModeMessage.java @@ -39,6 +39,7 @@ public class EnterStructurePlacementModeMessage extends SWGMessage { public EnterStructurePlacementModeMessage(SWGObject deed, String structureTemplate) { this.deed = deed; this.structureTemplate = structureTemplate; + deed.setAttachment("structureTemplate", structureTemplate); } @Override @@ -49,15 +50,10 @@ public class EnterStructurePlacementModeMessage extends SWGMessage { @Override public IoBuffer serialize() { IoBuffer result = IoBuffer.allocate(16 + structureTemplate.length()).order(ByteOrder.LITTLE_ENDIAN); - result.putShort((short) 3); result.putInt(0xE8A54DC1); - result.putLong(deed.getObjectID()); - - deed.setAttachment("structureTemplate", structureTemplate); result.put(getAsciiString(structureTemplate)); - return result.flip(); } diff --git a/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java index e0ce1fd6..b92f96c3 100644 --- a/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java +++ b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersMessage.java @@ -52,6 +52,7 @@ public class AuctionQueryHeadersMessage extends SWGMessage { setScreen(data.getInt()); setCategory(data.getInt()); setItemTypeCRC(data.getInt()); + data.get(); // unk int size = data.getInt(); try { setSearchString(new String(ByteBuffer.allocate(size * 2).put(data.array(), data.position(), size * 2).array(), "UTF-16LE")); @@ -59,11 +60,12 @@ public class AuctionQueryHeadersMessage extends SWGMessage { e.printStackTrace(); } data.position(data.position() + size * 2); + setUnkInt(data.getInt()); setMinPrice(data.getInt()); setMaxPrice(data.getInt()); setIncludeEntranceFee(data.get()); - data.skip(6); // unk + data.skip(5); // unk setVendorId(data.getLong()); setVendorFlag(data.get()); setOffset(data.getShort()); diff --git a/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java index a36bb523..e67de9b2 100644 --- a/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java +++ b/src/protocol/swg/auctionManagerClientListener/AuctionQueryHeadersResponseMessage.java @@ -103,7 +103,27 @@ public class AuctionQueryHeadersResponseMessage extends SWGMessage { result.putInt((int) ((item.getExpireTime() - System.currentTimeMillis()) / 1000)); result.putInt(item.getPrice()); result.putShort((short) 0); + result.putLong(item.getOwnerId()); + result.put((byte) (item.isAuction() ? 0 : 1)); + result.putLong(0); result.put((byte) 0); + result.putInt(2); // unk + result.putInt(0); + result.putShort((short) 0); + result.putInt(item.getItemType()); + + //result.putInt(0x400C); // category bitmask? + result.putInt(0); + int options = 0; + + if(item.getOwnerId() == playerId && (item.getStatus() == AuctionItem.OFFERED || item.getStatus() == AuctionItem.FORSALE)) + options |= 0x800; + + result.putInt(item.getAuctionOptions() | options); + result.putInt(0); + + + /*result.put((byte) 0); result.putInt(CRC.StringtoCRC(item.getItem().getTemplate())); result.putShort((short) 0); result.put((byte) 0); @@ -117,7 +137,7 @@ public class AuctionQueryHeadersResponseMessage extends SWGMessage { result.putInt(item.getItemType()); result.putInt(0); result.putInt(0); - result.putInt(0); + result.putInt(0);*/ /* result.put((byte) (item.isAuction() ? 0 : 1)); diff --git a/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java b/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java index 33307c41..6db48c5b 100644 --- a/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java +++ b/src/protocol/swg/auctionManagerClientListener/CreateImmediateAuctionMessage.java @@ -26,6 +26,7 @@ import java.nio.ByteBuffer; import org.apache.mina.core.buffer.IoBuffer; +import engine.resources.common.Utilities; import protocol.swg.SWGMessage; public class CreateImmediateAuctionMessage extends SWGMessage { @@ -100,8 +101,10 @@ public class CreateImmediateAuctionMessage extends SWGMessage { this.description = description; } - public byte getPremium() { - return premium; + public boolean getPremium() { + if(premium == 1) + return true; + return false; } public void setPremium(byte premium) { diff --git a/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java b/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java index b522ee35..0c5740fd 100644 --- a/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java +++ b/src/protocol/swg/objectControllerObjects/BuffBuilderChangeMessage.java @@ -6,7 +6,7 @@ import java.util.Vector; import org.apache.mina.core.buffer.IoBuffer; import protocol.swg.ObjControllerMessage; -import resources.objects.BuffItem; +import resources.buffs.BuffItem; public class BuffBuilderChangeMessage extends ObjControllerObject { diff --git a/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java b/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java index 96a959db..b4aa5cd1 100644 --- a/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java +++ b/src/protocol/swg/objectControllerObjects/BuffBuilderEndMessage.java @@ -27,7 +27,7 @@ import java.util.Vector; import org.apache.mina.core.buffer.IoBuffer; import protocol.swg.ObjControllerMessage; -import resources.objects.BuffItem; +import resources.buffs.BuffItem; public class BuffBuilderEndMessage extends ObjControllerObject { diff --git a/src/resources/common/BountyListItem.java b/src/resources/common/BountyListItem.java index a50272e8..ec096333 100644 --- a/src/resources/common/BountyListItem.java +++ b/src/resources/common/BountyListItem.java @@ -1,3 +1,4 @@ +<<<<<<< HEAD /******************************************************************************* * Copyright (c) 2013 * @@ -104,3 +105,111 @@ public class BountyListItem { assignedHunters.remove(objectId); } } +======= +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.common; + +import java.util.ArrayList; +import java.util.List; + +import com.sleepycat.persist.model.Entity; +import com.sleepycat.persist.model.PrimaryKey; + +@Entity +public class BountyListItem { + + @PrimaryKey + private long objectId; + private int creditReward; + private String profession; + private String faction; + private String name; + private List assignedHunters; + + public BountyListItem() { } + + public BountyListItem(long objectId, int creditReward, String profession, String faction, String name) { + this.objectId = objectId; + this.creditReward = creditReward; + this.profession = profession; + this.faction = faction; + this.setName(name); + this.setAssignedHunters(new ArrayList(3)); + } + + public long getObjectId() { + return objectId; + } + public void setObjectId(long objectId) { + this.objectId = objectId; + } + public int getCreditReward() { + return creditReward; + } + public void setCreditReward(int creditReward) { + this.creditReward = creditReward; + } + public String getProfession() { + return profession; + } + public void setProfession(String profession) { + this.profession = profession; + } + + public String getFaction() { + return faction; + } + + public void setFaction(String faction) { + this.faction = faction; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void addBounty(int amountToAdd) { + this.creditReward += amountToAdd; + } + + public List getAssignedHunters() { + return assignedHunters; + } + + public void setAssignedHunters(List assignedHunters) { + this.assignedHunters = assignedHunters; + } + + public void addBountyHunter(long objectId) { + assignedHunters.add(objectId); + } + + public void removeBountyHunter(long objectId) { + assignedHunters.remove(objectId); + } +} +>>>>>>> origin/master diff --git a/src/resources/common/Forager.java b/src/resources/common/Forager.java index e0445f29..6e27a207 100644 --- a/src/resources/common/Forager.java +++ b/src/resources/common/Forager.java @@ -32,10 +32,10 @@ import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; import main.NGECore; import resources.datatables.Options; +import resources.loot.LootGroup; import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; import resources.objects.group.GroupObject; -import resources.objects.loot.LootGroup; import resources.objects.tangible.TangibleObject; import services.ai.AIActor; diff --git a/src/resources/objectives/BountyMissionObjective.java b/src/resources/objectives/BountyMissionObjective.java index e17de5cd..51c8382c 100644 --- a/src/resources/objectives/BountyMissionObjective.java +++ b/src/resources/objectives/BountyMissionObjective.java @@ -1,3 +1,4 @@ +<<<<<<< HEAD /******************************************************************************* * Copyright (c) 2013 * @@ -78,3 +79,85 @@ public class BountyMissionObjective extends MissionObjective { public void setMarkObjId(long markObjId) { this.markObjId = markObjId; } } +======= +/******************************************************************************* + * Copyright (c) 2013 + * + * This File is part of NGECore2. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. + * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. + ******************************************************************************/ +package resources.objectives; + +import java.util.Random; + +import engine.resources.scene.Point3D; +import main.NGECore; +import resources.common.BountyListItem; +import resources.objects.creature.CreatureObject; +import resources.objects.mission.MissionObject; +import services.mission.MissionObjective; + +public class BountyMissionObjective extends MissionObjective { + + private Point3D lastKnownLocation; + private long markObjId; + + public BountyMissionObjective(MissionObject parent) { + super(parent); + } + + @Override + public void activate(NGECore core, CreatureObject player) { + if (isActivated()) + return; + + BountyListItem bountyTarget = core.missionService.getBountyListItem(getMissionObject().getBountyObjId()); + + setMarkObjId(bountyTarget.getObjectId()); + + // TODO: Change this to a comm message. + player.sendSystemMessage("@mission/mission_bounty_informant:target_hard_" + Integer.toString(new Random().nextInt(5)), (byte) 0); + + + } + + @Override + public void complete(NGECore core, CreatureObject player) { + + } + + @Override + public void abort(NGECore core, CreatureObject player) { + + } + + @Override + public void update(NGECore core, CreatureObject player) { + + } + + public Point3D getLastKnownLocation() { return lastKnownLocation; } + + public void setLastKnownLocation(Point3D lastKnownLocation) { this.lastKnownLocation = lastKnownLocation; } + + public long getMarkObjId() { return markObjId; } + + public void setMarkObjId(long markObjId) { this.markObjId = markObjId; } + +} +>>>>>>> origin/master diff --git a/src/resources/objectives/DeliveryMissionObjective.java b/src/resources/objectives/DeliveryMissionObjective.java index b5802390..6a116a8e 100644 --- a/src/resources/objectives/DeliveryMissionObjective.java +++ b/src/resources/objectives/DeliveryMissionObjective.java @@ -21,7 +21,6 @@ ******************************************************************************/ package resources.objectives; -import engine.resources.objects.SWGObject; import engine.resources.scene.Point3D; import main.NGECore; import resources.common.OutOfBand; @@ -37,14 +36,13 @@ public class DeliveryMissionObjective extends MissionObjective { private TangibleObject deliveryObject; private CreatureObject missionGiver; private CreatureObject dropOffNpc; - private NGECore core = NGECore.getInstance(); public DeliveryMissionObjective(MissionObject parent) { super(parent); } @Override - public void activate() { + public void activate(NGECore core, CreatureObject player) { if (isActivated()) return; @@ -97,25 +95,21 @@ public class DeliveryMissionObjective extends MissionObjective { } @Override - public void complete() { - CreatureObject completer = (CreatureObject) getMissionObject().getGrandparent(); - - if (completer == null) - return; - + public void complete(NGECore core, CreatureObject player) { + int reward = getMissionObject().getCreditReward(); - completer.addBankCredits(reward); + player.addBankCredits(reward); - completer.sendSystemMessage(new OutOfBand(new ProsePackage("@mission/mission_generic:success_w_amount", reward)), (byte) 0); + player.sendSystemMessage(new OutOfBand(new ProsePackage("@mission/mission_generic:success_w_amount", reward)), (byte) 0); - abort(); + abort(core, player); core.objectService.destroyObject(getMissionObject()); } @Override - public void abort() { + public void abort(NGECore core, CreatureObject player) { if (deliveryObject != null) core.objectService.destroyObject(deliveryObject.getObjectId()); @@ -127,7 +121,7 @@ public class DeliveryMissionObjective extends MissionObjective { } @Override - public void update() { + public void update(NGECore core, CreatureObject player) { setObjectivePhase(getObjectivePhase() + 1); @@ -154,10 +148,8 @@ public class DeliveryMissionObjective extends MissionObjective { } } - public boolean createDeliveryItem() { + public boolean createDeliveryItem(NGECore core, CreatureObject player) { - SWGObject player = getMissionObject().getGrandparent(); - if (player == null) return false; diff --git a/src/resources/objectives/DestroyMissionObjective.java b/src/resources/objectives/DestroyMissionObjective.java index e4832756..7437d46f 100644 --- a/src/resources/objectives/DestroyMissionObjective.java +++ b/src/resources/objectives/DestroyMissionObjective.java @@ -21,6 +21,8 @@ ******************************************************************************/ package resources.objectives; +import main.NGECore; +import resources.objects.creature.CreatureObject; import resources.objects.mission.MissionObject; import services.mission.MissionObjective; @@ -31,27 +33,28 @@ public class DestroyMissionObjective extends MissionObjective { } @Override - public void activate() { + public void activate(NGECore core, CreatureObject player) { // TODO Auto-generated method stub - + } @Override - public void complete() { + public void complete(NGECore core, CreatureObject player) { // TODO Auto-generated method stub - + } @Override - public void abort() { + public void abort(NGECore core, CreatureObject player) { // TODO Auto-generated method stub - + } @Override - public void update() { + public void update(NGECore core, CreatureObject player) { // TODO Auto-generated method stub - + } + } diff --git a/src/resources/objects/Buff.java b/src/resources/objects/Buff.java deleted file mode 100644 index fd6aa4e0..00000000 --- a/src/resources/objects/Buff.java +++ /dev/null @@ -1,485 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects; - -import java.nio.ByteOrder; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; - -import main.NGECore; - -import org.apache.mina.core.buffer.IoBuffer; -import org.apache.mina.core.buffer.SimpleBufferAllocator; - -import resources.objects.creature.CreatureObject; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -import engine.resources.common.CRC; - -@Persistent(version=10) -public class Buff implements IDelta { - - @NotPersistent - private SimpleBufferAllocator bufferPool = new SimpleBufferAllocator(); - private String group1, group2; - private int priority; - private float duration; - private String buffName; - private long ownerId; - private String effect1Name, effect2Name, effect3Name, effect4Name, effect5Name; - private float effect1Value, effect2Value, effect3Value, effect4Value, effect5Value; - private String callback; - private String particleEffect; - private boolean isDebuff; - private boolean removeOnDeath; - private boolean isRemovableByPlayer; - private int maxStacks; - private boolean isPersistent; - private boolean removeOnRespec; - private boolean aiRemoveOnEndCombat; - private boolean decayOnPvPDeath; - private long startTime; - private int totalPlayTime; - private byte decayCounter = 0; - @NotPersistent - private ScheduledFuture removalTask; - private int stacks = 1; - private long groupBufferId; - private int buffCRC; - - public Buff(Buff baseBuff, long ownerId) { - this.buffName = baseBuff.getBuffName(); - this.buffCRC = baseBuff.getBuffCRC(); - this.group1 = baseBuff.getGroup1(); - this.group2 = baseBuff.getGroup2(); - this.priority = baseBuff.getPriority(); - this.duration = baseBuff.getDuration(); - this.effect1Name = baseBuff.getEffect1Name(); - this.effect1Value = baseBuff.getEffect1Value(); - this.effect2Name = baseBuff.getEffect2Name(); - this.effect2Value = baseBuff.getEffect2Value(); - this.effect3Name = baseBuff.getEffect3Name(); - this.effect3Value = baseBuff.getEffect3Value(); - this.effect4Name = baseBuff.getEffect4Name(); - this.effect4Value = baseBuff.getEffect4Value(); - this.effect5Name = baseBuff.getEffect5Name(); - this.effect5Value = baseBuff.getEffect5Value(); - this.callback = baseBuff.getCallback(); - this.particleEffect = baseBuff.getParticleEffect(); - this.isDebuff = baseBuff.isDebuff(); - this.removeOnDeath = baseBuff.isRemoveOnDeath(); - this.isRemovableByPlayer = baseBuff.isRemovableByPlayer(); - this.maxStacks = baseBuff.getMaxStacks(); - this.isPersistent = baseBuff.isPersistent(); - this.removeOnRespec = baseBuff.isRemoveOnRespec(); - this.aiRemoveOnEndCombat = baseBuff.isAiRemoveOnEndCombat(); - this.decayOnPvPDeath = baseBuff.isDecayOnPvPDeath(); - } - - /*public Buff(String buffName, long ownerId) { - - this.buffName = buffName; - this.ownerId = ownerId; - this.buffCRC = CRC.StringtoCRC(buffName); - - DatatableVisitor visitor; - - try { - - visitor = ClientFileManager.loadFile("datatables/buff/buff.iff", DatatableVisitor.class); - for(int i = 0; i < visitor.getRowCount(); i++) { - - if(visitor.getObject(i, 0) != null) - if(((String) visitor.getObject(i, 0)).equalsIgnoreCase(buffName)) { - - group1 = (String) visitor.getObject(i, 1); - group2 = (String) visitor.getObject(i, 2); - priority = (int) visitor.getObject(i, 4); - duration = (Float) visitor.getObject(i, 6); - effect1Name = (String) visitor.getObject(i, 7); - effect1Value = (Float) visitor.getObject(i, 8); - effect2Name = (String) visitor.getObject(i, 9); - effect2Value = (Float) visitor.getObject(i, 10); - effect3Name = (String) visitor.getObject(i, 11); - effect3Value = (Float) visitor.getObject(i, 12); - effect4Name = (String) visitor.getObject(i, 13); - effect4Value = (Float) visitor.getObject(i, 14); - effect5Name = (String) visitor.getObject(i, 15); - effect5Value = (Float) visitor.getObject(i, 16); - callback = (String) visitor.getObject(i, 18); - particleEffect = (String) visitor.getObject(i, 19); - isDebuff = (Boolean) visitor.getObject(i, 22); - removeOnDeath = (Integer) visitor.getObject(i, 25) != 0; - isRemovableByPlayer = (Integer) visitor.getObject(i, 26) != 0; - maxStacks = (Integer) visitor.getObject(i, 28); - isPersistent = (Integer) visitor.getObject(i, 29) != 0; - removeOnRespec = (Integer) visitor.getObject(i, 31) != 0; - aiRemoveOnEndCombat = (Integer) visitor.getObject(i, 32) != 0; - decayOnPvPDeath = (Integer) visitor.getObject(i, 33) != 0; - - } - - } - - } catch (InstantiationException | IllegalAccessException e) { - e.printStackTrace(); - } - }*/ - - public Buff() { } - - @Override - public byte[] getBytes() { - - IoBuffer buffer = bufferPool.allocate(28, false).order(ByteOrder.LITTLE_ENDIAN); - - buffer.putInt(CRC.StringtoCRC(buffName.toLowerCase())); - if(duration > 0) { - buffer.putInt((int) (totalPlayTime + getRemainingDuration())); - buffer.putInt(0); - buffer.putInt((int) duration); - } else { - buffer.putInt(-1); - buffer.putInt(0); - buffer.putInt(0); - } - buffer.putLong(ownerId); - buffer.putInt(stacks); // stacks - - buffer.flip(); - - return buffer.array(); - - } - - public String getGroup1() { - return group1; - } - - public void setGroup1(String group1) { - this.group1 = group1; - } - - public int getPriority() { - return priority; - } - - public void setPriority(int priority) { - this.priority = priority; - } - - public float getDuration() { - return duration; - } - - public void setDuration(float duration) { - this.duration = duration; - } - - public String getBuffName() { - return buffName; - } - - public void setBuffName(String buffName) { - this.buffName = buffName; - } - - public long getOwnerId() { - return ownerId; - } - - public void setOwnerId(long ownerId) { - this.ownerId = ownerId; - } - - public String getEffect1Name() { - return effect1Name; - } - - public void setEffect1Name(String effect1Name) { - this.effect1Name = effect1Name; - } - - public String getEffect2Name() { - return effect2Name; - } - - public void setEffect2Name(String effect2Name) { - this.effect2Name = effect2Name; - } - - public String getEffect3Name() { - return effect3Name; - } - - public void setEffect3Name(String effect3Name) { - this.effect3Name = effect3Name; - } - - public String getEffect4Name() { - return effect4Name; - } - - public void setEffect4Name(String effect4Name) { - this.effect4Name = effect4Name; - } - - public String getEffect5Name() { - return effect5Name; - } - - public void setEffect5Name(String effect5Name) { - this.effect5Name = effect5Name; - } - - public float getEffect1Value() { - return effect1Value; - } - - public void setEffect1Value(float effect1Value) { - this.effect1Value = effect1Value; - } - - public float getEffect2Value() { - return effect2Value; - } - - public void setEffect2Value(float effect2Value) { - this.effect2Value = effect2Value; - } - - public float getEffect3Value() { - return effect3Value; - } - - public void setEffect3Value(float effect3Value) { - this.effect3Value = effect3Value; - } - - public float getEffect4Value() { - return effect4Value; - } - - public void setEffect4Value(float effect4Value) { - this.effect4Value = effect4Value; - } - - public float getEffect5Value() { - return effect5Value; - } - - public void setEffect5Value(float effect5Value) { - this.effect5Value = effect5Value; - } - - public String getCallback() { - return callback; - } - - public void setCallback(String callback) { - this.callback = callback; - } - - public String getParticleEffect() { - return particleEffect; - } - - public void setParticleEffect(String particleEffect) { - this.particleEffect = particleEffect; - } - - public boolean isDebuff() { - return isDebuff; - } - - public void setDebuff(boolean isDebuff) { - this.isDebuff = isDebuff; - } - - public boolean isRemoveOnDeath() { - return removeOnDeath; - } - - public void setRemoveOnDeath(boolean removeOnDeath) { - this.removeOnDeath = removeOnDeath; - } - - public boolean isRemovableByPlayer() { - return isRemovableByPlayer; - } - - public void setRemovableByPlayer(boolean isRemovableByPlayer) { - this.isRemovableByPlayer = isRemovableByPlayer; - } - - public int getMaxStacks() { - return maxStacks; - } - - public void setMaxStacks(int maxStacks) { - this.maxStacks = maxStacks; - } - - public boolean isPersistent() { - return isPersistent; - } - - public void setPersistent(boolean isPersistent) { - this.isPersistent = isPersistent; - } - - public boolean isRemoveOnRespec() { - return removeOnRespec; - } - - public void setRemoveOnRespec(boolean removeOnRespec) { - this.removeOnRespec = removeOnRespec; - } - - public boolean isAiRemoveOnEndCombat() { - return aiRemoveOnEndCombat; - } - - public void setAiRemoveOnEndCombat(boolean aiRemoveOnEndCombat) { - this.aiRemoveOnEndCombat = aiRemoveOnEndCombat; - } - - public boolean isDecayOnPvPDeath() { - return decayOnPvPDeath; - } - - public void setDecayOnPvPDeath(boolean decayOnPvPDeath) { - this.decayOnPvPDeath = decayOnPvPDeath; - } - - public void setStartTime() { - this.startTime = System.currentTimeMillis(); - } - - public long getStartTime() { - return startTime; - } - - public int getRemainingDuration() { - - long currentTime = System.currentTimeMillis(); - long timeDiff = (currentTime - startTime) / 1000; - int remaining = (int) (duration - timeDiff); - for(int i = 0; i < decayCounter; i++) { - remaining /= 2; - } - return remaining; - - } - - public int getTotalPlayTime() { - return totalPlayTime; - } - - public void setTotalPlayTime(int totalPlayTime) { - this.totalPlayTime = totalPlayTime; - } - - public byte getDecayCounter() { - return decayCounter; - } - - public void incDecayCounter() { - this.decayCounter++; - } - - public ScheduledFuture getRemovalTask() { - return removalTask; - } - - public void setRemovalTask(ScheduledFuture removalTask) { - this.removalTask = removalTask; - } - - public void updateRemovalTask() { - - if(removalTask == null) - return; - - removalTask.cancel(true); - - final NGECore core = NGECore.getInstance(); - final CreatureObject owner = (CreatureObject) core.objectService.getObject(getOwnerId()); - - if(owner == null) - return; - - ScheduledFuture task = Executors.newScheduledThreadPool(1).schedule(new Runnable() { - - @Override - public void run() { - - core.buffService.removeBuffFromCreature(owner, Buff.this); - - } - - }, (long) getRemainingDuration(), TimeUnit.SECONDS); - - setRemovalTask(task); - - } - - public int getStacks() { - return stacks; - } - - public void setStacks(int stacks) { - this.stacks = stacks; - } - - public boolean isGroupBuff() { - return effect1Name == null ? false : effect1Name.equals("group"); - } - - public long getGroupBufferId() { - return groupBufferId; - } - - public void setGroupBufferId(long groupBufferId) { - this.groupBufferId = groupBufferId; - } - - public String getGroup2() { - return group2; - } - - public void setGroup2(String group2) { - this.group2 = group2; - } - - public int getBuffCRC() { - return buffCRC; - } - - public void setBuffCRC(int buffCRC) { - this.buffCRC = buffCRC; - } - -} diff --git a/src/resources/objects/BuffItem.java b/src/resources/objects/BuffItem.java deleted file mode 100644 index b87ce0af..00000000 --- a/src/resources/objects/BuffItem.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects; - -import com.sleepycat.persist.model.Persistent; - -@Persistent -public class BuffItem { - private int affectAmount; - private int entertainerBonus; - private int invested; - private String skillName; - - public BuffItem() { - - } - - public BuffItem(String skillName, int invested, int entBonus) { - this.skillName = skillName; - this.invested = invested; - this.entertainerBonus = entBonus; - } - - public int getAffectAmount() { - return affectAmount; - } - - public int getEntertainerBonus() { - return entertainerBonus; - } - - public int getInvested() { - return invested; - } - - public String getSkillName() { - return skillName; - } - - public void setAffectAmount(int amount) { - this.affectAmount = amount; - } - - public void setEntertainerBonus(int entertainerBonus) { - this.entertainerBonus = entertainerBonus; - } - - public void setInvested(int invested) { - this.invested = invested; - } - - public void setSkillName(String skillName) { - this.skillName = skillName; - } -} diff --git a/src/resources/objects/DamageOverTime.java b/src/resources/objects/DamageOverTime.java deleted file mode 100644 index ce367916..00000000 --- a/src/resources/objects/DamageOverTime.java +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects; - -import java.util.concurrent.ScheduledFuture; - -import com.sleepycat.persist.model.NotPersistent; -import com.sleepycat.persist.model.Persistent; - -@Persistent(version=1) -public class DamageOverTime { - - private Buff buff; - private String type; - private int duration; - private int intensity; - @NotPersistent - private ScheduledFuture task; - private long startTime; - private String commandName; - - public DamageOverTime() { } - - public DamageOverTime(String commandName, Buff buff, String type, int duration, int intensity) { - this.buff = buff; - this.type = type; - this.duration = duration; - this.intensity = intensity; - this.commandName = commandName; - } - - public Buff getBuff() { - return buff; - } - - public void setBuff(Buff buff) { - this.buff = buff; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public int getDuration() { - return duration; - } - - public void setDuration(int duration) { - this.duration = duration; - } - - public int getIntensity() { - return intensity; - } - - public void setIntensity(int intensity) { - this.intensity = intensity; - } - - public ScheduledFuture getTask() { - return task; - } - - public void setTask(ScheduledFuture task) { - this.task = task; - } - - public long getStartTime() { - return startTime; - } - - public void setStartTime(long startTime) { - this.startTime = startTime; - } - - public int getRemainingDuration() { - - long currentTime = System.currentTimeMillis(); - long timeDiff = (currentTime - startTime) / 1000; - return (int) (duration - timeDiff); - - } - - public String getCommandName() { - return commandName; - } - - public void setCommandName(String commandName) { - this.commandName = commandName; - } - - -} diff --git a/src/resources/objects/SkillMod.java b/src/resources/objects/SkillMod.java deleted file mode 100644 index 1a2fef63..00000000 --- a/src/resources/objects/SkillMod.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects; - -import org.apache.mina.core.buffer.IoBuffer; - -import com.sleepycat.persist.model.Persistent; - -@Persistent(version=0) -public class SkillMod extends Delta { - - private int base; - private int modifier; - - public SkillMod(int base, int modifier) { - this.base = base; - this.modifier = modifier; - } - - public SkillMod() { - - } - - public int getBase() { - synchronized(objectMutex) { - return base; - } - } - - public void setBase(int base) { - synchronized(objectMutex) { - this.base = base; - } - } - - public void addBase(int base) { - synchronized(objectMutex) { - this.base += base; - } - } - - public void deductBase(int base) { - synchronized(objectMutex) { - this.base -= base; - } - } - - public int getModifier() { - synchronized(objectMutex) { - return modifier; - } - } - - public void setModifier(int modifier) { - synchronized(objectMutex) { - this.modifier = modifier; - } - } - - public void addModifier(int modifier) { - synchronized(objectMutex) { - this.modifier += modifier; - } - } - - public void deductModifier(int modifier) { - synchronized(objectMutex) { - this.modifier -= modifier; - } - } - - public float getValue(int divisor) { - synchronized(objectMutex) { - return ((divisor < 1) ? ((float) base) : ((float) base / (float) divisor)); - } - } - - @Override - public byte[] getBytes() { - synchronized(objectMutex) { - IoBuffer buffer = createBuffer(8); - buffer.putInt(base); - buffer.putInt(modifier); - return buffer.array(); - } - } - -} diff --git a/src/resources/objects/building/BuildingObject.java b/src/resources/objects/building/BuildingObject.java index 6b4fd8fa..5d276fc8 100644 --- a/src/resources/objects/building/BuildingObject.java +++ b/src/resources/objects/building/BuildingObject.java @@ -61,15 +61,15 @@ public class BuildingObject extends TangibleObject implements IPersistent { private short maximumStorageCapacity=0; private Vector entryList = new Vector(); // Preferably the OIDs should be stored, because of name changes private Vector banList = new Vector(); - - public BuildingObject() { - super(); + + public BuildingObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { + super(objectID, planet, Template, position, orientation); messageBuilder = new BuildingMessageBuilder(this); this.setConditionDamage(100); } - - public BuildingObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { - super(objectID, planet, Template, position, orientation); + + public BuildingObject() { + super(); messageBuilder = new BuildingMessageBuilder(this); this.setConditionDamage(100); } @@ -89,6 +89,18 @@ public class BuildingObject extends TangibleObject implements IPersistent { } + public int getCellNumberByObjectId(long objectId) { + Vector cells = getCells(); + + for (CellObject cell : cells) { + if (cell.getObjectID() == objectId) { + return cell.getCellNumber(); + } + } + + return 0; + } + public float getMaintenanceAmount() { return maintenanceAmount; } diff --git a/src/resources/objects/creature/CreatureMessageBuilder.java b/src/resources/objects/creature/CreatureMessageBuilder.java index 1255acb9..b7e4553f 100644 --- a/src/resources/objects/creature/CreatureMessageBuilder.java +++ b/src/resources/objects/creature/CreatureMessageBuilder.java @@ -22,7 +22,6 @@ package resources.objects.creature; import java.nio.ByteOrder; - import java.util.Map.Entry; import org.apache.mina.core.buffer.IoBuffer; @@ -30,13 +29,13 @@ import org.apache.mina.core.buffer.IoBuffer; import com.sleepycat.persist.model.Persistent; import engine.resources.common.CRC; -import resources.objects.Buff; +import resources.buffs.Buff; import resources.objects.ObjectMessageBuilder; -import resources.objects.SkillMod; import engine.resources.objects.SWGObject; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.objects.weapon.WeaponObject; +import resources.skills.SkillMod; @Persistent public class CreatureMessageBuilder extends ObjectMessageBuilder { diff --git a/src/resources/objects/creature/CreatureObject.java b/src/resources/objects/creature/CreatureObject.java index 20e460e4..cfd9a60c 100644 --- a/src/resources/objects/creature/CreatureObject.java +++ b/src/resources/objects/creature/CreatureObject.java @@ -49,13 +49,12 @@ import com.sleepycat.persist.model.NotPersistent; import main.NGECore; import engine.clients.Client; +import resources.buffs.Buff; +import resources.buffs.DamageOverTime; import resources.common.Cooldown; import resources.common.OutOfBand; -import resources.objects.Buff; -import resources.objects.DamageOverTime; import resources.objects.SWGList; import resources.objects.SWGMap; -import resources.objects.SkillMod; import engine.resources.common.CRC; import engine.resources.objects.IPersistent; import engine.resources.objects.MissionCriticalObject; @@ -65,6 +64,7 @@ import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; +import resources.skills.SkillMod; import services.command.BaseSWGCommand; @Entity(version=9) @@ -189,6 +189,8 @@ public class CreatureObject extends TangibleObject implements IPersistent { private ConcurrentHashMap cooldowns = new ConcurrentHashMap(); @NotPersistent private long tefTime = System.currentTimeMillis(); + @NotPersistent + private SWGObject useTarget; public CreatureObject(long objectID, Planet planet, Point3D position, Quaternion orientation, String Template) { super(objectID, planet, Template, position, orientation); @@ -987,6 +989,18 @@ public class CreatureObject extends TangibleObject implements IPersistent { notifyObservers(messageBuilder.buildIntendedTargetDelta(intendedTarget), true); } + public SWGObject getUseTarget() { + synchronized(objectMutex) { + return useTarget; + } + } + + public void setUseTarget(SWGObject useTarget) { + synchronized(objectMutex) { + this.useTarget = useTarget; + } + } + public long getTargetId() { return getIntendedTarget(); } diff --git a/src/resources/objects/deed/Deed.java b/src/resources/objects/deed/Deed.java deleted file mode 100644 index f98c6398..00000000 --- a/src/resources/objects/deed/Deed.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.deed; - -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; -import resources.objects.tangible.TangibleObject; - -/** - * @author Charon - */ -public class Deed extends TangibleObject { - - public Deed(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ - super(objectID, planet, template, position, orientation); - } -} diff --git a/src/resources/objects/deed/Harvester_Deed.java b/src/resources/objects/deed/Harvester_Deed.java deleted file mode 100644 index 945d9eb3..00000000 --- a/src/resources/objects/deed/Harvester_Deed.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.deed; -import com.sleepycat.persist.model.Persistent; - -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -/** - * @author Charon - */ -@Persistent(version=0) -public class Harvester_Deed extends Deed { - - private String name; - private String structureTemplate; - private String constructorTemplate; - private int outputHopperCapacity=0; - private int BER=0; - private int BMR=0; - private int surplusMaintenance=0; - private int surplusPower=0; - private int lotRequirement; - - - public Harvester_Deed(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ - super(objectID, planet, template, position, orientation); - } - - public int getOutputHopperCapacity() { - return outputHopperCapacity; - } - public void setOutputHopperCapacity(int outputHopperCapacity) { - this.outputHopperCapacity = outputHopperCapacity; - } - public int getBER() { - return BER; - } - public void setBER(int bER) { - this.BER = bER; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String getStructureTemplate() { - return structureTemplate; - } - public void setStructureTemplate(String structureTemplate) { - this.structureTemplate = structureTemplate; - } - public int getLotRequirement() { - return lotRequirement; - } - public void setLotRequirement(int lotRequirement) { - this.lotRequirement = lotRequirement; - } - public String getConstructorTemplate() { - return constructorTemplate; - } - public void setConstructorTemplate(String constructorTemplate) { - this.constructorTemplate = constructorTemplate; - } - public int getBMR() { - return BMR; - } - public void setBMR(int BMR) { - this.BMR = BMR; - } - public int getSurplusMaintenance() { - return surplusMaintenance; - } - public void setSurplusMaintenance(int surplusMaintenance) { - this.surplusMaintenance = surplusMaintenance; - } - - public int getSurplusPower() { - return surplusPower; - } - - public void setSurplusPower(int surplusPower) { - this.surplusPower = surplusPower; - } - - - public void setAttributes() { - this.getAttributes().put("@obj_attr_n:volume", "1"); - this.getAttributes().put("@obj_attr_n:examine_maintenance_rate", ""+this.getBMR() + "/hour"); - if (this.getSurplusMaintenance()>0) - this.getAttributes().put("@obj_attr_n:examine_maintenance", ""+this.getSurplusMaintenance()); - - //this.getAttributes().put("@obj_attr_n:energy_maintenance", "0"); - if (this.getSurplusPower()>0) - this.getAttributes().put("@obj_attr_n:examine_power", ""+this.getSurplusPower()); - - this.getAttributes().put("@obj_attr_n:examine_hoppersize", ""+this.getOutputHopperCapacity()); - this.getAttributes().put("@obj_attr_n:examine_extractionrate", ""+this.getBER()); - } -} diff --git a/src/resources/objects/deed/Player_House_Deed.java b/src/resources/objects/deed/Player_House_Deed.java deleted file mode 100644 index 448f3da9..00000000 --- a/src/resources/objects/deed/Player_House_Deed.java +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.deed; -import com.sleepycat.persist.model.Persistent; - -import engine.resources.scene.Planet; -import engine.resources.scene.Point3D; -import engine.resources.scene.Quaternion; - -/** - * @author Seefo - * @author Charon - */ - -@Persistent(version=0) -public class Player_House_Deed extends Deed { - - private String name; - private String structureTemplate; - private String constructorTemplate; - private int BMR=0; - private int surplusMaintenance=0; - private int lotRequirement; - - - public Player_House_Deed(long objectID, Planet planet, String template, Point3D position, Quaternion orientation){ - super(objectID, planet, template, position, orientation); - } - - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String getStructureTemplate() { - return structureTemplate; - } - public void setStructureTemplate(String structureTemplate) { - this.structureTemplate = structureTemplate; - } - public int getLotRequirement() { - return lotRequirement; - } - public void setLotRequirement(int lotRequirement) { - this.lotRequirement = lotRequirement; - } - public String getConstructorTemplate() { - return constructorTemplate; - } - public void setConstructorTemplate(String constructorTemplate) { - this.constructorTemplate = constructorTemplate; - } - public int getBMR() { - return BMR; - } - public void setBMR(int BMR) { - this.BMR = BMR; - } - public int getSurplusMaintenance() { - return surplusMaintenance; - } - public void setSurplusMaintenance(int surplusMaintenance) { - this.surplusMaintenance = surplusMaintenance; - } - - public void setAttributes() { - this.getAttributes().put("@obj_attr_n:volume", "1"); - this.getAttributes().put("@obj_attr_n:examine_maintenance_rate", ""+this.getBMR() + "/hour"); - if (this.getSurplusMaintenance()>0) - this.getAttributes().put("@obj_attr_n:examine_maintenance", ""+this.getSurplusMaintenance()); - - - } -} diff --git a/src/resources/objects/loot/LootDrop.java b/src/resources/objects/loot/LootDrop.java deleted file mode 100644 index 371c1727..00000000 --- a/src/resources/objects/loot/LootDrop.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.loot; - -import java.util.ArrayList; -import java.util.List; - -public class LootDrop { - - private List elements = new ArrayList(); - private String droppedItemTemplate; - - public LootDrop(){ - - } - - public void addElement(String element){ - elements.add(element); - } - - public List getElements(){ - return elements; - } - - public String getDroppedItemTemplate() { - return droppedItemTemplate; - } - - public void setDroppedItemTemplate(String droppedItemTemplate) { - this.droppedItemTemplate = droppedItemTemplate; - } -} diff --git a/src/resources/objects/loot/LootGroup.java b/src/resources/objects/loot/LootGroup.java deleted file mode 100644 index 1c626c05..00000000 --- a/src/resources/objects/loot/LootGroup.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.loot; - -import com.sleepycat.persist.model.Persistent; - -/** - * @author Charon - */ - -@Persistent(version=0) -public class LootGroup { - - private String[] lootPoolNames; - private double[] lootPoolChances; - private double lootGroupChance; - - public LootGroup(){ - - } - - public LootGroup(String[] lootPoolNames, double[] lootPoolChances, double lootGroupChance){ - this.lootPoolNames = lootPoolNames; - this.lootPoolChances = lootPoolChances; - this.lootGroupChance = lootGroupChance; - } - - public void addLootData(String[] lootPoolNames, double[] lootPoolChances, double lootGroupChance){ - this.lootPoolNames = lootPoolNames; - this.lootPoolChances = lootPoolChances; - this.lootGroupChance = lootGroupChance; - } - - public String[] getLootPoolNames() { - return lootPoolNames; - } - - public double[] getLootPoolChances() { - return lootPoolChances; - } - - public double getLootGroupChance() { - return lootGroupChance; - } -} diff --git a/src/resources/objects/loot/LootPool.java b/src/resources/objects/loot/LootPool.java deleted file mode 100644 index 2e74cf8b..00000000 --- a/src/resources/objects/loot/LootPool.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.loot; - -/** - * @author Charon - */ - -public class LootPool { - - public LootPool(){ - - } -} diff --git a/src/resources/objects/loot/LootRollSession.java b/src/resources/objects/loot/LootRollSession.java deleted file mode 100644 index 884346ba..00000000 --- a/src/resources/objects/loot/LootRollSession.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects.loot; - -import java.util.ArrayList; -import java.util.List; - -import engine.resources.scene.Planet; -import main.NGECore; -import resources.objects.creature.CreatureObject; -import resources.objects.group.GroupObject; -import resources.objects.tangible.TangibleObject; - -/** - * @author Charon - */ - -public class LootRollSession { - - private String SessionID; // leaderName-SystemTime - private boolean sessionValid; - private GroupObject playerGroup; - private CreatureObject requester; - private List droppedItems; - private Planet sessionPlanet; - private List errorMessages; - private int sessionLootMode; - private boolean allowRareLoot; - private boolean increasedRLSChance; - - public LootRollSession(){ - } - - public LootRollSession(CreatureObject requester, TangibleObject lootedObject){ - long requesterGroupId = requester.getGroupId(); - if (requesterGroupId>0){ - this.playerGroup = (GroupObject) NGECore.getInstance().objectService.getObject(requesterGroupId); - this.SessionID = playerGroup.getGroupLeader().getCustomName()+"-"+System.currentTimeMillis(); - - } else { - this.SessionID = requester.getCustomName()+"-"+System.currentTimeMillis(); - } - - if (lootedObject instanceof CreatureObject){ - CreatureObject lootedCreature = (CreatureObject)lootedObject; - // Exclude rare loot depending on creature level - // For groups maybe average CL? - if (requester.getLevel()-lootedCreature.getLevel()<=6){ - this.setAllowRareLoot(true); - } - } - - // Group situation - if (this.getPlayerGroup()!=null){ - if (this.getPlayerGroup().getMemberList().size()>=4) - this.setIncreasedRLSChance(true); - } - - // Possible AFKer check here - - - droppedItems = new ArrayList(); - errorMessages = new ArrayList(); - sessionPlanet = requester.getPlanet(); - this.requester = requester; - allowRareLoot = false; - } - - public List getDroppedItems() { - return droppedItems; - } - - public void addDroppedItem(TangibleObject droppedItem) { - this.droppedItems.add(droppedItem); - } - - public String getSessionID() { - return SessionID; - } - - public void setSessionID(String sessionID) { - SessionID = sessionID; - } - - public void generateSessionID(String sessionID) { - SessionID = sessionID; - } - - public Planet getSessionPlanet() { - return sessionPlanet; - } - - public List getErrorMessages() { - return errorMessages; - } - - public void addErrorMessage(String errorMessage) { - this.errorMessages.add(errorMessage); - } - - public int getSessionLootMode() { - return sessionLootMode; - } - - public void setSessionLootMode(int sessionLootMode) { - this.sessionLootMode = sessionLootMode; - } - - public boolean isAllowRareLoot() { - return allowRareLoot; - } - - public void setAllowRareLoot(boolean allowRareLoot) { - this.allowRareLoot = allowRareLoot; - } - - public GroupObject getPlayerGroup() { - return playerGroup; - } - - public boolean isIncreasedRLSChance() { - return increasedRLSChance; - } - - public void setIncreasedRLSChance(boolean increasedRLSChance) { - this.increasedRLSChance = increasedRLSChance; - } - - public boolean isSessionValid() { - return sessionValid; - } - - public void setSessionValid(boolean sessionValid) { - this.sessionValid = sessionValid; - } - - public CreatureObject getRequester() { - return requester; - } - - public void setRequester(CreatureObject requester) { - this.requester = requester; - } -} diff --git a/src/resources/objects/mission/MissionMessageBuilder.java b/src/resources/objects/mission/MissionMessageBuilder.java index 24c9aa07..071a4f58 100644 --- a/src/resources/objects/mission/MissionMessageBuilder.java +++ b/src/resources/objects/mission/MissionMessageBuilder.java @@ -304,13 +304,13 @@ public class MissionMessageBuilder extends ObjectMessageBuilder { return buffer; } - public IoBuffer buildMissionDescriptionDelta(String desc, int id) { + public IoBuffer buildMissionDescriptionDelta(String desc, int id, String additionalParam) { - IoBuffer buffer = IoBuffer.allocate(12 + desc.length(), false).order(ByteOrder.LITTLE_ENDIAN); + IoBuffer buffer = IoBuffer.allocate(13 + desc.length() + additionalParam.length(), false).order(ByteOrder.LITTLE_ENDIAN); buffer.put(getAsciiString(desc)); buffer.putInt(0); - buffer.put(getAsciiString("m" + id + "d")); + buffer.put(getAsciiString("m" + id + "d" + additionalParam)); int size = buffer.position(); buffer.flip(); @@ -318,14 +318,14 @@ public class MissionMessageBuilder extends ObjectMessageBuilder { return buffer; } - - public IoBuffer buildMissionTitleDelta(String title, int id) { - IoBuffer buffer = IoBuffer.allocate(12 + title.length(), false).order(ByteOrder.LITTLE_ENDIAN); + public IoBuffer buildMissionTitleDelta(String title, int id, String additionalParam) { + + IoBuffer buffer = IoBuffer.allocate(12 + title.length() + additionalParam.length(), false).order(ByteOrder.LITTLE_ENDIAN); buffer.put(getAsciiString(title)); buffer.putInt(0); - buffer.put(getAsciiString("m" + id + "t")); + buffer.put(getAsciiString("m" + id + "t" + additionalParam)); int size = buffer.position(); buffer.flip(); diff --git a/src/resources/objects/mission/MissionObject.java b/src/resources/objects/mission/MissionObject.java index 12ed3fa8..48f573f2 100644 --- a/src/resources/objects/mission/MissionObject.java +++ b/src/resources/objects/mission/MissionObject.java @@ -26,6 +26,7 @@ import com.sleepycat.je.Transaction; import com.sleepycat.persist.model.NotPersistent; import com.sleepycat.persist.model.Persistent; +import resources.common.BountyListItem; import resources.objects.intangible.IntangibleObject; import resources.objects.waypoint.WaypointObject; import services.mission.MissionObjective; @@ -53,8 +54,11 @@ public class MissionObject extends IntangibleObject implements IPersistent { private String type = ""; private int missionTemplateObject = 0; private WaypointObject attachedWaypoint; + + // Server variables private MissionObjective objective; - + private long bountyObjId; + @NotPersistent MissionMessageBuilder messageBuilder = new MissionMessageBuilder(this); @@ -148,11 +152,15 @@ public class MissionObject extends IntangibleObject implements IPersistent { } public void setMissionDescription(String missionDescription) { + setMissionDescription(missionDescription, ""); + } + + public void setMissionDescription(String missionDescription, String additionalParam) { synchronized(objectMutex) { this.description = missionDescription; } if (getGrandparent() != null && getGrandparent().getClient() != null && getGrandparent().getClient().getSession() != null) { - getGrandparent().getClient().getSession().write(messageBuilder.buildMissionDescriptionDelta(missionDescription, missionId)); + getGrandparent().getClient().getSession().write(messageBuilder.buildMissionDescriptionDelta(missionDescription, missionId, additionalParam)); } } @@ -163,11 +171,15 @@ public class MissionObject extends IntangibleObject implements IPersistent { } public void setMissionTitle(String missionTitle) { + setMissionTitle(missionTitle, ""); + } + + public void setMissionTitle(String missionTitle, String additionalParam) { synchronized(objectMutex) { this.title = missionTitle; } if (getGrandparent() != null && getGrandparent().getClient() != null && getGrandparent().getClient().getSession() != null) { - getGrandparent().getClient().getSession().write(messageBuilder.buildMissionTitleDelta(missionTitle, missionId)); + getGrandparent().getClient().getSession().write(messageBuilder.buildMissionTitleDelta(missionTitle, missionId, additionalParam)); } } @@ -286,6 +298,14 @@ public class MissionObject extends IntangibleObject implements IPersistent { this.missionId = missionId; } + public long getBountyObjId() { + return bountyObjId; + } + + public void setBountyObjId(long bountyObjId) { + this.bountyObjId = bountyObjId; + } + public Transaction getTransaction() { return txn; } diff --git a/src/resources/objects/tangible/TangibleObject.java b/src/resources/objects/tangible/TangibleObject.java index 4a5f11c3..a06dfcaf 100644 --- a/src/resources/objects/tangible/TangibleObject.java +++ b/src/resources/objects/tangible/TangibleObject.java @@ -40,8 +40,8 @@ import protocol.swg.objectControllerObjects.ShowFlyText; import resources.common.OutOfBand; import resources.common.RGB; import resources.datatables.Options; +import resources.loot.LootGroup; import resources.objects.creature.CreatureObject; -import resources.objects.loot.LootGroup; import resources.visitors.IDManagerVisitor; import com.sleepycat.persist.model.NotPersistent; @@ -54,7 +54,7 @@ import engine.resources.scene.Planet; import engine.resources.scene.Point3D; import engine.resources.scene.Quaternion; -@Persistent(version=12) +@Persistent(version=13) public class TangibleObject extends SWGObject { // TODO: Thread safety diff --git a/src/services/BuffService.java b/src/services/BuffService.java index 71f44a0d..839c2b01 100644 --- a/src/services/BuffService.java +++ b/src/services/BuffService.java @@ -31,9 +31,9 @@ import java.util.concurrent.TimeUnit; import org.python.core.Py; import org.python.core.PyObject; +import resources.buffs.Buff; +import resources.buffs.DamageOverTime; import resources.common.FileUtilities; -import resources.objects.Buff; -import resources.objects.DamageOverTime; import resources.objects.creature.CreatureObject; import resources.objects.group.GroupObject; import resources.objects.player.PlayerObject; diff --git a/src/services/CharacterService.java b/src/services/CharacterService.java index b11bd350..7807b9ec 100644 --- a/src/services/CharacterService.java +++ b/src/services/CharacterService.java @@ -323,6 +323,8 @@ public class CharacterService implements INetworkDispatch { object.addAbility("startDance"); object.addAbility("startDance+Basic"); + object.setFaction("neutral"); + object.addObjectToEquipList(datapad); object.addObjectToEquipList(inventory); object.addObjectToEquipList(bank); diff --git a/src/services/ConnectionService.java b/src/services/ConnectionService.java index ff79d72c..c27423cd 100644 --- a/src/services/ConnectionService.java +++ b/src/services/ConnectionService.java @@ -270,6 +270,8 @@ public class ConnectionService implements INetworkDispatch { } }*/ + core.missionService.getBountyList().remove(core.getBountiesODB().get(object.getObjectId(), Long.class, BountyListItem.class)); + ghost.toggleFlag(PlayerFlags.LD); object.setPerformanceListenee(null); diff --git a/src/services/DevService.java b/src/services/DevService.java index b5d204a8..21043777 100644 --- a/src/services/DevService.java +++ b/src/services/DevService.java @@ -39,8 +39,6 @@ import resources.common.SpawnPoint; import resources.datatables.WeaponType; import resources.objects.building.BuildingObject; import resources.objects.creature.CreatureObject; -import resources.objects.deed.Harvester_Deed; -import resources.objects.deed.Player_House_Deed; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.objects.tool.SurveyTool; @@ -1028,190 +1026,140 @@ public class DevService implements INetworkDispatch { inventory.add(solarSurveyTool); return; case 111: + SWGObject deed1; + // Minerals - String templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_s1_deed.iff"; - Harvester_Deed deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(5); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_ore_s1_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 5); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_s2_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(11); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_ore_s2_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 11); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_heavy_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(135400); - deed1.setBER(14); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_ore_heavy_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 135400); + deed1.setIntAttribute("examine_maintenance_rate", 14); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_deed_elite.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(44); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_ore_deed_elite.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 44); inventory.add(deed1); - // Chemicals - templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(5); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_liquid_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 5); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_medium.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(11); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_medium.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 11); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_heavy.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(135400); - deed1.setBER(14); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_heavy.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 135400); + deed1.setIntAttribute("examine_maintenance_rate", 14); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_elite.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(44); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_liquid_deed_elite.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 44); inventory.add(deed1); - // Flora - templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(5); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_flora_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 5); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed_medium.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(11); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_flora_deed_medium.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 11); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed_heavy.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(135400); - deed1.setBER(14); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_flora_deed_heavy.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 135400); + deed1.setIntAttribute("examine_maintenance_rate", 14); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_flora_deed_elite.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(44); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_flora_deed_elite.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 44); inventory.add(deed1); // Gas - templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(5); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_gas_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 5); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed_medium.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(11); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_gas_deed_medium.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 11); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed_heavy.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(135400); - deed1.setBER(14); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_gas_deed_heavy.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 135400); + deed1.setIntAttribute("examine_maintenance_rate", 14); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_gas_deed_elite.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(44); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_gas_deed_elite.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 44); inventory.add(deed1); - // Water - templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(5); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_moisture_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 5); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_medium.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(27344); - deed1.setBER(11); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_medium.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 27344); + deed1.setIntAttribute("examine_maintenance_rate", 11); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_heavy.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(135400); - deed1.setBER(14); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_heavy.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 135400); + deed1.setIntAttribute("examine_maintenance_rate", 14); inventory.add(deed1); - templateString="object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_elite.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(44); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/harvester_deed/shared_harvester_moisture_deed_elite.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 44); inventory.add(deed1); - // Generators - templateString="object/tangible/deed/generator_deed/shared_generator_fusion_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(19); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/generator_deed/shared_generator_fusion_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 19); inventory.add(deed1); - templateString="object/tangible/deed/generator_deed/shared_generator_wind_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(10); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/generator_deed/shared_generator_wind_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 10); inventory.add(deed1); - templateString="object/tangible/deed/generator_deed/shared_generator_solar_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(15); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/generator_deed/shared_generator_solar_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 15); inventory.add(deed1); -// templateString="object/tangible/deed/generator_deed/shared_generator_photo_bio_deed.iff"; -// deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); -// deed1.setOutputHopperCapacity(250000); -// deed1.setBER(19); +// deed1 = core.objectService.createObject("object/tangible/deed/generator_deed/shared_generator_photo_bio_deed.iff", planet); +// deed1.setIntAttribute("examine_hoppersize", 250000); +// deed1.setIntAttribute("examine_maintenance_rate", 19); // inventory.add(deed1); - templateString="object/tangible/deed/generator_deed/shared_generator_geothermal_deed.iff"; - deed1 = (Harvester_Deed)core.objectService.createObject(templateString, planet); - deed1.setOutputHopperCapacity(250000); - deed1.setBER(15); - deed1.setAttributes(); + deed1 = core.objectService.createObject("object/tangible/deed/generator_deed/shared_generator_geothermal_deed.iff", planet); + deed1.setIntAttribute("examine_hoppersize", 250000); + deed1.setIntAttribute("examine_maintenance_rate", 15); inventory.add(deed1); + return; case 112: core.resourceService.spawnSpecificResourceContainer("Radioactive", player, 100000); @@ -1219,6 +1167,7 @@ public class DevService implements INetworkDispatch { case 120: // SWGObject houseDeed = core.objectService.createObject("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", planet); // inventory.add(houseDeed); +<<<<<<< HEAD templateString="object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff"; Player_House_Deed deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); @@ -1240,6 +1189,18 @@ public class DevService implements INetworkDispatch { return; +======= + + TangibleObject deed = (TangibleObject) core.objectService.createObject("object/tangible/deed/player_house_deed/shared_generic_house_small_deed.iff", planet); + deed.setIntAttribute("examine_maintenance_rate", 15); + inventory.add(deed); + + deed = (TangibleObject) core.objectService.createObject("object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff", planet); + deed.setIntAttribute("examine_maintenance_rate", 15); + inventory.add(deed); + + return; +>>>>>>> origin/master case 125: TangibleObject genericCraftingTool = (TangibleObject) core.objectService.createObject("object/tangible/crafting/station/shared_generic_tool.iff", planet); genericCraftingTool.setCustomName("Generic Crafting Tool"); diff --git a/src/services/EntertainmentService.java b/src/services/EntertainmentService.java index f210cdc7..0643348e 100644 --- a/src/services/EntertainmentService.java +++ b/src/services/EntertainmentService.java @@ -20,6 +20,7 @@ import protocol.swg.ObjControllerMessage; import protocol.swg.objectControllerObjects.BuffBuilderChangeMessage; import protocol.swg.objectControllerObjects.BuffBuilderEndMessage; import protocol.swg.objectControllerObjects.ImageDesignMessage; +import resources.buffs.BuffItem; import resources.common.BuffBuilder; import resources.common.IDAttribute; import resources.common.MathUtilities; @@ -29,11 +30,10 @@ import resources.common.Performance; import resources.common.PerformanceEffect; import resources.common.RGB; import resources.datatables.Posture; -import resources.objects.BuffItem; -import resources.objects.SkillMod; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; +import resources.skills.SkillMod; import resources.visitors.IDManagerVisitor; import services.sui.SUIService.InputBoxType; import services.sui.SUIWindow; diff --git a/src/services/GroupService.java b/src/services/GroupService.java index fa4d9d5b..032ecd15 100644 --- a/src/services/GroupService.java +++ b/src/services/GroupService.java @@ -25,7 +25,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import resources.objects.Buff; +import resources.buffs.Buff; import resources.objects.creature.CreatureObject; import resources.objects.group.GroupObject; import services.chat.ChatRoom; @@ -146,6 +146,12 @@ public class GroupService implements INetworkDispatch { group.setGroupLeader(leader); group.getMemberList().add(leader); group.getMemberList().add(invited); + + if (invited.getLevel() > leader.getLevel()) + group.setGroupLevel(invited.getLevel()); + else + group.setGroupLevel(leader.getLevel()); + leader.makeAware(group); leader.setGroupId(group.getObjectID()); invited.makeAware(group); @@ -170,6 +176,10 @@ public class GroupService implements INetworkDispatch { invited.makeAware(group); invited.setGroupId(group.getObjectID()); invited.sendSystemMessage("@group:joined_self", (byte) 0); + + if (group.getGroupLevel() < invited.getLevel()) + group.setGroupLevel(invited.getLevel()); + addGroupBuffsToMember(group, invited); core.chatService.joinChatRoom(invited.getCustomName(), group.getChatRoomId(), true); diff --git a/src/services/LootService.java b/src/services/LootService.java index 1105e13c..97d45a46 100644 --- a/src/services/LootService.java +++ b/src/services/LootService.java @@ -35,11 +35,12 @@ import java.util.List; import java.util.Map; import java.util.Random; import java.util.Vector; + import protocol.swg.PlayClientEffectObjectTransformMessage; +import resources.loot.LootGroup; +import resources.loot.LootRollSession; import resources.objects.creature.CreatureObject; import resources.objects.group.GroupObject; -import resources.objects.loot.LootGroup; -import resources.objects.loot.LootRollSession; import resources.objects.tangible.TangibleObject; import resources.objects.weapon.WeaponObject; import main.NGECore; diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index ea075dc5..62f6e14a 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -58,6 +58,8 @@ import protocol.swg.ShowHelmet; import protocol.swg.objectControllerObjects.ChangeRoleIconChoice; import protocol.swg.objectControllerObjects.ShowFlyText; import protocol.swg.objectControllerObjects.ShowLootBox; +import resources.buffs.Buff; +import resources.common.BountyListItem; import resources.common.FileUtilities; import resources.common.ObjControllerOpcodes; import resources.common.Opcodes; @@ -70,7 +72,6 @@ import resources.datatables.DisplayType; import resources.datatables.PlayerFlags; import resources.datatables.Professions; import resources.guild.Guild; -import resources.objects.Buff; import resources.objects.building.BuildingObject; import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; @@ -78,6 +79,7 @@ import resources.objects.player.PlayerMessageBuilder; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import resources.objects.waypoint.WaypointObject; +import services.sui.SUIService.InputBoxType; import services.sui.SUIService.ListBoxType; import services.sui.SUIWindow; import services.sui.SUIWindow.Trigger; @@ -1252,6 +1254,29 @@ public class PlayerService implements INetworkDispatch { core.suiService.openSUIWindow(ringWindow); } + public void sendSetBountyWindow(final CreatureObject victim, final CreatureObject attacker) { + SUIWindow bountyWindow = core.suiService.createInputBox(InputBoxType.INPUT_BOX_OK_CANCEL, "@bounty_hunter:setbounty_title", "@bounty_hunter:setbounty_prompt1 " + attacker.getCustomName() + "?" + "\n@bounty_hunter:setbounty_prompt2 " + victim.getBankCredits(), + victim, null, (float) 10, new SUICallback() { + + @Override + public void process(SWGObject owner, int eventType, Vector returnList) { + if (eventType == 0 && returnList.get(0) != null) { + int bounty = Integer.parseInt(returnList.get(0)); + + if (bounty > victim.getBankCredits()) + return; + + if (!core.missionService.addToExistingBounty(attacker, bounty)) + core.missionService.createNewBounty(attacker, bounty); + + victim.setBankCredits(victim.getBankCredits() - bounty); + } + } + + }); + core.suiService.openSUIWindow(bountyWindow); + } + public String getFormalProfessionName(String template) { String formalName = ""; diff --git a/src/services/SkillModService.java b/src/services/SkillModService.java index b72dc14e..042e7bc9 100644 --- a/src/services/SkillModService.java +++ b/src/services/SkillModService.java @@ -25,8 +25,8 @@ import java.util.HashMap; import java.util.Map; import resources.common.FileUtilities; -import resources.objects.SkillMod; import resources.objects.creature.CreatureObject; +import resources.skills.SkillMod; import main.NGECore; import engine.clientdata.ClientFileManager; import engine.clientdata.visitors.DatatableVisitor; @@ -127,7 +127,7 @@ public class SkillModService implements INetworkDispatch { synchronized(creature.getMutex()) { SkillMod skillMod = creature.getSkillMods().get(name); - if (skillMod == null || base <= 0 || modifier <= 0) { + if (skillMod == null || (base <= 0 && modifier <= 0)) { return; } else { skillMod.deductBase(base); diff --git a/src/services/StaticService.java b/src/services/StaticService.java index 7dbe7d97..41401fea 100644 --- a/src/services/StaticService.java +++ b/src/services/StaticService.java @@ -26,11 +26,12 @@ import java.util.List; import java.util.Map; import resources.objects.building.BuildingObject; +import resources.objects.cell.CellObject; import resources.objects.creature.CreatureObject; import resources.objects.tangible.TangibleObject; - import main.NGECore; - +import engine.clientdata.ClientFileManager; +import engine.clientdata.visitors.PortalVisitor; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; import engine.resources.scene.Point3D; @@ -71,48 +72,79 @@ public class StaticService implements INetworkDispatch { return spawnObject(template, planetName, cellId, x, y, z, qW, 0, qY, 0); } - public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ) { - return spawnObject(template, 0, planetName, cellId, x, y, z, qW, qX, qY, qZ); + public SWGObject spawnObject(String template, String planetName, SWGObject cell, float x, float y, float z, float qW, float qX, float qY, float qZ) { + return spawnObject(template, planetName, ((cell == null) ? 0L : cell.getObjectID()), x, y, z, qW, qX, qY, qZ); } - public SWGObject spawnObject(String template, long objectId, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ) { + public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ) { Planet planet = core.terrainService.getPlanetByName(planetName); if (planet == null) { - System.out.println("StaticService: Can't spawn static object because planet is null."); + System.err.println("StaticService: Can't spawn static object because planet is null."); return null; } - SWGObject object = core.objectService.createObject(template, objectId, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ)); + long buildingId = 0; + int cellNumber = 0; + + SWGObject cell = core.objectService.getObject(cellId); + + if (cell != null && cell.getContainer() != null && cell.getContainer() instanceof BuildingObject) { + buildingId = cell.getContainer().getObjectId(); + cellNumber = ((BuildingObject) cell.getContainer()).getCellNumberByObjectId(cellId); + } + + long objectId = core.objectService.getDOId(planetName, template, 0, buildingId, cellNumber, x, y, z); + + SWGObject object = core.objectService.createObject(template, objectId, planet, new Point3D(x, y, z), new Quaternion(qW, qX, qY, qZ), null, true, true); if (object == null) { - System.out.println("Static object is null with id " + objectId + " and template " + template + "."); + System.err.println("Static object is null with id " + objectId + " and template " + template + "."); return null; } if (objectId != 0 && object.getObjectID() != objectId) { - System.out.println("StaticService: ObjectId " + objectId + " was taken for object with template " + object.getTemplate() + ". Replacement: " + object.getObjectID()); + System.err.println("StaticService: ObjectId " + objectId + " was taken for object with template " + object.getTemplate() + ". Replacement: " + object.getObjectID()); } if (object instanceof CreatureObject) { ((CreatureObject) object).setStaticNPC(true); } - if (cellId == 0) { - boolean add = core.simulationService.add(object, (float) x, (float) z, true); + if (object instanceof BuildingObject) { + BuildingObject building = (BuildingObject) object; - if (!add) { - System.out.println("StaticService: Quadtree insert failed for: " + template); + Map attributes = building.getTemplateData().getAttributes(); + + if (building.getCells().size() == 0 && attributes.containsKey("portalLayoutFilename") && ((String) attributes.get("portalLayoutFilename")).length() > 0) { + String portalLayoutFilename = (String) attributes.get("portalLayoutFilename"); + + try { + PortalVisitor portal = ClientFileManager.loadFile(portalLayoutFilename, PortalVisitor.class); + + for (int i = 1; i <= portal.cellCount; i++) { + long cellObjectId = core.objectService.getDOId(planetName, "object/cell/shared_cell.iff", 0, object.getObjectID(), i, x, y, z); + CellObject childCell = (CellObject) core.objectService.createObject("object/cell/shared_cell.iff", cellObjectId, core.terrainService.getPlanetByName(planetName), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), null, true, true); + childCell.setCellNumber(i); + building.add(childCell); + } + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + if (cellId == 0) { + if (!core.simulationService.add(object, (float) x, (float) z, true)) { + System.err.println("StaticService: Quadtree insert failed for: " + template); } } else { - SWGObject parent = core.objectService.getObject(cellId); - - if (parent == null) { - System.out.println("StaticService: Cell not found"); + if (cell == null) { + System.err.println("StaticService: Cell not found"); return object; } - parent.add(object); + cell.add(object); } return object; @@ -128,8 +160,8 @@ public class StaticService implements INetworkDispatch { cloners.add(obj); } } - return cloners; + return cloners; } @Override diff --git a/src/services/bazaar/BazaarService.java b/src/services/bazaar/BazaarService.java index 52f77554..4d074039 100644 --- a/src/services/bazaar/BazaarService.java +++ b/src/services/bazaar/BazaarService.java @@ -471,6 +471,7 @@ public class BazaarService implements INetworkDispatch { else if(item.getItem() instanceof IntangibleObject) player.getSlottedObject("datapad").add(item.getItem()); + core.objectService.getObjectList().put(item.getObjectId(), item.getItem()); removeAuctionItem(item); player.getClient().getSession().write(response.serialize()); diff --git a/src/services/collections/CollectionService.java b/src/services/collections/CollectionService.java index 4342ff12..d0b43268 100644 --- a/src/services/collections/CollectionService.java +++ b/src/services/collections/CollectionService.java @@ -142,7 +142,7 @@ public class CollectionService implements INetworkDispatch { int bits = 0; boolean noScriptOnModify = false; boolean clearOnComplete = false; - boolean noMessage = true; + boolean noMessage = false; boolean grantIfPreReqMet = true; boolean buddyCollection = false; int numAltTitles = 0; @@ -308,13 +308,21 @@ public class CollectionService implements INetworkDispatch { collections.set(beginSlotId); } - player.setCollections(collections.toByteArray()); - - if (!hidden && !noMessage) { - creature.sendSystemMessage(OutOfBand.ProsePackage("@collection_n:" + collection), DisplayType.Broadcast); + if (hidden && !(getCollection(creature, collectionName) > 0)) { + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection:player_hidden_slot_added", "TO", collectionName), DisplayType.Broadcast); } - if (!music.equals("")) { + player.setCollections(collections.toByteArray()); + + if (!noMessage) { + if (!bookName.equals("crafting_book")) { + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection:player_slot_added", "TU", slotName, "TO", collectionName), DisplayType.Broadcast); + } else { + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection:player_slot_increment", "TU", slotName, "TO", collectionName), DisplayType.Broadcast); + } + } + + if (!music.equals("") && !music.equalsIgnoreCase("none")) { creature.playMusic(music); } @@ -346,7 +354,9 @@ public class CollectionService implements INetworkDispatch { } } - if (!isComplete(creature, collectionName)) { + if (isComplete(creature, collectionName)) { + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection:player_collection_complete", "TO", collectionName), DisplayType.Broadcast); + if (!noReward) { if (FileUtilities.doesFileExist("scripts/collections/" + collectionName + ".py")) { PyObject method = core.scriptService.getMethod("scripts/collections/", collectionName, "complete"); @@ -364,6 +374,7 @@ public class CollectionService implements INetworkDispatch { if (trackServerFirst) { if (core.guildService.getGuildObject().addServerFirst(collectionName, new ServerFirst(creature.getCustomName(), creature.getObjectId(), collectionName, System.currentTimeMillis()))) { addCollection(creature, "bdg_server_first_01"); + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection:player_server_first", "TT", core.getGalaxyName(), "TO", collectionName), DisplayType.Broadcast); } } @@ -735,6 +746,10 @@ public class CollectionService implements INetworkDispatch { player.getTitleList().remove(slotName); } + if (collection.equals(collectionName)) { + creature.sendSystemMessage(OutOfBand.ProsePackage("@collection:player_collection_reset", "TO", collectionName), DisplayType.Broadcast); + } + continue; } } diff --git a/src/services/combat/CombatService.java b/src/services/combat/CombatService.java index 1a265c8c..301bf037 100644 --- a/src/services/combat/CombatService.java +++ b/src/services/combat/CombatService.java @@ -40,13 +40,13 @@ import protocol.swg.objectControllerObjects.CombatAction; import protocol.swg.objectControllerObjects.CombatSpam; import protocol.swg.objectControllerObjects.CommandEnqueueRemove; import protocol.swg.objectControllerObjects.StartTask; +import resources.buffs.Buff; +import resources.buffs.DamageOverTime; import resources.common.FileUtilities; import resources.datatables.Options; import resources.datatables.Elemental; import resources.datatables.Posture; import resources.datatables.WeaponType; -import resources.objects.Buff; -import resources.objects.DamageOverTime; import resources.objects.creature.CreatureObject; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; @@ -988,7 +988,10 @@ public class CombatService implements INetworkDispatch { target.setSpeedMultiplierBase(0); target.setTurnRadius(0); - if(target.getDuelList().contains(attacker)) handleEndDuel(target, attacker, false); + if(!target.getDuelList().contains(attacker) && attacker.getSlottedObject("ghost") != null) + core.playerService.sendSetBountyWindow(target, attacker); + else + handleEndDuel(target, attacker, false); core.playerService.sendCloningWindow(target, attacker.getSlottedObject("ghost") != null); } diff --git a/src/services/housing/HouseTemplate.java b/src/services/housing/HouseTemplate.java index 3918cf55..78f7715f 100644 --- a/src/services/housing/HouseTemplate.java +++ b/src/services/housing/HouseTemplate.java @@ -6,65 +6,76 @@ import java.util.Vector; import engine.resources.scene.Point3D; -public class HouseTemplate -{ +public class HouseTemplate { + private String deedTemplate; private String buildingTemplate; private int lotCost; private int defaultItemLimit; + private int baseMaintenanceRate; private Vector placeablePlanets; private Map buildingSigns; - public HouseTemplate(String deedTemplate, String buildingTemplate, int lotCost) - { + public HouseTemplate(String deedTemplate, String buildingTemplate, int lotCost) { this.deedTemplate = deedTemplate; this.buildingTemplate = buildingTemplate; this.lotCost = lotCost; this.defaultItemLimit = 50; + this.baseMaintenanceRate = 8; this.placeablePlanets = new Vector(); this.buildingSigns = new HashMap(); } - public void addBuildingSign(String signTemplate, Point3D signPosition) - { + public void addBuildingSign(String signTemplate, Point3D signPosition) { buildingSigns.put(signTemplate, signPosition); } - public void addPlaceablePlanet(String planetName) - { + + public void addPlaceablePlanet(String planetName) { this.placeablePlanets.add(planetName); } - public void setDefaultItemLimit(int itemLimit) - { + + public void setDefaultItemLimit(int itemLimit) { this.defaultItemLimit = itemLimit; } - public String getDeedTemplate() - { - return this.deedTemplate; + public String getDeedTemplate() { + return deedTemplate; } - public String getBuildingTemplate() - { - return this.buildingTemplate; + + public String getBuildingTemplate() { + return buildingTemplate; } - public Map getBuildingSigns() - { - return this.buildingSigns; + + public Map getBuildingSigns() { + return buildingSigns; } - public Vector getPlaceablePlanets() - { - return this.placeablePlanets; + + public Vector getPlaceablePlanets() { + return placeablePlanets; } - public boolean canBePlacedOn(String planetName) - { - if(placeablePlanets.contains(planetName)) return true; + + public boolean canBePlacedOn(String planetName) { + if (placeablePlanets.contains(planetName)) { + return true; + } + return false; } - public int getLotCost() - { - return this.lotCost; + + public int getLotCost() { + return lotCost; } - public int getDefaultItemLimit() - { - return this.defaultItemLimit; + + public int getDefaultItemLimit() { + return defaultItemLimit; } + + public int getBaseMaintenanceRate() { + return baseMaintenanceRate; + } + + public void setBaseMaintenanceRate(int baseMaintenanceRate) { + this.baseMaintenanceRate = baseMaintenanceRate; + } + } diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java index b4ac1589..0f1e9f22 100644 --- a/src/services/housing/HousingService.java +++ b/src/services/housing/HousingService.java @@ -40,7 +40,6 @@ import main.NGECore; import protocol.swg.EnterStructurePlacementModeMessage; import resources.objects.building.BuildingObject; import resources.objects.creature.CreatureObject; -import resources.objects.deed.Player_House_Deed; import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; import services.playercities.PlayerCity; @@ -57,24 +56,42 @@ public class HousingService implements INetworkDispatch { private NGECore core; private Map housingTemplates = new ConcurrentHashMap(); - + private Map houseToDeed = new ConcurrentHashMap(); + public HousingService(NGECore core) { this.core = core; - core.commandService.registerCommand("placestructure"); - core.commandService.registerCommand("movefurniture"); - core.commandService.registerCommand("rotatefurniture"); + + Path p = Paths.get("scripts/houses/"); + + FileVisitor fv = new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + core.scriptService.callScript("scripts/houses/", file.getFileName().toString().replace(".py", ""), "setup", housingTemplates); + return FileVisitResult.CONTINUE; + } + }; + + try { + Files.walkFileTree(p, fv); + } catch (IOException e) { + e.printStackTrace(); + } + + housingTemplates.values().forEach((houseTemplate) -> houseToDeed.put(houseTemplate.getBuildingTemplate(), houseTemplate.getDeedTemplate())); } - public void enterStructureMode(CreatureObject actor, TangibleObject deed) - { - if(!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor, actor.getWorldPosition().x, actor.getWorldPosition().z)) - { + public void enterStructureMode(CreatureObject actor, TangibleObject deed) { + if (!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor, actor.getWorldPosition().x, actor.getWorldPosition().z)) { actor.sendSystemMessage("You may not place a structure here.", (byte) 0); // should probably load this from an stf return; } +<<<<<<< HEAD if(housingTemplates.containsKey(deed.getTemplate())) { +======= + if (housingTemplates.containsKey(deed.getTemplate())) { +>>>>>>> origin/master HouseTemplate houseTemplate = housingTemplates.get(deed.getTemplate()); System.out.println("DEED FOUND " + houseTemplate.getBuildingTemplate()); System.out.println("DEED TEMP " + deed.getTemplate()); @@ -83,10 +100,8 @@ public class HousingService implements INetworkDispatch { } } - public void placeStructure(final CreatureObject actor, TangibleObject deed, float positionX, float positionZ, float rotation) - { + public void placeStructure(final CreatureObject actor, TangibleObject deed, float positionX, float positionZ, float rotation) { HouseTemplate houseTemplate = housingTemplates.get(deed.getTemplate()); - Player_House_Deed playerHourseDeed = (Player_House_Deed)core.objectService.getObject(deed.getObjectID()); int structureLotCost = houseTemplate.getLotCost(); if (deed.getTemplate().contains("cityhall")) @@ -95,21 +110,18 @@ public class HousingService implements INetworkDispatch { String structureTemplate = houseTemplate.getBuildingTemplate(); - if(!houseTemplate.canBePlacedOn(actor.getPlanet().getName())) - { + 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 return; } - if(!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor, positionX, positionZ)) - { + if(!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor, positionX, positionZ)) { actor.sendSystemMessage("You may not place a structure here.", (byte) 0); // should probably load this from an stf return; } // Lot stuff - if(!actor.getPlayerObject().deductLots(structureLotCost)) - { + if (!actor.getPlayerObject().deductLots(structureLotCost)) { actor.sendSystemMessage("You do not have enough available lots to place this structure.", (byte) 0); // should probably load this from an stf return; } @@ -187,10 +199,12 @@ public class HousingService implements INetworkDispatch { TangibleObject sign = (TangibleObject) building.getAttachment("structureSign"); String playerFirstName = actor.getCustomName().split(" ")[0]; - if (sign !=null) + if (sign != null) { sign.setCustomName2(playerFirstName + "'s House"); + } + //building.add(sign); - + core.objectService.destroyObject(deed); // Structure management @@ -200,8 +214,8 @@ public class HousingService implements INetworkDispatch { building.setAttachment("structureOwner", actor.getObjectID()); building.setAttachment("structureAdmins", admins); building.setDeedTemplate(deed.getTemplate()); - building.setBMR(playerHourseDeed.getBMR()); - building.setConditionDamage(100); + building.setMaintenanceAmount(houseTemplate.getBaseMaintenanceRate()); + building.setConditionDamage(100); // Ouch if (structureTemplate.contains("cityhall")){ PlayerCity newCity = core.playerCityService.addNewPlayerCity(actor); @@ -212,45 +226,24 @@ public class HousingService implements INetworkDispatch { // Save structure to DB - //building.createTransaction(core.getBuildingODB().getEnvironment()); - //core.getBuildingODB().put(building, Long.class, BuildingObject.class, building.getTransaction()); - //building.getTransaction().commitSync(); + /*building.createTransaction(core.getBuildingODB().getEnvironment()); + core.getBuildingODB().put(building, Long.class, BuildingObject.class, building.getTransaction()); + building.getTransaction().commitSync();*/ } @SuppressWarnings("unchecked") - public boolean getPermissions(SWGObject player, SWGObject container) - { - if(((Vector) container.getContainer().getAttachment("structureAdmins")).contains(player.getObjectID())) return true; - return false; - } + public boolean getPermissions(SWGObject player, SWGObject container) { + if (((Vector) container.getContainer().getAttachment("structureAdmins")).contains(player.getObjectID())) { + return true; + } - public void addHousingTemplate(HouseTemplate houseTemplate) - { - housingTemplates.put(houseTemplate.getDeedTemplate(), houseTemplate); - } - - public void loadHousingTemplates() { - Path p = Paths.get("scripts/houses/"); - FileVisitor fv = new SimpleFileVisitor() - { - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException - { - System.out.println("Loading housing template " + file.getFileName()); - core.scriptService.callScript("scripts/houses/", file.getFileName().toString().replace(".py", ""), "setup", core); - return FileVisitResult.CONTINUE; - } - }; - try - { - Files.walkFileTree(p, fv); - } - catch (IOException e) { e.printStackTrace(); } + return false; } public void createDestroySUIPage(final SWGObject owner, final TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); //final BuildingObject building = (BuildingObject) core.objectService.getObject(target.getParentId()); // harvester.getStfFilename(); installation_n .getTemplate(); @@ -307,7 +300,8 @@ public class HousingService implements INetworkDispatch { public void createCodeWindow(SWGObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); //final BuildingObject building = (BuildingObject)target; Random rnd = new Random(); final int confirmCode = 100000 + rnd.nextInt(900000); @@ -333,26 +327,27 @@ public class HousingService implements INetworkDispatch { if (returnList.get(0).equals(""+confirmCode)){ // handle creation of correct deed in player inventory PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); - String deedTemplate = building.getDeedTemplate(); - - Player_House_Deed deed = (Player_House_Deed)core.objectService.createObject(deedTemplate, owner.getPlanet()); - if(player.getLotsRemaining()+deed.getLotRequirement()>10){ + HouseTemplate houseTemplate = housingTemplates.get(houseToDeed.get(building.getTemplate())); + + TangibleObject deed = (TangibleObject) core.objectService.createObject(houseTemplate.getDeedTemplate(), owner.getPlanet()); + + if (player.getLotsRemaining() + houseTemplate.getLotCost() > 10){ // Something went wrong or hacking attempt crafter.sendSystemMessage("Structure can't be redeeded. Maximum lot count exceeded.",(byte)1); return; } - - deed.setStructureTemplate(building.getTemplate()); - deed.setSurplusMaintenance((int)building.getMaintenanceAmount()); - deed.setAttributes(); + + deed.setIntAttribute("@obj_attr_n:examine_maintenance_rate", houseTemplate.getBaseMaintenanceRate()); + deed.setIntAttribute("@obj_attr_n:examine_maintenance", (int) building.getMaintenanceAmount()); core.objectService.destroyObject(building.getObjectID()); SWGObject ownerInventory = owner.getSlottedObject("inventory"); ownerInventory.add(deed); - if(player.getLotsRemaining()+deed.getLotRequirement()<=10) - player.setLotsRemaining(player.getLotsRemaining()+deed.getLotRequirement()); + if (player.getLotsRemaining() + houseTemplate.getLotCost() <= 10) { + player.setLotsRemaining(player.getLotsRemaining() + houseTemplate.getLotCost()); + } crafter.sendSystemMessage("@player_structure:processing_destruction",(byte)1); crafter.sendSystemMessage("@player_structure:deed_reclaimed",(byte)1); @@ -374,7 +369,8 @@ public class HousingService implements INetworkDispatch { public void createPayMaintenanceSUIPage(SWGObject owner, TangibleObject target) { CreatureObject creature = (CreatureObject) owner; - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); final SUIWindow window = core.suiService.createSUIWindow("Script.transfer", owner, target, 10); window.setProperty("bg.caption.lblTitle:Text", "@player_structure:select_amount"); window.setProperty("Prompt.lblPrompt:Text", "@player_structure:select_maint_amount" + @@ -452,7 +448,8 @@ public class HousingService implements INetworkDispatch { } public void createStatusSUIPage(SWGObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); String displayname = "@installation_n:"+building.getStfName(); if (building.getCustomName()!=null) displayname = building.getCustomName(); @@ -504,7 +501,8 @@ public class HousingService implements INetworkDispatch { } public void declareResidency(SWGObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); building.setResidency((CreatureObject)owner); PlayerCity cityActorIsIn = core.playerCityService.getCityObjectIsIn(owner); if (cityActorIsIn==null) @@ -520,7 +518,8 @@ public class HousingService implements INetworkDispatch { } public void handleListAllItems(SWGObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); String displayname = "@installation_n:"+building.getStfName(); if (building.getCustomName()!=null) displayname = building.getCustomName(); @@ -553,15 +552,17 @@ public class HousingService implements INetworkDispatch { } public void handleDeleteAllItems(SWGObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); //building.getItemsList().clear(); // confirmation needed confirmDeleteAllItems(owner, target); } public void confirmDeleteAllItems(SWGObject owner, TangibleObject target) { - - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); Random rnd = new Random(); final int confirmCode = 100000 + rnd.nextInt(900000); @@ -632,7 +633,8 @@ public class HousingService implements INetworkDispatch { } public void handleFindLostItems(SWGObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); String displayname = "@installation_n:"+building.getStfName(); if (building.getCustomName()!=null) displayname = building.getCustomName(); @@ -682,7 +684,8 @@ public class HousingService implements INetworkDispatch { core.staticService.spawnObject("object/tangible/terminal/shared_terminal_player_structure.iff", "tatooine", 0L, 3525.0F, 4.0F, -4800.0F, 0.70F, 0.71F); // I assume that childobject does not get a radial somehow - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); final SUIWindow window = core.suiService.createInputBox(2,"@player_structure:structure_status","@player_structure:structure_name_prompt", owner, target, 0); window.setProperty("bg.caption.lblTitle:Text", "@player_structure:find_items_search_keyword_title"); window.setProperty("Prompt.lblPrompt:Text", "@player_structure:find_items_search_keyword_prompt"); @@ -728,7 +731,8 @@ public class HousingService implements INetworkDispatch { } public void displayFoundItems(SWGObject owner, TangibleObject target, Vector foundItems) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); final SUIWindow window = core.suiService.createSUIWindow("Script.listBox", owner, target, 0); window.setProperty("bg.caption.lblTitle:Text", "@player_structure:find_items_search_keyword_title"); window.setProperty("Prompt.lblPrompt:Text", "@player_structure:find_items_search_list_prompt"); @@ -769,13 +773,15 @@ public class HousingService implements INetworkDispatch { } public void handlePermissionEntry(CreatureObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); String listName = "ENTRY"; building.setPermissionEntry(listName,owner); } public void handlePermissionBan(CreatureObject owner, TangibleObject target) { - final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); + final BuildingObject building = (BuildingObject) target.getGrandparent(); + //final BuildingObject building = (BuildingObject) target.getAttachment("housing_parentstruct"); String listName = "BAN"; building.setPermissionBan(listName,owner); } @@ -816,8 +822,9 @@ public class HousingService implements INetworkDispatch { } public String fetchPrivacyString(TangibleObject object){ - final BuildingObject building = (BuildingObject) object.getAttachment("housing_parentstruct"); - return building.getPrivacyString(); + //final BuildingObject building = (BuildingObject) object.getAttachment("housing_parentstruct"); + //return building.getPrivacyString(); + return ((BuildingObject) object.getGrandparent()).getPrivacyString(); } diff --git a/src/services/mission/MissionObjective.java b/src/services/mission/MissionObjective.java index c81fcc0a..8f43fe9f 100644 --- a/src/services/mission/MissionObjective.java +++ b/src/services/mission/MissionObjective.java @@ -21,8 +21,11 @@ ******************************************************************************/ package services.mission; +import main.NGECore; + import com.sleepycat.persist.model.Persistent; +import resources.objects.creature.CreatureObject; import resources.objects.mission.MissionObject; @Persistent(version=0) @@ -42,10 +45,10 @@ public abstract class MissionObjective { this.objectivePhase = 0; } - public abstract void activate(); - public abstract void complete(); - public abstract void abort(); - public abstract void update(); + public abstract void activate(NGECore core, CreatureObject player); + public abstract void complete(NGECore core, CreatureObject player); + public abstract void abort(NGECore core, CreatureObject player); + public abstract void update(NGECore core, CreatureObject player); public long getStartTime() { return startTime; } diff --git a/src/services/mission/MissionService.java b/src/services/mission/MissionService.java index 40b5abf0..f701ad2e 100644 --- a/src/services/mission/MissionService.java +++ b/src/services/mission/MissionService.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.nio.ByteOrder; import java.util.Map; import java.util.Random; +import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -35,24 +36,30 @@ import main.NGECore; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; +import com.sleepycat.je.Transaction; +import com.sleepycat.persist.EntityCursor; + import protocol.swg.ObjControllerMessage; import protocol.swg.objectControllerObjects.MissionAbort; import protocol.swg.objectControllerObjects.MissionAcceptRequest; import protocol.swg.objectControllerObjects.MissionAcceptResponse; import protocol.swg.objectControllerObjects.MissionListRequest; +import resources.common.BountyListItem; import resources.common.SpawnPoint; import resources.common.ObjControllerOpcodes; +import resources.objectives.BountyMissionObjective; import resources.objectives.DeliveryMissionObjective; import resources.objectives.DestroyMissionObjective; import resources.objects.creature.CreatureObject; import resources.objects.mission.MissionObject; +import resources.objects.player.PlayerObject; import resources.objects.tangible.TangibleObject; -import resources.objects.waypoint.WaypointObject; import engine.clientdata.StfTable; import engine.clients.Client; import engine.resources.common.CRC; import engine.resources.common.NameGen; import engine.resources.container.Traverser; +import engine.resources.database.ObjectDatabase; import engine.resources.objects.SWGObject; import engine.resources.scene.Point3D; import engine.resources.service.INetworkDispatch; @@ -63,7 +70,9 @@ public class MissionService implements INetworkDispatch { private NGECore core; private NameGen nameGenerator; // Use a HashMap for obtaining number of entries so we aren't using a visitor all the time. - private ConcurrentHashMap entryCounts = new ConcurrentHashMap(); + private Map entryCounts = new ConcurrentHashMap(); + private Vector bountyList = new Vector(); + private ObjectDatabase bountiesODB; private Random ran = new Random(); public MissionService(NGECore core) { @@ -73,6 +82,10 @@ public class MissionService implements INetworkDispatch { catch (IOException e) { e.printStackTrace(); } loadMissionEntryCounts(); + + bountiesODB = core.getBountiesODB(); + + cleanupBounties(); // delete any characters from the bounties odb if they no longer exist. } @Override @@ -118,7 +131,7 @@ public class MissionService implements INetworkDispatch { if(client == null || client.getSession() == null) return; - SWGObject object = client.getParent(); + CreatureObject object = (CreatureObject) client.getParent(); if(object == null) return; @@ -137,8 +150,12 @@ public class MissionService implements INetworkDispatch { if (terminalType == TerminalType.GENERIC) { handleMissionListRequest(core.objectService.getObject(request.getObjectId()), request.getTickCount(), TerminalType.GENERIC); - } else if (terminalType == TerminalType.BOUNTYHUNTER) { - + } else if (terminalType == TerminalType.BOUNTY) { + if (!object.hasSkill("class_bountyhunter_phase1_novice")) { + object.sendSystemMessage("@mission/mission_generic:not_bounty_hunter_terminal", (byte) 0); + } else { + handleMissionListRequest(core.objectService.getObject(request.getObjectId()), request.getTickCount(), TerminalType.BOUNTY); + } } else if (terminalType == TerminalType.ENTERTAINER) { } else if (terminalType == TerminalType.ARTISAN) { @@ -191,7 +208,7 @@ public class MissionService implements INetworkDispatch { MissionObjective objective = mission.getObjective(); if (objective != null) - objective.abort(); + objective.abort(core, creature); core.objectService.destroyObject(mission.getObjectId()); } @@ -225,7 +242,7 @@ public class MissionService implements INetworkDispatch { missionStrings++; } } - System.out.println("Loaded " + missionStrings + " mission entry counts."); + //System.out.println("Loaded " + missionStrings + " mission entry counts."); } @@ -267,8 +284,9 @@ public class MissionService implements INetworkDispatch { if (type == TerminalType.GENERIC) randomDeliveryMission(player, mission); - else if (type == TerminalType.BOUNTYHUNTER) - randomBountyMission(player, mission); + else if (type == TerminalType.BOUNTY) + //randomBountyMission(player, mission); + return; else if (type == TerminalType.ARTISAN) return; @@ -282,9 +300,9 @@ public class MissionService implements INetworkDispatch { } else if (typeTwoCount.get() < 4) { if (type == TerminalType.GENERIC) - randomDestroyMission(player, mission); + return; - else if (type == TerminalType.BOUNTYHUNTER) + else if (type == TerminalType.BOUNTY) return; else if (type == TerminalType.ARTISAN) @@ -293,8 +311,8 @@ public class MissionService implements INetworkDispatch { else return; - mission.setRepeatCount(requestCounter); - typeTwoCount.incrementAndGet(); + //mission.setRepeatCount(requestCounter); + //typeTwoCount.incrementAndGet(); } } }); @@ -338,7 +356,11 @@ public class MissionService implements INetworkDispatch { return true; } - private void createMissionObjective(CreatureObject creature, MissionObject mission) { + private MissionObjective createMissionObjective(CreatureObject creature, MissionObject mission) { + return createMissionObjective(creature, mission, false); + } + + private MissionObjective createMissionObjective(CreatureObject creature, MissionObject mission, boolean silent) { switch(mission.getMissionType()) { case "deliver": @@ -346,18 +368,32 @@ public class MissionService implements INetworkDispatch { mission.setObjective(deliveryObjective); - deliveryObjective.activate(); - break; + if (!silent) + deliveryObjective.activate(core, creature); + + return deliveryObjective; case "destroy": DestroyMissionObjective destroyObjective = new DestroyMissionObjective(mission); mission.setObjective(destroyObjective); - destroyObjective.activate(); - break; + if (!silent) + destroyObjective.activate(core, creature); + + return destroyObjective; + + case "bounty": + BountyMissionObjective bountyObjective = new BountyMissionObjective(mission); + + mission.setObjective(bountyObjective); + + if (!silent) + bountyObjective.activate(core, creature); + + return bountyObjective; default: - break; + return null; } } @@ -387,33 +423,166 @@ public class MissionService implements INetworkDispatch { mission.setMissionTemplateObject(CRC.StringtoCRC("object/tangible/mission/shared_mission_datadisk.iff")); mission.setMissionTargetName("Datadisk"); - - WaypointObject waypoint = (WaypointObject) core.objectService.createObject("object/waypoint/shared_waypoint.iff", player.getPlanet()); - if (waypoint == null) - return; - - waypoint.setColor(WaypointObject.ORANGE); - - } - - private void randomDestroyMission(SWGObject player, MissionObject mission) { - } private void randomBountyMission(SWGObject player, MissionObject mission) { + BountyListItem bountyTarget = null; + if (bountyList.size() > 0) { + boolean gotBounty = false; + while (!gotBounty) { + bountyTarget = getRandomBounty(); + + if (bountyTarget == null || bountyTarget.getAssignedHunters().size() >= 3 || bountyTarget.getCreditReward() < 20000) + continue; + else + gotBounty = true; + } + } + + if (bountyTarget == null) + return; + + mission.setMissionType("bounty"); + + String missionStf = "mission/mission_bounty_jedi"; + + if (!bountyTarget.getProfession().equals("")) { // TODO: Smuggler mission checks. + if (bountyTarget.getFaction().equals("neutral")) { + mission.setMissionTargetName("@mission/mission_bounty_jedi:neutral_jedi"); + mission.setMissionId(3); + } + else if (bountyTarget.getFaction().equals("rebel")) { + mission.setMissionTargetName("@mission/mission_bounty_jedi:rebel_jedi"); + mission.setMissionId(2); + } + else if (bountyTarget.getFaction().equals("imperial")) { + mission.setMissionTargetName("@mission/mission_bounty_jedi:imperial_jedi"); + mission.setMissionId(1); + } + mission.setMissionTitle(missionStf); + mission.setMissionDescription(missionStf); + } else { + // TODO: Dead code, but place-holder for implementation of smuggler missions. + if (bountyTarget.getFaction().equals("neutral")) { + mission.setMissionId(3); + } + else if (bountyTarget.getFaction().equals("rebel")) { + mission.setMissionId(2); + } + else if (bountyTarget.getFaction().equals("imperial")) { + mission.setMissionId(1); + } + mission.setMissionTitle(missionStf, "s"); + mission.setMissionDescription(missionStf, "s"); + } + + mission.setMissionLevel(90); + + mission.setCreditReward(bountyTarget.getCreditReward()); + + mission.setMissionTemplateObject(CRC.StringtoCRC("object/tangible/mission/shared_mission_bounty_jedi_target.iff")); + + mission.setBountyObjId(bountyTarget.getObjectId()); } public enum TerminalType {; public static final int GENERIC = 1; - public static final int BOUNTYHUNTER = 2; + public static final int BOUNTY = 2; public static final int ENTERTAINER = 3; public static final int ARTISAN = 4; public static final int EXPLORER = 5; } + public Vector getBountyList() { + return this.bountyList; + } + + public BountyListItem getRandomBounty() { + int bountyListId = ran.nextInt(bountyList.size()); + + return bountyList.get(bountyListId); + } + + public BountyListItem getBountyListItem(long objectId) { + Vector bounties = bountyList; + for (BountyListItem bounty : bounties) { + if (bounty.getObjectId() == objectId) + return bounty; + } + return null; + } + + public BountyListItem createNewBounty(CreatureObject bountyTarget, int reward) { + PlayerObject player = (PlayerObject) bountyTarget.getSlottedObject("ghost"); + if (player == null) + return null; + + if (getBountyListItem(bountyTarget.getObjectId()) != null) + return null; + + BountyListItem bounty = new BountyListItem(bountyTarget.getObjectId(), reward, core.playerService.getFormalProfessionName(player.getProfession()), bountyTarget.getFaction(), bountyTarget.getCustomName()); + + Transaction txn = bountiesODB.getEnvironment().beginTransaction(null, null); + bountiesODB.put(bounty, Long.class, BountyListItem.class, txn); + txn.commitSync(); + + bountyList.add(bounty); + + //System.out.println("Created bounty of " + reward + " to " + bounty.getName()); + return bounty; + } + + public boolean addToExistingBounty(CreatureObject bountyTarget, int amountToAdd) { + + BountyListItem bounty = getBountyListItem(bountyTarget.getObjectId()); + + if (bounty == null) + return false; + + bounty.addBounty(amountToAdd); + + Transaction txn = bountiesODB.getEnvironment().beginTransaction(null, null); + bountiesODB.put(bounty, Long.class, BountyListItem.class, txn); + txn.commitSync(); + + //System.out.println("Added bounty of " + amountToAdd + " to " + bounty.getName()); + return true; + } + + public boolean removeBounty(CreatureObject bountyTarget, boolean listRemove) { + Transaction txn = bountiesODB.getEnvironment().beginTransaction(null, null); + + if (listRemove) + bountyList.remove(bountiesODB.get(bountyTarget.getObjectId(), Long.class, BountyListItem.class)); + + bountiesODB.delete(bountyTarget.getObjectId(), Long.class, BountyListItem.class, txn); + txn.commitSync(); + return true; + } + + public boolean removeBounty(CreatureObject bountyTarget) { + return removeBounty(bountyTarget, true); + } + + private void cleanupBounties() { + AtomicInteger bountyCount = new AtomicInteger(); + Transaction txn = bountiesODB.getEnvironment().beginTransaction(null, null); + EntityCursor bountyCursor = bountiesODB.getEntityStore().getPrimaryIndex(Long.class, BountyListItem.class).entities(txn, null); + bountyCursor.forEach(bounty -> { + if (!core.characterService.playerExists(bounty.getObjectId())) { + bountyCursor.delete(); + bountyCount.getAndIncrement(); + } + }); + bountyCursor.close(); + txn.commitSync(); + + if (bountyCount.get() != 0) + System.out.println("Removed " + bountyCount.get() + " bounties."); + } + @Override public void shutdown() { - } } diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index 8158ae15..0923192d 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -102,8 +102,6 @@ import resources.objects.building.BuildingObject; import resources.objects.cell.CellObject; import resources.objects.craft.DraftSchematic; import resources.objects.creature.CreatureObject; -import resources.objects.deed.Harvester_Deed; -import resources.objects.deed.Player_House_Deed; import resources.objects.factorycrate.FactoryCrateObject; import resources.objects.group.GroupObject; import resources.objects.guild.GuildObject; @@ -223,7 +221,9 @@ public class ObjectService implements INetworkDispatch { } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); } + boolean isSnapshot = false; + if(objectID == 0) objectID = generateObjectID(); else @@ -241,15 +241,7 @@ public class ObjectService implements INetworkDispatch { object = new SurveyTool(objectID, planet, Template, position, orientation); - } else if(Template.startsWith("object/tangible/deed/harvester_deed") || Template.startsWith("object/tangible/deed/generator_deed")) { - - object = new Harvester_Deed(objectID, planet, Template, position, orientation); - - } else if(Template.startsWith("object/tangible/deed/player_house_deed") || Template.startsWith("object/tangible/deed/guild_deed") || Template.startsWith("object/tangible/deed/city_deed") || Template.startsWith("object/tangible/tcg/series3/shared_structure_deed_sith_meditation_room_deed.iff") || Template.startsWith("object/tangible/tcg/series5/shared_structure_deed_player_house_atat.iff") || Template.startsWith("object/tangible/tcg/series5/shared_structure_deed_player_house_hangar.iff") || Template.startsWith("object/tangible/tcg/series3/shared_structure_deed_jedi_meditation_room_deed.iff") || Template.startsWith("object/tangible/saga_system/rewards/shared_structure_deed_player_house_sandcrawler.iff")) { - - object = new Player_House_Deed(objectID, planet, Template, position, orientation); - - } + } // else if(Template.startsWith("object/tangible/container/drum/shared_treasure_drum.iff")) { // // object = new CreatureObject(objectID, planet, position, orientation, Template); @@ -346,17 +338,10 @@ public class ObjectService implements INetworkDispatch { object.setAttachment("customServerTemplate", customServerTemplate); object.setisInSnapshot(isSnapshot); + if(!core.getObjectIdODB().contains(objectID, Long.class, ObjectId.class)) { core.getObjectIdODB().put(new ObjectId(objectID), Long.class, ObjectId.class); } - if(loadServerTemplate) - loadServerTemplate(object); - else { - final SWGObject pointer = object; - loadServerTemplateTasks.add(() -> loadServerTemplate(pointer)); - } - - objectList.put(objectID, object); // Set Options - easier to set them across the board here // because we'll be spawning them despite most of them being unscripted. @@ -392,6 +377,15 @@ public class ObjectService implements INetworkDispatch { } } + if(loadServerTemplate) + loadServerTemplate(object); + else { + final SWGObject pointer = object; + loadServerTemplateTasks.add(() -> loadServerTemplate(pointer)); + } + + objectList.put(objectID, object); + return object; } @@ -643,11 +637,33 @@ public class ObjectService implements INetworkDispatch { } + public long getDOId(String planet, String template, int type, long containerId, int cellNumber, float x1, float y, float z1) { + SWGObject container = getObject(containerId); + float x = ((container == null) ? x1 : container.getPosition().x + x1); + float z = ((container == null) ? z1 : container.getPosition().z + z1); + String key = "" + CRC.StringtoCRC(planet) + CRC.StringtoCRC(template) + type + containerId + cellNumber + x + y + z; + + long objectId = 0; + + if (core.getDuplicateIdODB().contains(key, String.class, DuplicateId.class)) { + objectId = core.getDuplicateIdODB().get(key, String.class, DuplicateId.class).getObjectId(); + } else { + objectId = generateObjectID(); + Transaction txn = core.getDuplicateIdODB().getEnvironment().beginTransaction(null, null); + core.getDuplicateIdODB().put(new DuplicateId(key, objectId), String.class, DuplicateId.class, txn); + txn.commitSync(); + } + + return objectId; + } + public void useObject(CreatureObject creature, SWGObject object) { if (creature == null || object == null) { return; } + creature.setUseTarget(object); + int reuse_time; try { @@ -897,6 +913,10 @@ public class ObjectService implements INetworkDispatch { if(!core.getConfig().getString("MOTD").equals("")) creature.sendSystemMessage(core.getConfig().getString("MOTD"), (byte) 2); + BountyListItem bounty = core.getBountiesODB().get(creature.getObjectId(), Long.class, BountyListItem.class); + if (bounty != null) + core.missionService.getBountyList().add(bounty); + core.playerService.postZoneIn(creature); } @@ -1081,11 +1101,14 @@ public class ObjectService implements INetworkDispatch { if (duplicate.containsKey(containerId)) { containerId = duplicate.get(containerId); } + String planetName = planet.getName(); + + // TODO needs to a way to work for mustafar and kashyyyk which both have instances if (objectId != 0 && getObject(objectId) != null && (planetName.contains("dungeon") || planetName.contains("adventure"))) { SWGObject container = getObject(containerId); - int x = ((int) (px + ((container == null) ? x1 : container.getPosition().x))); - int z = ((int) (pz + ((container == null) ? z1 : container.getPosition().z))); + float x = (px + ((container == null) ? x1 : container.getPosition().x)); + float z = (pz + ((container == null) ? z1 : container.getPosition().z)); String key = "" + CRC.StringtoCRC(planet.getName()) + CRC.StringtoCRC(template) + type + containerId + cellIndex + x + py + z; long newObjectId = 0; diff --git a/src/services/resources/HarvesterService.java b/src/services/resources/HarvesterService.java index 7dd955eb..151a6d67 100644 --- a/src/services/resources/HarvesterService.java +++ b/src/services/resources/HarvesterService.java @@ -54,7 +54,6 @@ import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import resources.common.ObjControllerOpcodes; import resources.objects.creature.CreatureObject; -import resources.objects.deed.Harvester_Deed; import resources.objects.harvester.HarvesterMessageBuilder; import resources.objects.harvester.HarvesterObject; import resources.objects.installation.InstallationObject; @@ -83,7 +82,7 @@ public class HarvesterService implements INetworkDispatch { private Vector allConstructors = new Vector(); public HarvesterService(NGECore core) { - this.core = core; + this.core = core; //core.commandService.registerCommand("permissionlistmodify"); //core.commandService.registerCommand("harvesterselectresource"); //core.commandService.registerCommand("harvesteractivate"); @@ -439,19 +438,26 @@ public class HarvesterService implements INetworkDispatch { // handle creation of correct deed in player inventory PlayerObject player = (PlayerObject) crafter.getSlottedObject("ghost"); String deedTemplate = harvester.getDeedTemplate(); - Harvester_Deed deed = (Harvester_Deed)core.objectService.createObject(deedTemplate, owner.getPlanet()); - if(player.getLotsRemaining()+deed.getLotRequirement()>10){ + TangibleObject deed = (TangibleObject) core.objectService.createObject(deedTemplate, owner.getPlanet()); + + if (player.getLotsRemaining() + (Integer) deed.getAttachment("LotRequirement") > 10) { // Something went wrong or hacking attempt crafter.sendSystemMessage("Structure can't be redeeded. Maximum lot count exceeded.",(byte)1); return; } - deed.setStructureTemplate(harvester.getTemplate()); - deed.setOutputHopperCapacity(harvester.getOutputHopperCapacity()); - deed.setBER(harvester.getBER()); - deed.setSurplusMaintenance((int)harvester.getMaintenanceAmount()); - deed.setSurplusPower((int)harvester.getPowerLevel()); - deed.setAttributes(); + deed.setAttachment("StructureTemplate", harvester.getTemplate()); + + if (harvester.getMaintenanceAmount() > 0) { + deed.setIntAttribute("examine_maintenance", (int) harvester.getMaintenanceAmount()); + } + + if (harvester.getPowerLevel() > 0) { + deed.setIntAttribute("examine_power", (int) harvester.getPowerLevel()); + } + + deed.setIntAttribute("examine_hoppersize", harvester.getOutputHopperCapacity()); + deed.setIntAttribute("examine_extractionrate", harvester.getBER()); removeHarvester(harvester); core.objectService.destroyObject(harvester.getObjectID()); @@ -459,8 +465,9 @@ public class HarvesterService implements INetworkDispatch { SWGObject crafterInventory = owner.getSlottedObject("inventory"); crafterInventory.add(deed); - if(player.getLotsRemaining()+deed.getLotRequirement()<=10) - player.setLotsRemaining(player.getLotsRemaining()+deed.getLotRequirement()); + if (player.getLotsRemaining() + (Integer) deed.getAttachment("LotRequirement") <= 10) { + player.setLotsRemaining(player.getLotsRemaining() + (Integer) deed.getAttachment("LotRequirement")); + } crafter.sendSystemMessage("@player_structure:processing_destruction",(byte)1); crafter.sendSystemMessage("@player_structure:deed_reclaimed",(byte)1); @@ -651,7 +658,7 @@ public class HarvesterService implements INetworkDispatch { } return 0; } - } + } public void handlePermissionAdmin(CreatureObject owner, TangibleObject target) { @@ -927,11 +934,9 @@ public class HarvesterService implements INetworkDispatch { return container; } - - public void constructionSite(CreatureObject actor,SWGObject target, long objectId, float posX, float posZ, float dir){ - - SWGObject usedDeed = (SWGObject)actor.getAttachment("LastUsedDeed"); - String constructorTemplate = ((Harvester_Deed)usedDeed).getConstructorTemplate(); + public void constructionSite(CreatureObject actor, SWGObject target, long objectId, float posX, float posZ, float dir){ + SWGObject usedDeed = actor.getUseTarget(); //(SWGObject)actor.getAttachment("LastUsedDeed"); + String constructorTemplate = (String) usedDeed.getAttachment("ConstructorTemplate"); //String structureTemplate = "object/installation/mining_ore/construction/shared_construction_mining_ore_harvester_style_1.iff"; float positionY = core.terrainService.getHeight(actor.getPlanetId(), posX, posZ) + 2f; @@ -939,33 +944,47 @@ public class HarvesterService implements INetworkDispatch { quaternion = resources.common.MathUtilities.rotateQuaternion(quaternion, (float)((Math.PI/2) * dir), new Point3D(0, 1, 0)); InstallationObject installation = (InstallationObject) core.objectService.createObject(constructorTemplate, 0, actor.getPlanet(), new Point3D(posX, positionY, posZ), quaternion); + if (!usedDeed.getAttributes().containsKey("examine_extractionrate")) { + usedDeed.setIntAttribute("examine_extractionrate", 0); + } + + if (!usedDeed.getAttributes().containsKey("examine_hoppersize")) { + usedDeed.setIntAttribute("examine_hoppersize", 0); + } + + if (!usedDeed.getAttributes().containsKey("examine_maintenance")) { + usedDeed.setIntAttribute("examine_maintenance", 0); + } + + if (!usedDeed.getAttributes().containsKey("examine_power")) { + usedDeed.setIntAttribute("examine_power", 0); + } installation.setAttachment("ConstructionStart", System.currentTimeMillis()); - installation.setAttachment("Owner", actor); - installation.setAttachment("Deed_StructureTemplate", ((Harvester_Deed)usedDeed).getStructureTemplate()); - installation.setAttachment("Deed_DeedTemplate", ((Harvester_Deed)usedDeed).getTemplate()); - installation.setAttachment("Deed_BER", ((Harvester_Deed)usedDeed).getBER()); - installation.setAttachment("Deed_Capacity", ((Harvester_Deed)usedDeed).getOutputHopperCapacity()); - installation.setAttachment("Deed_DeedLots", ((Harvester_Deed)usedDeed).getLotRequirement()); - installation.setAttachment("Deed_SurplusMaintenance", ((Harvester_Deed)usedDeed).getSurplusMaintenance()); - installation.setAttachment("Deed_SurplusPower", ((Harvester_Deed)usedDeed).getSurplusPower()); + installation.setAttachment("ownerId", actor.getObjectID()); + installation.setAttachment("StructureTemplate", usedDeed.getAttachment("StructureTemplate")); + installation.setAttachment("Deed_DeedTemplate", usedDeed.getTemplate()); + installation.setAttachment("Deed_BER", usedDeed.getIntAttribute("examine_extractionrate")); + installation.setAttachment("Deed_Capacity", usedDeed.getIntAttribute("examine_hoppersize")); + installation.setAttachment("Deed_DeedLots", usedDeed.getAttachment("LotRequirement")); + installation.setAttachment("Deed_SurplusMaintenance", usedDeed.getIntAttribute("examine_maintenance")); + installation.setAttachment("Deed_SurplusPower", usedDeed.getIntAttribute("examine_power")); // destroy deed - TangibleObject playerInventory = (TangibleObject) actor.getSlottedObject("inventory"); - playerInventory.remove(usedDeed); + core.objectService.destroyObject(usedDeed); core.simulationService.add(installation, posX, posZ, true); PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); - player.setLotsRemaining(player.getLotsRemaining()-(int)((Harvester_Deed)usedDeed).getLotRequirement()); + player.setLotsRemaining(player.getLotsRemaining() - (int) usedDeed.getAttachment("LotRequirement")); synchronized(allConstructors){ allConstructors.add(installation); } } public void placeHarvester(SWGObject object) { - CreatureObject actor = (CreatureObject) object.getAttachment("Owner"); - String structureTemplate = (String)object.getAttachment("Deed_StructureTemplate"); + CreatureObject actor = (CreatureObject) NGECore.getInstance().objectService.getObject((Long) object.getAttachment("ownerId")); + String structureTemplate = (String) object.getAttachment("StructureTemplate"); HarvesterObject harvester = (HarvesterObject) NGECore.getInstance().objectService.createObject(structureTemplate, actor.getPlanet()); long objectId = harvester.getObjectID(); Vector adminList = harvester.getAdminList(); @@ -1039,7 +1058,7 @@ public class HarvesterService implements INetworkDispatch { } - public void enterStructurePlacementMode(SWGObject object, CreatureObject actor){ + public void enterStructurePlacementMode(CreatureObject actor, SWGObject object){ if (!actor.getClient().isGM() && !core.terrainService.canBuildAtPosition(actor,actor.getPosition().x,actor.getPosition().z)){ actor.sendSystemMessage("@player_structure:not_permitted", (byte) 0); @@ -1047,13 +1066,12 @@ public class HarvesterService implements INetworkDispatch { } PlayerObject player = (PlayerObject) actor.getSlottedObject("ghost"); - if (((Harvester_Deed)object).getLotRequirement()>player.getLotsRemaining()){ + if (((Integer) object.getAttachment("LotRequirement")) > player.getLotsRemaining()){ actor.sendSystemMessage("@player_structure:not_enough_lots", (byte) 0); return; } - actor.setAttachment("LastUsedDeed", object); - String structureTemplate = ((Harvester_Deed)object).getStructureTemplate(); + String structureTemplate = (String) object.getAttachment("StructureTemplate"); //String temp = "object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff"; EnterStructurePlacementModeMessage placementMsg = new EnterStructurePlacementModeMessage(actor,structureTemplate); actor.getClient().getSession().write(placementMsg.serialize()); @@ -1085,11 +1103,11 @@ public class HarvesterService implements INetworkDispatch { public void createExampleDeed(CreatureObject actor){ String templateString="object/tangible/deed/harvester_deed/shared_harvester_ore_s1_deed.iff"; - Harvester_Deed deed = (Harvester_Deed)core.objectService.createObject(templateString, actor.getPlanet()); - deed.setName("Example Harvester Deed"); - deed.setStructureTemplate("object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff"); - deed.setOutputHopperCapacity(27344); - deed.setBER(15); + TangibleObject deed = (TangibleObject) core.objectService.createObject(templateString, actor.getPlanet()); + deed.setCustomName("Example Harvester Deed"); + deed.setAttachment("StructureTemplate", "object/installation/mining_ore/shared_mining_ore_harvester_style_1.iff"); + deed.setIntAttribute("examine_hoppersize", 27344); + deed.setIntAttribute("examine_extractionrate", 15); TangibleObject playerInventory = (TangibleObject) actor.getSlottedObject("inventory"); playerInventory.add(deed); diff --git a/src/services/sui/SUIService.java b/src/services/sui/SUIService.java index 546fc3d2..309577cc 100644 --- a/src/services/sui/SUIService.java +++ b/src/services/sui/SUIService.java @@ -46,9 +46,9 @@ import resources.common.FileUtilities; import resources.common.ObjControllerOpcodes; import resources.common.Opcodes; import resources.common.RadialOptions; +import resources.loot.LootRollSession; import resources.objects.creature.CreatureObject; import resources.objects.harvester.HarvesterObject; -import resources.objects.loot.LootRollSession; import services.sui.SUIWindow.SUICallback; import services.sui.SUIWindow.Trigger; import engine.clients.Client;