Merge remote-tracking branch 'upstream/master' into rcs-update

This commit is contained in:
Fox-McCloud
2015-09-21 00:30:00 -04:00
98 changed files with 13713 additions and 16504 deletions
@@ -33,7 +33,7 @@
return 1
if(href_list["set_subject"])
var/list/valves=list()
for(var/obj/machinery/atmospherics/valve/digital/V in world)
for(var/obj/machinery/atmospherics/binary/valve/digital/V in world)
if(!isnull(V.id_tag) && V.frequency == parent.frequency)
valves|=V.id_tag
if(valves.len==0)
+3 -3
View File
@@ -17,8 +17,8 @@
/datum/event/alien_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
@@ -33,4 +33,4 @@
spawncount--
successSpawn = 1
+3 -3
View File
@@ -17,9 +17,9 @@
/datum/event/borer_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.network.normal_members.len > 50)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
@@ -32,4 +32,4 @@
spawncount--
successSpawn = 1
+2 -2
View File
@@ -16,8 +16,8 @@
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
while((spawncount >= 1) && vents.len)
+2 -2
View File
@@ -11,8 +11,8 @@
/datum/event/vent_clog/setup()
endWhen = rand(25, 100)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in machines)
if((temp_vent.loc.z in config.station_levels) && temp_vent.network)
if(temp_vent.network.normal_members.len > 50)
if((temp_vent.loc.z in config.station_levels))
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
/datum/event/vent_clog/tick()
@@ -175,7 +175,7 @@ var/global/list/ghdels_profiled = list()
if(garbageCollector)
while(garbageCollector.queue.len)
var/datum/o = locate(garbageCollector.queue[1])
if(istype(o) && o.gcDestroyed)
if(istype(o) && !isnull(o.gcDestroyed))
del(o)
garbageCollector.dels_count++
garbageCollector.queue.Cut(1, 2)
+1 -1
View File
@@ -728,7 +728,7 @@
else if(mechanical && istype(O, /obj/item/weapon/wrench))
//If there's a connector here, the portable_atmospherics setup can handle it.
if(locate(/obj/machinery/atmospherics/portables_connector/) in loc)
if(locate(/obj/machinery/atmospherics/unary/portables_connector) in loc)
return ..()
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -79,7 +79,7 @@
// If we're attached to a pipenet, then we should let the pipenet know we might have modified some gasses
if (closed_system && connected_port)
update_connected_network()
connected_port.parent.update = 1
// Toxin levels beyond the plant's tolerance cause damage, but
// toxins are sucked up each tick and slowly reduce over time.
+11 -9
View File
@@ -329,7 +329,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
break
if(vent_found)
if(vent_found.network && (vent_found.network.normal_members.len || vent_found.network.line_members.len))
if(vent_found.parent && (vent_found.parent.members.len || vent_found.parent.other_atmosmch))
visible_message("<span class='notice'>[src] begins climbing into the ventilation system...</span>", \
"<span class='notice'>You begin climbing into the ventilation system...</span>")
@@ -362,15 +362,17 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
var/datum/pipe_network/network = starting_machine.return_network(starting_machine)
if(!network)
if(!istype(starting_machine) || !starting_machine.returnPipenet())
return
for(var/datum/pipeline/pipeline in network.line_members)
for(var/obj/machinery/atmospherics/A in (pipeline.members || pipeline.edges))
if(!A.pipe_image)
A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipes_shown += A.pipe_image
client.images += A.pipe_image
var/datum/pipeline/pipeline = starting_machine.returnPipenet()
var/list/totalMembers = list()
totalMembers |= pipeline.members
totalMembers |= pipeline.other_atmosmch
for(var/obj/machinery/atmospherics/A in totalMembers)
if(!A.pipe_image)
A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipes_shown += A.pipe_image
client.images += A.pipe_image
/mob/living/proc/remove_ventcrawl()
if(client)
+2 -4
View File
@@ -97,10 +97,8 @@
circ2.air2.merge(air2)
//Update the gas networks
if(circ1.network2)
circ1.network2.update = 1
if(circ2.network2)
circ2.network2.update = 1
circ1.parent2.update = 1
circ2.parent2.update = 1
// update icon overlays and power usage only if displayed level has changed
if(lastgen > powercap && prob(10))
+2 -5
View File
@@ -74,11 +74,8 @@
//world << "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]"
if(input1.network)
input1.network.update = 1
if(input2.network)
input2.network.update = 1
input1.parent.update = 1
input2.parent.update = 1
add_avail(lastgen)
// update icon overlays only if displayed level has changed
+2 -2
View File
@@ -243,7 +243,7 @@ datum/reagent/facid/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(volume >=5 && volume <=10)
if(!H.unacidable)
M.take_organ_damage(max(volume-5,2)*4,0)
M.take_organ_damage(0,max(volume-5,2)*4)
M.emote("scream")
@@ -270,7 +270,7 @@ datum/reagent/facid/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(!H.unacidable)
var/obj/item/organ/external/affecting = H.get_organ("head")
affecting.take_damage(75, 0)
affecting.take_damage(0, 75)
H.UpdateDamageIcon()
H.emote("scream")
H.status_flags |= DISFIGURED
@@ -24,28 +24,25 @@
if(self.holder) //for catching rare runtimes
if(method == TOUCH && self.penetrates_skin)
var/block = 0
for(var/obj/item/clothing/C in M.get_equipped_items())
if(istype(C, /obj/item/clothing/suit/bio_suit))
block += 1
if(istype(C, /obj/item/clothing/head/bio_hood))
block += 1
if(block < 2)
if(M.reagents)
M.reagents.add_reagent(self.id,self.volume)
if(isliving(M))
var/mob/living/L = M
var/block = L.get_permeability_protection()
var/amount = round(self.volume * (1.0 - block), 0.1)
if(L.reagents)
if(amount >= 1)
L.reagents.add_reagent(self.id,amount)
/*
if(method == INGEST && istype(M, /mob/living/carbon))
if(prob(1 * self.addictiveness))
if(prob(5 * volume))
var/datum/disease/addiction/A = new /datum/disease/addiction
A.addicted_to = self
A.name = "[self.name] Addiction"
A.addiction ="[self.name]"
A.cure = self.id
M.viruses += A
A.affected_mob = M
A.holder = M
if(prob(self.addictiveness))
var/datum/disease/addiction/A = new /datum/disease/addiction
A.addicted_to = self
A.name = "[self.name] Addiction"
A.addiction ="[self.name]"
A.cure = self.id
M.viruses += A
A.affected_mob = M
A.holder = M
*/
return 1
@@ -187,7 +187,8 @@
/datum/reagent/radium/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.apply_effect(4*REM,IRRADIATE,0)
if(M.radiation < 80)
M.apply_effect(4,IRRADIATE,0)
// radium may increase your chances to cure a disease
if(istype(M,/mob/living/carbon)) // make sure to only use it on carbon mobs
var/mob/living/carbon/C = M
@@ -313,13 +314,13 @@
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.take_damage(20, 0)
affecting.take_damage(5, 10)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(15,0)
M.take_organ_damage(5,10)
else
M.take_organ_damage(15,0)
M.take_organ_damage(5,10)
if(method == INGEST)
if(ishuman(M))
@@ -330,7 +331,7 @@
if(volume >=10 && volume <=25)
if(!H.unacidable)
M.take_organ_damage(min(max(volume-10,2)*2,20),0)
M.take_organ_damage(0,min(max(volume-10,2)*2,20))
M.emote("scream")
@@ -339,11 +340,11 @@
if(prob(75))
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting)
affecting.take_damage(20, 0)
affecting.take_damage(0, 20)
H.UpdateDamageIcon()
H.emote("scream")
else
M.take_organ_damage(15,0)
M.take_organ_damage(0,20)
/datum/reagent/sacid/reaction_obj(var/obj/O, var/volume)
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40))
@@ -62,7 +62,7 @@
/obj/item/weapon/reagent_containers/spray/proc/spray(var/atom/A)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_currentrange)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
spawn(0)
for(var/i=0, i<spray_currentrange, i++)