mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +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:
@@ -7,6 +7,7 @@ obj/machinery/atmospherics/filter
|
|||||||
|
|
||||||
dir = SOUTH
|
dir = SOUTH
|
||||||
initialize_directions = SOUTH|NORTH|WEST
|
initialize_directions = SOUTH|NORTH|WEST
|
||||||
|
req_access = list(access_atmospherics)
|
||||||
|
|
||||||
var/on = 0
|
var/on = 0
|
||||||
var/temp = null // -- TLE
|
var/temp = null // -- TLE
|
||||||
@@ -116,9 +117,6 @@ Filter types:
|
|||||||
filtered_out.toxins = removed.toxins
|
filtered_out.toxins = removed.toxins
|
||||||
removed.toxins = 0
|
removed.toxins = 0
|
||||||
|
|
||||||
filtered_out.carbon_dioxide = removed.carbon_dioxide
|
|
||||||
removed.carbon_dioxide = 0
|
|
||||||
|
|
||||||
if(removed.trace_gases.len>0)
|
if(removed.trace_gases.len>0)
|
||||||
for(var/datum/gas/trace_gas in removed.trace_gases)
|
for(var/datum/gas/trace_gas in removed.trace_gases)
|
||||||
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
|
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
|
||||||
@@ -133,15 +131,19 @@ Filter types:
|
|||||||
filtered_out.nitrogen = removed.nitrogen
|
filtered_out.nitrogen = removed.nitrogen
|
||||||
removed.nitrogen = 0
|
removed.nitrogen = 0
|
||||||
|
|
||||||
|
if(3) //removing CO2
|
||||||
|
filtered_out.carbon_dioxide = removed.carbon_dioxide
|
||||||
|
removed.carbon_dioxide = 0
|
||||||
|
|
||||||
|
if(4)//removing N2O
|
||||||
if(removed.trace_gases.len>0)
|
if(removed.trace_gases.len>0)
|
||||||
for(var/datum/gas/trace_gas in removed.trace_gases)
|
for(var/datum/gas/trace_gas in removed.trace_gases)
|
||||||
if(istype(trace_gas, /datum/gas/sleeping_agent))
|
if(istype(trace_gas, /datum/gas/sleeping_agent))
|
||||||
removed.trace_gases -= trace_gas
|
removed.trace_gases -= trace_gas
|
||||||
filtered_out.trace_gases += trace_gas
|
filtered_out.trace_gases += trace_gas
|
||||||
|
|
||||||
if(3) //removing CO2
|
else
|
||||||
filtered_out.carbon_dioxide = removed.carbon_dioxide
|
filtered_out = null
|
||||||
removed.carbon_dioxide = 0
|
|
||||||
|
|
||||||
|
|
||||||
air_out1.merge(filtered_out)
|
air_out1.merge(filtered_out)
|
||||||
@@ -298,10 +300,12 @@ Filter types:
|
|||||||
|
|
||||||
|
|
||||||
obj/machinery/atmospherics/filter/attack_hand(user as mob) // -- TLE
|
obj/machinery/atmospherics/filter/attack_hand(user as mob) // -- TLE
|
||||||
var/dat
|
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
if (1 == 1)
|
|
||||||
|
if(!src.allowed(user))
|
||||||
|
user << "\red Access denied."
|
||||||
|
return
|
||||||
/*
|
/*
|
||||||
dat += "Autolathe Wires:<BR>"
|
dat += "Autolathe Wires:<BR>"
|
||||||
var/wire
|
var/wire
|
||||||
@@ -312,34 +316,49 @@ obj/machinery/atmospherics/filter/attack_hand(user as mob) // -- TLE
|
|||||||
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
|
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
|
||||||
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
|
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
|
||||||
*/
|
*/
|
||||||
var/current_filter_type
|
var/dat
|
||||||
switch(filter_type)
|
var/current_filter_type
|
||||||
if(0)
|
switch(filter_type)
|
||||||
current_filter_type = "Carbon Molecules"
|
if(0)
|
||||||
if(1)
|
current_filter_type = "Carbon Molecules"
|
||||||
current_filter_type = "Oxygen"
|
if(1)
|
||||||
if(2)
|
current_filter_type = "Oxygen"
|
||||||
current_filter_type = "Nitrogen"
|
if(2)
|
||||||
if(3)
|
current_filter_type = "Nitrogen"
|
||||||
current_filter_type = "Carbon Dioxide"
|
if(3)
|
||||||
else
|
current_filter_type = "Carbon Dioxide"
|
||||||
current_filter_type = "ERROR - Report this bug to the admin, please!"
|
if(4)
|
||||||
|
current_filter_type = "Nitrous Oxide"
|
||||||
|
if(-1)
|
||||||
|
current_filter_type = "Nothing"
|
||||||
|
else
|
||||||
|
current_filter_type = "ERROR - Report this bug to the admin, please!"
|
||||||
|
|
||||||
dat += "<b>Filtering: </b>[current_filter_type]<br><br>"
|
dat += {"<b>Filtering: </b>[current_filter_type]<br><HR>
|
||||||
dat += "<h3>Set Filter Type:</h3><BR>"
|
<h4>Set Filter Type:</h4>
|
||||||
dat += "<A href='?src=\ref[src];filterset=0'>Carbon Molecules</A><BR>"
|
<A href='?src=\ref[src];filterset=0'>Carbon Molecules</A><BR>
|
||||||
dat += "<A href='?src=\ref[src];filterset=1'>Oxygen</A><BR>"
|
<A href='?src=\ref[src];filterset=1'>Oxygen</A><BR>
|
||||||
dat += "<A href='?src=\ref[src];filterset=2'>Nitrogen</A><BR>"
|
<A href='?src=\ref[src];filterset=2'>Nitrogen</A><BR>
|
||||||
dat += "<A href='?src=\ref[src];filterset=3'>Carbon Dioxide</A><BR>"
|
<A href='?src=\ref[src];filterset=3'>Carbon Dioxide</A><BR>
|
||||||
|
<A href='?src=\ref[src];filterset=4'>Nitrous Oxide</A><BR>
|
||||||
user << browse("<HEAD><TITLE>Atmospherics Filter</TITLE></HEAD>[dat]","window=atmo_filter")
|
<A href='?src=\ref[src];filterset=-1'>Nothing</A><BR>
|
||||||
|
<HR><B>Desirible output pressure:</B>
|
||||||
|
<a href='?src=\ref[src];out_press=-10'><b>-</b></a>
|
||||||
|
<a href='?src=\ref[src];out_press=-1'>-</a>
|
||||||
|
[src.target_pressure]
|
||||||
|
<a href='?src=\ref[src];out_press=1'>+</a>
|
||||||
|
<a href='?src=\ref[src];out_press=10'><b>+</b></a>"}
|
||||||
|
/*
|
||||||
|
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD>[dat]","window=atmo_filter")
|
||||||
onclose(user, "atmo_filter")
|
onclose(user, "atmo_filter")
|
||||||
return
|
return
|
||||||
|
|
||||||
if (src.temp)
|
if (src.temp)
|
||||||
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];temp=1'>Clear Screen</A>", src.temp, src)
|
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];temp=1'>Clear Screen</A>", src.temp, src)
|
||||||
//else
|
//else
|
||||||
// src.on != src.on
|
// src.on != src.on
|
||||||
user << browse("<HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_filter")
|
*/
|
||||||
|
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_filter")
|
||||||
onclose(user, "atmo_filter")
|
onclose(user, "atmo_filter")
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -349,18 +368,13 @@ obj/machinery/atmospherics/filter/Topic(href, href_list) // -- TLE
|
|||||||
usr.machine = src
|
usr.machine = src
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
if(href_list["filterset"])
|
if(href_list["filterset"])
|
||||||
if(href_list["filterset"] == "0")
|
src.filter_type = text2num(href_list["filterset"])
|
||||||
src.filter_type = 0
|
|
||||||
if(href_list["filterset"] == "1")
|
|
||||||
src.filter_type = 1
|
|
||||||
if(href_list["filterset"] == "2")
|
|
||||||
src.filter_type = 2
|
|
||||||
if(href_list["filterset"] == "3")
|
|
||||||
src.filter_type = 3
|
|
||||||
if (href_list["temp"])
|
if (href_list["temp"])
|
||||||
src.temp = null
|
src.temp = null
|
||||||
|
if(href_list["out_press"])
|
||||||
|
src.target_pressure = max(0, min(4000, src.target_pressure + text2num(href_list["out_press"])))
|
||||||
|
|
||||||
for(var/mob/M in viewers(1, src))
|
for(var/mob/M in viewers(1, src))
|
||||||
if ((M.client && M.machine == src))
|
if ((M.client && M.machine == src))
|
||||||
src.attack_hand(M)
|
src.attack_hand(M)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
|
|
||||||
process()
|
process()
|
||||||
..()
|
..()
|
||||||
|
broadcast_status()
|
||||||
|
|
||||||
if(!on)
|
if(!on)
|
||||||
return 0
|
return 0
|
||||||
if(welded)
|
if(welded)
|
||||||
@@ -143,6 +145,10 @@
|
|||||||
if("power_toggle")
|
if("power_toggle")
|
||||||
on = !on
|
on = !on
|
||||||
|
|
||||||
|
if("toggle_checks")
|
||||||
|
pressure_checks = (pressure_checks?0:3)
|
||||||
|
|
||||||
|
|
||||||
if("set_direction")
|
if("set_direction")
|
||||||
var/number = text2num(signal.data["parameter"])
|
var/number = text2num(signal.data["parameter"])
|
||||||
if(number > 0.5)
|
if(number > 0.5)
|
||||||
@@ -175,7 +181,10 @@
|
|||||||
external_pressure_bound = number
|
external_pressure_bound = number
|
||||||
|
|
||||||
if(signal.data["tag"])
|
if(signal.data["tag"])
|
||||||
spawn(5) broadcast_status()
|
spawn(2)
|
||||||
|
broadcast_status()
|
||||||
|
update_icon()
|
||||||
|
return
|
||||||
|
|
||||||
hide(var/i) //to make the little pipe section invisible, the icon changes.
|
hide(var/i) //to make the little pipe section invisible, the icon changes.
|
||||||
if(on&&node)
|
if(on&&node)
|
||||||
@@ -209,4 +218,4 @@
|
|||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
..()
|
..()
|
||||||
if(welded)
|
if(welded)
|
||||||
usr << "It seems welded shut."
|
usr << "It seems welded shut."
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
var/datum/signal/signal = new
|
var/datum/signal/signal = new
|
||||||
signal.transmission_method = 1 //radio signal
|
signal.transmission_method = 1 //radio signal
|
||||||
signal.data["tag"] = id_tag
|
signal.data["tag"] = id_tag
|
||||||
|
signal.data["device"] = "AScr"
|
||||||
signal.data["timestamp"] = air_master.current_cycle
|
signal.data["timestamp"] = air_master.current_cycle
|
||||||
signal.data["on"] = on
|
signal.data["on"] = on
|
||||||
signal.data["scrubbing"] = scrubbing
|
signal.data["scrubbing"] = scrubbing
|
||||||
@@ -55,59 +56,14 @@
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//This is probably not a good place for this, since it messes with all scrubbers and alarms in area. Maybe it's better to move this to area code.
|
|
||||||
//It has its issues. Just place additional air alarm closer to the scrubbers, or assign scrubbers manually
|
|
||||||
find_air_alarm()
|
|
||||||
if(src.id_tag) return //id_tag assigned
|
|
||||||
var/area/A = get_area(loc)
|
|
||||||
var/area/M = A.master //we want to search master area, not only L(number) one
|
|
||||||
|
|
||||||
var/uniq_id = md5(M.name)//hash works like a charm
|
|
||||||
var/list/alarms = list()
|
|
||||||
var/list/scrubbers = list()
|
|
||||||
var/i = 0 //used in id_tag and scrubber name generation
|
|
||||||
|
|
||||||
if(M.related && M.related.len)//if has relatives
|
|
||||||
for(var/area/Rel in M.related)//check all relatives
|
|
||||||
if(Rel == M) continue //same parent area.
|
|
||||||
if(Rel.contents && Rel.contents.len)
|
|
||||||
for(var/obj/machinery/alarm/Al in Rel.contents)//find air alarms in area, append to list
|
|
||||||
alarms += Al
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/V in Rel.contents)//find scrubbers in area, append to list
|
|
||||||
if(V.id_tag) continue//already connected to air alarm
|
|
||||||
scrubbers += V
|
|
||||||
|
|
||||||
if(scrubbers.len&&alarms.len) //if scrubbers & alarms found in area
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/Sc in scrubbers)//iterate over found scrubbers
|
|
||||||
var/dist = 127 //max value returned by get_dist
|
|
||||||
var/obj/machinery/alarm/target_alarm = null
|
|
||||||
for(var/obj/machinery/alarm/Al in alarms)//iterate over found alarms
|
|
||||||
var/temp_dist = get_dist(Sc.loc, Al.loc)//if distance between current scrubber and current alarm < previous distance, set this alarm as target to connect to
|
|
||||||
if(temp_dist<dist)
|
|
||||||
target_alarm = Al
|
|
||||||
dist = temp_dist
|
|
||||||
if(target_alarm) //if target(closest) air alarm found,
|
|
||||||
Sc.id_tag = "[uniq_id]_[i++]" //set scrubber id_tag
|
|
||||||
Sc.frequency = target_alarm.frequency //set scrubber frequency (alarm frequency)
|
|
||||||
var/d_name = "[M.name] Air Scrubber #[i]" //displayed name
|
|
||||||
target_alarm.sensors[Sc.id_tag] = d_name //append scrubber to alarm 'sensor' list
|
|
||||||
Sc.name = d_name //set scrubber name
|
|
||||||
//debug
|
|
||||||
//world << "[Sc.name] in [M.name] is set to frequency [Sc.frequency] with ID [Sc.id_tag]"
|
|
||||||
//debug
|
|
||||||
|
|
||||||
initialize()
|
initialize()
|
||||||
find_air_alarm()
|
|
||||||
set_frequency(frequency)
|
set_frequency(frequency)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
process()
|
process()
|
||||||
..()
|
..()
|
||||||
if(!(stat & (NOPOWER|BROKEN)))
|
broadcast_status()
|
||||||
broadcast_status()
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if(!on)
|
if(!on)
|
||||||
return 0
|
return 0
|
||||||
@@ -191,8 +147,8 @@
|
|||||||
else
|
else
|
||||||
scrubbing = 1
|
scrubbing = 1
|
||||||
volume_rate = 120
|
volume_rate = 120
|
||||||
|
|
||||||
if(signal.data["tag"])
|
if(signal.data["tag"])
|
||||||
spawn(2) broadcast_status()
|
spawn(2)
|
||||||
update_icon()
|
broadcast_status()
|
||||||
return ..()
|
update_icon()
|
||||||
|
return
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ obj/machinery/atmospherics/valve
|
|||||||
initialize_directions = NORTH|SOUTH
|
initialize_directions = NORTH|SOUTH
|
||||||
if(EAST || WEST)
|
if(EAST || WEST)
|
||||||
initialize_directions = EAST|WEST
|
initialize_directions = EAST|WEST
|
||||||
|
..()
|
||||||
|
|
||||||
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||||
|
|
||||||
@@ -213,6 +214,12 @@ obj/machinery/atmospherics/valve
|
|||||||
attack_ai(mob/user as mob)
|
attack_ai(mob/user as mob)
|
||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
|
attack_hand(mob/user as mob)
|
||||||
|
if(!src.allowed(user))
|
||||||
|
user << "\red Access denied."
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
//Radio remote control
|
//Radio remote control
|
||||||
|
|
||||||
proc
|
proc
|
||||||
|
|||||||
82
code/ATMOSPHERICS/init_S_V_A.dm
Normal file
82
code/ATMOSPHERICS/init_S_V_A.dm
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
datum/controller/game_controller
|
||||||
|
proc/find_air_alarms()
|
||||||
|
|
||||||
|
for(var/area/A in world)
|
||||||
|
var/area/M = A.master //we want to search master area, not only L(number) one
|
||||||
|
|
||||||
|
var/uniq_id = md5(M.name)//hash works like a charm
|
||||||
|
var/list/alarms = list()
|
||||||
|
var/list/scrubbers = list()
|
||||||
|
var/list/vents = list()
|
||||||
|
var/i = 0 //used in id_tag and name generation
|
||||||
|
|
||||||
|
if(M.related && M.related.len)//if has relatives
|
||||||
|
for(var/area/Rel in M.related)//check all relatives
|
||||||
|
if(Rel == M) continue //same parent area.
|
||||||
|
if(Rel.contents && Rel.contents.len)
|
||||||
|
for(var/obj/O in Rel.contents)
|
||||||
|
switch(O.type)
|
||||||
|
if(/obj/machinery/alarm)
|
||||||
|
alarms += O
|
||||||
|
if(/obj/machinery/atmospherics/unary/vent_scrubber)
|
||||||
|
scrubbers += O
|
||||||
|
if(/obj/machinery/atmospherics/unary/vent_pump)
|
||||||
|
vents += O
|
||||||
|
else continue
|
||||||
|
/*
|
||||||
|
for(var/obj/machinery/alarm/Al in Rel.contents)//find air alarms in area, append to list
|
||||||
|
alarms += Al
|
||||||
|
for(var/obj/machinery/atmospherics/unary/vent_scrubber/V in Rel.contents)//find scrubbers in area, append to list
|
||||||
|
if(V.id_tag) continue//already connected to air alarm
|
||||||
|
scrubbers += V
|
||||||
|
for(var/obj/machinery/atmospherics/unary/vent_pump/P in Rel.contents)
|
||||||
|
if(P.id) continue
|
||||||
|
vents += P
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(!alarms.len || (!scrubbers.len && !vents.len)) continue
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
if(scrubbers.len) //if scrubbers found in area
|
||||||
|
for(var/obj/machinery/atmospherics/unary/vent_scrubber/Sc in scrubbers)//iterate over found scrubbers
|
||||||
|
if(Sc.id_tag) continue
|
||||||
|
var/dist = 127 //max value returned by get_dist
|
||||||
|
var/obj/machinery/alarm/target_alarm = null
|
||||||
|
for(var/obj/machinery/alarm/Al in alarms)//iterate over found alarms
|
||||||
|
var/temp_dist = get_dist(Sc.loc, Al.loc)//if distance between current scrubber and current alarm < previous distance, set this alarm as target to connect to
|
||||||
|
if(temp_dist<dist)
|
||||||
|
target_alarm = Al
|
||||||
|
dist = temp_dist
|
||||||
|
if(target_alarm) //if target(closest) air alarm found,
|
||||||
|
Sc.id_tag = "[uniq_id]_scr_[i++]" //set scrubber id_tag
|
||||||
|
Sc.frequency = target_alarm.frequency //set scrubber frequency (alarm frequency)
|
||||||
|
var/d_name = "[M.name] Air Scrubber #[i]" //displayed name
|
||||||
|
target_alarm.sensors[Sc.id_tag] = d_name //append scrubber to alarm 'sensors' list
|
||||||
|
Sc.name = d_name //set scrubber name
|
||||||
|
Sc.set_frequency(Sc.frequency)
|
||||||
|
//debug
|
||||||
|
//world << "[Sc.name] in [M.name] is set to frequency [Sc.frequency] with ID [Sc.id_tag]"
|
||||||
|
//debug
|
||||||
|
i = 0
|
||||||
|
if(vents.len) //if vents found in area
|
||||||
|
for(var/obj/machinery/atmospherics/unary/vent_pump/P in vents)//iterate over found vents
|
||||||
|
if(P.id) continue
|
||||||
|
var/dist = 127 //max value returned by get_dist
|
||||||
|
var/obj/machinery/alarm/target_alarm = null
|
||||||
|
for(var/obj/machinery/alarm/Al in alarms)//iterate over found alarms
|
||||||
|
var/temp_dist = get_dist(P.loc, Al.loc)//if distance between current vent and current alarm < previous distance, set this alarm as target to connect to
|
||||||
|
if(temp_dist<dist)
|
||||||
|
target_alarm = Al
|
||||||
|
dist = temp_dist
|
||||||
|
if(target_alarm) //if target(closest) air alarm found,
|
||||||
|
P.id = "[uniq_id]_vpump_[i++]" //set vent id
|
||||||
|
P.frequency = target_alarm.frequency //set vent frequency (alarm frequency)
|
||||||
|
var/d_name = "[M.name] Vent Pump #[i]" //displayed name
|
||||||
|
target_alarm.vents[P.id] = d_name //append vent to alarm 'vents' list
|
||||||
|
P.name = d_name //set vent name
|
||||||
|
P.set_frequency(P.frequency)
|
||||||
|
//debug
|
||||||
|
//world << "[Sc.name] in [M.name] is set to frequency [Sc.frequency] with ID [Sc.id_tag]"
|
||||||
|
//debug
|
||||||
|
|
||||||
|
return
|
||||||
@@ -20,7 +20,7 @@ to null does not delete the object itself. Thank you.
|
|||||||
var/cure = null
|
var/cure = null
|
||||||
var/cure_id = null// reagent.id or list containing them
|
var/cure_id = null// reagent.id or list containing them
|
||||||
var/cure_chance = 8//chance for the cure to do its job
|
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/spread_type = AIRBORNE
|
||||||
var/contagious_period = 0//the disease stage when it can be spread
|
var/contagious_period = 0//the disease stage when it can be spread
|
||||||
var/list/affected_species = list()
|
var/list/affected_species = list()
|
||||||
@@ -58,7 +58,7 @@ to null does not delete the object itself. Thank you.
|
|||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/disease/proc/has_cure()
|
/datum/disease/proc/has_cure()//check if affected_mob has required reagents.
|
||||||
if(!cure_id) return 0
|
if(!cure_id) return 0
|
||||||
var/result = 1
|
var/result = 1
|
||||||
if(istype(cure_id, /list))
|
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.virus) return
|
||||||
|
|
||||||
if(src.resistances.Find(virus.type))
|
if(virus.type in src.resistances)
|
||||||
if(prob(99.9)) return
|
if(prob(99.9)) return
|
||||||
src.resistances.Remove(virus.type)//the resistance is futile
|
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/mob/living/carbon/M in oviewers(check_range, source))
|
||||||
for(var/name in src.affected_species)
|
for(var/name in src.affected_species)
|
||||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
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)
|
M.contract_disease(src)
|
||||||
break
|
break
|
||||||
return
|
return
|
||||||
@@ -273,8 +273,8 @@ to null does not delete the object itself. Thank you.
|
|||||||
src.stage_act()
|
src.stage_act()
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/disease/proc/cure(var/resistance=1)
|
/datum/disease/proc/cure(var/resistance=1)//if resistance = 0, the mob won't develop resistance to disease
|
||||||
if(resistance && src.affected_mob && !affected_mob.resistances.Find(src.type))
|
if(resistance && src.affected_mob && !(src.type in affected_mob.resistances))
|
||||||
// world << "Setting res to [src]"
|
// 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.
|
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)
|
affected_mob.resistances += text2path(type)
|
||||||
@@ -284,7 +284,7 @@ to null does not delete the object itself. Thank you.
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/datum/disease/New()
|
/datum/disease/New()//adding the object to global list. List is processed by master controller.
|
||||||
active_diseases += src
|
active_diseases += src
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
cure_chance = 20
|
cure_chance = 20
|
||||||
affected_species = list("Human", "Monkey")
|
affected_species = list("Human", "Monkey")
|
||||||
permeability_mod = 3//likely to infect
|
permeability_mod = 3//likely to infect
|
||||||
|
var/gibbed = 0
|
||||||
|
|
||||||
/datum/disease/alien_embryo/stage_act()
|
/datum/disease/alien_embryo/stage_act()
|
||||||
..()
|
..()
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
affected_mob.toxloss += 10
|
affected_mob.toxloss += 10
|
||||||
affected_mob.updatehealth()
|
affected_mob.updatehealth()
|
||||||
if(prob(40))
|
if(prob(40))
|
||||||
|
ASSERT(gibbed == 0)
|
||||||
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
|
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)
|
for(var/mob/dead/observer/G in world)
|
||||||
if(G.client)
|
if(G.client)
|
||||||
@@ -69,7 +71,9 @@
|
|||||||
else
|
else
|
||||||
if(affected_mob.client)
|
if(affected_mob.client)
|
||||||
affected_mob.client.mob = new/mob/living/carbon/alien/larva(affected_mob.loc)
|
affected_mob.client.mob = new/mob/living/carbon/alien/larva(affected_mob.loc)
|
||||||
|
src.cure(0)
|
||||||
affected_mob.gib()
|
affected_mob.gib()
|
||||||
|
gibbed = 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if(affected_mob.client)
|
if(affected_mob.client)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
affected_species = list("Human")
|
affected_species = list("Human")
|
||||||
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
||||||
severity = "Major"
|
severity = "Major"
|
||||||
|
var/gibbed = 0
|
||||||
|
|
||||||
/datum/disease/robotic_transformation/stage_act()
|
/datum/disease/robotic_transformation/stage_act()
|
||||||
..()
|
..()
|
||||||
@@ -53,6 +54,10 @@
|
|||||||
affected_mob.toxloss += 10
|
affected_mob.toxloss += 10
|
||||||
affected_mob.updatehealth()
|
affected_mob.updatehealth()
|
||||||
if(prob(40)) //So everyone can feel like robot Seth Brundle
|
if(prob(40)) //So everyone can feel like robot Seth Brundle
|
||||||
|
ASSERT(src.gibbed == 0)
|
||||||
var/turf/T = find_loc(affected_mob)
|
var/turf/T = find_loc(affected_mob)
|
||||||
gibs(T)
|
gibs(T)
|
||||||
|
src.cure(0)
|
||||||
|
gibbed = 1
|
||||||
affected_mob:Robotize()
|
affected_mob:Robotize()
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
cure = "None"
|
cure = "None"
|
||||||
agent = "Rip-LEY Alien Microbes"
|
agent = "Rip-LEY Alien Microbes"
|
||||||
affected_species = list("Human")
|
affected_species = list("Human")
|
||||||
|
var/gibbed = 0
|
||||||
|
|
||||||
/datum/disease/xeno_transformation/stage_act()
|
/datum/disease/xeno_transformation/stage_act()
|
||||||
..()
|
..()
|
||||||
@@ -53,6 +54,10 @@
|
|||||||
affected_mob.toxloss += 10
|
affected_mob.toxloss += 10
|
||||||
affected_mob.updatehealth()
|
affected_mob.updatehealth()
|
||||||
if(prob(40))
|
if(prob(40))
|
||||||
|
ASSERT(gibbed == 0)
|
||||||
var/turf/T = find_loc(affected_mob)
|
var/turf/T = find_loc(affected_mob)
|
||||||
gibs(T)
|
gibs(T)
|
||||||
|
src.cure(0)
|
||||||
|
gibbed = 1
|
||||||
affected_mob:Alienize()
|
affected_mob:Alienize()
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
|
|
||||||
var/frequency = 1439
|
var/frequency = 1439
|
||||||
var/list/sensors = list()
|
var/list/sensors = list()
|
||||||
|
var/list/vents = list()
|
||||||
var/list/sensor_information = list()
|
var/list/sensor_information = list()
|
||||||
|
var/list/vent_information = list()
|
||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
var/alarm_area //unused atm. Maybe do something if emmaged or hacked...Like change the area to security, syphon air out, ..., profit.
|
var/alarm_area //unused atm. Maybe do something if emmaged or hacked...Like change the area to security, syphon air out, ..., profit.
|
||||||
var/locked = 1
|
var/locked = 1
|
||||||
var/panic = 0 //is this alarm panicked?
|
var/panic = 0 //is this alarm panicked?
|
||||||
|
var/device = null
|
||||||
|
|
||||||
req_access = list(access_atmospherics)
|
req_access = list(access_atmospherics)
|
||||||
|
|
||||||
@@ -30,9 +33,11 @@
|
|||||||
if(!signal || signal.encryption) return
|
if(!signal || signal.encryption) return
|
||||||
|
|
||||||
var/id_tag = signal.data["tag"]
|
var/id_tag = signal.data["tag"]
|
||||||
if(!id_tag || !sensors.Find(id_tag)) return
|
if(!id_tag || (!sensors.Find(id_tag) && !vents.Find(id_tag))) return
|
||||||
|
if(signal.data["device"] == "AScr")
|
||||||
sensor_information[id_tag] = signal.data
|
sensor_information[id_tag] = signal.data
|
||||||
|
else if(signal.data["device"] == "AVP")
|
||||||
|
vent_information[id_tag] = signal.data
|
||||||
|
|
||||||
proc
|
proc
|
||||||
set_frequency(new_frequency)
|
set_frequency(new_frequency)
|
||||||
@@ -40,34 +45,6 @@
|
|||||||
frequency = new_frequency
|
frequency = new_frequency
|
||||||
radio_connection = radio_controller.add_object(src, "[frequency]")
|
radio_connection = radio_controller.add_object(src, "[frequency]")
|
||||||
|
|
||||||
/* //moved to vent_scrubber.dm
|
|
||||||
|
|
||||||
find_scrubbers()//finds vent_scrubbers in area, sets corresponding frequency, name and id_tags, fills sensor list with id_tags and names
|
|
||||||
var/area/A = get_area(loc)
|
|
||||||
var/area/M = A.master
|
|
||||||
if(!alarm_area)
|
|
||||||
alarm_area = M
|
|
||||||
|
|
||||||
//world << "\red Processing [M.name]"
|
|
||||||
|
|
||||||
var/uniq_id = md5(M.name)//hash works like a charm
|
|
||||||
|
|
||||||
if(M.related && M.related.len)//if has relatives
|
|
||||||
var/i = 0
|
|
||||||
for(var/area/Rel in M.related)//check all relatives
|
|
||||||
if(Rel == M) continue //same parent area
|
|
||||||
if(Rel.contents && Rel.contents.len)
|
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/V in Rel.contents)
|
|
||||||
if(V.id_tag)//id_tag assigned, probably already connected to alarm somewhere
|
|
||||||
//world << "[V.id_tag] passed"
|
|
||||||
continue
|
|
||||||
V.id_tag = "[uniq_id]_[i++]"//unique ID of the scrubber
|
|
||||||
V.frequency = frequency
|
|
||||||
var/name = "[M.name] Air Scrubber #[i]" //displayed name
|
|
||||||
sensors[V.id_tag] = name
|
|
||||||
V.name = name
|
|
||||||
//world << "[V.name] in [M.name] is set to [frequency] with ID [V.id_tag] and named [sensors[V.id_tag]]"
|
|
||||||
*/
|
|
||||||
|
|
||||||
send_signal(var/target, var/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
|
send_signal(var/target, var/command)//sends signal 'command' to 'target'. Returns 0 if no radio connection, 1 otherwise
|
||||||
if(!radio_connection)
|
if(!radio_connection)
|
||||||
@@ -81,76 +58,111 @@
|
|||||||
signal.data["command"] = command
|
signal.data["command"] = command
|
||||||
|
|
||||||
radio_connection.post_signal(src, signal)
|
radio_connection.post_signal(src, signal)
|
||||||
//world << text("Signal [] Broadcasted to []", command, target)
|
// world << text("Signal [] Broadcasted to []", command, target)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return_text()
|
return_text()
|
||||||
var/sensor_data
|
var/output = "<B>[alarm_zone] Air [name]</B><HR>"
|
||||||
if(sensors.len)
|
if(!src.device)
|
||||||
for(var/id_tag in sensors)
|
output += {"<a href='?src=\ref[src];scrubbers_control=1'>Scrubbers Control</a><br>
|
||||||
var/long_name = sensors[id_tag]
|
<a href='?src=\ref[src];vents_control=1'>Vents Control</a><br>
|
||||||
var/list/data = sensor_information[id_tag]
|
<HR>
|
||||||
var/sensor_part = "<B>[long_name]</B>:<BR>"
|
"}
|
||||||
|
|
||||||
if(data)
|
|
||||||
sensor_part += "<B>Operating:</B> <A href='?src=\ref[src];toggle_power=[id_tag]'>[data["on"]?"on":"off"]</A><BR>"
|
|
||||||
sensor_part += "<B>Type:</B> <A href='?src=\ref[src];toggle_scrubbing=[id_tag]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>"
|
|
||||||
if(data["scrubbing"])
|
|
||||||
sensor_part += "<B>Filtering:</B> Carbon Dioxide <A href='?src=\ref[src];toggle_co2_scrub=[id_tag]'>([data["filter_co2"]?"on":"off"])</A>; Toxins <A href='?src=\ref[src];toggle_tox_scrub=[id_tag]'>([data["filter_toxins"]?"on":"off"])</A><BR>"
|
|
||||||
sensor_part += "<A href='?src=\ref[src];toggle_panic_siphon=[id_tag]'><font color='[data["panic"]?"blue'>Dea":"red'>A"]ctivate panic syphon</A></font><BR>"
|
|
||||||
if(data["panic"])
|
|
||||||
sensor_part += "<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>"
|
|
||||||
sensor_part += "<HR>"
|
|
||||||
else
|
|
||||||
sensor_part = "<FONT color='red'>[long_name] can not be found!</FONT><BR>"
|
|
||||||
|
|
||||||
sensor_data += sensor_part
|
|
||||||
sensor_data += "<A href='?src=\ref[src];toggle_panic_siphon_global=1'><font color='red'><B>TOGGLE PANIC SYPHON IN AREA</B></font></A>"
|
|
||||||
|
|
||||||
|
output += "<A href='?src=\ref[src];toggle_panic_siphon_global=1'><font color='red'><B>TOGGLE PANIC SYPHON IN AREA</B></font></A>"
|
||||||
else
|
else
|
||||||
sensor_data = "No scrubbers connected."
|
var/sensor_data
|
||||||
|
if(src.device == "Scrubbers")
|
||||||
|
if(sensors.len)
|
||||||
|
for(var/id_tag in sensors)
|
||||||
|
var/long_name = sensors[id_tag]
|
||||||
|
var/list/data = sensor_information[id_tag]
|
||||||
|
var/sensor_part = "<B>[long_name]</B>:<BR>"
|
||||||
|
|
||||||
var/output = {"<B>[alarm_zone] Air [name]</B><HR>[sensor_data]"}
|
if(data)
|
||||||
|
sensor_part += {"<B>Operating:</B> <A href='?src=\ref[src];scr_toggle_power=[id_tag]'>[(data["on"]?"on":"off")]</A><BR>
|
||||||
|
<B>Type:</B> <A href='?src=\ref[src];scr_toggle_scrubbing=[id_tag]'>[(data["scrubbing"]?"scrubbing":"syphoning")]</A><BR>"}
|
||||||
|
if(data["scrubbing"])
|
||||||
|
sensor_part += "<B>Filtering:</B> Carbon Dioxide <A href='?src=\ref[src];scr_toggle_co2_scrub=[id_tag]'>([(data["filter_co2"]?"on":"off")])</A>; Toxins <A href='?src=\ref[src];scr_toggle_tox_scrub=[id_tag]'>([data["filter_toxins"]?"on":"off"])</A><BR>"
|
||||||
|
sensor_part += "<A href='?src=\ref[src];scr_toggle_panic_siphon=[id_tag]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate panic syphon</A></font><BR>"
|
||||||
|
if(data["panic"])
|
||||||
|
sensor_part += "<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>"
|
||||||
|
sensor_part += "<HR>"
|
||||||
|
else
|
||||||
|
sensor_part = "<FONT color='red'>[long_name] can not be found!</FONT><BR><HR>"
|
||||||
|
|
||||||
|
sensor_data += sensor_part
|
||||||
|
else
|
||||||
|
sensor_data = "No scrubbers connected.<BR>"
|
||||||
|
|
||||||
|
else if(src.device == "Vents")
|
||||||
|
if(vents.len)
|
||||||
|
for(var/id_tag in vents)
|
||||||
|
var/long_name = vents[id_tag]
|
||||||
|
var/list/data = vent_information[id_tag]
|
||||||
|
var/sensor_part = "<B>[long_name]</B>:<BR>"
|
||||||
|
|
||||||
|
if(data)
|
||||||
|
sensor_part += {"<B>Operating:</B> <A href='?src=\ref[src];v_toggle_power=[id_tag]'>[data["power"]]</A><BR>
|
||||||
|
<B>Pressure checks:</B> <A href='?src=\ref[src];v_toggle_checks=[id_tag]'>[data["checks"]?"on":"off"]</A><BR>
|
||||||
|
<HR>"}
|
||||||
|
else
|
||||||
|
sensor_part = "<FONT color='red'>[long_name] can not be found!</FONT><HR>"
|
||||||
|
|
||||||
|
sensor_data += sensor_part
|
||||||
|
else
|
||||||
|
sensor_data = "No scrubbers connected.<BR>"
|
||||||
|
|
||||||
|
output = {"[sensor_data]<a href='?src=\ref[src];main=1'>Main menu</a><br>"}
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
initialize()
|
initialize()
|
||||||
set_frequency(frequency)
|
set_frequency(frequency)
|
||||||
/*if(!(sensors.len))//if there's something in the list, do not search the area
|
|
||||||
find_scrubbers()*/
|
|
||||||
|
|
||||||
|
|
||||||
Topic(href, href_list)
|
Topic(href, href_list)
|
||||||
//if(..())
|
//if(..())
|
||||||
// return
|
// return
|
||||||
|
if(href_list["scrubbers_control"])
|
||||||
|
src.device = "Scrubbers"
|
||||||
|
if(href_list["vents_control"])
|
||||||
|
src.device = "Vents"
|
||||||
|
if(href_list["main"])
|
||||||
|
src.device = null
|
||||||
|
if(href_list["scr_toggle_power"])
|
||||||
|
send_signal(href_list["scr_toggle_power"], "toggle_power")
|
||||||
|
|
||||||
if(href_list["toggle_power"])
|
if(href_list["scr_toggle_scrubbing"])
|
||||||
send_signal(href_list["toggle_power"], "toggle_power")
|
send_signal(href_list["scr_toggle_scrubbing"], "toggle_scrubbing")
|
||||||
|
|
||||||
if(href_list["toggle_scrubbing"])
|
if(href_list["scr_toggle_co2_scrub"])
|
||||||
send_signal(href_list["toggle_scrubbing"], "toggle_scrubbing")
|
send_signal(href_list["scr_toggle_co2_scrub"], "toggle_co2_scrub")
|
||||||
|
|
||||||
if(href_list["toggle_co2_scrub"])
|
if(href_list["scr_toggle_tox_scrub"])
|
||||||
send_signal(href_list["toggle_co2_scrub"], "toggle_co2_scrub")
|
send_signal(href_list["scr_toggle_tox_scrub"], "toggle_tox_scrub")
|
||||||
|
|
||||||
if(href_list["toggle_tox_scrub"])
|
if(href_list["scr_toggle_panic_siphon"])
|
||||||
send_signal(href_list["toggle_tox_scrub"], "toggle_tox_scrub")
|
send_signal(href_list["scr_toggle_panic_siphon"], "toggle_panic_siphon")
|
||||||
|
|
||||||
if(href_list["toggle_panic_siphon"])
|
if(href_list["v_toggle_power"])
|
||||||
send_signal(href_list["toggle_panic_siphon"], "toggle_panic_siphon")
|
send_signal(href_list["v_toggle_power"], "power_toggle")
|
||||||
|
if(href_list["v_toggle_checks"])
|
||||||
|
send_signal(href_list["v_toggle_checks"], "toggle_checks")
|
||||||
|
|
||||||
if(href_list["toggle_panic_siphon_global"])
|
if(href_list["toggle_panic_siphon_global"])
|
||||||
for(var/V in sensors)
|
for(var/V in sensors)
|
||||||
send_signal(V, "toggle_panic_siphon")
|
send_signal(V, "toggle_panic_siphon")
|
||||||
|
for(var/P in vents)
|
||||||
|
send_signal(P, "power_off")
|
||||||
panic = !panic
|
panic = !panic
|
||||||
|
|
||||||
|
|
||||||
spawn(5)
|
spawn(5)
|
||||||
attack_hand(usr)
|
// attack_hand(usr)
|
||||||
return ..()
|
src.updateUsrDialog()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/alarm/New()
|
/obj/machinery/alarm/New()
|
||||||
|
|||||||
@@ -41,15 +41,20 @@ obj/machinery/air_sensor
|
|||||||
|
|
||||||
if(output>4)
|
if(output>4)
|
||||||
var/total_moles = air_sample.total_moles()
|
var/total_moles = air_sample.total_moles()
|
||||||
if(output&4)
|
if(total_moles > 0)
|
||||||
signal.data["oxygen"] = round(100*air_sample.oxygen/total_moles,0.1)
|
if(output&4)
|
||||||
if(output&8)
|
signal.data["oxygen"] = round(100*air_sample.oxygen/total_moles,0.1)
|
||||||
signal.data["toxins"] = round(100*air_sample.toxins/total_moles,0.1)
|
if(output&8)
|
||||||
if(output&16)
|
signal.data["toxins"] = round(100*air_sample.toxins/total_moles,0.1)
|
||||||
signal.data["nitrogen"] = round(100*air_sample.nitrogen/total_moles,0.1)
|
if(output&16)
|
||||||
if(output&32)
|
signal.data["nitrogen"] = round(100*air_sample.nitrogen/total_moles,0.1)
|
||||||
signal.data["carbon_dioxide"] = round(100*air_sample.carbon_dioxide/total_moles,0.1)
|
if(output&32)
|
||||||
|
signal.data["carbon_dioxide"] = round(100*air_sample.carbon_dioxide/total_moles,0.1)
|
||||||
|
else
|
||||||
|
signal.data["oxygen"] = 0
|
||||||
|
signal.data["toxins"] = 0
|
||||||
|
signal.data["nitrogen"] = 0
|
||||||
|
signal.data["carbon_dioxide"] = 0
|
||||||
radio_connection.post_signal(src, signal)
|
radio_connection.post_signal(src, signal)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ datum/controller/game_controller
|
|||||||
for(var/obj/machinery/atmospherics/machine in world)
|
for(var/obj/machinery/atmospherics/machine in world)
|
||||||
machine.build_network()
|
machine.build_network()
|
||||||
|
|
||||||
|
world << "\red \b Initializing atmos machinery"
|
||||||
|
sleep(-1)
|
||||||
|
|
||||||
|
find_air_alarms()
|
||||||
|
|
||||||
world << "\red \b Initializations complete."
|
world << "\red \b Initializations complete."
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -533,41 +533,10 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
handle_virus_updates()
|
handle_virus_updates()
|
||||||
if(src.bodytemperature > 406)
|
if(src.bodytemperature > 406 && src.virus)
|
||||||
src.virus.cure()
|
src.virus.cure()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!src.virus)
|
|
||||||
if(prob(40))
|
|
||||||
for(var/mob/living/carbon/M in oviewers(4, src))
|
|
||||||
if(M.virus && M.virus.spread == "Airborne")
|
|
||||||
if(M.virus.affected_species.Find("Alien"))
|
|
||||||
if(src.resistances.Find(M.virus.type))
|
|
||||||
continue
|
|
||||||
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
|
|
||||||
D.strain_data = M.virus.strain_data
|
|
||||||
src.contract_disease(D)
|
|
||||||
|
|
||||||
for(var/obj/decal/cleanable/blood/B in view(4, src))
|
|
||||||
if(B.virus && B.virus.spread == "Airborne")
|
|
||||||
if(B.virus.affected_species.Find("Alien"))
|
|
||||||
if(src.resistances.Find(B.virus.type))
|
|
||||||
continue
|
|
||||||
var/datum/disease/D = new B.virus.type
|
|
||||||
D.strain_data = B.virus.strain_data
|
|
||||||
src.contract_disease(D)
|
|
||||||
|
|
||||||
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
|
|
||||||
if(X.virus && X.virus.spread == "Airborne")
|
|
||||||
if(X.virus.affected_species.Find("Alien"))
|
|
||||||
if(src.resistances.Find(X.virus.type))
|
|
||||||
continue
|
|
||||||
var/datum/disease/D = new X.virus.type
|
|
||||||
D.strain_data = X.virus.strain_data
|
|
||||||
src.contract_disease(D)
|
|
||||||
else
|
|
||||||
src.virus.stage_act()
|
|
||||||
|
|
||||||
check_if_buckled()
|
check_if_buckled()
|
||||||
if (src.buckled)
|
if (src.buckled)
|
||||||
src.lying = (istype(src.buckled, /obj/stool/bed) ? 1 : 0)
|
src.lying = (istype(src.buckled, /obj/stool/bed) ? 1 : 0)
|
||||||
|
|||||||
@@ -454,38 +454,9 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
handle_virus_updates()
|
handle_virus_updates()
|
||||||
if(src.bodytemperature > 406)
|
if(src.bodytemperature > 406 && src.virus)
|
||||||
src.resistances += src.virus
|
src.virus.cure()
|
||||||
del(src.virus)
|
return
|
||||||
|
|
||||||
if(!src.virus)
|
|
||||||
if(prob(40))
|
|
||||||
for(var/mob/living/carbon/M in oviewers(4, src))
|
|
||||||
if(M.virus && M.virus.spread == "Airborne")
|
|
||||||
if(M.virus.affected_species.Find("Alien"))
|
|
||||||
if(src.resistances.Find(M.virus.type))
|
|
||||||
continue
|
|
||||||
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
|
|
||||||
D.strain_data = M.virus.strain_data
|
|
||||||
src.contract_disease(D)
|
|
||||||
for(var/obj/decal/cleanable/blood/B in view(4, src))
|
|
||||||
if(B.virus && B.virus.spread == "Airborne")
|
|
||||||
if(B.virus.affected_species.Find("Alien"))
|
|
||||||
if(src.resistances.Find(B.virus.type))
|
|
||||||
continue
|
|
||||||
var/datum/disease/D = new B.virus.type
|
|
||||||
D.strain_data = B.virus.strain_data
|
|
||||||
src.contract_disease(D)
|
|
||||||
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
|
|
||||||
if(X.virus && X.virus.spread == "Airborne")
|
|
||||||
if(X.virus.affected_species.Find("Alien"))
|
|
||||||
if(src.resistances.Find(X.virus.type))
|
|
||||||
continue
|
|
||||||
var/datum/disease/D = new X.virus.type
|
|
||||||
D.strain_data = X.virus.strain_data
|
|
||||||
src.contract_disease(D)
|
|
||||||
else
|
|
||||||
src.virus.stage_act()
|
|
||||||
|
|
||||||
check_if_buckled()
|
check_if_buckled()
|
||||||
if (src.buckled)
|
if (src.buckled)
|
||||||
|
|||||||
@@ -800,7 +800,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
handle_virus_updates()
|
handle_virus_updates()
|
||||||
if(src.bodytemperature > 406)
|
if(src.bodytemperature > 406 && src.virus)
|
||||||
src.virus.cure()
|
src.virus.cure()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -553,7 +553,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
handle_virus_updates()
|
handle_virus_updates()
|
||||||
if(src.bodytemperature > 406)
|
if(src.bodytemperature > 406 && src.virus)
|
||||||
src.virus.cure()
|
src.virus.cure()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,7 @@
|
|||||||
#include "code\ATMOSPHERICS\atmospherics.dm"
|
#include "code\ATMOSPHERICS\atmospherics.dm"
|
||||||
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
|
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
|
||||||
#include "code\ATMOSPHERICS\datum_pipeline.dm"
|
#include "code\ATMOSPHERICS\datum_pipeline.dm"
|
||||||
|
#include "code\ATMOSPHERICS\init_S_V_A.dm"
|
||||||
#include "code\ATMOSPHERICS\pipes.dm"
|
#include "code\ATMOSPHERICS\pipes.dm"
|
||||||
#include "code\ATMOSPHERICS\components\filter.dm"
|
#include "code\ATMOSPHERICS\components\filter.dm"
|
||||||
#include "code\ATMOSPHERICS\components\mixer.dm"
|
#include "code\ATMOSPHERICS\components\mixer.dm"
|
||||||
|
|||||||
12894
maps/trunkmap.dmm
12894
maps/trunkmap.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user