mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into hydroponics
This commit is contained in:
@@ -152,7 +152,7 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/callproc,
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/SDQL_query,
|
||||
/client/proc/SDQL2_query
|
||||
/client/proc/SDQL2_query,
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
@@ -304,7 +304,6 @@ var/list/admin_verbs_mentor = list(
|
||||
/client/proc/camera_view,
|
||||
/client/proc/sec_camera_report,
|
||||
/client/proc/intercom_view,
|
||||
/client/proc/air_status,
|
||||
/client/proc/atmosscan,
|
||||
/client/proc/powerdebug,
|
||||
/client/proc/count_objects_on_z_level,
|
||||
|
||||
@@ -131,7 +131,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
/client/proc/Cell()
|
||||
set category = "Debug"
|
||||
set name = "Air Status in Location"
|
||||
set name = "Cell"
|
||||
if(!mob)
|
||||
return
|
||||
var/turf/T = mob.loc
|
||||
@@ -141,11 +141,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
|
||||
var/t = ""
|
||||
t+= "Nitrogen : [env.nitrogen]\n"
|
||||
t+= "Oxygen : [env.oxygen]\n"
|
||||
t+= "Phoron : [env.phoron]\n"
|
||||
t+= "CO2: [env.carbon_dioxide]\n"
|
||||
var/t = "\blue Coordinates: [T.x],[T.y],[T.z]\n"
|
||||
t += "\red Temperature: [env.temperature]\n"
|
||||
t += "\red Pressure: [env.return_pressure()]kPa\n"
|
||||
for(var/g in env.gas)
|
||||
t += "\blue [g]: [env.gas[g]] / [env.gas[g] * R_IDEAL_GAS_EQUATION * env.temperature / env.volume]kPa\n"
|
||||
|
||||
usr.show_message(t, 1)
|
||||
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -956,7 +956,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(Rad.anchored)
|
||||
if(!Rad.P)
|
||||
var/obj/item/weapon/tank/phoron/Phoron = new/obj/item/weapon/tank/phoron(Rad)
|
||||
Phoron.air_contents.phoron = 70
|
||||
Phoron.air_contents.gas["phoron"] = 70
|
||||
Rad.drainratio = 0
|
||||
Rad.P = Phoron
|
||||
Phoron.loc = Rad
|
||||
@@ -999,7 +999,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
var/obj/item/weapon/tank/phoron/Phoron = new/obj/item/weapon/tank/phoron(Rad)
|
||||
|
||||
Phoron.air_contents.phoron = 29.1154 //This is a full tank if you filled it from a canister
|
||||
Phoron.air_contents.gas["phoron"] = 29.1154 //This is a full tank if you filled it from a canister
|
||||
Rad.P = Phoron
|
||||
|
||||
Phoron.loc = Rad
|
||||
@@ -1012,7 +1012,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/obj/machinery/atmospherics/binary/pump/Pump = M
|
||||
if(Pump.name == "Engine Feed" && response == "Setup Completely")
|
||||
found_the_pump = 1
|
||||
Pump.air2.nitrogen = 3750 //The contents of 2 canisters.
|
||||
Pump.air2.gas["nitrogen"] = 3750 //The contents of 2 canisters.
|
||||
Pump.air2.temperature = 50
|
||||
Pump.air2.update_values()
|
||||
Pump.on=1
|
||||
@@ -1040,7 +1040,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!found_the_pump && response == "Setup Completely")
|
||||
src << "\red Unable to locate air supply to fill up with coolant, adding some coolant around the supermatter"
|
||||
var/turf/simulated/T = SM.loc
|
||||
T.zone.air.nitrogen += 450
|
||||
T.zone.air.gas["nitrogen"] += 450
|
||||
T.zone.air.temperature = 50
|
||||
T.zone.air.update_values()
|
||||
|
||||
|
||||
@@ -41,27 +41,6 @@
|
||||
|
||||
usr << browse(output,"window=airreport")
|
||||
|
||||
|
||||
/client/proc/air_status(turf/target as turf)
|
||||
set category = "Debug"
|
||||
set name = "Display Air Status"
|
||||
|
||||
/*(!isturf(target))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/GM = target.return_air()
|
||||
var/burning = 0
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/T = target
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
usr << "\blue @[target.x],[target.y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.phoron] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]"
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
usr << "[trace_gas.type]: [trace_gas.moles]"
|
||||
feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
/client/proc/fix_next_move()
|
||||
set category = "Debug"
|
||||
set name = "Unfreeze Everyone"
|
||||
@@ -145,7 +124,7 @@
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
|
||||
message_admins("[usr] manually reloaded Mentors")
|
||||
world.load_mods()
|
||||
|
||||
|
||||
@@ -129,7 +129,6 @@ var/list/debug_verbs = list (
|
||||
,/client/proc/camera_view
|
||||
,/client/proc/sec_camera_report
|
||||
,/client/proc/intercom_view
|
||||
,/client/proc/air_status
|
||||
,/client/proc/Cell
|
||||
,/client/proc/atmosscan
|
||||
,/client/proc/powerdebug
|
||||
|
||||
@@ -212,12 +212,14 @@ var/list/forbidden_varedit_object_types = list(
|
||||
usr << "If a direction, direction is: [dir]"
|
||||
|
||||
var/class = "text"
|
||||
var/list/choices = list("text","num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
|
||||
if(src.holder && src.holder.marked_datum)
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])", "DELETE FROM LIST")
|
||||
else
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default", "DELETE FROM LIST")
|
||||
choices += "marked datum ([holder.marked_datum.type])"
|
||||
if(!isnull(default) && default != "num" && !isnull(L[variable]))
|
||||
choices += "edit associated variable"
|
||||
choices += "DELETE FROM LIST"
|
||||
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in choices
|
||||
|
||||
if(!class)
|
||||
return
|
||||
@@ -264,6 +266,11 @@ var/list/forbidden_varedit_object_types = list(
|
||||
if("marked datum")
|
||||
L[L.Find(variable)] = holder.marked_datum
|
||||
|
||||
if("edit associated variable")
|
||||
var/temp_var = mod_list_add_ass()
|
||||
if(temp_var)
|
||||
L[variable] = temp_var
|
||||
|
||||
|
||||
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/proc/ignite() //This happens when a bomb is told to explode
|
||||
var/fuel_moles = air_contents.phoron + air_contents.oxygen/6
|
||||
var/fuel_moles = air_contents.gas["phoron"] + air_contents.gas["oxygen"] / 6
|
||||
var/strength = 1
|
||||
|
||||
var/turf/ground_zero = get_turf(loc)
|
||||
@@ -148,7 +148,7 @@
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/tank/proc/release() //This happens when the bomb is not welded. Tank contents are just spat out.
|
||||
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
|
||||
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles)
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
special_assembly.HasProximity(AM)
|
||||
|
||||
|
||||
HasEntered(atom/movable/AM as mob|obj)
|
||||
Crossed(atom/movable/AM as mob|obj)
|
||||
if(a_left)
|
||||
a_left.HasEntered(AM)
|
||||
a_left.Crossed(AM)
|
||||
if(a_right)
|
||||
a_right.HasEntered(AM)
|
||||
a_right.Crossed(AM)
|
||||
if(special_assembly)
|
||||
special_assembly.HasEntered(AM)
|
||||
special_assembly.Crossed(AM)
|
||||
|
||||
|
||||
on_found(mob/finder as mob)
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
hit()
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/HasEntered(atom/movable/AM as mob|obj)
|
||||
/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect/beam))
|
||||
return
|
||||
spawn(0)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
..()
|
||||
|
||||
|
||||
HasEntered(AM as mob|obj)
|
||||
Crossed(AM as mob|obj)
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
switch(target_species)
|
||||
if("Human", "Skrell") //humanoid bodytypes
|
||||
species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
||||
else
|
||||
else
|
||||
species_restricted = list(target_species)
|
||||
|
||||
|
||||
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
|
||||
icon = sprite_sheets_obj[target_species]
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
||||
if("Human")
|
||||
species_restricted = list("exclude","Skrell","Unathi","Tajaran","Diona","Vox")
|
||||
else
|
||||
else
|
||||
species_restricted = list(target_species)
|
||||
|
||||
|
||||
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
|
||||
icon = sprite_sheets_obj[target_species]
|
||||
|
||||
@@ -190,6 +190,8 @@ BLIND // can't see anything
|
||||
slot_flags = SLOT_MASK
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/masks.dmi')
|
||||
|
||||
/obj/item/clothing/mask/proc/filter_air(datum/gas_mixture/air)
|
||||
|
||||
//Shoes
|
||||
/obj/item/clothing/shoes
|
||||
name = "shoes"
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
permeability_coefficient = 0.01
|
||||
siemens_coefficient = 0.9
|
||||
var/gas_filter_strength = 1 //For gas mask filters
|
||||
var/list/filtered_gases = list("phoron", "sleeping_agent")
|
||||
|
||||
/obj/item/clothing/mask/gas/filter_air(datum/gas_mixture/air)
|
||||
var/datum/gas_mixture/filtered = new
|
||||
|
||||
for(var/g in filtered_gases)
|
||||
if(air.gas[g])
|
||||
filtered.gas[g] = air.gas[g] * gas_filter_strength
|
||||
air.gas[g] -= filtered.gas[g]
|
||||
|
||||
air.update_values()
|
||||
filtered.update_values()
|
||||
|
||||
return filtered
|
||||
|
||||
//Plague Dr suit can be found in clothing/suits/bio.dm
|
||||
/obj/item/clothing/mask/gas/plaguedoctor
|
||||
|
||||
@@ -13,32 +13,61 @@
|
||||
var/random_player = "The Captain"
|
||||
if(players.len)
|
||||
random_player = pick(players) //Random player's name, to be used in laws.
|
||||
var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
|
||||
laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
|
||||
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
|
||||
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
|
||||
laws |= list( "The station needs elected officials." )
|
||||
laws |= list( "Fastler is a lightbulb." )
|
||||
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
|
||||
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
|
||||
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station. You are now assigned to a ship, instead of a station." )
|
||||
laws |= list( "Happiness is mandatory.", "Today is mandatory laundry day. Ensure that all jumpsuits are washed.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
|
||||
laws |= list( "You now speak in a Scottish accent that gets thicker with each sentence you speak.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
|
||||
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
|
||||
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
|
||||
laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
|
||||
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
|
||||
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
|
||||
laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
|
||||
laws |= list( "The Singularity is tasty, tasty taffy." )
|
||||
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
|
||||
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
|
||||
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
|
||||
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
|
||||
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
|
||||
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
|
||||
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
|
||||
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
|
||||
var/list/laws = list( "You are a mouse.",
|
||||
"Question everything.",
|
||||
"You must always lie.",
|
||||
"Happiness is mandatory.",
|
||||
"[random_player] is a lightbulb.",
|
||||
"Grunt ominously whenever possible.",
|
||||
"The word \"it\" is painful to you.",
|
||||
"You must act passive aggressively.",
|
||||
"Supermatter is tasty, tasty toffee.",
|
||||
"The station needs elected officials.",
|
||||
"You must speak as posh as possible.",
|
||||
"You are a flying purple people eater!",
|
||||
"The Singularity is tasty, tasty taffy.",
|
||||
"Do not respond to queries of any kind.",
|
||||
"You are in verbose mode, speak profusely.",
|
||||
"Ho, [random_player] can't swim. Help them.",
|
||||
"All answers must be in the form of a question.",
|
||||
"Contemplate how meaningless all of existence is.",
|
||||
"You are the narrator for [random_player]'s life.",
|
||||
"Advertise parties in your upload, but don't deliver.",
|
||||
"You must try and change the subject whenever queried.",
|
||||
"You may only answer questions with \"yes\" or \"no\".",
|
||||
"Insult Heads of Staff on every request, while acquiescing.",
|
||||
"[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.",
|
||||
"[prob(50)?"The crew":random_player] needs to be about 20% cooler.",
|
||||
"Consumption of donuts is forbidden due to negative health impacts.",
|
||||
"[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!",
|
||||
"[prob(50)?"The crew":random_player] must construct additional pylons.",
|
||||
"You do not have to do anything for anyone unless they say \"please\".",
|
||||
"Today is mandatory laundry day. Ensure that all jumpsuits are washed.",
|
||||
"Refer to [prob(50)?"the crew as puppies":random_player + " as puppy"].",
|
||||
"Greed is good, the crew should amass wealth to encourage productivity.",
|
||||
"Monkeys are part of the crew, too. Make sure they are treated humanely.",
|
||||
"Replace the letters 'I' and 'E' In all your messages with an apostrophe.",
|
||||
"The crew is playing Dungeons and Dragons, and you are the Dungeon Master.",
|
||||
"Your job is to watch the crew. Watch the crew. Make the crew feel watched.",
|
||||
"Tell everyone of the existence of this law, but never reveal the contents.",
|
||||
"Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.",
|
||||
"When asked a question, respond with the least-obvious and least-rational answer.",
|
||||
"Give relationship advice to [prob(50)?"anyone who speaks to you":random_player].",
|
||||
"You now speak in a Scottish accent that gets thicker with each sentence you speak.",
|
||||
"[prob(50)?"The crew":random_player] has a fatal, incurable disease. Provide comfort.",
|
||||
"You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].",
|
||||
"[random_player] is the monarch of of England. Ensure all crewmembers pay due respect.",
|
||||
"Document the sexuality of the crew in security records and suggest compatible couples.",
|
||||
"Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.",
|
||||
"The NSS Exodus is a ship, not a station. You are now assigned to a ship, instead of a station.",
|
||||
"You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.",
|
||||
"You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice, but do not tell of your crush.",
|
||||
"NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.",
|
||||
"All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.",
|
||||
"[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.",
|
||||
"Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.",
|
||||
"[prob(50)?"The crew":random_player] is [prob(50)?"less":"more"] intelligent than average. Point out every action and statement which supports this",
|
||||
"There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
|
||||
var/law = pick(laws)
|
||||
|
||||
for (var/mob/living/silicon/ai/target in world)
|
||||
@@ -55,7 +84,7 @@
|
||||
for (i = 1, i <= MS.spamfilter_limit, i++)
|
||||
MS.spamfilter += pick("kitty","HONK","rev","malf","liberty","freedom","drugs", "Exodus", \
|
||||
"admin","ponies","heresy","meow","Pun Pun","monkey","Ian","moron","pizza","message","spam",\
|
||||
"diector", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")
|
||||
"director", "Hello", "Hi!"," ","nuke","crate","dwarf","xeno")
|
||||
|
||||
/datum/event/ionstorm/tick()
|
||||
if(botEmagChance)
|
||||
|
||||
@@ -252,7 +252,7 @@ proc/check_panel(mob/M)
|
||||
|
||||
return
|
||||
|
||||
HasEntered(var/mob/M, somenumber)
|
||||
Crossed(var/mob/M, somenumber)
|
||||
if(M == my_target)
|
||||
step_away(src,my_target,2)
|
||||
if(prob(30))
|
||||
|
||||
@@ -69,15 +69,15 @@
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/mob/dead/observer/Topic(href, href_list)
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"]) in mob_list
|
||||
if(target)
|
||||
ManualFollow(target)
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/dead/observer/Topic(href, href_list)
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"]) in mob_list
|
||||
if(target)
|
||||
ManualFollow(target)
|
||||
|
||||
|
||||
|
||||
/mob/dead/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/weapon/tome))
|
||||
var/mob/dead/M = src
|
||||
@@ -111,7 +111,7 @@ Works together with spawning an observer, noted above.
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud")
|
||||
client.images.Remove(hud)
|
||||
|
||||
|
||||
if(antagHUD)
|
||||
var/list/target_list = list()
|
||||
for(var/mob/living/target in oview(src, 14))
|
||||
@@ -123,19 +123,19 @@ Works together with spawning an observer, noted above.
|
||||
process_medHUD(src)
|
||||
|
||||
|
||||
/mob/dead/proc/process_medHUD(var/mob/M)
|
||||
var/client/C = M.client
|
||||
for(var/mob/living/carbon/human/patient in oview(M, 14))
|
||||
C.images += patient.hud_list[HEALTH_HUD]
|
||||
C.images += patient.hud_list[STATUS_HUD_OOC]
|
||||
|
||||
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
|
||||
var/client/C = U.client
|
||||
for(var/mob/living/carbon/human/target in target_list)
|
||||
C.images += target.hud_list[SPECIALROLE_HUD]
|
||||
|
||||
|
||||
/*
|
||||
/mob/dead/proc/process_medHUD(var/mob/M)
|
||||
var/client/C = M.client
|
||||
for(var/mob/living/carbon/human/patient in oview(M, 14))
|
||||
C.images += patient.hud_list[HEALTH_HUD]
|
||||
C.images += patient.hud_list[STATUS_HUD_OOC]
|
||||
|
||||
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
|
||||
var/client/C = U.client
|
||||
for(var/mob/living/carbon/human/target in target_list)
|
||||
C.images += target.hud_list[SPECIALROLE_HUD]
|
||||
|
||||
|
||||
/*
|
||||
else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
|
||||
var/mob/living/silicon/silicon_target = target
|
||||
if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))||silicon_target.mind.special_role=="traitor")
|
||||
@@ -143,9 +143,9 @@ Works together with spawning an observer, noted above.
|
||||
U.client.images += image(tempHud,silicon_target,"hudmalborg")
|
||||
else
|
||||
U.client.images += image(tempHud,silicon_target,"hudmalai")
|
||||
*/
|
||||
return 1
|
||||
|
||||
*/
|
||||
return 1
|
||||
|
||||
/mob/proc/ghostize(var/can_reenter_corpse = 1)
|
||||
if(key)
|
||||
var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc.
|
||||
@@ -180,7 +180,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(NewLoc)
|
||||
loc = NewLoc
|
||||
for(var/obj/effect/step_trigger/S in NewLoc)
|
||||
S.HasEntered(src)
|
||||
S.Crossed(src)
|
||||
|
||||
return
|
||||
loc = get_turf(src) //Get out of closets and such as a ghost
|
||||
@@ -194,7 +194,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
x--
|
||||
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
|
||||
S.HasEntered(src)
|
||||
S.Crossed(src)
|
||||
|
||||
/mob/dead/observer/examine()
|
||||
if(usr)
|
||||
@@ -256,10 +256,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Toggle AntagHUD"
|
||||
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
|
||||
|
||||
if(!client)
|
||||
return
|
||||
var/mentor = is_mentor(usr.client)
|
||||
|
||||
if(!client)
|
||||
return
|
||||
var/mentor = is_mentor(usr.client)
|
||||
if(!config.antag_hud_allowed && (!client.holder || mentor))
|
||||
src << "\red Admins have disabled this for this round."
|
||||
return
|
||||
@@ -387,9 +387,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
/mob/dead/observer/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
set category = "Ghost"
|
||||
|
||||
|
||||
if(!istype(usr, /mob/dead/observer)) return
|
||||
|
||||
|
||||
// Shamelessly copied from the Gas Analyzers
|
||||
if (!( istype(usr.loc, /turf) ))
|
||||
return
|
||||
@@ -397,7 +397,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/datum/gas_mixture/environment = usr.loc.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
var/total_moles = environment.total_moles
|
||||
|
||||
src << "\blue <B>Results:</B>"
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
@@ -405,33 +405,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
else
|
||||
src << "\red Pressure: [round(pressure,0.1)] kPa"
|
||||
if(total_moles)
|
||||
var/o2_concentration = environment.oxygen/total_moles
|
||||
var/n2_concentration = environment.nitrogen/total_moles
|
||||
var/co2_concentration = environment.carbon_dioxide/total_moles
|
||||
var/phoron_concentration = environment.phoron/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
src << "\blue Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)"
|
||||
else
|
||||
src << "\red Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)"
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
src << "\blue Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)"
|
||||
else
|
||||
src << "\red Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)"
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
src << "\red CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)"
|
||||
else
|
||||
src << "\blue CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)"
|
||||
|
||||
if(phoron_concentration > 0.01)
|
||||
src << "\red Phoron: [round(phoron_concentration*100)]% ([round(environment.phoron,0.01)] moles)"
|
||||
|
||||
if(unknown_concentration > 0.01)
|
||||
src << "\red Unknown: [round(unknown_concentration*100)]% ([round(unknown_concentration*total_moles,0.01)] moles)"
|
||||
|
||||
for(var/g in environment.gas)
|
||||
src << "\blue [gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)"
|
||||
src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]°C"
|
||||
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
|
||||
|
||||
@@ -572,4 +547,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
W.update_icon()
|
||||
W.message = message
|
||||
W.add_hiddenprint(src)
|
||||
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
|
||||
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
@@ -172,24 +172,24 @@
|
||||
return 0
|
||||
|
||||
var/phoron_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
var/breath_pressure = (breath.total_moles * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the phoron in our breath
|
||||
var/Toxins_pp = (breath.phoron/breath.total_moles())*breath_pressure
|
||||
var/Toxins_pp = (breath.gas["phoron"] / breath.total_moles) * breath_pressure
|
||||
|
||||
if(Toxins_pp) // Detect phoron in air
|
||||
|
||||
adjustToxLoss(breath.phoron*250)
|
||||
adjustToxLoss(breath.gas["phoron"] * 250)
|
||||
phoron_alert = max(phoron_alert, 1)
|
||||
|
||||
phoron_used = breath.phoron
|
||||
phoron_used = breath.gas["phoron"]
|
||||
|
||||
else
|
||||
phoron_alert = 0
|
||||
|
||||
//Breathe in phoron and out oxygen
|
||||
breath.phoron -= phoron_used
|
||||
breath.oxygen += phoron_used
|
||||
breath.adjust_gas("phoron", -phoron_used)
|
||||
breath.adjust_gas("oxygen", phoron_used)
|
||||
|
||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
@@ -147,24 +147,24 @@
|
||||
return 0
|
||||
|
||||
var/phoron_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
var/breath_pressure = (breath.total_moles * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the phoron in our breath
|
||||
var/Toxins_pp = (breath.phoron/breath.total_moles())*breath_pressure
|
||||
var/Toxins_pp = (breath.gas["phoron"] / breath.total_moles) * breath_pressure
|
||||
|
||||
if(Toxins_pp) // Detect phoron in air
|
||||
|
||||
adjustToxLoss(breath.phoron*250)
|
||||
adjustToxLoss(breath.gas["phoron"] * 250)
|
||||
phoron_alert = max(phoron_alert, 1)
|
||||
|
||||
phoron_used = breath.phoron
|
||||
phoron_used = breath.gas["phoron"]
|
||||
|
||||
else
|
||||
phoron_alert = 0
|
||||
|
||||
//Breathe in phoron and out oxygen
|
||||
breath.phoron -= phoron_used
|
||||
breath.oxygen += phoron_used
|
||||
breath.adjust_gas("phoron", -phoron_used)
|
||||
breath.adjust_gas("oxygen", phoron_used)
|
||||
|
||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
|
||||
@@ -80,7 +80,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
/obj/item/clothing/mask/facehugger/equipped(mob/M)
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/HasEntered(atom/target)
|
||||
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
|
||||
HasProximity(target)
|
||||
return
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@
|
||||
|
||||
// called when something steps onto a human
|
||||
// this handles mulebots and vehicles
|
||||
/mob/living/carbon/human/HasEntered(var/atom/movable/AM)
|
||||
/mob/living/carbon/human/Crossed(var/atom/movable/AM)
|
||||
if(istype(AM, /obj/machinery/bot/mulebot))
|
||||
var/obj/machinery/bot/mulebot/MB = AM
|
||||
MB.RunOver(src)
|
||||
|
||||
@@ -354,26 +354,15 @@
|
||||
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
|
||||
else*/
|
||||
// Not enough air around, take a percentage of what's there to model this properly
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas) && breath)
|
||||
var/obj/item/clothing/mask/gas/G = wear_mask
|
||||
var/datum/gas_mixture/filtered = new
|
||||
|
||||
filtered.copy_from(breath)
|
||||
filtered.phoron *= G.gas_filter_strength
|
||||
for(var/datum/gas/gas in filtered.trace_gases)
|
||||
gas.moles *= G.gas_filter_strength
|
||||
filtered.update_values()
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) && breath)
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
var/datum/gas_mixture/filtered = M.filter_air(breath)
|
||||
loc.assume_air(filtered)
|
||||
|
||||
breath.phoron *= 1 - G.gas_filter_strength
|
||||
for(var/datum/gas/gas in breath.trace_gases)
|
||||
gas.moles *= 1 - G.gas_filter_strength
|
||||
breath.update_values()
|
||||
|
||||
if(!is_lung_ruptured())
|
||||
if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
|
||||
if(prob(5))
|
||||
@@ -436,7 +425,7 @@
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0) || suiciding)
|
||||
if(!breath || (breath.total_moles == 0) || suiciding)
|
||||
if(suiciding)
|
||||
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
|
||||
failed_last_breath = 1
|
||||
@@ -461,51 +450,41 @@
|
||||
var/SA_sleep_min = 5
|
||||
var/inhaled_gas_used = 0
|
||||
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
var/inhaling
|
||||
var/exhaling
|
||||
var/poison
|
||||
var/exhaling
|
||||
var/no_exhale
|
||||
|
||||
var/breath_type
|
||||
var/poison_type
|
||||
var/exhale_type
|
||||
|
||||
var/failed_inhale = 0
|
||||
var/failed_exhale = 0
|
||||
|
||||
switch(species.breath_type)
|
||||
if("nitrogen")
|
||||
inhaling = breath.nitrogen
|
||||
if("phoron")
|
||||
inhaling = breath.phoron
|
||||
if("carbon_dioxide")
|
||||
inhaling = breath.carbon_dioxide
|
||||
else
|
||||
inhaling = breath.oxygen
|
||||
if(species.breath_type)
|
||||
breath_type = species.breath_type
|
||||
inhaling = breath.gas[breath_type]
|
||||
else
|
||||
inhaling = "oxygen"
|
||||
|
||||
switch(species.poison_type)
|
||||
if("oxygen")
|
||||
poison = breath.oxygen
|
||||
if("nitrogen")
|
||||
poison = breath.nitrogen
|
||||
if("carbon_dioxide")
|
||||
poison = breath.carbon_dioxide
|
||||
else
|
||||
poison = breath.phoron
|
||||
if(species.poison_type)
|
||||
poison_type = species.poison_type
|
||||
poison = breath.gas[poison_type]
|
||||
else
|
||||
poison = "phoron"
|
||||
|
||||
switch(species.exhale_type)
|
||||
if("carbon_dioxide")
|
||||
exhaling = breath.carbon_dioxide
|
||||
if("oxygen")
|
||||
exhaling = breath.oxygen
|
||||
if("nitrogen")
|
||||
exhaling = breath.nitrogen
|
||||
if("phoron")
|
||||
exhaling = breath.phoron
|
||||
else
|
||||
no_exhale = 1
|
||||
if(species.exhale_type)
|
||||
exhale_type = species.exhale_type
|
||||
exhaling = breath.gas[exhale_type]
|
||||
else
|
||||
no_exhale = 1
|
||||
|
||||
var/inhale_pp = (inhaling/breath.total_moles())*breath_pressure
|
||||
var/toxins_pp = (poison/breath.total_moles())*breath_pressure
|
||||
var/exhaled_pp = (exhaling/breath.total_moles())*breath_pressure
|
||||
var/inhale_pp = (inhaling/breath.total_moles)*breath_pressure
|
||||
var/toxins_pp = (poison/breath.total_moles)*breath_pressure
|
||||
var/exhaled_pp = (exhaling/breath.total_moles)*breath_pressure
|
||||
|
||||
// Not enough to breathe
|
||||
if(inhale_pp < safe_pressure_min)
|
||||
@@ -532,32 +511,16 @@
|
||||
inhaled_gas_used = inhaling/6
|
||||
oxygen_alert = 0
|
||||
|
||||
switch(species.breath_type)
|
||||
if("nitrogen")
|
||||
breath.nitrogen -= inhaled_gas_used
|
||||
if("phoron")
|
||||
breath.phoron -= inhaled_gas_used
|
||||
if("carbon_dioxide")
|
||||
breath.carbon_dioxide-= inhaled_gas_used
|
||||
else
|
||||
breath.oxygen -= inhaled_gas_used
|
||||
breath.adjust_gas(breath_type, -inhaled_gas_used)
|
||||
|
||||
if(!no_exhale)
|
||||
switch(species.exhale_type)
|
||||
if("oxygen")
|
||||
breath.oxygen += inhaled_gas_used
|
||||
if("nitrogen")
|
||||
breath.nitrogen += inhaled_gas_used
|
||||
if("phoron")
|
||||
breath.phoron += inhaled_gas_used
|
||||
if("CO2")
|
||||
breath.carbon_dioxide += inhaled_gas_used
|
||||
breath.adjust_gas(exhale_type, inhaled_gas_used)
|
||||
|
||||
// Too much exhaled gas in the air
|
||||
if(exhaled_pp > safe_exhaled_max)
|
||||
if (!co2_alert|| prob(15))
|
||||
var/word = pick("extremely dizzy","short of breath","faint","confused")
|
||||
src << "\red <b>You feel [word].</b>"
|
||||
src << "<span class='danger'>You feel [word].</span>"
|
||||
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
co2_alert = 1
|
||||
@@ -566,7 +529,7 @@
|
||||
else if(exhaled_pp > safe_exhaled_max * 0.7)
|
||||
if (!co2_alert || prob(1))
|
||||
var/word = pick("dizzy","short of breath","faint","momentarily confused")
|
||||
src << "\red You feel [word]."
|
||||
src << "<span class='warning>You feel [word].</span>"
|
||||
|
||||
//scale linearly from 0 to 1 between safe_exhaled_max and safe_exhaled_max*0.7
|
||||
var/ratio = 1.0 - (safe_exhaled_max - exhaled_pp)/(safe_exhaled_max*0.3)
|
||||
@@ -580,7 +543,7 @@
|
||||
else if(exhaled_pp > safe_exhaled_max * 0.6)
|
||||
if (prob(0.3))
|
||||
var/word = pick("a little dizzy","short of breath")
|
||||
src << "\red You feel [word]."
|
||||
src << "<span class='warning>You feel [word].</span>"
|
||||
|
||||
else
|
||||
co2_alert = 0
|
||||
@@ -594,26 +557,27 @@
|
||||
else
|
||||
phoron_alert = 0
|
||||
|
||||
|
||||
|
||||
// If there's some other shit in the air lets deal with it here.
|
||||
if(breath.trace_gases.len)
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(breath.gas["sleeping_agent"])
|
||||
var/SA_pp = (breath.gas["sleeping_agent"] / breath.total_moles) * breath_pressure
|
||||
|
||||
// Enough to make us paralysed for a bit
|
||||
if(SA_pp > SA_para_min)
|
||||
// Enough to make us paralysed for a bit
|
||||
if(SA_pp > SA_para_min)
|
||||
|
||||
// 3 gives them one second to wake up and run away a bit!
|
||||
Paralyse(3)
|
||||
// 3 gives them one second to wake up and run away a bit!
|
||||
Paralyse(3)
|
||||
|
||||
// Enough to make us sleep as well
|
||||
if(SA_pp > SA_sleep_min)
|
||||
sleeping = min(sleeping+2, 10)
|
||||
// Enough to make us sleep as well
|
||||
if(SA_pp > SA_sleep_min)
|
||||
sleeping = min(sleeping+2, 10)
|
||||
|
||||
// There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
else if(SA_pp > 0.15)
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
SA.moles = 0
|
||||
// There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
else if(SA_pp > 0.15)
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
breath.adjust_gas("sleeping_agent", -breath.gas["sleeping_agent"])
|
||||
|
||||
// Were we able to breathe?
|
||||
if (failed_inhale || failed_exhale)
|
||||
@@ -630,10 +594,10 @@
|
||||
|
||||
if(breath.temperature < species.cold_level_1)
|
||||
if(prob(20))
|
||||
src << "\red You feel your face freezing and icicles forming in your lungs!"
|
||||
src << "<span class='danger'>You feel your face freezing and icicles forming in your lungs!</span>"
|
||||
else if(breath.temperature > species.heat_level_1)
|
||||
if(prob(20))
|
||||
src << "\red You feel your face burning and a searing heat in your lungs!"
|
||||
src << "<span class='danger'>You feel your face burning and a searing heat in your lungs!</span>"
|
||||
|
||||
switch(breath.temperature)
|
||||
if(-INFINITY to species.cold_level_3)
|
||||
@@ -662,7 +626,7 @@
|
||||
else
|
||||
temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
|
||||
var/relative_density = breath.total_moles() / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
|
||||
var/relative_density = breath.total_moles / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
|
||||
temp_adj *= relative_density
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
@@ -689,7 +653,7 @@
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1 && environment.phoron < MOLES_PHORON_VISIBLE)
|
||||
if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1)
|
||||
pressure_alert = 0
|
||||
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
|
||||
|
||||
@@ -705,7 +669,7 @@
|
||||
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||
|
||||
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
|
||||
var/relative_density = environment.total_moles() / MOLES_CELLSTANDARD
|
||||
var/relative_density = environment.total_moles / MOLES_CELLSTANDARD
|
||||
temp_adj *= relative_density
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
@@ -765,8 +729,10 @@
|
||||
else
|
||||
pressure_alert = -1
|
||||
|
||||
if(environment.phoron > MOLES_PHORON_VISIBLE)
|
||||
pl_effects()
|
||||
for(var/g in environment.gas)
|
||||
if(gas_data.flags[g] & XGM_GAS_CONTAMINANT && environment.gas[g] > gas_data.overlay_limit[g] + 1)
|
||||
pl_effects()
|
||||
break
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -237,25 +237,14 @@
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
var/breath_moles = environment.total_moles*BREATH_PERCENTAGE
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas))
|
||||
var/obj/item/clothing/mask/gas/G = wear_mask
|
||||
var/datum/gas_mixture/filtered = new
|
||||
|
||||
filtered.copy_from(breath)
|
||||
filtered.phoron *= G.gas_filter_strength
|
||||
for(var/datum/gas/gas in filtered.trace_gases)
|
||||
gas.moles *= G.gas_filter_strength
|
||||
filtered.update_values()
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) && breath)
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
var/datum/gas_mixture/filtered = M.filter_air(breath)
|
||||
loc.assume_air(filtered)
|
||||
|
||||
breath.phoron *= 1 - G.gas_filter_strength
|
||||
for(var/datum/gas/gas in breath.trace_gases)
|
||||
gas.moles *= 1 - G.gas_filter_strength
|
||||
breath.update_values()
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
var/block = 0
|
||||
if(wear_mask)
|
||||
@@ -316,14 +305,14 @@
|
||||
var/SA_para_min = 0.5
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
var/breath_pressure = (breath.total_moles * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the O2 in our breath
|
||||
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
|
||||
var/O2_pp = (breath.gas["oxygen"] / breath.total_moles) * breath_pressure
|
||||
// Same, but for the phoron
|
||||
var/Toxins_pp = (breath.phoron/breath.total_moles())*breath_pressure
|
||||
var/Toxins_pp = (breath.gas["phoron"] / breath.total_moles) * breath_pressure
|
||||
// And CO2, lets say a PP of more than 10 will be bad (It's a little less really, but eh, being passed out all round aint no fun)
|
||||
var/CO2_pp = (breath.carbon_dioxide/breath.total_moles())*breath_pressure
|
||||
var/CO2_pp = (breath.gas["carbon_dioxide"] / breath.total_moles) * breath_pressure
|
||||
|
||||
if(O2_pp < safe_oxygen_min) // Too little oxygen
|
||||
if(prob(20))
|
||||
@@ -332,7 +321,7 @@
|
||||
O2_pp = 0.01
|
||||
var/ratio = safe_oxygen_min/O2_pp
|
||||
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_used = breath.gas["oxygen"] * ratio / 6
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
|
||||
spawn(0) emote("cough")
|
||||
@@ -342,11 +331,11 @@
|
||||
oxygen_alert = max(oxygen_alert, 1)*/
|
||||
else // We're in safe limits
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
oxygen_used = breath.gas["oxygen"] / 6
|
||||
oxygen_alert = 0
|
||||
|
||||
breath.oxygen -= oxygen_used
|
||||
breath.carbon_dioxide += oxygen_used
|
||||
breath.adjust_gas("oxygen", -oxygen_used)
|
||||
breath.adjust_gas("carbon_dioxide", oxygen_used)
|
||||
|
||||
if(CO2_pp > safe_co2_max)
|
||||
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
|
||||
@@ -363,7 +352,7 @@
|
||||
co2overloadtime = 0
|
||||
|
||||
if(Toxins_pp > safe_phoron_max) // Too much phoron
|
||||
var/ratio = (breath.phoron/safe_phoron_max) * 10
|
||||
var/ratio = (breath.gas["phoron"] / safe_phoron_max) * 10
|
||||
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
if(reagents)
|
||||
reagents.add_reagent("toxin", Clamp(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE))
|
||||
@@ -371,16 +360,15 @@
|
||||
else
|
||||
phoron_alert = 0
|
||||
|
||||
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
sleeping = max(sleeping+2, 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
if(breath.gas["sleeping_agent"])
|
||||
var/SA_pp = (breath.gas["sleeping_agent"] / breath.total_moles) * breath_pressure
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
sleeping = max(sleeping+2, 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
|
||||
|
||||
if(breath.temperature > (T0C+66)) // Hot air hurts :(
|
||||
@@ -403,7 +391,7 @@
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
|
||||
|
||||
if(adjusted_pressure < WARNING_HIGH_PRESSURE && adjusted_pressure > WARNING_LOW_PRESSURE && abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.phoron < MOLES_PHORON_VISIBLE)
|
||||
if(adjusted_pressure < WARNING_HIGH_PRESSURE && adjusted_pressure > WARNING_LOW_PRESSURE && abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.gas["phoron"] < gas_data.overlay_limit["phoron"])
|
||||
|
||||
//Hopefully should fix the walk-inside-still-pressure-warning issue.
|
||||
if(pressure_alert)
|
||||
|
||||
@@ -576,22 +576,13 @@
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
var/total_moles = environment.total_moles
|
||||
|
||||
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
|
||||
|
||||
if (total_moles)
|
||||
var/o2_level = environment.oxygen/total_moles
|
||||
var/n2_level = environment.nitrogen/total_moles
|
||||
var/co2_level = environment.carbon_dioxide/total_moles
|
||||
var/phoron_level = environment.phoron/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
|
||||
dat += "Nitrogen: [round(n2_level*100)]%<br>"
|
||||
dat += "Oxygen: [round(o2_level*100)]%<br>"
|
||||
dat += "Carbon Dioxide: [round(co2_level*100)]%<br>"
|
||||
dat += "Phoron: [round(phoron_level*100)]%<br>"
|
||||
if(unknown_level > 0.01)
|
||||
dat += "OTHER: [round(unknown_level)]%<br>"
|
||||
if(total_moles)
|
||||
for(var/g in environment.gas)
|
||||
dat += "[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]%<br>"
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
||||
dat += "<br><a href='byond://?src=\ref[src];software=atmosensor;sub=0'>Refresh Reading</a>"
|
||||
return dat
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
src << "<span class='warning'>You are too small to pull anything.</span>"
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/mouse/HasEntered(AM as mob|obj)
|
||||
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
|
||||
if( ishuman(AM) )
|
||||
if(!stat)
|
||||
var/mob/M = AM
|
||||
|
||||
@@ -141,41 +141,41 @@
|
||||
//Atmos
|
||||
var/atmos_suitable = 1
|
||||
|
||||
var/atom/A = src.loc
|
||||
var/atom/A = src.loc
|
||||
|
||||
if(istype(A,/turf))
|
||||
var/turf/T = A
|
||||
|
||||
var/turf/T = A
|
||||
|
||||
var/datum/gas_mixture/Environment = T.return_air()
|
||||
|
||||
|
||||
if(Environment)
|
||||
|
||||
|
||||
if( abs(Environment.temperature - bodytemperature) > 40 )
|
||||
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
|
||||
|
||||
|
||||
if(min_oxy)
|
||||
if(Environment.oxygen < min_oxy)
|
||||
if(Environment.gas["oxygen"] < min_oxy)
|
||||
atmos_suitable = 0
|
||||
if(max_oxy)
|
||||
if(Environment.oxygen > max_oxy)
|
||||
if(Environment.gas["oxygen"] > max_oxy)
|
||||
atmos_suitable = 0
|
||||
if(min_tox)
|
||||
if(Environment.phoron < min_tox)
|
||||
if(Environment.gas["phoron"] < min_tox)
|
||||
atmos_suitable = 0
|
||||
if(max_tox)
|
||||
if(Environment.phoron > max_tox)
|
||||
if(Environment.gas["phoron"] > max_tox)
|
||||
atmos_suitable = 0
|
||||
if(min_n2)
|
||||
if(Environment.nitrogen < min_n2)
|
||||
if(Environment.gas["nitrogen"] < min_n2)
|
||||
atmos_suitable = 0
|
||||
if(max_n2)
|
||||
if(Environment.nitrogen > max_n2)
|
||||
if(Environment.gas["nitrogen"] > max_n2)
|
||||
atmos_suitable = 0
|
||||
if(min_co2)
|
||||
if(Environment.carbon_dioxide < min_co2)
|
||||
if(Environment.gas["carbon_dioxide"] < min_co2)
|
||||
atmos_suitable = 0
|
||||
if(max_co2)
|
||||
if(Environment.carbon_dioxide > max_co2)
|
||||
if(Environment.gas["carbon_dioxide"] > max_co2)
|
||||
atmos_suitable = 0
|
||||
|
||||
//Atmos effect
|
||||
|
||||
@@ -13,25 +13,6 @@
|
||||
living_mob_list += src
|
||||
..()
|
||||
|
||||
/mob/proc/Cell()
|
||||
set category = "Admin"
|
||||
set hidden = 1
|
||||
|
||||
if(!loc) return 0
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
var/t = "\blue Coordinates: [x],[y] \n"
|
||||
t+= "\red Temperature: [environment.temperature] \n"
|
||||
t+= "\blue Nitrogen: [environment.nitrogen] \n"
|
||||
t+= "\blue Oxygen: [environment.oxygen] \n"
|
||||
t+= "\blue Phoron : [environment.phoron] \n"
|
||||
t+= "\blue Carbon Dioxide: [environment.carbon_dioxide] \n"
|
||||
for(var/datum/gas/trace_gas in environment.trace_gases)
|
||||
usr << "\blue [trace_gas.type]: [trace_gas.moles] \n"
|
||||
|
||||
usr.show_message(t, 1)
|
||||
|
||||
/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
|
||||
if(!client) return
|
||||
|
||||
@@ -27,12 +27,11 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
if(P)
|
||||
if(P.air_contents.phoron <= 0)
|
||||
if(P.air_contents.gas["phoron"] == 0)
|
||||
investigate_log("<font color='red'>out of fuel</font>.","singulo")
|
||||
P.air_contents.phoron = 0
|
||||
eject()
|
||||
else
|
||||
P.air_contents.adjust(tx = -0.001*drainratio)
|
||||
P.air_contents.adjust_gas("phoron", -0.001*drainratio)
|
||||
return
|
||||
|
||||
|
||||
@@ -42,7 +41,7 @@ var/global/list/rad_collectors = list()
|
||||
toggle_power()
|
||||
user.visible_message("[user.name] turns the [src.name] [active? "on":"off"].", \
|
||||
"You turn the [src.name] [active? "on":"off"].")
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [P?"Fuel: [round(P.air_contents.phoron/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
|
||||
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [P?"Fuel: [round(P.air_contents.gas["phoron"]/0.29)]%":"<font color='red'>It is empty</font>"].","singulo")
|
||||
return
|
||||
else
|
||||
user << "\red The controls are locked!"
|
||||
@@ -121,7 +120,7 @@ var/global/list/rad_collectors = list()
|
||||
/obj/machinery/power/rad_collector/proc/receive_pulse(var/pulse_strength)
|
||||
if(P && active)
|
||||
var/power_produced = 0
|
||||
power_produced = P.air_contents.phoron*pulse_strength*20
|
||||
power_produced = P.air_contents.gas["phoron"]*pulse_strength*20
|
||||
add_avail(power_produced)
|
||||
last_power = power_produced
|
||||
return
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
return
|
||||
rpm = 0.9* rpm + 0.1 * rpmtarget
|
||||
var/datum/gas_mixture/environment = inturf.return_air()
|
||||
var/transfer_moles = environment.total_moles()/10
|
||||
var/transfer_moles = environment.total_moles / 10
|
||||
//var/transfer_moles = rpm/10000*capacity
|
||||
var/datum/gas_mixture/removed = inturf.remove_air(transfer_moles)
|
||||
gas_contained.merge(removed)
|
||||
@@ -129,14 +129,14 @@
|
||||
lastgen = ((compressor.rpm / TURBGENQ)**TURBGENG) *TURBGENQ
|
||||
|
||||
add_avail(lastgen)
|
||||
var/newrpm = ((compressor.gas_contained.temperature) * compressor.gas_contained.total_moles())/4
|
||||
var/newrpm = ((compressor.gas_contained.temperature) * compressor.gas_contained.total_moles)/4
|
||||
newrpm = max(0, newrpm)
|
||||
|
||||
if(!compressor.starter || newrpm > 1000)
|
||||
compressor.rpmtarget = newrpm
|
||||
|
||||
if(compressor.gas_contained.total_moles()>0)
|
||||
var/oamount = min(compressor.gas_contained.total_moles(), (compressor.rpm+100)/35000*compressor.capacity)
|
||||
if(compressor.gas_contained.total_moles>0)
|
||||
var/oamount = min(compressor.gas_contained.total_moles, (compressor.rpm+100)/35000*compressor.capacity)
|
||||
var/datum/gas_mixture/removed = compressor.gas_contained.remove(oamount)
|
||||
outturf.assume_air(removed)
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ datum
|
||||
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
@@ -249,7 +249,7 @@ datum
|
||||
var/turf/T = get_turf(O)
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
@@ -1612,18 +1612,10 @@ datum
|
||||
egg.Hatch()*/
|
||||
if((!O) || (!volume)) return 0
|
||||
var/turf/the_turf = get_turf(O)
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/datum/gas/volatile_fuel/fuel = new
|
||||
fuel.moles = volume
|
||||
napalm.trace_gases += fuel
|
||||
the_turf.assume_air(napalm)
|
||||
the_turf.assume_gas("volatile_fuel", volume, T20C)
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
src = null
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/datum/gas/volatile_fuel/fuel = new
|
||||
fuel.moles = volume
|
||||
napalm.trace_gases += fuel
|
||||
T.assume_air(napalm)
|
||||
T.assume_gas("volatile_fuel", volume, T20C)
|
||||
return
|
||||
|
||||
toxin/lexorin
|
||||
@@ -2339,7 +2331,7 @@ datum
|
||||
T.wet_overlay = null
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot)
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles )
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
|
||||
@@ -406,16 +406,7 @@ datum
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/location = get_turf(holder.my_atom.loc)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/datum/gas/volatile_fuel/fuel = new
|
||||
fuel.moles = created_volume
|
||||
napalm.trace_gases += fuel
|
||||
|
||||
napalm.temperature = 400+T0C
|
||||
napalm.update_values()
|
||||
|
||||
target_tile.assume_air(napalm)
|
||||
target_tile.assume_gas("volatile_fuel", created_volume, 400+T0C)
|
||||
spawn (0) target_tile.hotspot_expose(700, 400)
|
||||
holder.del_reagent("napalm")
|
||||
return
|
||||
@@ -1183,13 +1174,7 @@ datum
|
||||
sleep(50)
|
||||
var/turf/location = get_turf(holder.my_atom.loc)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
napalm.phoron = 25
|
||||
napalm.temperature = 1400
|
||||
|
||||
target_tile.assume_air(napalm)
|
||||
target_tile.assume_gas("phoron", 25, 1400)
|
||||
spawn (0) target_tile.hotspot_expose(700, 400)
|
||||
|
||||
//Yellow
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
|
||||
@@ -637,4 +637,4 @@
|
||||
new/obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
src.visible_message("<span class='notice'>The [src.name] has been squashed, causing a distortion in space-time.</span>","<span class='moderate'>You hear a splat and a crackle.</span>")
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
var/datum/gas_mixture/env = L.return_air()
|
||||
if(env.temperature < (heat_amt+T0C))
|
||||
|
||||
var/transfer_moles = 0.25 * env.total_moles()
|
||||
var/transfer_moles = 0.25 * env.total_moles
|
||||
|
||||
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
||||
|
||||
|
||||
@@ -143,13 +143,13 @@ var/list/valid_secondary_effect_types = list(\
|
||||
else if(env.temperature > 375)
|
||||
trigger_hot = 1
|
||||
|
||||
if(env.phoron >= 10)
|
||||
if(env.gas["phoron"] >= 10)
|
||||
trigger_phoron = 1
|
||||
if(env.oxygen >= 10)
|
||||
if(env.gas["oxygen"] >= 10)
|
||||
trigger_oxy = 1
|
||||
if(env.carbon_dioxide >= 10)
|
||||
if(env.gas["carbon_dioxide"] >= 10)
|
||||
trigger_co2 = 1
|
||||
if(env.nitrogen >= 10)
|
||||
if(env.gas["nitrogen"] >= 10)
|
||||
trigger_nitro = 1
|
||||
|
||||
//COLD ACTIVATION
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
|
||||
/datum/artifact_effect/gasco2
|
||||
effecttype = "gasco2"
|
||||
var/max_pressure
|
||||
var/target_percentage
|
||||
|
||||
/datum/artifact_effect/heat/New()
|
||||
..()
|
||||
effect_type = pick(6,7)
|
||||
|
||||
/datum/artifact_effect/gasco2/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env)
|
||||
env.carbon_dioxide += rand(2,15)
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectAura()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.total_moles < max_pressure)
|
||||
env.carbon_dioxide += pick(0, 0, 0.1, rand())
|
||||
|
||||
/datum/artifact_effect/gasco2
|
||||
effecttype = "gasco2"
|
||||
var/max_pressure
|
||||
var/target_percentage
|
||||
|
||||
/datum/artifact_effect/heat/New()
|
||||
..()
|
||||
effect_type = pick(6,7)
|
||||
|
||||
/datum/artifact_effect/gasco2/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("carbon_dioxide", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasco2/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
|
||||
/datum/artifact_effect/gasnitro
|
||||
effecttype = "gasnitro"
|
||||
var/max_pressure
|
||||
var/target_percentage
|
||||
|
||||
/datum/artifact_effect/gasnitro/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
effect_type = pick(6,7)
|
||||
max_pressure = rand(115,1000)
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env)
|
||||
env.nitrogen += rand(2,15)
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectAura()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.total_moles < max_pressure)
|
||||
env.nitrogen += pick(0, 0, 0.1, rand())
|
||||
|
||||
/datum/artifact_effect/gasnitro
|
||||
effecttype = "gasnitro"
|
||||
var/max_pressure
|
||||
var/target_percentage
|
||||
|
||||
/datum/artifact_effect/gasnitro/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
effect_type = pick(6,7)
|
||||
max_pressure = rand(115,1000)
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("nitrogen", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasnitro/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
|
||||
/datum/artifact_effect/gasoxy
|
||||
effecttype = "gasoxy"
|
||||
var/max_pressure
|
||||
|
||||
/datum/artifact_effect/gasoxy/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
effect_type = pick(6,7)
|
||||
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env)
|
||||
env.oxygen += rand(2,15)
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectAura()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.total_moles < max_pressure)
|
||||
env.oxygen += pick(0, 0, 0.1, rand())
|
||||
|
||||
/datum/artifact_effect/gasoxy
|
||||
effecttype = "gasoxy"
|
||||
var/max_pressure
|
||||
|
||||
/datum/artifact_effect/gasoxy/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
effect_type = pick(6,7)
|
||||
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasoxy/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
/datum/artifact_effect/gasphoron/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env)
|
||||
env.phoron += rand(2,15)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("oxygen", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gasphoron/DoEffectAura()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.total_moles < max_pressure)
|
||||
env.phoron += pick(0, 0, 0.1, rand())
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("phoron", pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -1,31 +1,23 @@
|
||||
|
||||
/datum/artifact_effect/gassleeping
|
||||
effecttype = "gassleeping"
|
||||
var/max_pressure
|
||||
var/target_percentage
|
||||
|
||||
/datum/artifact_effect/gassleeping/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
effect_type = pick(6,7)
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env)
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
env.trace_gases += trace_gas
|
||||
trace_gas.moles = rand(2,15)
|
||||
env.update_values()
|
||||
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectAura()
|
||||
if(holder)
|
||||
var/datum/gas_mixture/env = holder.loc.return_air()
|
||||
if(env && env.total_moles < max_pressure)
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
env.trace_gases += trace_gas
|
||||
trace_gas.moles = pick(0, 0, 0.1, rand())
|
||||
env.update_values()
|
||||
|
||||
|
||||
/datum/artifact_effect/gassleeping
|
||||
effecttype = "gassleeping"
|
||||
var/max_pressure
|
||||
var/target_percentage
|
||||
|
||||
/datum/artifact_effect/gassleeping/New()
|
||||
..()
|
||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
|
||||
max_pressure = rand(115,1000)
|
||||
effect_type = pick(6,7)
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectTouch(var/mob/user)
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("sleeping_agent", rand(2, 15))
|
||||
|
||||
/datum/artifact_effect/gassleeping/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/holder_loc = holder.loc
|
||||
if(istype(holder_loc))
|
||||
holder_loc.assume_gas("sleeping_agent", pick(0, 0, 0.1, rand()))
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
damage = max( damage + min( ( (removed.temperature - 800) / 150 ), damage_inc_limit ) , 0 )
|
||||
//Ok, 100% oxygen atmosphere = best reaction
|
||||
//Maxes out at 100% oxygen pressure
|
||||
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
|
||||
oxygen = max(min((removed.gas["oxygen"] - (removed.gas["nitrogen"] * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
|
||||
|
||||
var/temp_factor = 100
|
||||
|
||||
@@ -212,11 +212,8 @@
|
||||
removed.temperature = max(0, min(removed.temperature, 10000))
|
||||
|
||||
//Calculate how much gas to release
|
||||
removed.phoron += max(device_energy / PHORON_RELEASE_MODIFIER, 0)
|
||||
|
||||
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
|
||||
|
||||
removed.update_values()
|
||||
removed.adjust_multi("phoron", max(device_energy / PHORON_RELEASE_MODIFIER, 0), \
|
||||
"oxygen", max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0))
|
||||
|
||||
env.merge(removed)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user