# Colored signs by Chaobrother. This is a simplified version which only includes
# the SOC based SD2 signs and CC signs.
# Signs that have their color set by the balloon closest to them.
# It is recommended to place a balloon outside of the map to get a single color
# for all signs in the stage.
# Balloon skin color is determined by angle % (100) + 1
# Skin color reference: https://wiki.srb2.org/wiki/SRB2Kart/List_of_skin_colors
# Additional Signs and Lua Variant: https://mb.srb2.org/showthread.php?t=45314

#SD2 Signs
Freeslot
S_COLOREDSIGN
S_COLOREDSIGN2
MT_COLOREDSIGN
MT_SMALL_COLREDSIGN
S_SMALL_COLOREDSIGN
SPR_SDAR

#The color to closest match the default SD2 sign is red (balloon angle 23).
Object MT_COLOREDSIGN
#$Name Colorable SD2 Sign
#$Sprite SDARALAR
#$Category Colorable Signs
MapThingNum = 2222
SpawnState = S_COLOREDSIGN
SpawnHealth = 1000
SeeState = S_NULL
SeeSound = sfx_None
ReactionTime = 8
AttackSound = sfx_None
PainState = S_NULL
PainChance = 0
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_NULL
DeathState = S_NULL
XDeathState = S_NULL
DeathSound = sfx_none
Speed = 0
Radius = 128*FRACUNIT
Height = 256*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_None
Flags = MF_NOGRAVITY|MF_RUNSPAWNFUNC
RaiseState = S_NULL

State S_COLOREDSIGN
SpriteName = SDAR
SpriteFrame = FF_PAPERSPRITE|A
Duration = 1
Next = S_COLOREDSIGN2
Action = A_FindTarget
Var1 = MT_BALLOON
Var2 = 0

State S_COLOREDSIGN2
SpriteName = SDAR
SpriteFrame = FF_PAPERSPRITE|A
Duration = -1
Next = S_COLOREDSIGN2
Action = A_ChangeColorAbsolute
Var1 = 1
Var2 = 23

Object MT_SMALL_COLREDSIGN
#$Name Half Scale Colorable SD2 Sign
#$Sprite SDARALAR
#$Category Colorable Signs
MapThingNum = 2224
SpawnState = S_SMALL_COLOREDSIGN
SpawnHealth = 1000
SeeState = S_NULL
SeeSound = sfx_None
ReactionTime = 8
AttackSound = sfx_None
PainState = S_NULL
PainChance = 0
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_NULL
DeathState = S_NULL
XDeathState = S_NULL
DeathSound = sfx_none
Speed = 0
Radius = 128*FRACUNIT
Height = 256*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_None
Flags = MF_NOGRAVITY|MF_RUNSPAWNFUNC
RaiseState = S_NULL

State S_SMALL_COLOREDSIGN
SpriteName = SDAR
SpriteFrame = A
Duration = 1
Next = S_COLOREDSIGN
Action = A_SetScale
Var1 = FRACUNIT/2
Var2 = 0


#Crimson Core Signs
Freeslot
MT_COLORED_CC_SIGN
S_COLORED_CC_SIGN
S_COLORED_CC_SIGN2
S_COLORED_CC_SIGN_SOLID1
S_COLORED_CC_SIGN_SHIMMER
S_COLORED_CC_SIGN_SOLID2
S_COLORED_CC_SIGN_VANISH
S_COLORED_CC_SIGN_CLEAR
SPR_CCAR

#The original Crimson Core arrows were made by Charybdizs.
#The color to match the default Crimson Core sign is raspberry (balloon angle 21).
Object MT_COLORED_CC_SIGN
#$Name Colorable Crimson Core Sign
#$Sprite CCARALAR
#$Category Colorable Signs
MapThingNum = 2223
SpawnState = S_COLORED_CC_SIGN
SpawnHealth = 1000
SeeState = S_NULL
SeeSound = sfx_None
ReactionTime = 8
AttackSound = sfx_None
PainState = S_NULL
PainChance = 0
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_NULL
DeathState = S_NULL
XDeathState = S_NULL
DeathSound = sfx_none
Speed = 0
Radius = 64*FRACUNIT
Height = 256*FRACUNIT
DispOffset = 0
Mass = 100
Damage = 0
ActiveSound = sfx_None
Flags = MF_NOGRAVITY|MF_RUNSPAWNFUNC
RaiseState = S_NULL

State S_COLORED_CC_SIGN
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|A
Duration = 1
Next = S_COLORED_CC_SIGN2
Action = A_FindTarget
Var1 = MT_BALLOON
Var2 = 0

State S_COLORED_CC_SIGN2
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|A
Duration = 1
Next = S_COLORED_CC_SIGN_SOLID1
Action = A_ChangeColorAbsolute
Var1 = 1
Var2 = 23

State S_COLORED_CC_SIGN_SOLID1
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|A
Duration = 2
Next = S_COLORED_CC_SIGN_SHIMMER
Action = None
Var1 = 0
Var2 = 0

State S_COLORED_CC_SIGN_SHIMMER
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|FF_ANIMATE|B
Duration = 12
Next = S_COLORED_CC_SIGN_SOLID2
Action = None
Var1 = 6
Var2 = 2

State S_COLORED_CC_SIGN_SOLID2
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|A
Duration = 6
Next = S_COLORED_CC_SIGN_VANISH
Action = None
Var1 = 0
Var2 = 0

State S_COLORED_CC_SIGN_VANISH
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|FF_ANIMATE|H
Duration = 6
Next = S_COLORED_CC_SIGN_CLEAR
Action = None
Var1 = 3
Var2 = 2

State S_COLORED_CC_SIGN_CLEAR
SpriteName = CCAR
SpriteFrame = FF_PAPERSPRITE|K
Duration = 16
Next = S_COLORED_CC_SIGN_SOLID1
Action = None
Var1 = 0
Var2 = 0