mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-07 22:13:08 -04:00
continued sandbox city, public structure problem
This commit is contained in:
@@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import resources.objects.building.BuildingObject;
|
||||
import resources.objects.creature.CreatureObject;
|
||||
import resources.objects.deed.Player_House_Deed;
|
||||
import resources.objects.tangible.TangibleObject;
|
||||
import services.sui.SUIWindow;
|
||||
import services.sui.SUIWindow.SUICallback;
|
||||
@@ -52,6 +53,9 @@ public class PlayerCityService implements INetworkDispatch {
|
||||
private Vector<PlayerCity> playerCities = new Vector<PlayerCity>();
|
||||
private int cityID = 0; // This must be persisted or handled via objectservice somehow
|
||||
|
||||
// static helper variable to be deleted later
|
||||
public static boolean sandboxCityBuilt = false;
|
||||
|
||||
public PlayerCityService(NGECore core) {
|
||||
this.core = core;
|
||||
|
||||
@@ -161,8 +165,12 @@ public class PlayerCityService implements INetworkDispatch {
|
||||
core.suiService.openSUIWindow(window);
|
||||
}
|
||||
|
||||
|
||||
// Test method to be deleted later
|
||||
public void buildSandboxTestCity(CreatureObject founder) {
|
||||
|
||||
if (sandboxCityBuilt)
|
||||
return;
|
||||
|
||||
float positionX = 2170.0F;
|
||||
float positionY = 1.0F;
|
||||
@@ -205,13 +213,19 @@ public class PlayerCityService implements INetworkDispatch {
|
||||
cityHall.setConditionDamage(100);
|
||||
|
||||
|
||||
positionY = core.terrainService.getHeight(founder.getPlanetId(), positionX, positionZ)+ 2f;
|
||||
founder.setPosition(new Point3D(positionX+100,positionY,positionZ));
|
||||
core.simulationService.teleport(founder, new Point3D(positionX,positionY,positionZ+150), founder.getOrientation(), 0);
|
||||
positionY = core.terrainService.getHeight(founder.getPlanetId(), positionX, positionZ);
|
||||
founder.setPosition(new Point3D(positionX,positionY,positionZ+50));
|
||||
core.simulationService.teleport(founder, new Point3D(positionX,positionY,positionZ+50), founder.getOrientation(), 0);
|
||||
|
||||
TangibleObject swoopDeed = (TangibleObject) core.objectService.createObject("object/tangible/deed/vehicle_deed/shared_speederbike_swoop_deed.iff", founder.getPlanet());
|
||||
SWGObject inventory = founder.getSlottedObject("inventory");
|
||||
inventory.add(swoopDeed);
|
||||
|
||||
TangibleObject shuttleportDeed = (TangibleObject) core.objectService.createObject("object/tangible/deed/city_deed/shared_shuttleport_tatooine_deed.iff", founder.getPlanet());
|
||||
inventory.add(shuttleportDeed);
|
||||
|
||||
TangibleObject garden1 = (TangibleObject) core.objectService.createObject("object/tangible/deed/city_deed/shared_garden_tatooine_sml_01_deed.iff", founder.getPlanet());
|
||||
inventory.add(garden1);
|
||||
|
||||
|
||||
//structureTemplate = "object/building/player/city/shared_shuttleport_tatooine.iff";
|
||||
@@ -219,6 +233,7 @@ public class PlayerCityService implements INetworkDispatch {
|
||||
positionX = 2170.0F;
|
||||
positionY = 1.0F;
|
||||
positionZ = -4559.0F;
|
||||
positionY = core.terrainService.getHeight(founder.getPlanetId(), positionX, positionZ);
|
||||
|
||||
//StructureObject shuttlePort = (StructureObject) core.objectService.createObject(structureTemplate, 0, founder.getPlanet(), new Point3D(positionX, positionY, positionZ), founder.getOrientation());
|
||||
BuildingObject shuttlePort = (BuildingObject) core.objectService.createObject(structureTemplate, 0, founder.getPlanet(), new Point3D(positionX, positionY, positionZ), founder.getOrientation());
|
||||
@@ -238,6 +253,8 @@ public class PlayerCityService implements INetworkDispatch {
|
||||
shuttlePort.setDeedTemplate("object/tangible/deed/city_deed/shared_cityhall_tatooine_deed.iff");
|
||||
shuttlePort.setBMR(12);
|
||||
shuttlePort.setConditionDamage(100);
|
||||
|
||||
sandboxCityBuilt = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user