mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-20 10:02:56 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
This commit is contained in:
@@ -838,7 +838,7 @@ public class PlayerObject extends IntangibleObject {
|
||||
|
||||
public boolean deductLots(int amount)
|
||||
{
|
||||
if(this.lotsRemaining - amount > 0)
|
||||
if(this.lotsRemaining - amount >= 0)
|
||||
{
|
||||
this.lotsRemaining -= amount;
|
||||
return true;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class HouseTemplate
|
||||
public boolean canBePlacedOn(String planetName)
|
||||
{
|
||||
if(placeablePlanets.contains(planetName)) return true;
|
||||
else return false;
|
||||
return false;
|
||||
}
|
||||
public int getLotCost()
|
||||
{
|
||||
|
||||
@@ -97,12 +97,11 @@ public class HousingService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
// Lot stuff
|
||||
if(actor.getPlayerObject().getLotsRemaining() - structureLotCost < 0)
|
||||
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;
|
||||
}
|
||||
actor.getPlayerObject().deductLots(structureLotCost);
|
||||
|
||||
// Calculate our orientation and height
|
||||
Quaternion quaternion = new Quaternion(1, 0, 0, 0);
|
||||
|
||||
@@ -82,6 +82,16 @@ public class SUIService implements INetworkDispatch {
|
||||
if(target == null || owner == null)
|
||||
return;
|
||||
|
||||
if(target.getGrandparent() != null && target.getGrandparent().getAttachment("structureAdmins") != null)
|
||||
{
|
||||
if(core.housingService.getPermissions(owner, target.getContainer()))
|
||||
{
|
||||
core.scriptService.callScript("scripts/radial/", "moveable", "createRadial", core, owner, target, request.getRadialOptions());
|
||||
sendRadial(owner, target, request.getRadialOptions(), request.getRadialCount());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
core.scriptService.callScript("scripts/radial/", getRadialFilename(target), "createRadial", core, owner, target, request.getRadialOptions());
|
||||
if(getRadialFilename(target).equals("default"))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user