Files
NGECore2/scripts/commands/placestructure.py
T
Treeku de296b4db2 More removed DeedObject stuff
Also changed attachments to use ids instead of objects.  Best to use Ids
otherwise issues such as objects not deleting successfully occur, if not
outright causing persistence errors during saving.
2014-04-29 03:48:32 +01:00

26 lines
602 B
Python

import sys
def setup():
return
def run(core, actor, target, commandString):
cmdArgs = commandString.split(" ")
deedId = long(cmdArgs[0])
deed = core.objectService.getObject(deedId)
if deed == actor:
deed = actor.getUseTarget()
if deed.getTemplate().startswith('object/tangible/deed/harvester_deed') is True:
core.harvesterService.handlePlaceStructureCommand(actor, target, commandString)
return
positionX = float(cmdArgs[1])
positionZ = float(cmdArgs[2])
rotation = float(cmdArgs[3])
core.housingService.placeStructure(actor, deed, positionX, positionZ, rotation)
return