Added MissionObject Baselines, Waypoints can be added via Planetary Map now

This commit is contained in:
Waverunner
2013-12-04 19:10:15 -05:00
parent 470215c05d
commit ca807ae5ae
9 changed files with 553 additions and 4 deletions
@@ -0,0 +1,14 @@
import sys
def setup():
return
def run(core, actor, target, commandString):
commandArgs = commandString.split("(^-,=+_)color_13548(,+-=_^)=1")
newString = commandArgs[1]
print (newString)
cmdService = core.commandService
cmdService.callCommand(actor, 'waypoint', None, newString) # No need to re-create a script
return
+18
View File
@@ -67,6 +67,24 @@ def run(core, actor, target, commandString):
actorPlayer.waypointAdd(waypoint)
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
return
#/wp planet x z y name
elif len(commandArgs) >= 3 and isFloat(commandArgs[2]) and isFloat(commandArgs[3]) and isFloat(commandArgs[4]):
waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', core.terrainService.getPlanetByName(commandArgs[1]), float(commandArgs[2]), float(commandArgs[4]), float(commandArgs[3]))
waypoint.setActive(True)
waypoint.setColor(WaypointObject.BLUE)
name = commandString.split(" ", 5)
print (name)
if name == "":
name = "Waypoint"
waypoint.setName(name[5])
waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName()))
actorPlayer.getWaypoints().add(waypoint)
actorPlayer.waypointAdd(waypoint)
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
return
#/wp NAME
else:
waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', actor.getPlanet(), actor.getWorldPosition().x, actor.getWorldPosition().z, actor.getWorldPosition().y)