This commit is contained in:
Treeku
2014-04-10 10:22:07 +01:00
6 changed files with 39 additions and 8 deletions
+1 -4
View File
@@ -61,9 +61,6 @@ odb/resourcehistory/je.info.*
odb/resourceroots/je.info.*
odb/resources/je.info.*
# PSWG Configs
options.cfg
# External tool builders
.externalToolBuilders/
@@ -214,4 +211,4 @@ pip-log.txt
#############
## PyCharm
#############
.idea
.idea
+25
View File
@@ -0,0 +1,25 @@
from resources.common import RadialOptions
import sys
def createRadial(core, owner, target, radials):
radials.clear()
radials.add(RadialOptions(0, 11, 1, ''))
radials.add(RadialOptions(0, 55, 0, ''))
radials.add(RadialOptions(3, 56, 1, ''))
radials.add(RadialOptions(3, 57, 1, ''))
radials.add(RadialOptions(3, 58, 1, ''))
radials.add(RadialOptions(3, 59, 1, ''))
radials.add(RadialOptions(0, 52, 0, ''))
radials.add(RadialOptions(4, 53, 1, ''))
radials.add(RadialOptions(4, 54, 1, ''))
return
def handleSelection(core, owner, target, option):
if option == 56:
core.commandService.callCommand(owner, 'movefurniture', target, 'forward 10')
return
@@ -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;
+1 -1
View File
@@ -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()
{
+1 -2
View File
@@ -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);
+10
View File
@@ -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;