From 00573d0975eeaf0680ec2f104a0f9e393cc0aa63 Mon Sep 17 00:00:00 2001 From: Samuel T Date: Thu, 9 Nov 2023 01:55:00 +0000 Subject: [PATCH] spellbook: SetMaxCarry magic word --- toontown/spellbook/MagicWordIndex.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/toontown/spellbook/MagicWordIndex.py b/toontown/spellbook/MagicWordIndex.py index fe26ce2..dacdf5e 100644 --- a/toontown/spellbook/MagicWordIndex.py +++ b/toontown/spellbook/MagicWordIndex.py @@ -735,6 +735,21 @@ class SetGM(MagicWord): toon.b_setGM(0) # Reset it first, otherwise the Toon keeps the old icon, but the name still changes. toon.b_setGM(iconRequest) 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): aliases = ["firework"]