mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
- Disease & related fixes.
- Wizarditis should not teleport you to space. But still can teleport you to areas with no air. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@344 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -298,7 +298,7 @@
|
||||
if (href_list["create_vaccine"])
|
||||
if(!src.wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
var/vaccine_type = href_list["create_vaccine"]
|
||||
var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting
|
||||
var/datum/disease/D = new vaccine_type
|
||||
var/name = input(usr,"Name:","Name the vaccine",D.name)
|
||||
if(!name || name == " ") name = D.name
|
||||
@@ -316,7 +316,7 @@
|
||||
if(!wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
B.icon_state = "bottle3"
|
||||
var/type = href_list["create_virus_culture"]
|
||||
var/type = text2path(href_list["create_virus_culture"])//the path is received as string - converting
|
||||
var/datum/disease/D = new type
|
||||
var/list/data = list("virus"=D)
|
||||
var/name = input(usr,"Name:","Name the culture",D.name)
|
||||
|
||||
@@ -127,6 +127,14 @@ datum
|
||||
blood_prop.virus.spread_type = CONTACT_HANDS
|
||||
return
|
||||
|
||||
/* Must check the transfering of reagents and their data first. They all can point to one disease datum.
|
||||
|
||||
Del()
|
||||
if(src.data["virus"])
|
||||
var/datum/disease/D = src.data["virus"]
|
||||
D.cure(0)
|
||||
..()
|
||||
*/
|
||||
vaccine
|
||||
//data must contain virus type
|
||||
name = "Vaccine"
|
||||
@@ -137,7 +145,7 @@ datum
|
||||
var/datum/reagent/vaccine/self = src
|
||||
src = null
|
||||
if(self.data&&method == INGEST)
|
||||
if(M.virus&&M.virus.type == self.data)
|
||||
if(M.virus && M.virus.type == self.data)
|
||||
M.virus.cure()
|
||||
return
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ to null does not delete the object itself. Thank you.
|
||||
if(stage != 1 && (prob(1) || (cure_present && prob(cure_chance))))
|
||||
stage--
|
||||
else if(stage <= 1 && ((prob(1) && src.curable) || (cure_present && prob(cure_chance))))
|
||||
// world << "Cured as stage act"
|
||||
src.cure()
|
||||
return
|
||||
return
|
||||
@@ -72,7 +73,7 @@ to null does not delete the object itself. Thank you.
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0)
|
||||
//world << "Contract_disease called by [src] with virus [virus]"
|
||||
|
||||
if(skip_this == 1)
|
||||
if(skip_this == 1)//be wary, it replaces the current disease...
|
||||
if(src.virus)
|
||||
src.virus.cure(0)
|
||||
src.virus = new virus.type
|
||||
@@ -102,7 +103,7 @@ to null does not delete the object itself. Thank you.
|
||||
clothing_areas[Covers] += Clothing
|
||||
|
||||
*/
|
||||
if(prob(15/virus.permeability_mod)) return
|
||||
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease!
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
@@ -273,11 +274,14 @@ to null does not delete the object itself. Thank you.
|
||||
return
|
||||
|
||||
/datum/disease/proc/cure(var/resistance=1)
|
||||
var/datum/disease/D = src
|
||||
src = null
|
||||
if(resistance && src.affected_mob && !affected_mob.resistances.Find(D.type))
|
||||
affected_mob.resistances += D.type
|
||||
del(D)
|
||||
if(resistance && src.affected_mob && !affected_mob.resistances.Find(src.type))
|
||||
// world << "Setting res to [src]"
|
||||
var/type = "[src.type]"//copy the value, not create the reference to it, so when the object is deleted, the value remains.
|
||||
affected_mob.resistances += text2path(type)
|
||||
// world << "Removing [src]"
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/New()
|
||||
|
||||
@@ -103,7 +103,7 @@ STI KALY - blind
|
||||
|
||||
var/list/theareas = new/list()
|
||||
for(var/area/AR in orange(80, affected_mob))
|
||||
if(theareas.Find(AR)) continue
|
||||
if(theareas.Find(AR) || AR.name == "Space") continue
|
||||
theareas += AR
|
||||
|
||||
var/area/thearea = pick(theareas)
|
||||
|
||||
Reference in New Issue
Block a user