spellbook: SetMaxCarry magic word
This commit is contained in:
parent
eb2f347f09
commit
00573d0975
1 changed files with 15 additions and 0 deletions
|
@ -736,6 +736,21 @@ class SetGM(MagicWord):
|
||||||
toon.b_setGM(iconRequest)
|
toon.b_setGM(iconRequest)
|
||||||
return f"GM icon set to {iconRequest} for {toon.getName()}"
|
return f"GM icon set to {iconRequest} for {toon.getName()}"
|
||||||
|
|
||||||
|
class SetMaxCarry(MagicWord):
|
||||||
|
aliases = ["gagpouch", "pouch", "gagcapacity"]
|
||||||
|
desc = "Set a Toon's gag pouch size."
|
||||||
|
execLocation = MagicWordConfig.EXEC_LOC_SERVER
|
||||||
|
arguments = [("pouchSize", int, True)]
|
||||||
|
|
||||||
|
def handleWord(self, invoker, avId, toon, *args):
|
||||||
|
pouchSize = args[0]
|
||||||
|
|
||||||
|
if pouchSize > 255 or pouchSize < 0:
|
||||||
|
return "Specified pouch size must be between 1 and 255."
|
||||||
|
|
||||||
|
toon.b_setMaxCarry(pouchSize)
|
||||||
|
return f"Set gag pouch size to {pouchSize} for {toon.getName()}"
|
||||||
|
|
||||||
class Fireworks(MagicWord):
|
class Fireworks(MagicWord):
|
||||||
aliases = ["firework"]
|
aliases = ["firework"]
|
||||||
desc = "Starts a firework show."
|
desc = "Starts a firework show."
|
||||||
|
|
Loading…
Reference in a new issue