diff --git a/src/resources/common/BountyListItem.java b/src/resources/common/BountyListItem.java index ec096333..a50272e8 100644 --- a/src/resources/common/BountyListItem.java +++ b/src/resources/common/BountyListItem.java @@ -1,4 +1,3 @@ -<<<<<<< HEAD /******************************************************************************* * Copyright (c) 2013 * @@ -105,111 +104,3 @@ 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/objectives/BountyMissionObjective.java b/src/resources/objectives/BountyMissionObjective.java index 51c8382c..e17de5cd 100644 --- a/src/resources/objectives/BountyMissionObjective.java +++ b/src/resources/objectives/BountyMissionObjective.java @@ -1,4 +1,3 @@ -<<<<<<< HEAD /******************************************************************************* * Copyright (c) 2013 * @@ -79,85 +78,3 @@ 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/services/DevService.java b/src/services/DevService.java index 21043777..e2bd4390 100644 --- a/src/services/DevService.java +++ b/src/services/DevService.java @@ -91,7 +91,6 @@ public class DevService implements INetworkDispatch { if(creature.getClient().isGM()) suiOptions.put((long) 120, "House Deeds"); if(creature.getClient().isGM()) suiOptions.put((long) 125, "Crafting Tools"); if(creature.getClient().isGM()) suiOptions.put((long) 130, "Vehicle Deeds"); - if(creature.getClient().isGM()) suiOptions.put((long) 121, "Sandbox City"); break; case 3: // [Items] Weapons @@ -1167,29 +1166,6 @@ 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); - deed.setBMR(15); - deed.setAttributes(); - inventory.add(deed); - - templateString="object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff"; - deed = (Player_House_Deed)core.objectService.createObject(templateString, planet); - deed.setBMR(15); - deed.setAttributes(); - inventory.add(deed); - - - return; - - case 121: - NGECore.getInstance().playerCityService.buildSandboxTestCity(player); - - 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); @@ -1200,7 +1176,6 @@ public class DevService implements INetworkDispatch { 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"); @@ -1212,8 +1187,6 @@ public class DevService implements INetworkDispatch { inventory.add(swoopDeed); inventory.add(av21deed); return; - - } } }); diff --git a/src/services/housing/HousingService.java b/src/services/housing/HousingService.java index 0f1e9f22..34bdb205 100644 --- a/src/services/housing/HousingService.java +++ b/src/services/housing/HousingService.java @@ -22,7 +22,6 @@ package services.housing; import java.io.IOException; -import java.math.BigInteger; import java.nio.file.FileVisitResult; import java.nio.file.FileVisitor; import java.nio.file.Files; @@ -86,15 +85,8 @@ public class HousingService implements INetworkDispatch { 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()); EnterStructurePlacementModeMessage packet = new EnterStructurePlacementModeMessage(deed, houseTemplate.getBuildingTemplate()); actor.getClient().getSession().write(packet.serialize()); } @@ -103,11 +95,6 @@ public class HousingService implements INetworkDispatch { public void placeStructure(final CreatureObject actor, TangibleObject deed, float positionX, float positionZ, float rotation) { HouseTemplate houseTemplate = housingTemplates.get(deed.getTemplate()); int structureLotCost = houseTemplate.getLotCost(); - - if (deed.getTemplate().contains("cityhall")) - structureLotCost = 0; - - String structureTemplate = houseTemplate.getBuildingTemplate(); if (!houseTemplate.canBePlacedOn(actor.getPlanet().getName())) { @@ -132,69 +119,10 @@ public class HousingService implements INetworkDispatch { float positionY = core.terrainService.getHeight(actor.getPlanetId(), positionX, positionZ) + 2f; - boolean canBuild = true; - - // Check for city founders joining a new city - PlayerCity cityActorIsIn = core.playerCityService.getCityObjectIsIn(actor); - - if (cityActorIsIn != null){ - // Actor is inside the bounds of a city, so zoning must be checked - //actor.setAttachment("Has24HZoningFor",cityActorIsIn.getCityID()); // for testing - //actor.setAttachment("Has24HZoningUntil",System.currentTimeMillis()+1000000); // for testing - - - if (deed.getTemplate().contains("shuttleport")){ - - if (actor.getObjectID()!=cityActorIsIn.getMayorID()) - actor.sendSystemMessage("You must be the mayor of this city to place the structure.", (byte) 0); - - if (cityActorIsIn.getRank()<0){ - actor.sendSystemMessage("@city/city:rank_req", (byte) 0); - return; - } - - } - - if (actor.getAttachment("Has24HZoningFor")==null || actor.getAttachment("Has24HZoningFor")==null) - return; - int cityActorHasZoning = (int)actor.getAttachment("Has24HZoningFor"); - BigInteger zoningUntilBI = (BigInteger) actor.getAttachment("Has24HZoningUntil"); - long zoningUntil = zoningUntilBI.longValue(); - if (cityActorHasZoning==cityActorIsIn.getCityID() && System.currentTimeMillis()