deletes invertHTML function (#14369)

This commit is contained in:
RedWolfie
2020-09-18 18:39:09 -04:00
committed by GitHub
parent 0f937787b5
commit 10e6cc852e
-25
View File
@@ -20,31 +20,6 @@
return 0
//Inverts the colour of an HTML string
/proc/invertHTML(HTMLstring)
if(!( istext(HTMLstring) ))
CRASH("Given non-text argument!")
else
if(length(HTMLstring) != 7)
CRASH("Given non-HTML argument!")
var/textr = copytext(HTMLstring, 2, 4)
var/textg = copytext(HTMLstring, 4, 6)
var/textb = copytext(HTMLstring, 6, 8)
var/r = hex2num(textr)
var/g = hex2num(textg)
var/b = hex2num(textb)
textr = num2hex(255 - r)
textg = num2hex(255 - g)
textb = num2hex(255 - b)
if(length(textr) < 2)
textr = text("0[]", textr)
if(length(textg) < 2)
textr = text("0[]", textg)
if(length(textb) < 2)
textr = text("0[]", textb)
return text("#[][][]", textr, textg, textb)
//Returns the middle-most value
/proc/dd_range(var/low, var/high, var/num)
return max(low,min(high,num))