Files
NGECore2/scripts/commands/rotatefurniture.py
T
Seefo 70b7507bb0 Added /movefurniture & /rotatefurniture, see ext.
The permission system thing I'm doing needs to be adjusted to the
Container permission system in the Engine.

To Light:  Please contact me in regards to this
2014-04-09 19:53:11 -04:00

29 lines
1004 B
Python

import sys
from engine.resources.scene import Point3D
def setup():
return
def run(core, actor, target, commandString):
tarObj = core.objectService.getObject(actor.getTargetId())
container = actor.getContainer()
parsedMsg = commandString.split(' ', 2)
if core.housingService.getPermissions(actor, container): # i should probably relook into my permissions system... it kinda sucks
if parsedMsg[0] == "pitch":
core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(1, 0, 0)) # this is messed up ???
return
elif parsedMsg[0] == "yaw":
core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(0, 1, 0)) # this is correct
return
elif parsedMsg[0] == "roll":
core.simulationService.transform(tarObj, float(parsedMsg[1]), Point3D(0, 0, 1)) # this is messed up ???
return
elif container.getTemplate() == "object/cell/shared_cell.iff":
actor.sendSystemMessage("You do not have permission to access that container!", 0)
return
return