mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
fixed giveitem
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import sys
|
||||
|
||||
def setup():
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
|
||||
if actor.getClient() and actor.getClient().isGM() == False:
|
||||
return
|
||||
|
||||
if not commandString.startswith('object/tangible') and not commandString.startswith('object/weapon'):
|
||||
return
|
||||
|
||||
object = core.objectService.createObject(commandString, actor.getPlanet())
|
||||
|
||||
if not object:
|
||||
return
|
||||
|
||||
inventory = actor.getSlottedObject('inventory')
|
||||
|
||||
if inventory:
|
||||
inventory.add(object)
|
||||
|
||||
return
|
||||
Reference in New Issue
Block a user