mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-21 20:12:31 +01:00
Merge pull request #4553 from Ccomp5950/hud_rewrite
Code effeciency project: HUD items rewrite.
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.effect.deactivate(mob)
|
||||
mob.virus2.Remove("[uniqueID]")
|
||||
mob.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
/datum/disease2/disease/proc/minormutate()
|
||||
//uniqueID = rand(0,10000)
|
||||
@@ -175,6 +176,7 @@ proc/virus2_lesser_infection()
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.client && G.stat != DEAD)
|
||||
candidates += G
|
||||
|
||||
if(!candidates.len) return
|
||||
|
||||
candidates = shuffle(candidates)
|
||||
|
||||
@@ -77,6 +77,7 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
D.minormutate()
|
||||
// log_debug("Adding virus")
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//Infects mob M with random lesser disease, if he doesn't have one
|
||||
/proc/infect_mob_random_lesser(var/mob/living/carbon/M)
|
||||
@@ -84,12 +85,14 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
D.makerandom()
|
||||
D.infectionchance = 1
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//Infects mob M with random greated disease, if he doesn't have one
|
||||
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom(1)
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//Fancy prob() function.
|
||||
/proc/dprob(var/p)
|
||||
@@ -135,4 +138,4 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
for (var/ID in victim.virus2)
|
||||
var/datum/disease2/disease/V = victim.virus2[ID]
|
||||
if(V && V.spreadtype != vector) continue
|
||||
infect_virus2(src,V)
|
||||
infect_virus2(src,V)
|
||||
|
||||
Reference in New Issue
Block a user