mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
deletes invertHTML function (#14369)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user