From 06d22cae9ee4b571fcdca3082660ab6a9c3dbee6 Mon Sep 17 00:00:00 2001 From: Wefi Date: Tue, 10 Dec 2013 17:33:56 -0600 Subject: [PATCH] Added "Addability" to Setgodmode and experimenting with Mediate Use /Setgodmod addability IE bh_sh3 --- scripts/commands/meditate.py | 20 ++++++++++++++++++++ scripts/commands/setgodmode.py | 4 ++++ src/services/SimulationService.java | 1 + 3 files changed, 25 insertions(+) create mode 100644 scripts/commands/meditate.py diff --git a/scripts/commands/meditate.py b/scripts/commands/meditate.py new file mode 100644 index 00000000..2bc74a69 --- /dev/null +++ b/scripts/commands/meditate.py @@ -0,0 +1,20 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + ##To do make it reset moodanimations when meditation is cancled. + + if actor.getPosture() != 0x08: + actor.sendSystemMessage('You need to sit',0) + actor.setMoodAnimation('neutral') + return + if actor.getPosture() == 0x08: + actor.setMoodAnimation('meditating') + return + if actor.getPosture() == 0x00: + actor.setMoodAnimation('neutral') + return + return + diff --git a/scripts/commands/setgodmode.py b/scripts/commands/setgodmode.py index 76229b64..442cd9ad 100644 --- a/scripts/commands/setgodmode.py +++ b/scripts/commands/setgodmode.py @@ -40,4 +40,8 @@ def run(core, actor, target, commandString): elif command == 'cash' and arg1 is int(arg1): actor.setCash(actor.getCash() + int(arg1)) actor.sendSystemMessage('The Galactic Empire has transferred ' + arg1 + ' credits to you for your service.') + + elif command == 'addability' and arg1: + actor.addAbility(str(arg1)) + actor.sendSystemMessage('You have learned ' + arg1 + '') return diff --git a/src/services/SimulationService.java b/src/services/SimulationService.java index fc1868a1..602cb8be 100644 --- a/src/services/SimulationService.java +++ b/src/services/SimulationService.java @@ -148,6 +148,7 @@ public class SimulationService implements INetworkDispatch { core.commandService.registerCommand("inspire"); core.commandService.registerCommand("setgodmode"); core.commandService.registerCommand("requestwaypointatposition"); + core.commandService.registerCommand("meditate"); }