mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-01-17 00:05:17 -05:00
32 lines
645 B
Python
32 lines
645 B
Python
import sys
|
|
|
|
def setup():
|
|
return
|
|
|
|
def run(core, actor, target, commandString):
|
|
|
|
commandArgs = commandString.split(' ')
|
|
arg1 = commandArgs[0]
|
|
if len(commandArgs) > 1:
|
|
arg2 = commandArgs[1]
|
|
|
|
if not commandString.startswith('object/tangible') and not commandString.startswith('object/weapon'):
|
|
return
|
|
|
|
|
|
if len(commandArgs) == 2:
|
|
object = core.objectService.createObject((arg1), actor.getPlanet(), (arg2))
|
|
|
|
if len(commandArgs) == 1:
|
|
object = core.objectService.createObject((arg1), actor.getPlanet())
|
|
|
|
|
|
if not object:
|
|
return
|
|
|
|
inventory = actor.getSlottedObject('inventory')
|
|
|
|
if inventory:
|
|
inventory.add(object)
|
|
|
|
return |