Custom Enum Types

Float Enum

class CommonEnumFloat(enum_name, enum_value, class_name)

Bases: float

An 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: float

An inheritable class to turn properties into float enums.

Int

class CommonInt

Bases: sims4communitylib.enums.enumtypes.common_int.Int

An 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: int

An 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

class CommonEnumIntBase

Bases: int

An inheritable class to turn properties into integer enums.

Warning

This class is obsolete, please inherit from CommonInt instead.

Object Enum

class CommonEnumObject(enum_name, enum_value, class_name)

Bases: object

An 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: object

An inheritable class to turn properties of the class into object enums.

String Enum

class CommonEnumString(enum_name, enum_value, class_name)

Bases: str

An 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: str

An inheritable class to turn properties into string enums.