Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into hydroponics

This commit is contained in:
Zuhayr
2014-07-25 22:34:40 +09:30
110 changed files with 2530 additions and 2688 deletions

View File

@@ -1180,10 +1180,6 @@ var/list/ghostteleportlocs = list()
name = "\improper Robotics"
icon_state = "medresearch"
/area/medical/research
name = "\improper Medical Research"
icon_state = "medresearch"
/area/medical/virology
name = "\improper Virology"
icon_state = "virology"
@@ -1381,12 +1377,11 @@ var/list/ghostteleportlocs = list()
icon_state = "garden"
//rnd (Research and Development
/area/rnd/research
name = "\improper Research and Development"
icon_state = "research"
/area/rnd/lab
name = "\improper Research and Development"
icon_state = "toxlab"
/area/rnd/hallway
name = "\improper Research Lab"
icon_state = "toxlab"

View File

@@ -70,9 +70,6 @@
/atom/proc/CheckExit()
return 1
/atom/proc/HasEntered(atom/movable/AM as mob|obj)
return
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
return

View File

@@ -1,57 +1,57 @@
/obj/structure/cult
density = 1
anchored = 1
icon = 'icons/obj/cult.dmi'
/obj/structure/cult/talisman
name = "Altar"
desc = "A bloodstained altar dedicated to Nar-Sie"
icon_state = "talismanaltar"
/obj/structure/cult/forge
name = "Daemon forge"
desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie"
icon_state = "forge"
/obj/structure/cult/pylon
name = "Pylon"
desc = "A floating crystal that hums with an unearthly energy"
icon_state = "pylon"
luminosity = 5
/obj/structure/cult/tome
name = "Desk"
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
icon_state = "tomealtar"
// luminosity = 5
//sprites for this no longer exist -Pete
//(they were stolen from another game anyway)
/*
/obj/structure/cult/pillar
name = "Pillar"
desc = "This should not exist"
icon_state = "pillar"
icon = 'magic_pillar.dmi'
*/
/obj/effect/gateway
name = "gateway"
desc = "You're pretty sure that abyss is staring back"
icon = 'icons/obj/cult.dmi'
icon_state = "hole"
density = 1
unacidable = 1
anchored = 1.0
/obj/effect/gateway/Bumped(mob/M as mob|obj)
spawn(0)
return
return
/obj/effect/gateway/HasEntered(AM as mob|obj)
spawn(0)
return
/obj/structure/cult
density = 1
anchored = 1
icon = 'icons/obj/cult.dmi'
/obj/structure/cult/talisman
name = "Altar"
desc = "A bloodstained altar dedicated to Nar-Sie"
icon_state = "talismanaltar"
/obj/structure/cult/forge
name = "Daemon forge"
desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie"
icon_state = "forge"
/obj/structure/cult/pylon
name = "Pylon"
desc = "A floating crystal that hums with an unearthly energy"
icon_state = "pylon"
luminosity = 5
/obj/structure/cult/tome
name = "Desk"
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
icon_state = "tomealtar"
// luminosity = 5
//sprites for this no longer exist -Pete
//(they were stolen from another game anyway)
/*
/obj/structure/cult/pillar
name = "Pillar"
desc = "This should not exist"
icon_state = "pillar"
icon = 'magic_pillar.dmi'
*/
/obj/effect/gateway
name = "gateway"
desc = "You're pretty sure that abyss is staring back"
icon = 'icons/obj/cult.dmi'
icon_state = "hole"
density = 1
unacidable = 1
anchored = 1.0
/obj/effect/gateway/Bumped(mob/M as mob|obj)
spawn(0)
return
return
/obj/effect/gateway/Crossed(AM as mob|obj)
spawn(0)
return
return

View File

@@ -315,24 +315,15 @@ ________________________________________________________________________________
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"
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 += "<ul>"
dat += "<li>Nitrogen: [round(n2_level*100)]%</li>"
dat += "<li>Oxygen: [round(o2_level*100)]%</li>"
dat += "<li>Carbon Dioxide: [round(co2_level*100)]%</li>"
dat += "<li>Phoron: [round(phoron_level*100)]%</li>"
for(var/g in environment.gas)
dat += "<li>[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]%</li>"
dat += "</ul>"
if(unknown_level > 0.01)
dat += "OTHER: [round(unknown_level)]%<br>"
dat += "Temperature: [round(environment.temperature-T0C)]&deg;C"
if(2)

View File

@@ -557,7 +557,7 @@ datum/objective/steal
for(var/obj/item/I in all_items) //Check for phoron tanks
if(istype(I, steal_target))
found_amount += (target_name=="28 moles of phoron (full tank)" ? (I:air_contents:phoron) : (I:amount))
found_amount += (target_name=="28 moles of phoron (full tank)" ? (I:air_contents:gas["phoron"]) : (I:amount))
return found_amount>=target_amount
if("50 coins (in bag)")

View File

