AO2XP/constants.py
2025-03-11 00:06:22 -03:00

73 lines
1.3 KiB
Python

GAME_VERSION = "2.8.0"
AOpath = "base/"
AO2XPpath = "AO2XPbase/"
DESK_MOD = 1
PREANIM = 2
CHARNAME = 3
ANIM = 4
CHATMSG = 5
SIDE = 6
SFX = 7
EMOTE_MOD = 8
CHAR_ID = 9
SFX_DELAY = 10
SHOUT_MOD = 11
EVIDENCE = 12
FLIP = 13
REALIZATION = 14
TEXT_COLOR = 15
SHOWNAME = 16
OTHER_CHARID = 17
OTHER_NAME = 18
OTHER_EMOTE = 19
SELF_OFFSET = 20
OTHER_OFFSET = 21
OTHER_FLIP = 22
NO_INTERRUPT = 23
LOOPING_SFX = 24
SCREENSHAKE = 25
FRAME_SCREENSHAKE = 26
FRAME_REALIZATION = 27
FRAME_SFX = 28
ADDITIVE = 29
EFFECTS = 30
BLIPS = 31
SLIDE = 32
INLINE_BLUE = 0
INLINE_GREEN = 1
INLINE_ORANGE = 2
INLINE_GRAY = 3
INLINE_RED = 4
C_WHITE = 0
C_GREEN = 1
C_RED = 2
C_ORANGE = 3
C_BLUE = 4
C_YELLOW = 5
C_PINK = 6
C_CYAN = 7
C_GRAY = 8
C_RAINBOW = 9
C_BLACK = 10
SCALING_AUTO = 0
SCALING_PIXEL = 1
SCALING_SMOOTH = 2
def decode_ao_str(text):
return text.replace("<percent>", "%").replace("<pound>", "#").replace("<num>", "#").replace("<and>", "&").replace("<dollar>", "$")
def encode_ao_str(text):
return text.replace("%", "<percent>").replace("#", "<pound>").replace("&", "<and>").replace("$", "<dollar>")
def get_scaling(scaling_str):
if scaling_str == "pixel" or scaling_str == "fast":
return SCALING_PIXEL
elif scaling_str == "smooth":
return SCALING_SMOOTH
else:
return SCALING_AUTO