Custom Enum Types¶
Float Enum¶
-
class
CommonEnumFloat(enum_name, enum_value, class_name)¶ Bases:
floatAn enum that holds a float value.
Parameters: - enum_name (str) – The name of the enum.
- enum_value (float) – The value of the enum.
- class_name (str) – The name of the class containing the enum.
-
name¶ The name of the enum.
Returns: The name of the enum. Return type: str
-
value¶ The value of the enum.
Returns: The value of the enum. Return type: float
Float Enum Base¶
-
class
CommonEnumFloatBase¶ Bases:
floatAn inheritable class to turn properties into float enums.
Int¶
-
class
CommonInt¶ Bases:
sims4communitylib.enums.enumtypes.common_int.IntAn inheritable class that inherits from the vanilla Sims 4 enum.Int class so you don’t have to.
Int Enum¶
-
class
CommonEnumInt(enum_name, enum_value, class_name)¶ Bases:
intAn enum that holds an integer value.
Parameters: - enum_name (str) – The name of the enum.
- enum_value (int) – The value of the enum.
- class_name (str) – The name of the class containing the enum.
-
name¶ The name of the enum.
Returns: The name of the enum. Return type: str
-
value¶ The value of the enum.
Returns: The value of the enum. Return type: int
Int Enum Base¶
Int Flags¶
-
class
CommonIntFlags¶ Bases:
sims4communitylib.enums.enumtypes.common_int_flags.IntFlagsAn inheritable class that inherits from the vanilla Sims 4 enum.IntFlags class so you don’t have to.
Object Enum¶
-
class
CommonEnumObject(enum_name, enum_value, class_name)¶ Bases:
objectAn enum that holds an object value.
Parameters: - enum_name (str) – The name of the enum.
- enum_value (object) – The value of the enum.
- class_name (str) – The name of the class containing the enum.
-
name¶ The name of the enum.
Returns: The name of the enum. Return type: str
-
value¶ The value of the enum.
Returns: The value of the enum. Return type: object
Object Enum Base¶
-
class
CommonEnumObjectBase¶ Bases:
objectAn inheritable class to turn properties of the class into object enums.
String Enum¶
-
class
CommonEnumString(enum_name, enum_value, class_name)¶ Bases:
strAn enum that holds a string value.
Parameters: - enum_name (str) – The name of the enum.
- enum_value (str) – The value of the enum.
- class_name (str) – The name of the class containing the enum.
-
name¶ The name of the enum.
Returns: The name of the enum. Return type: str
-
value¶ The value of the enum.
Returns: The value of the enum. Return type: str
String Enum Base¶
-
class
CommonEnumStringBase¶ Bases:
strAn inheritable class to turn properties into string enums.
Versioned Int¶
-
class
CommonVersionedInt¶ Bases:
sims4communitylib.enums.enumtypes.common_int.CommonInt,sims4communitylib.enums.enumtypes.common_versioned_values_mixin.CommonVersionedValuesMixinInteger, but with a version.
-
classmethod
convert_obsolete_value(value)¶ Convert an obsolete value to its new equivalent, if there is one.
-
classmethod
get_obsolete_values() → Set[sims4communitylib.enums.enumtypes.common_versioned_int.CommonVersionedInt]¶ Retrieve a set of values considered as obsolete.
-
classmethod
get_version() → str¶ The version of the enum. If this changes, it means values have changed and should be updated.
-
classmethod
is_obsolete_value(value: sims4communitylib.enums.enumtypes.common_versioned_int.CommonVersionedInt) → bool¶ Determine if a value is considered to be obsolete.
-
classmethod
Versioned Int Flags¶
-
class
CommonVersionedIntFlags¶ Bases:
sims4communitylib.enums.enumtypes.common_int_flags.CommonIntFlags,sims4communitylib.enums.enumtypes.common_versioned_values_mixin.CommonVersionedValuesMixinInteger flags, but with a version.
-
classmethod
convert_obsolete_value(value)¶ Convert an obsolete value to its new equivalent, if there is one.
-
classmethod
get_obsolete_values() → Set[sims4communitylib.enums.enumtypes.common_versioned_int_flags.CommonVersionedIntFlags]¶ Retrieve a set of values considered as obsolete.
-
classmethod
get_version() → str¶ The version of the enum. If this changes, it means values have changed and should be updated.
-
classmethod
is_obsolete_value(value: sims4communitylib.enums.enumtypes.common_versioned_int_flags.CommonVersionedIntFlags) → bool¶ Determine if a value is considered to be obsolete.
-
classmethod
Versioned Values Mixin¶
-
class
CommonVersionedValuesMixin¶ Bases:
objectA mixin that provides versioning for values.
-
classmethod
convert_obsolete_value(value)¶ Convert an obsolete value to its new equivalent, if there is one.
-
classmethod
get_obsolete_values() → Set[sims4communitylib.enums.enumtypes.common_versioned_values_mixin.CommonVersionedValuesMixin]¶ Retrieve a set of values considered as obsolete.
-
classmethod
get_version() → str¶ The version of the enum. If this changes, it means values have changed and should be updated.
-
classmethod
is_obsolete_value(value: sims4communitylib.enums.enumtypes.common_versioned_values_mixin.CommonVersionedValuesMixin) → bool¶ Determine if a value is considered to be obsolete.
-
classmethod