@@ -198,23 +198,24 @@
gas = location.remove_air(0.25*environment.total_moles)
if(gas)
var/heat_capacity = gas.heat_capacity()
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
if(heat_capacity)
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
//Use power. Assuming that each power unit represents 1 watts....
use_power(energy_used, ENVIRON)
//Use power. Assuming that each power unit represents 1 watts....
use_power(energy_used, ENVIRON)
//We need to cool ourselves.
if(environment.temperature > target_temperature)
gas.temperature -= energy_used/heat_capacity
else
gas.temperature += energy_used/heat_capacity
//We need to cool ourselves.
if(environment.temperature > target_temperature)
gas.temperature -= energy_used/heat_capacity
else
gas.temperature += energy_used/heat_capacity
environment.merge(gas)
environment.merge(gas)
if(abs(environment.temperature - target_temperature) <= 0.5)
regulating_temperature = 0
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
if(abs(environment.temperature - target_temperature) <= 0.5)
regulating_temperature = 0
visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
var/old_level = danger_level
var/old_pressurelevel = pressure_dangerlevel
@@ -256,23 +257,23 @@
var/partial_pressure = R_IDEAL_GAS_EQUATION*environment.temperature/environment.volume
var/environment_pressure = environment.return_pressure()
var/other_moles = 0.0
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
//var/other_moles = 0.0
////for(var/datum/gas/G in environment.trace_gases)
// other_moles+=G.moles
pressure_dangerlevel = get_danger_level(environment_pressure, TLV["pressure"])
oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, TLV["oxygen"])
co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, TLV["carbon dioxide"])
phoron_dangerlevel = get_danger_level(environment.phoron*partial_pressure, TLV["phoron"])
oxygen_dangerlevel = get_danger_level(environment.gas["oxygen"]*partial_pressure, TLV["oxygen"])
co2_dangerlevel = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, TLV["carbon dioxide"])
phoron_dangerlevel = get_danger_level(environment.gas["phoron"]*partial_pressure, TLV["phoron"])
temperature_dangerlevel = get_danger_level(environment.temperature, TLV["temperature"])
other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
//other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
return max(
pressure_dangerlevel,
oxygen_dangerlevel,
co2_dangerlevel,
phoron_dangerlevel,
other_dangerlevel,
//other_dangerlevel,
temperature_dangerlevel
)
@@ -661,7 +662,7 @@
/obj/machinery/alarm/proc/return_status()
var/turf/location = get_turf(src)
var/datum/gas_mixture/environment = location.return_air()
var/total = environment.oxygen + environment.carbon_dioxide + environment.phoron + environment.nitrogen
var/total = environment.total_moles
var/output = "<b>Air Status:</b><br>"
if(total == 0)
@@ -683,22 +684,22 @@
var/pressure_dangerlevel = get_danger_level(environment_pressure, current_settings)
current_settings = TLV["oxygen"]
var/oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, current_settings)
var/oxygen_percent = round(environment.oxygen / total * 100, 2)
var/oxygen_dangerlevel = get_danger_level(environment.gas["oxygen"]*partial_pressure, current_settings)
var/oxygen_percent = round(environment.gas["oxygen"] / total * 100, 2)
current_settings = TLV["carbon dioxide"]
var/co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, current_settings)
var/co2_percent = round(environment.carbon_dioxide / total * 100, 2)
var/co2_dangerlevel = get_danger_level(environment.gas["carbon_dioxide"]*partial_pressure, current_settings)
var/co2_percent = round(environment.gas["carbon_dioxide"] / total * 100, 2)
current_settings = TLV["phoron"]
var/phoron_dangerlevel = get_danger_level(environment.phoron*partial_pressure, current_settings)
var/phoron_percent = round(environment.phoron / total * 100, 2)
var/phoron_dangerlevel = get_danger_level(environment.gas["phoron"]*partial_pressure, current_settings)
var/phoron_percent = round(environment.gas["phoron"] / total * 100, 2)
current_settings = TLV["other"]
var/other_moles = 0.0
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
//current_settings = TLV["other"]
//var/other_moles = 0.0
//for(var/datum/gas/G in environment.trace_gases)
// other_moles+=G.moles
//var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, current_settings)
current_settings = TLV["temperature"]
var/temperature_dangerlevel = get_danger_level(environment.temperature, current_settings)
@@ -709,10 +710,10 @@ Oxygen: <span class='dl[oxygen_dangerlevel]'>[oxygen_percent]</span>%<br>
Carbon dioxide: <span class='dl[co2_dangerlevel]'>[co2_percent]</span>%<br>
Toxins: <span class='dl[phoron_dangerlevel]'>[phoron_percent]</span>%<br>
"}
if (other_dangerlevel==2)
output += "Notice: <span class='dl2'>High Concentration of Unknown Particles Detected</span><br>"
else if (other_dangerlevel==1)
output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
//if (other_dangerlevel==2)
// output += "Notice: <span class='dl2'>High Concentration of Unknown Particles Detected</span><br>"
//else if (other_dangerlevel==1)
// output += "Notice: <span class='dl1'>Low Concentration of Unknown Particles Detected</span><br>"
output += "Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]</span>K ([round(environment.temperature - T0C, 0.1)]C)<br>"

View File

@@ -40,16 +40,16 @@ obj/machinery/air_sensor
signal.data["temperature"] = round(air_sample.temperature,0.1)
if(output>4)
var/total_moles = air_sample.total_moles()
var/total_moles = air_sample.total_moles
if(total_moles > 0)
if(output&4)
signal.data["oxygen"] = round(100*air_sample.oxygen/total_moles,0.1)
signal.data["oxygen"] = round(100*air_sample.gas["oxygen"]/total_moles,0.1)
if(output&8)
signal.data["phoron"] = round(100*air_sample.phoron/total_moles,0.1)
signal.data["phoron"] = round(100*air_sample.gas["phoron"]/total_moles,0.1)
if(output&16)
signal.data["nitrogen"] = round(100*air_sample.nitrogen/total_moles,0.1)
signal.data["nitrogen"] = round(100*air_sample.gas["nitrogen"]/total_moles,0.1)
if(output&32)
signal.data["carbon_dioxide"] = round(100*air_sample.carbon_dioxide/total_moles,0.1)
signal.data["carbon_dioxide"] = round(100*air_sample.gas["carbon_dioxide"]/total_moles,0.1)
else
signal.data["oxygen"] = 0
signal.data["phoron"] = 0

View File

