mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
- Added vent control to air alarms
- Added air filter pressure control and made N2O filtering a separate option - Fixed gas sensor division by zero bug - Some atmos changes - Disease gib-loop debugging - Moved alarms, scrubbers and vents initialization to more suitable place git-svn-id: http://tgstation13.googlecode.com/svn/trunk@352 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -20,7 +20,7 @@ to null does not delete the object itself. Thank you.
|
||||
var/cure = null
|
||||
var/cure_id = null// reagent.id or list containing them
|
||||
var/cure_chance = 8//chance for the cure to do its job
|
||||
var/spread = null
|
||||
var/spread = null //spread type description
|
||||
var/spread_type = AIRBORNE
|
||||
var/contagious_period = 0//the disease stage when it can be spread
|
||||
var/list/affected_species = list()
|
||||
@@ -58,7 +58,7 @@ to null does not delete the object itself. Thank you.
|
||||
return
|
||||
return
|
||||
|
||||
/datum/disease/proc/has_cure()
|
||||
/datum/disease/proc/has_cure()//check if affected_mob has required reagents.
|
||||
if(!cure_id) return 0
|
||||
var/result = 1
|
||||
if(istype(cure_id, /list))
|
||||
@@ -86,7 +86,7 @@ to null does not delete the object itself. Thank you.
|
||||
|
||||
if(src.virus) return
|
||||
|
||||
if(src.resistances.Find(virus.type))
|
||||
if(virus.type in src.resistances)
|
||||
if(prob(99.9)) return
|
||||
src.resistances.Remove(virus.type)//the resistance is futile
|
||||
|
||||
@@ -259,7 +259,7 @@ to null does not delete the object itself. Thank you.
|
||||
for(var/mob/living/carbon/M in oviewers(check_range, source))
|
||||
for(var/name in src.affected_species)
|
||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
||||
if(mob_type && istype(M, mob_type))
|
||||
if(mob_type && istype(M, mob_type))//check if mob can be infected
|
||||
M.contract_disease(src)
|
||||
break
|
||||
return
|
||||
@@ -273,8 +273,8 @@ to null does not delete the object itself. Thank you.
|
||||
src.stage_act()
|
||||
return
|
||||
|
||||
/datum/disease/proc/cure(var/resistance=1)
|
||||
if(resistance && src.affected_mob && !affected_mob.resistances.Find(src.type))
|
||||
/datum/disease/proc/cure(var/resistance=1)//if resistance = 0, the mob won't develop resistance to disease
|
||||
if(resistance && src.affected_mob && !(src.type in affected_mob.resistances))
|
||||
// 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)
|
||||
@@ -284,7 +284,7 @@ to null does not delete the object itself. Thank you.
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/New()
|
||||
/datum/disease/New()//adding the object to global list. List is processed by master controller.
|
||||
active_diseases += src
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
cure_chance = 20
|
||||
affected_species = list("Human", "Monkey")
|
||||
permeability_mod = 3//likely to infect
|
||||
var/gibbed = 0
|
||||
|
||||
/datum/disease/alien_embryo/stage_act()
|
||||
..()
|
||||
@@ -58,6 +59,7 @@
|
||||
affected_mob.toxloss += 10
|
||||
affected_mob.updatehealth()
|
||||
if(prob(40))
|
||||
ASSERT(gibbed == 0)
|
||||
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
@@ -69,7 +71,9 @@
|
||||
else
|
||||
if(affected_mob.client)
|
||||
affected_mob.client.mob = new/mob/living/carbon/alien/larva(affected_mob.loc)
|
||||
src.cure(0)
|
||||
affected_mob.gib()
|
||||
gibbed = 1
|
||||
|
||||
/*
|
||||
if(affected_mob.client)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
affected_species = list("Human")
|
||||
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
||||
severity = "Major"
|
||||
var/gibbed = 0
|
||||
|
||||
/datum/disease/robotic_transformation/stage_act()
|
||||
..()
|
||||
@@ -53,6 +54,10 @@
|
||||
affected_mob.toxloss += 10
|
||||
affected_mob.updatehealth()
|
||||
if(prob(40)) //So everyone can feel like robot Seth Brundle
|
||||
ASSERT(src.gibbed == 0)
|
||||
var/turf/T = find_loc(affected_mob)
|
||||
gibs(T)
|
||||
src.cure(0)
|
||||
gibbed = 1
|
||||
affected_mob:Robotize()
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
cure = "None"
|
||||
agent = "Rip-LEY Alien Microbes"
|
||||
affected_species = list("Human")
|
||||
var/gibbed = 0
|
||||
|
||||
/datum/disease/xeno_transformation/stage_act()
|
||||
..()
|
||||
@@ -53,6 +54,10 @@
|
||||
affected_mob.toxloss += 10
|
||||
affected_mob.updatehealth()
|
||||
if(prob(40))
|
||||
ASSERT(gibbed == 0)
|
||||
var/turf/T = find_loc(affected_mob)
|
||||
gibs(T)
|
||||
src.cure(0)
|
||||
gibbed = 1
|
||||
affected_mob:Alienize()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user