I dunno what made the difference -- that I changed the type to Automation or that I prepended the vertical bar thing to the string I'm passing on, but it's now doing what I wanted.
@sims4.commands.Command('t', 'd', 'debug', command_type=sims4.commands.CommandType.Automation)
def pb_testing(enable:bool=None, _connection=None):
output = sims4.commands.CheatOutput(_connection)
if enable is not None:
if enable:
command = '|testingcheats on'
sims4.commands.client_cheat(command, _connection)
else:
command = '|testingcheats off'
sims4.commands.client_cheat(command, _connection)
else:
output("You need to turn this on or off with 't', 'true', 'on', '1', 'yes', 'y', 'enable' or 'f', 'false', 'off', '0', 'no', 'n', 'disable'")
I guess it might have something to do with testingcheats being defined in Python while headlineeffects is not .. ?
Comments
I dunno what made the difference -- that I changed the type to Automation or that I prepended the vertical bar thing to the string I'm passing on, but it's now doing what I wanted.
I guess it might have something to do with testingcheats being defined in Python while headlineeffects is not .. ?
That's correct.