@@ -88,9 +88,9 @@ update_flag
src.overlays = 0
src.icon_state = text("[]-1", src.canister_color)
if(icon_state != "[canister_color]")
if(icon_state != "[canister_color]")
icon_state = "[canister_color]"
if(check_change()) //Returns 1 if no change needed to icons.
return
@@ -227,10 +227,10 @@ update_flag
return
..()
nanomanager.update_uis(src) // Update all NanoUIs attached to src
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
@@ -255,8 +255,8 @@ update_flag
data["minReleasePressure"] = round(ONE_ATMOSPHERE/10)
data["maxReleasePressure"] = round(10*ONE_ATMOSPHERE)
data["valveOpen"] = valve_open ? 1 : 0
data["hasHoldingTank"] = holding ? 1 : 0
data["hasHoldingTank"] = holding ? 1 : 0
if (holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
@@ -330,18 +330,17 @@ update_flag
src.canister_color = colors[label]
src.icon_state = colors[label]
src.name = "Canister: [label]"
src.add_fingerprint(usr)
update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/phoron/New()
..()
src.air_contents.phoron = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.air_contents.adjust_gas("phoron", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.update_icon()
return 1
@@ -350,8 +349,7 @@ update_flag
..()
src.air_contents.oxygen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.air_contents.adjust_gas("oxygen", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.update_icon()
return 1
@@ -359,10 +357,7 @@ update_flag
..()
var/datum/gas/sleeping_agent/trace_gas = new
air_contents.trace_gases += trace_gas
trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
air_contents.adjust_gas("sleeping_agent", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.update_icon()
return 1
@@ -370,8 +365,7 @@ update_flag
//Dirty way to fill room with gas. However it is a bit easier to do than creating some floor/engine/n2o -rastaf0
/obj/machinery/portable_atmospherics/canister/sleeping_agent/roomfiller/New()
..()
var/datum/gas/sleeping_agent/trace_gas = air_contents.trace_gases[1]
trace_gas.moles = 9*4000
air_contents.gas["sleeping_agent"] = 9*4000
spawn(10)
var/turf/simulated/location = src.loc
if (istype(src.loc))
@@ -385,8 +379,7 @@ update_flag
..()
src.air_contents.nitrogen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.air_contents.adjust_gas("nitrogen", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.update_icon()
return 1
@@ -394,19 +387,14 @@ update_flag
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
..()
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
src.air_contents.adjust_gas("carbon_dioxide", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
return 1
/obj/machinery/portable_atmospherics/canister/air/New()
..()
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.air_contents.adjust_multi("oxygen", (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature), "nitrogen", (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.update_icon()
return 1

View File

@@ -26,7 +26,7 @@
if(port)
connect(port)
update_icon()
process()
if(!connected_port) //only react when pipe_network will ont it do it for you
//Allow for reactions
@@ -118,24 +118,13 @@
visible_message("\red [user] has used [W] on \icon[icon]")
if(air_contents)
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()
var/total_moles = air_contents.total_moles
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
var/co2_concentration = air_contents.carbon_dioxide/total_moles
var/phoron_concentration = air_contents.phoron/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Phoron: [round(phoron_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
for(var/g in air_contents.gas)
user << "\blue [gas_data.name[g]]: [round((air_contents.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"

View File

@@ -98,7 +98,7 @@
environment = holding.air_contents
else
environment = loc.return_air()
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles
//Take a gas sample
var/datum/gas_mixture/removed
@@ -114,23 +114,17 @@
filtered_out.temperature = removed.temperature
filtered_out.phoron = removed.phoron
removed.phoron = 0
filtered_out.gas["phoron"] = removed.gas["phoron"]
removed.gas["phoron"] = 0
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
filtered_out.gas["carbon_dioxide"] = removed.gas["carbon_dioxide"]
removed.gas["carbon_dioxide"] = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/sleeping_agent))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.gas["sleeping_agent"] = removed.gas["sleeping_agent"]
removed.gas["sleeping_agent"] = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.gas["oxygen_agent_b"] = removed.gas["oxygen_agent_b"]
removed.gas["oxygen_agent_b"] = 0
//Remix the resulting gases
air_contents.merge(filtered_out)

View File

@@ -789,7 +789,7 @@
return get_turf(src)
// called from mob/living/carbon/human/HasEntered()
// called from mob/living/carbon/human/Crossed()
// when mulebot is in the same loc
/obj/machinery/bot/mulebot/proc/RunOver(var/mob/living/carbon/human/H)
src.visible_message("\red [src] drives over [H]!")

View File

@@ -121,13 +121,13 @@
data["beakerVolume"] += R.volume
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
@@ -194,7 +194,7 @@
icon_state = "cell-off"
/obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant()
if(air_contents.total_moles() < 10)
if(air_contents.total_moles < 10)
return
if(occupant)
if(occupant.stat == 2)
@@ -205,7 +205,7 @@
if(occupant.bodytemperature < T0C)
occupant.sleeping = max(5, (1/occupant.bodytemperature)*2000)
occupant.Paralyse(max(5, (1/occupant.bodytemperature)*3000))
if(air_contents.oxygen > 2)
if(air_contents.gas["oxygen"] > 2)
if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1)
else
occupant.adjustOxyLoss(-1)
@@ -224,7 +224,7 @@
beaker.reagents.reaction(occupant)
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
if(air_contents.total_moles() < 1)
if(air_contents.total_moles < 1)
return
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
@@ -233,7 +233,7 @@
air_contents.temperature = combined_energy/combined_heat_capacity
/obj/machinery/atmospherics/unary/cryo_cell/proc/expel_gas()
if(air_contents.total_moles() < 1)
if(air_contents.total_moles < 1)
return
// var/datum/gas_mixture/expel_gas = new
// var/remove_amount = air_contents.total_moles()/50

View File

@@ -288,13 +288,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
/obj/machinery/door/airlock/phoron/proc/PhoronBurn(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
// if(target_tile.parent && target_tile.parent.group_processing) // THESE PROBABLY DO SOMETHING IMPORTANT BUT I DON'T KNOW HOW TO FIX IT - Erthilo
// target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
var/phoronToDeduce = 35
napalm.phoron = phoronToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
target_tile.assume_gas("phoron", 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)

View File

@@ -210,7 +210,7 @@
if("/turf/simulated/floor", "/turf/simulated/floor/engine")
var/datum/gas_mixture/environment = T.return_air()
var/turf_total = environment.total_moles()
var/turf_total = environment.total_moles
var/t1 = turf_total / MOLES_CELLSTANDARD * 175
if(t1<=100)

View File

@@ -128,7 +128,7 @@
/*
//Allow you to push disposal pipes into it (for those with density 1)
/obj/machinery/pipedispenser/disposal/HasEntered(var/obj/structure/disposalconstruct/pipe as obj)
/obj/machinery/pipedispenser/disposal/Crossed(var/obj/structure/disposalconstruct/pipe as obj)
if(istype(pipe) && !pipe.anchored)
del(pipe)

View File

@@ -1,202 +1,202 @@
/obj/machinery/space_heater
anchored = 0
density = 1
icon = 'icons/obj/atmos.dmi'
icon_state = "sheater0"
name = "space heater"
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
var/on = 0
var/open = 0
var/set_temperature = 50 // in celcius, add T0C for kelvin
var/heating_power = 40000
flags = FPRINT
New()
..()
cell = new(src)
cell.charge = 1000
cell.maxcharge = 1000
update_icon()
return
update_icon()
overlays.Cut()
icon_state = "sheater[on]"
if(open)
overlays += "sheater-open"
return
examine()
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [src.name]."
usr << src.desc
usr << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
if(open)
usr << "The power cell is [cell ? "installed" : "missing"]."
else
usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(cell)
cell.emp_act(severity)
..(severity)
attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
if(open)
if(cell)
user << "There is already a power cell inside."
return
else
// insert cell
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
user.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].")
else
user << "The hatch must be open to insert a power cell."
return
else if(istype(I, /obj/item/weapon/screwdriver))
open = !open
user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
update_icon()
if(!open && user.machine == src)
user << browse(null, "window=spaceheater")
user.unset_machine()
else
..()
return
attack_hand(mob/user as mob)
src.add_fingerprint(user)
interact(user)
interact(mob/user as mob)
if(open)
var/dat
dat = "Power cell: "
if(cell)
dat += "<A href='byond://?src=\ref[src];op=cellremove'>Installed</A><BR>"
else
dat += "<A href='byond://?src=\ref[src];op=cellinstall'>Removed</A><BR>"
dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
dat += "Set Temperature: "
dat += "<A href='?src=\ref[src];op=temp;val=-5'>-</A>"
dat += " [set_temperature]&deg;C "
dat += "<A href='?src=\ref[src];op=temp;val=5'>+</A><BR>"
user.set_machine(src)
user << browse("<HEAD><TITLE>Space Heater Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=spaceheater")
onclose(user, "spaceheater")
else
on = !on
user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].")
update_icon()
return
Topic(href, href_list)
if (usr.stat)
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
switch(href_list["op"])
if("temp")
var/value = text2num(href_list["val"])
// limit to 20-90 degC
set_temperature = dd_range(0, 90, set_temperature + value)
if("cellremove")
if(open && cell && !usr.get_active_hand())
cell.updateicon()
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
updateDialog()
else
usr << browse(null, "window=spaceheater")
usr.unset_machine()
return
process()
if(on)
if(cell && cell.charge > 0)
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature != set_temperature + T0C)
var/transfer_moles = 0.25 * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
//world << "got [transfer_moles] moles at [removed.temperature]"
if(removed)
var/heat_capacity = removed.heat_capacity()
//world << "heating ([heat_capacity])"
if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
if(removed.temperature < set_temperature + T0C)
removed.temperature = min(removed.temperature + heating_power/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
else
removed.temperature = max(removed.temperature - heating_power/heat_capacity, TCMB)
cell.use(heating_power/20000)
//world << "now at [removed.temperature]"
env.merge(removed)
//world << "turf now at [env.temperature]"
else
on = 0
update_icon()
/obj/machinery/space_heater
anchored = 0
density = 1
icon = 'icons/obj/atmos.dmi'
icon_state = "sheater0"
name = "space heater"
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
var/on = 0
var/open = 0
var/set_temperature = 50 // in celcius, add T0C for kelvin
var/heating_power = 40000
flags = FPRINT
New()
..()
cell = new(src)
cell.charge = 1000
cell.maxcharge = 1000
update_icon()
return
update_icon()
overlays.Cut()
icon_state = "sheater[on]"
if(open)
overlays += "sheater-open"
return
examine()
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [src.name]."
usr << src.desc
usr << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
if(open)
usr << "The power cell is [cell ? "installed" : "missing"]."
else
usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(cell)
cell.emp_act(severity)
..(severity)
attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/cell))
if(open)
if(cell)
user << "There is already a power cell inside."
return
else
// insert cell
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
user.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].")
else
user << "The hatch must be open to insert a power cell."
return
else if(istype(I, /obj/item/weapon/screwdriver))
open = !open
user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].")
update_icon()
if(!open && user.machine == src)
user << browse(null, "window=spaceheater")
user.unset_machine()
else
..()
return
attack_hand(mob/user as mob)
src.add_fingerprint(user)
interact(user)
interact(mob/user as mob)
if(open)
var/dat
dat = "Power cell: "
if(cell)
dat += "<A href='byond://?src=\ref[src];op=cellremove'>Installed</A><BR>"
else
dat += "<A href='byond://?src=\ref[src];op=cellinstall'>Removed</A><BR>"
dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
dat += "Set Temperature: "
dat += "<A href='?src=\ref[src];op=temp;val=-5'>-</A>"
dat += " [set_temperature]&deg;C "
dat += "<A href='?src=\ref[src];op=temp;val=5'>+</A><BR>"
user.set_machine(src)
user << browse("<HEAD><TITLE>Space Heater Control Panel</TITLE></HEAD><TT>[dat]</TT>", "window=spaceheater")
onclose(user, "spaceheater")
else
on = !on
user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].")
update_icon()
return
Topic(href, href_list)
if (usr.stat)
return
if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
switch(href_list["op"])
if("temp")
var/value = text2num(href_list["val"])
// limit to 20-90 degC
set_temperature = dd_range(0, 90, set_temperature + value)
if("cellremove")
if(open && cell && !usr.get_active_hand())
cell.updateicon()
usr.put_in_hands(cell)
cell.add_fingerprint(usr)
cell = null
usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].")
if("cellinstall")
if(open && !cell)
var/obj/item/weapon/cell/C = usr.get_active_hand()
if(istype(C))
usr.drop_item()
cell = C
C.loc = src
C.add_fingerprint(usr)
usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].")
updateDialog()
else
usr << browse(null, "window=spaceheater")
usr.unset_machine()
return
process()
if(on)
if(cell && cell.charge > 0)
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature != set_temperature + T0C)
var/transfer_moles = 0.25 * env.total_moles
var/datum/gas_mixture/removed = env.remove(transfer_moles)
//world << "got [transfer_moles] moles at [removed.temperature]"
if(removed)
var/heat_capacity = removed.heat_capacity()
//world << "heating ([heat_capacity])"
if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE
if(removed.temperature < set_temperature + T0C)
removed.temperature = min(removed.temperature + heating_power/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE
else
removed.temperature = max(removed.temperature - heating_power/heat_capacity, TCMB)
cell.use(heating_power/20000)
//world << "now at [removed.temperature]"
env.merge(removed)
//world << "turf now at [env.temperature]"
else
on = 0
update_icon()
return

View File

@@ -246,7 +246,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
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)

View File

@@ -924,13 +924,11 @@
return
var/datum/gas_mixture/GM = new
if(prob(10))
GM.phoron += 100
GM.temperature = 1500+T0C //should be enough to start a fire
T.assume_gas("phoron", 100, 1500+T0C)
T.visible_message("The [src] suddenly disgorges a cloud of heated phoron.")
destroy()
else
GM.phoron += 5
GM.temperature = istype(T) ? T.air.temperature : T20C
T.assume_gas("phoron", 5, istype(T) ? T.air.temperature : T20C)
T.visible_message("The [src] suddenly disgorges a cloud of phoron.")
T.assume_air(GM)
return

View File

@@ -123,8 +123,7 @@
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.adjust_multi("oxygen", O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature), "nitrogen", N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature))
return cabin_air
/obj/mecha/proc/add_radio()
@@ -332,7 +331,7 @@
var/obj/O = obstacle
if(istype(O, /obj/effect/portal)) //derpfix
src.anchored = 0
O.HasEntered(src)
O.Crossed(src)
spawn(0)//countering portal teleport spawn(0), hurr
src.anchored = 1
else if(!O.anchored)
@@ -855,11 +854,11 @@
/obj/mecha/proc/return_temperature()
. = 0
if(use_internal_tank)
. = cabin_air.return_temperature()
. = cabin_air.temperature
else
var/datum/gas_mixture/t_air = get_turf_air()
if(t_air)
. = t_air.return_temperature()
. = t_air.temperature
return
/obj/mecha/proc/connect(obj/machinery/atmospherics/portables_connector/new_port)
@@ -1705,7 +1704,7 @@
delay = 20
process(var/obj/mecha/mecha)
if(mecha.cabin_air && mecha.cabin_air.return_volume() > 0)
if(mecha.cabin_air && mecha.cabin_air.volume > 0)
var/delta = mecha.cabin_air.temperature - T20C
mecha.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
return
@@ -1723,8 +1722,8 @@
var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2)
var/transfer_moles = 0
if(pressure_delta > 0) //cabin pressure lower than release pressure
if(tank_air.return_temperature() > 0)
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
if(tank_air.temperature > 0)
transfer_moles = pressure_delta*cabin_air.volume/(cabin_air.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = tank_air.remove(transfer_moles)
cabin_air.merge(removed)
else if(pressure_delta < 0) //cabin pressure higher than release pressure
@@ -1733,7 +1732,7 @@
if(t_air)
pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta)
if(pressure_delta > 0) //if location pressure is lower than cabin pressure
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
transfer_moles = pressure_delta*cabin_air.volume/(cabin_air.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles)
if(t_air)
t_air.merge(removed)
@@ -1766,12 +1765,12 @@
if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)))
mecha.setInternalDamage(MECHA_INT_TANK_BREACH)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents
if(int_tank_air && int_tank_air.volume>0) //heat the air_contents
int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15))
if(mecha.cabin_air && mecha.cabin_air.return_volume()>0)
mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15))
if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2)
mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire")
if(mecha.cabin_air && mecha.cabin_air.volume>0)
mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.temperature+rand(10,15))
if(mecha.cabin_air.temperature>mecha.max_temperature/2)
mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.temperature,0.1),"fire")
if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum
mecha.pr_int_temp_processor.stop()
if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank

View File

@@ -45,7 +45,7 @@ var/global/list/image/splatter_cache=list()
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
color = basecolor
/obj/effect/decal/cleanable/blood/HasEntered(mob/living/carbon/human/perp)
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
if (!istype(perp))
return
if(amount < 1)

View File

@@ -216,7 +216,7 @@ steam.start() -- spawns the effect
delete()
return
/obj/effect/effect/smoke/HasEntered(mob/living/carbon/M as mob )
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
..()
if(istype(M))
affect(M)
@@ -549,7 +549,7 @@ steam.start() -- spawns the effect
delete()
/obj/effect/effect/foam/HasEntered(var/atom/movable/AM)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
if(metal)
return

View File

@@ -12,7 +12,7 @@
/obj/effect/mine/New()
icon_state = "uglyminearmed"
/obj/effect/mine/HasEntered(AM as mob|obj)
/obj/effect/mine/Crossed(AM as mob|obj)
Bumped(AM)
/obj/effect/mine/Bumped(mob/M as mob|obj)
@@ -51,14 +51,7 @@
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
var/datum/gas_mixture/payload = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 30
payload += trace_gas
target.zone.air.merge(payload)
target.assume_gas("sleeping_agent", 30)
spawn(0)
del(src)
@@ -66,12 +59,7 @@
/obj/effect/mine/proc/triggerphoron(obj)
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
var/datum/gas_mixture/payload = new
payload.phoron = 30
target.zone.air.merge(payload)
target.assume_gas("phoron", 30)
target.hotspot_expose(1000, CELL_VOLUME)

View File

@@ -16,7 +16,7 @@
return
return
/obj/effect/portal/HasEntered(AM as mob|obj)
/obj/effect/portal/Crossed(AM as mob|obj)
spawn(0)
src.teleport(AM)
return

View File

@@ -137,13 +137,10 @@
OT.master = V
PT.air_contents.temperature = PHORON_FLASHPOINT
PT.air_contents.phoron = 12
PT.air_contents.carbon_dioxide = 8
PT.air_contents.adjust_multi("phoron", 12, "carbon_dioxide", 8)
OT.air_contents.temperature = PHORON_FLASHPOINT
OT.air_contents.temperature = PHORON_FLASHPOINT
OT.air_contents.oxygen = 20
OT.air_contents.adjust_gas("oxygen", 20)
var/obj/item/device/assembly/S

View File

@@ -1,117 +1,117 @@
/* Simple object type, calls a proc when "stepped" on by something */
/obj/effect/step_trigger
var/affect_ghosts = 0
var/stopper = 1 // stops throwers
invisibility = 101 // nope cant see this shit
anchored = 1
/obj/effect/step_trigger/proc/Trigger(var/atom/movable/A)
return 0
/obj/effect/step_trigger/HasEntered(H as mob|obj)
..()
if(!H)
return
if(istype(H, /mob/dead/observer) && !affect_ghosts)
return
Trigger(H)
/* Tosses things in a certain direction */
/obj/effect/step_trigger/thrower
var/direction = SOUTH // the direction of throw
var/tiles = 3 // if 0: forever until atom hits a stopper
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
var/speed = 1 // delay of movement
var/facedir = 0 // if 1: atom faces the direction of movement
var/nostop = 0 // if 1: will only be stopped by teleporters
var/list/affecting = list()
Trigger(var/atom/A)
if(!A || !istype(A, /atom/movable))
return
var/atom/movable/AM = A
var/curtiles = 0
var/stopthrow = 0
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
if(AM in T.affecting)
return
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 0
affecting.Add(AM)
while(AM && !stopthrow)
if(tiles)
if(curtiles >= tiles)
break
if(AM.z != src.z)
break
curtiles++
sleep(speed)
// Calculate if we should stop the process
if(!nostop)
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
if(T.stopper && T != src)
stopthrow = 1
else
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
if(T.stopper)
stopthrow = 1
if(AM)
var/predir = AM.dir
step(AM, direction)
if(!facedir)
AM.dir = predir
affecting.Remove(AM)
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 1
/* Stops things thrown by a thrower, doesn't do anything */
/obj/effect/step_trigger/stopper
/* Instant teleporter */
/obj/effect/step_trigger/teleporter
var/teleport_x = 0 // teleportation coordinates (if one is null, then no teleport!)
var/teleport_y = 0
var/teleport_z = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
A.x = teleport_x
A.y = teleport_y
A.z = teleport_z
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
/obj/effect/step_trigger/teleporter/random
var/teleport_x_offset = 0
var/teleport_y_offset = 0
var/teleport_z_offset = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
A.x = rand(teleport_x, teleport_x_offset)
A.y = rand(teleport_y, teleport_y_offset)
A.z = rand(teleport_z, teleport_z_offset)
/* Simple object type, calls a proc when "stepped" on by something */
/obj/effect/step_trigger
var/affect_ghosts = 0
var/stopper = 1 // stops throwers
invisibility = 101 // nope cant see this shit
anchored = 1
/obj/effect/step_trigger/proc/Trigger(var/atom/movable/A)
return 0
/obj/effect/step_trigger/Crossed(H as mob|obj)
..()
if(!H)
return
if(istype(H, /mob/dead/observer) && !affect_ghosts)
return
Trigger(H)
/* Tosses things in a certain direction */
/obj/effect/step_trigger/thrower
var/direction = SOUTH // the direction of throw
var/tiles = 3 // if 0: forever until atom hits a stopper
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
var/speed = 1 // delay of movement
var/facedir = 0 // if 1: atom faces the direction of movement
var/nostop = 0 // if 1: will only be stopped by teleporters
var/list/affecting = list()
Trigger(var/atom/A)
if(!A || !istype(A, /atom/movable))
return
var/atom/movable/AM = A
var/curtiles = 0
var/stopthrow = 0
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
if(AM in T.affecting)
return
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 0
affecting.Add(AM)
while(AM && !stopthrow)
if(tiles)
if(curtiles >= tiles)
break
if(AM.z != src.z)
break
curtiles++
sleep(speed)
// Calculate if we should stop the process
if(!nostop)
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
if(T.stopper && T != src)
stopthrow = 1
else
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
if(T.stopper)
stopthrow = 1
if(AM)
var/predir = AM.dir
step(AM, direction)
if(!facedir)
AM.dir = predir
affecting.Remove(AM)
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 1
/* Stops things thrown by a thrower, doesn't do anything */
/obj/effect/step_trigger/stopper
/* Instant teleporter */
/obj/effect/step_trigger/teleporter
var/teleport_x = 0 // teleportation coordinates (if one is null, then no teleport!)
var/teleport_y = 0
var/teleport_z = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
A.x = teleport_x
A.y = teleport_y
A.z = teleport_z
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
/obj/effect/step_trigger/teleporter/random
var/teleport_x_offset = 0
var/teleport_y_offset = 0
var/teleport_z_offset = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
A.x = rand(teleport_x, teleport_x_offset)
A.y = rand(teleport_y, teleport_y_offset)
A.z = rand(teleport_z, teleport_z_offset)

View File

@@ -440,13 +440,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
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
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/o2_level = environment.gas["oxygen"]/total_moles
var/n2_level = environment.gas["nitrogen"]/total_moles
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
var/phoron_level = environment.gas["phoron"]/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
data["aircontents"] = list(\
"pressure" = "[round(pressure,0.1)]",\
@@ -1162,24 +1162,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
O << "\red [user] has used [src] on \icon[icon] [A]"
var/pressure = A:air_contents.return_pressure()
var/total_moles = A:air_contents.total_moles()
var/total_moles = A:air_contents.total_moles
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = A:air_contents.oxygen/total_moles
var/n2_concentration = A:air_contents.nitrogen/total_moles
var/co2_concentration = A:air_contents.carbon_dioxide/total_moles
var/phoron_concentration = A:air_contents.phoron/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Phoron: [round(phoron_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
for(var/g in A:air_contents.gas)
user << "\blue [gas_data.name[g]]: [round((A:air_contents.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(A:air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
@@ -1191,24 +1180,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/machinery/atmospherics/pipe/tank/T = A
var/pressure = T.parent.air.return_pressure()
var/total_moles = T.parent.air.total_moles()
var/total_moles = T.parent.air.total_moles
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = T.parent.air.oxygen/total_moles
var/n2_concentration = T.parent.air.nitrogen/total_moles
var/co2_concentration = T.parent.air.carbon_dioxide/total_moles
var/phoron_concentration = T.parent.air.phoron/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Phoron: [round(phoron_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
for(var/g in T.parent.air.gas)
user << "\blue [gas_data.name[g]]: [round((T.parent.air.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(T.parent.air.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
@@ -1278,7 +1256,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
src.id.loc = get_turf(src.loc)
..()
/obj/item/device/pda/clown/HasEntered(AM as mob|obj) //Clown PDA is slippery.
/obj/item/device/pda/clown/Crossed(AM as mob|obj) //Clown PDA is slippery.
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
if ((istype(M, /mob/living/carbon/human) && (istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) || M.m_intent == "walk")

View File

@@ -257,7 +257,7 @@ REAGENT SCANNER
var/datum/gas_mixture/environment = location.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
var/total_moles = environment.total_moles
user.show_message("\blue <B>Results:</B>", 1)
if(abs(pressure - ONE_ATMOSPHERE) < 10)
@@ -265,32 +265,8 @@ REAGENT SCANNER
else
user.show_message("\red Pressure: [round(pressure,0.1)] kPa", 1)
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)
user.show_message("\blue Nitrogen: [round(n2_concentration*100)]%", 1)
else
user.show_message("\red Nitrogen: [round(n2_concentration*100)]%", 1)
if(abs(o2_concentration - O2STANDARD) < 2)
user.show_message("\blue Oxygen: [round(o2_concentration*100)]%", 1)
else
user.show_message("\red Oxygen: [round(o2_concentration*100)]%", 1)
if(co2_concentration > 0.01)
user.show_message("\red CO2: [round(co2_concentration*100)]%", 1)
else
user.show_message("\blue CO2: [round(co2_concentration*100)]%", 1)
if(phoron_concentration > 0.01)
user.show_message("\red Phoron: [round(phoron_concentration*100)]%", 1)
if(unknown_concentration > 0.01)
user.show_message("\red Unknown: [round(unknown_concentration*100)]%", 1)
for(var/g in environment.gas)
user.show_message("\blue [gas_data.name[g]]: [round((environment.gas[g] / total_moles)*100)]%", 1)
user.show_message("\blue Temperature: [round(environment.temperature-T0C)]&deg;C", 1)

View File

@@ -284,7 +284,7 @@
return
return ..()
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
/obj/item/weapon/shard/Crossed(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step in the broken glass!</B>"

View File

@@ -406,7 +406,7 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1)
del(src)
/obj/item/toy/snappop/HasEntered(H as mob|obj)
/obj/item/toy/snappop/Crossed(H as mob|obj)
if((ishuman(H))) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
if(M.m_intent == "run")

View File

@@ -8,7 +8,7 @@
/*
* Banana Peals
*/
/obj/item/weapon/bananapeel/HasEntered(AM as mob|obj)
/obj/item/weapon/bananapeel/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)
@@ -23,7 +23,7 @@
/*
* Soap
*/
/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
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)

View File

@@ -116,24 +116,13 @@
var/obj/item/weapon/icon = src
user.visible_message("<span class='notice'>[user] has used the analyzer on \icon[icon]</span>")
var/pressure = ptank.air_contents.return_pressure()
var/total_moles = ptank.air_contents.total_moles()
var/total_moles = ptank.air_contents.total_moles
user << "\blue Results of analysis of \icon[icon]"
if(total_moles>0)
var/o2_concentration = ptank.air_contents.oxygen/total_moles
var/n2_concentration = ptank.air_contents.nitrogen/total_moles
var/co2_concentration = ptank.air_contents.carbon_dioxide/total_moles
var/phoron_concentration = ptank.air_contents.phoron/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Phoron: [round(phoron_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
for(var/g in ptank.air_contents.gas)
user << "\blue [gas_data.name[g]]: [round((ptank.air_contents.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(ptank.air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
@@ -163,7 +152,7 @@
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
if(ptank.air_contents.phoron < 1) return
if(ptank.air_contents.gas["phoron"] < 1) return
if(!status) return
lit = !lit
if(lit)
@@ -212,8 +201,8 @@
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
//air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.phoron,get_dir(loc,target))
air_transfer.phoron = 0
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.gas["phoron"],get_dir(loc,target))
air_transfer.gas["phoron"] = 0
target.assume_air(air_transfer)
//Burn it based on transfered gas
//target.hotspot_expose(part4.air_contents.temperature*2,300)

View File

@@ -23,7 +23,7 @@
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
if(air_contents.gas["oxygen"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
@@ -55,14 +55,13 @@
proc/allow_thrust(num, mob/living/user as mob)
if(!(src.on))
return 0
if((num < 0.005 || src.air_contents.total_moles() < num))
if((num < 0.005 || src.air_contents.total_moles < num))
src.ion_trail.stop()
return 0
var/datum/gas_mixture/G = src.air_contents.remove(num)
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.phoron //fuck trace gases -Pete
if(allgases >= 0.005)
if(G.total_moles >= 0.005)
return 1
del(G)
@@ -80,8 +79,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/jetpack/oxygen
@@ -92,8 +90,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/jetpack/carbondioxide
@@ -108,13 +105,13 @@
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
//src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust(0,(6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
examine()
set src in usr
..()
if(air_contents.carbon_dioxide < 10)
if(air_contents.gas["carbon_dioxide"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return

View File

@@ -19,15 +19,14 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
if(air_contents.gas["oxygen"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
@@ -53,13 +52,8 @@
/obj/item/weapon/tank/anesthetic/New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
src.air_contents.trace_gases += trace_gas
//
air_contents.gas["oxygen"] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gas["sleeping_agent"] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.update_values()
return
@@ -76,17 +70,14 @@
examine()
set src in usr
..()
if(air_contents.oxygen < 1 && loc==usr)
if(air_contents.gas["oxygen"] < 1 && loc==usr)
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
//
src.air_contents.update_values()
src.air_contents.adjust_multi("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, "nitrogen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
return
@@ -105,9 +96,7 @@
/obj/item/weapon/tank/phoron/New()
..()
src.air_contents.phoron = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
src.air_contents.adjust_gas("phoron", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -139,9 +128,7 @@
New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
src.air_contents.adjust_gas("oxygen", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
@@ -149,7 +136,7 @@
examine()
set src in usr
..()
if(air_contents.oxygen < 0.2 && loc==usr)
if(air_contents.gas["oxygen"] < 0.2 && loc==usr)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
usr << sound('sound/effects/alert.ogg')
@@ -176,14 +163,12 @@
/obj/item/weapon/tank/nitrogen/New()
..()
src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/nitrogen/examine()
set src in usr
..()
if(air_contents.nitrogen < 10)
if(air_contents.gas["nitrogen"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)

View File

@@ -28,7 +28,7 @@
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
processing_objects.Add(src)
processing_objects.Add(src)
return
/obj/item/weapon/tank/Del()
@@ -91,24 +91,13 @@
var/pressure = air_contents.return_pressure()
manipulated_by = user.real_name //This person is aware of the contents of the tank.
var/total_moles = air_contents.total_moles()
var/total_moles = air_contents.total_moles
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
var/co2_concentration = air_contents.carbon_dioxide/total_moles
var/phoron_concentration = air_contents.phoron/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Phoron: [round(phoron_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
for(var/g in air_contents.gas)
user << "\blue [gas_data.name[g]]: [(round(air_contents.gas[g] / total_moles) * 100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
@@ -142,8 +131,8 @@
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
data["valveOpen"] = using_internal ? 1 : 0
data["maskConnected"] = 0
data["maskConnected"] = 0
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src || (location.wear_mask && (location.wear_mask.flags & MASKINTERNALS)))

View File

@@ -323,12 +323,7 @@
var/datum/gas_mixture/gas = (..())
if(!gas) return null
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
newgas.oxygen = gas.oxygen
newgas.carbon_dioxide = gas.carbon_dioxide
newgas.nitrogen = gas.nitrogen
newgas.phoron = gas.phoron
newgas.volume = gas.volume
newgas.temperature = gas.temperature
newgas.copy_from(gas)
if(newgas.temperature <= target_temp) return
if((newgas.temperature - cooling_power) > target_temp)

View File

@@ -206,15 +206,9 @@
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
var/datum/gas_mixture/napalm = new
var/phoronToDeduce = temperature/10
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
napalm.phoron = phoronToDeduce
napalm.temperature = 200+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= phoronToDeduce/100

View File

@@ -81,8 +81,7 @@ obj/structure/ex_act(severity)
/obj/structure/transit_tube_pod/New(loc)
..(loc)
air_contents.oxygen = MOLES_O2STANDARD * 2
air_contents.nitrogen = MOLES_N2STANDARD
air_contents.adjust_multi("oxygen", MOLES_O2STANDARD * 2, "nitrogen", MOLES_N2STANDARD)
air_contents.temperature = T20C
// Give auto tubes time to align before trying to start moving
@@ -123,8 +122,8 @@ obj/structure/ex_act(severity)
else if(!pod.moving && pod.dir in directions())
AM.loc = pod
return
/obj/structure/transit_tube/station/attack_hand(mob/user as mob)
if(!pod_moving)
for(var/obj/structure/transit_tube_pod/pod in loc)
@@ -359,11 +358,7 @@ obj/structure/ex_act(severity)
// datum, there might be problems if I don't...
/obj/structure/transit_tube_pod/return_air()
var/datum/gas_mixture/GM = new()
GM.oxygen = air_contents.oxygen
GM.carbon_dioxide = air_contents.carbon_dioxide
GM.nitrogen = air_contents.nitrogen
GM.phoron = air_contents.phoron
GM.temperature = air_contents.temperature
GM.copy_from(air_contents)
return GM
// For now, copying what I found in an unused FEA file (and almost identical in a
@@ -398,8 +393,8 @@ obj/structure/ex_act(severity)
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles() * transfer_in)
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles() * transfer_out)
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles * transfer_in)
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles * transfer_out)
loc.assume_air(from_int)
air_contents.merge(from_env)

View File

@@ -190,7 +190,7 @@
del(mymist)
ismist = 0
/obj/machinery/shower/HasEntered(atom/movable/O)
/obj/machinery/shower/Crossed(atom/movable/O)
..()
wash(O)
if(ismob(O))

View File

@@ -78,14 +78,7 @@
/turf/simulated/floor/engine/n20
New()
. = ..()
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 2000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
assume_gas("sleeping_agent", 2000)
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"

View File

@@ -87,13 +87,7 @@
new /obj/structure/girder(src)
src.ChangeTurf(/turf/simulated/floor)
for(var/turf/simulated/floor/target_tile in range(0,src))
/*if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()*/
var/datum/gas_mixture/napalm = new
var/phoronToDeduce = 20
napalm.phoron = phoronToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
target_tile.assume_gas("phoron", 20, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)

View File

@@ -132,14 +132,6 @@
M:inertia_dir = 0
..()
var/objects = 0
for(var/atom/A as mob|obj|turf|area in src)
if(objects > loopsanity) break
objects++
spawn( 0 )
if ((A && M))
A.HasEntered(M, 1)
return
objects = 0
for(var/atom/A as mob|obj|turf|area in range(1))
if(objects > loopsanity) break
objects++
@@ -222,6 +214,7 @@
///// Z-Level Stuff
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/obj/fire/old_fire = fire
//world << "Replacing [src.type] with [N]"
@@ -250,6 +243,9 @@
W.lighting_changed = 1
lighting_controller.changed_turfs += W
if(old_fire)
fire = old_fire
if (istype(W,/turf/simulated/floor))
W.RemoveLattice()
@@ -271,6 +267,9 @@
W.lighting_changed = 1
lighting_controller.changed_turfs += W
if(old_fire)
old_fire.RemoveFire()
if(air_master)
air_master.mark_for_update(src)