mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-21 05:04:10 +01:00
Recolorable Petrification code
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
if (!istype(H) || !isturf(H.loc))
|
||||
return
|
||||
var/datum/component/gargoyle/comp = H.GetComponent(/datum/component/gargoyle)
|
||||
var/tint = rgb(255,255,255)
|
||||
if (comp)
|
||||
comp.cooldown = world.time + (15 SECONDS)
|
||||
comp.statue = src
|
||||
@@ -32,6 +33,7 @@
|
||||
comp.paused = FALSE
|
||||
identifier = comp.identifier
|
||||
material = comp.material
|
||||
tint = comp.tint
|
||||
gargoyle = H
|
||||
|
||||
max_integrity = H.getMaxHealth() + 100
|
||||
@@ -46,7 +48,32 @@
|
||||
H.buckled.unbuckle_mob(H, TRUE)
|
||||
icon = H.icon
|
||||
copy_overlays(H)
|
||||
color = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
|
||||
//calculate our tints
|
||||
|
||||
var/list/RGB = list( hex2num( "[tint[2]][tint[3]]" ),
|
||||
hex2num( "[tint[4]][tint[5]]" ),
|
||||
hex2num( "[tint[6]][tint[7]]" )
|
||||
)
|
||||
|
||||
var/colora = rgb( RGB[1]*0.299,
|
||||
RGB[2]*0.299,
|
||||
RGB[3]*0.299
|
||||
)
|
||||
|
||||
var/colorb = rgb( RGB[1]*0.587,
|
||||
RGB[2]*0.587,
|
||||
RGB[3]*0.587
|
||||
)
|
||||
|
||||
var/colorc = rgb( RGB[1]*0.114,
|
||||
RGB[2]*0.114,
|
||||
RGB[3]*0.114
|
||||
)
|
||||
|
||||
color = list( colora, colorb , colorc, rgb(0,0,0))
|
||||
|
||||
|
||||
initial_sleep = H.sleeping
|
||||
initial_blind = H.eye_blind
|
||||
initial_is_shifted = H.is_shifted
|
||||
|
||||
Reference in New Issue
Block a user