From 14335646c5f31047e51cbaa038fc3cec92e49b90 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl <14180120+JakobST1n@users.noreply.github.com> Date: Mon, 11 Oct 2021 09:07:02 +0200 Subject: :construction: Add actual classtype to super calls --- NeoRuntime/Runtime/luxcena_neo/neo_behaviour.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'NeoRuntime') diff --git a/NeoRuntime/Runtime/luxcena_neo/neo_behaviour.py b/NeoRuntime/Runtime/luxcena_neo/neo_behaviour.py index ce0fb62..4da3093 100644 --- a/NeoRuntime/Runtime/luxcena_neo/neo_behaviour.py +++ b/NeoRuntime/Runtime/luxcena_neo/neo_behaviour.py @@ -216,7 +216,7 @@ class IntegerVariable(Variable): try: value = int(value) if (self.__min <= value <= self.__max): - super(ColorVariable, type(self)).value.fset(self, value) + super(IntegerVariable, type(self)).value.fset(self, value) else: print("Attempted to set {} to {} but range is [{},{}].".format(self.name, value, self.__min, self.__max)) except ValueError: @@ -238,7 +238,7 @@ class FloatVariable(Variable): try: value = float(value) if (self.__min <= value <= self.__max): - super(ColorVariable, type(self)).value.fset(self, value) + super(FloatVariable, type(self)).value.fset(self, value) else: print("Attempted to set {} to {} but range is [{},{}].".format(self.name, value, self.__min, self.__max)) except ValueError: @@ -261,5 +261,6 @@ class BooleanVariable(Variable): def value(self, value): try: value = bool(value) + super(BooleanVariable, type(self)).value.fset(self, value) except: print("Attempted to set {} to \"{}\", which is not a valid bool...".format(self.name, value)) -- cgit v1.2.3