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-03-27 17:32:31 +01:00
parent 11f5ed7d2c
commit 7eedbedba5
25 changed files with 99 additions and 167 deletions
+5 -5
View File
@@ -14,7 +14,7 @@
var/resistance = 10 // % chance a disease will resist cure, up to 100
/datum/disease2/disease/New()
uniqueID = rand(0,10000)
uniqueID = rand(1, 9999)
..()
/datum/disease2/disease/proc/makerandom(var/severity=1)
@@ -25,7 +25,7 @@
holder.getrandomeffect(severity, excludetypes)
excludetypes += holder.effect.type
effects += holder
uniqueID = rand(0,10000)
uniqueID = rand(1, 9999)
switch(severity)
if(1)
infectionchance = 1
@@ -135,13 +135,13 @@
BITSET(mob.hud_updateflag, STATUS_HUD)
/datum/disease2/disease/proc/minormutate()
//uniqueID = rand(0,10000)
//uniqueID = rand(1, 9999)
var/datum/disease2/effectholder/holder = pick(effects)
holder.minormutate()
//infectionchance = min(50,infectionchance + rand(0,10))
/datum/disease2/disease/proc/majormutate()
uniqueID = rand(0,10000)
uniqueID = rand(1, 9999)
var/datum/disease2/effectholder/holder = pick(effects)
var/list/exclude = list()
for(var/datum/disease2/effectholder/D in effects)
@@ -208,7 +208,7 @@
var/global/list/virusDB = list()
/datum/disease2/disease/proc/name()
.= "stamm #[add_zero("[uniqueID]", 4)]"
.= "stamm #[pad_left(uniqueID, 8, "0")]"
if ("[uniqueID]" in virusDB)
var/datum/data/record/V = virusDB["[uniqueID]"]
.= V.fields["name"]