6 years ago
inject_to causes an last exception(SOLVED)
I am probably missing something obvious but I have this script and it's causing a last exception, I think I am injecting it correctly but I might be wrong
this part causes a last exception as soon as I load a household, when I remove it I don't get any Le's, I want to add some code after the original EA code, but this alone, without me adding any of my code causes an exception
this is how the original EA method looks:
What am i missing?
import sims.household_utilities.utilities_manager
import injector
@injector.inject_to(sims.household_utilities.utilities_manager, 'shut_off_utility')
def InterceptOffSwitch(original, self, utility, reason, **kwargs):
original(self, utility, reason, **kwargs)
this part causes a last exception as soon as I load a household, when I remove it I don't get any Le's, I want to add some code after the original EA code, but this alone, without me adding any of my code causes an exception
this is how the original EA method looks:
def shut_off_utility(self, utility, reason, tooltip=None, from_load=False):
What am i missing?