removes some legacy procs, adds some other procs

NUFC

removed add_lspace — unused
removed add_tspace — unused
removed invertHTML — unused
removed hsl2rgb — unimplemented

removed hex2num — replaced with define
removed num2hex — replaced with define
removed add_zero — replaced with pad_left
removed add_zero2 — replaced with pad_left
removes hex2rgb — replaced with behavior of rgb2num()
removes hex2rgb_r — replaced with behavior of rgb2num()
removes hex2rgb_g — replaced with behavior of rgb2num()
removes hex2rgb_b — replaced with behavior of rgb2num()
removes assorted inline list(rgb) > hex — replaced with behavior of rgb()
removes assorted inline rand > hex — replace with random_hex_text

added hex2num define
added num2hex define
added random_hex_text
added generate_padding
added pad_left
added pad_right
This commit is contained in:
spookerton
2022-04-03 14:19:45 +01:00
parent 11f5ed7d2c
commit 7eedbedba5
25 changed files with 99 additions and 167 deletions
@@ -322,7 +322,7 @@ var/list/wrapped_species_by_ref = list()
/mob/living/carbon/human/proc/shapeshifter_set_eye_color(var/new_eyes)
var/list/new_color_rgb_list = hex2rgb(new_eyes)
var/list/new_color_rgb_list = rgb2num(new_eyes)
// First, update mob vars.
r_eyes = new_color_rgb_list[1]
g_eyes = new_color_rgb_list[2]
+1 -1
View File
@@ -938,7 +938,7 @@
var/B = 0
for(var/C in colors_to_blend)
var/RGB = hex2rgb(C)
var/RGB = rgb2num(C)
R = between(0, R + RGB[1], 255)
G = between(0, G + RGB[2], 255)
B = between(0, B + RGB[3], 255)
+1 -1
View File
@@ -133,7 +133,7 @@
/mob/living/silicon/pai/proc/show_silenced()
if(src.silence_time)
var/timeleft = round((silence_time - world.timeofday)/10 ,1)
stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
stat(null, "Communications system reboot in -[(timeleft / 60) % 60]:[pad_left(num2text(timeleft % 60), 2, "0")]")
/mob/living/silicon/pai/Stat()
-7
View File
@@ -86,13 +86,6 @@
return check_rights(R_ADMIN|R_EVENT, 0, user) != 0
/proc/hsl2rgb(h, s, l)
return //TODO: Implement
/*
Miss Chance
*/
/proc/check_zone(zone)
if(!zone) return BP_TORSO
switch(zone)