Fixed vehicle passenger stuff

This commit is contained in:
Seefo
2014-04-23 00:11:26 -04:00
parent 8ee82f7a75
commit 064e733cba
4 changed files with 29 additions and 8 deletions
@@ -1,4 +1,6 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'creature/vehicle')
object.setAttachment('passengers', 0)
return
@@ -1,4 +1,9 @@
import sys
def setup(core, object):
object.setAttachment('radial_filename', 'deeds/vehicleDeed')
return
def use(core, actor, object):
core.mountService.generateVehicle(actor, object, 'object/mobile/vehicle/shared_landspeeder_av21.iff', 'object/intangible/vehicle/shared_landspeeder_av21_pcd.iff')
return
+4 -5
View File
@@ -6,8 +6,7 @@ def createRadial(core, owner, target, radials):
radials.add(RadialOptions(0, 7, 1, ''))
if core.mountService.canMount(owner, target):
radials.add(RadialOptions(1, 40, 3, '@pet/pet_menu:menu_enter_exit'))
radials.add(RadialOptions(0, 21, 1, ''))
radials.add(RadialOptions(0, 40, 3, '@pet/pet_menu:menu_enter_exit'))
if target.getOwnerId() == owner.getObjectID():
radials.add(RadialOptions(0, 60, 3, '@pet/pet_menu:menu_store'))
if core.mountService.canRepair(owner, target):
@@ -18,11 +17,11 @@ def handleSelection(core, owner, target, option):
mntSvc = core.mountService
if target:
if option == 21:
if option == 40:
if mntSvc.isMounted(owner):
mntSvc.mount(owner, target)
mntSvc.dismount(owner, target)
else:
mntSvc.unmount(owner, target)
mntSvc.mount(owner, target)
elif option == 60:
mntSvc.store(owner, target)
elif option == 114: