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

This commit is contained in:
Zuhayr
2014-11-16 13:43:17 +10:30
11 changed files with 241 additions and 214 deletions

View File

@@ -1,6 +1,6 @@
/obj/machinery/atmospherics/unary/vent_scrubber
icon = 'icons/atmos/vent_scrubber.dmi'
icon_state = "map_scrubber"
icon_state = "map_scrubber_off"
name = "Air Scrubber"
desc = "Has a valve and pump attached to it"
@@ -30,6 +30,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on
on = 1
icon_state = "map_scrubber_on"
/obj/machinery/atmospherics/unary/vent_scrubber/New()
..()

View File

@@ -11,8 +11,8 @@
var/canister_color = "yellow"
var/can_label = 1
var/filled = 0.5
pressure_resistance = 7*ONE_ATMOSPHERE
start_pressure = 45 * ONE_ATMOSPHERE
pressure_resistance = 7 * ONE_ATMOSPHERE
var/temperature_resistance = 1000 + T0C
volume = 1000
use_power = 0
@@ -24,33 +24,44 @@
icon_state = "redws"
canister_color = "redws"
can_label = 0
/obj/machinery/portable_atmospherics/canister/nitrogen
name = "Canister: \[N2\]"
icon_state = "red"
canister_color = "red"
can_label = 0
/obj/machinery/portable_atmospherics/canister/oxygen
name = "Canister: \[O2\]"
icon_state = "blue"
canister_color = "blue"
can_label = 0
/obj/machinery/portable_atmospherics/canister/phoron
name = "Canister \[Phoron\]"
icon_state = "orange"
canister_color = "orange"
can_label = 0
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
name = "Canister \[CO2\]"
icon_state = "black"
canister_color = "black"
can_label = 0
/obj/machinery/portable_atmospherics/canister/air
name = "Canister \[Air\]"
icon_state = "grey"
canister_color = "grey"
can_label = 0
/obj/machinery/portable_atmospherics/canister/air/airlock
filled = 0.05
start_pressure = 3 * ONE_ATMOSPHERE
/obj/machinery/portable_atmospherics/canister/empty/
start_pressure = 0
can_label = 1
/obj/machinery/portable_atmospherics/canister/empty/oxygen
name = "Canister: \[O2\]"
icon_state = "blue"
@@ -342,28 +353,23 @@ update_flag
return 1
/obj/machinery/portable_atmospherics/canister/phoron/New()
..()
src.air_contents.adjust_gas("phoron", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.air_contents.adjust_gas("phoron", MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/oxygen/New()
..()
src.air_contents.adjust_gas("oxygen", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.air_contents.adjust_gas("oxygen", MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
..()
air_contents.adjust_gas("sleeping_agent", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
air_contents.adjust_gas("sleeping_agent", MolesForPressure())
src.update_icon()
return 1
@@ -384,22 +390,21 @@ update_flag
..()
src.air_contents.adjust_gas("nitrogen", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.air_contents.adjust_gas("nitrogen", MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
..()
src.air_contents.adjust_gas("carbon_dioxide", (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
src.air_contents.adjust_gas("carbon_dioxide", MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/air/New()
..()
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))
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
src.update_icon()
return 1

View File

@@ -9,7 +9,8 @@
var/volume = 0
var/destroyed = 0
var/maximum_pressure = 90*ONE_ATMOSPHERE
var/start_pressure = ONE_ATMOSPHERE
var/maximum_pressure = 90 * ONE_ATMOSPHERE
/obj/machinery/portable_atmospherics/New()
..()
@@ -39,6 +40,14 @@
..()
/obj/machinery/portable_atmospherics/proc/StandardAirMix()
return list(
"oxygen" = O2STANDARD * MolesForPressure(),
"nitrogen" = N2STANDARD * MolesForPressure())
/obj/machinery/portable_atmospherics/proc/MolesForPressure(var/target_pressure = start_pressure)
return (target_pressure * air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
/obj/machinery/portable_atmospherics/update_icon()
return null

View File

@@ -14,10 +14,16 @@
power_rating = 7500 //7500 W ~ 10 HP
power_losses = 150
/obj/machinery/portable_atmospherics/powered/pump/filled
start_pressure = 90 * ONE_ATMOSPHERE
/obj/machinery/portable_atmospherics/powered/pump/New()
..()
cell = new/obj/item/weapon/cell(src)
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
/obj/machinery/portable_atmospherics/powered/pump/update_icon()
src.overlays = 0

View File

@@ -10,7 +10,6 @@
desc = "A remote control-switch for a door."
power_channel = ENVIRON
var/id = null
var/range = 10
var/normaldoorcontrol = CONTROL_POD_DOORS
var/desiredstate = 0 // Zero is closed, 1 is open.
var/specialfunctions = 1
@@ -65,7 +64,7 @@
return src.attack_hand(user)
/obj/machinery/door_control/proc/handle_door()
for(var/obj/machinery/door/airlock/D in range(range))
for(var/obj/machinery/door/airlock/D in world)
if(D.id_tag == src.id)
if(specialfunctions & OPEN)
if (D.density)
@@ -109,7 +108,7 @@
return
/obj/machinery/door_control/proc/handle_emitters(mob/user as mob)
for(var/obj/machinery/power/emitter/E in range(range))
for(var/obj/machinery/power/emitter/E in world)
if(E.id == src.id)
spawn(0)
E.activate(user)

View File

@@ -5,7 +5,7 @@
/area/research_outpost/hallway
name = "Research Outpost Hallway"
icon_state = "hallC"
icon_state = "anohallway"
/area/research_outpost/gearstore
name = "Expedition Preparation"
@@ -69,7 +69,7 @@
/area/research_outpost/entry
name = "Research Outpost Shuttle Dock"
icon_state = "entry"
icon_state = "anoentry"
/area/research_outpost/longtermstorage
name = "Long-Term Storage"