mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
(resolves) Fixes #1633
This commit is contained in:
@@ -167,6 +167,7 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/make_invulnerable,
|
||||
/client/proc/cmd_admin_dump_delprofile,
|
||||
/client/proc/mob_list,
|
||||
/client/proc/cure_disease,
|
||||
#ifdef PROFILE_MACHINES
|
||||
/client/proc/cmd_admin_dump_macprofile,
|
||||
#endif
|
||||
|
||||
@@ -1311,3 +1311,41 @@ client/proc/mob_list()
|
||||
if(foundnull)
|
||||
usr << "Found [foundnull] null entries in the mob list, running null clearer."
|
||||
listclearnulls(mob_list)
|
||||
|
||||
client/proc/cure_disease()
|
||||
set name = "Cure Disease"
|
||||
set category = "Debug"
|
||||
if(!holder) return
|
||||
|
||||
var/list/disease_by_name = list("-Cure All-" = null) + disease2_list + active_diseases
|
||||
|
||||
var/disease_name = input(src, "Disease to cure?") as null|anything in sortTim(disease_by_name, /proc/cmp_text_asc)
|
||||
if(!disease_name) return
|
||||
var/count = 0
|
||||
if(disease_name == "-Cure All-")
|
||||
for(var/mob/living/carbon/C in mob_list)
|
||||
for(var/ID in C.virus2)
|
||||
if(ID && C.virus2[ID])
|
||||
var/datum/disease2/disease/DD = C.virus2[ID]
|
||||
DD.cure(C)
|
||||
count++
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
if(D)
|
||||
D.cure(1)
|
||||
count++
|
||||
active_diseases -= D
|
||||
else
|
||||
for(var/mob/living/carbon/C in mob_list)
|
||||
for(var/ID in C.virus2)
|
||||
if(ID == disease_name)
|
||||
var/datum/disease2/disease/DD = C.virus2[ID]
|
||||
DD.cure(C)
|
||||
count++
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
if(D && D.name == disease_name)
|
||||
D.cure(1)
|
||||
count++
|
||||
active_diseases -= D
|
||||
src << "<span class='notice'>Cured [count] mob\s of [disease_name == "-Cure All-" ? "all diseases." : "[disease_name]"]</span>"
|
||||
log_admin("[src]/([ckey(src.key)] Cured all mobs of [disease_name == "-Cure All-" ? "all diseases." : "[disease_name]"]")
|
||||
message_admins("[src]/([ckey(src.key)] Cured all mobs of [disease_name == "-Cure All-" ? "all diseases." : "[disease_name]"]")
|
||||
@@ -1,3 +1,4 @@
|
||||
var/global/list/disease2_list = list()
|
||||
/datum/disease2/disease
|
||||
var/infectionchance = 70
|
||||
var/speed = 1
|
||||
@@ -17,6 +18,7 @@
|
||||
/datum/disease2/disease/New(var/notes="No notes.")
|
||||
uniqueID = rand(0,10000)
|
||||
log += "<br />[timestamp()] CREATED - [notes]<br>"
|
||||
disease2_list["[uniqueID]"] = src
|
||||
..()
|
||||
|
||||
/datum/disease2/disease/proc/makerandom(var/greater=0)
|
||||
@@ -29,6 +31,7 @@
|
||||
holder.getrandomeffect()
|
||||
effects += holder
|
||||
uniqueID = rand(0,10000)
|
||||
disease2_list["[uniqueID]"] = src
|
||||
infectionchance = rand(60,90)
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
@@ -55,7 +58,9 @@
|
||||
D.log += "[f.name] [holder.chance]%<br>"
|
||||
D.effects += holder // add the holder to the disease
|
||||
|
||||
disease2_list -= D.uniqueID
|
||||
D.uniqueID = rand(0, 10000)
|
||||
disease2_list["[D.uniqueID]"] = D
|
||||
D.infectionchance = input(C, "Choose an infection rate percent", "Infection Rate") as num
|
||||
if(D.infectionchance > 100 || D.infectionchance < 0)
|
||||
return 0
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
M.virus2 = disease.getcopy()
|
||||
M.virus2.minormutate()
|
||||
M.virus2.uniqueID = disease.uniqueID
|
||||
|
||||
for(var/datum/disease2/resistance/res in M.resistances)
|
||||
if(res.resistsdisease(M.virus2))
|
||||
|
||||
Reference in New Issue
Block a user