Shortened helper procs a little.

This commit is contained in:
Chinsky
2014-06-18 10:55:38 +04:00
committed by ZomgPonies
parent 4fe111bcdc
commit 1abe52befd
+3 -12
View File
@@ -450,22 +450,13 @@ proc/get_candidates(be_special_flag=0)
return mobs_found
/proc/GetRedPart(const/hexa)
var/hex = uppertext(hexa)
var/hi = text2ascii(hex, 2)
var/lo = text2ascii(hex, 3)
return (((hi >= 65 ? hi - 55 : hi - 48) << 4) | (lo >= 65 ? lo - 55 : lo - 48))
return hex2num(copytext(hexa,2,4))
/proc/GetGreenPart(const/hexa)
var/hex = uppertext(hexa)
var/hi = text2ascii(hex, 4)
var/lo = text2ascii(hex, 5)
return (((hi >= 65 ? hi - 55 : hi - 48) << 4) | (lo >= 65 ? lo - 55 : lo - 48))
return hex2num(copytext(hexa,4,6))
/proc/GetBluePart(const/hexa)
var/hex = uppertext(hexa)
var/hi = text2ascii(hex, 6)
var/lo = text2ascii(hex, 7)
return (((hi >= 65 ? hi - 55 : hi - 48) << 4) | (lo >= 65 ? lo - 55 : lo - 48))
return hex2num(copytext(hexa,6,8))
/proc/GetHexColors(const/hexa)
var/hex = uppertext(hexa)