Merge pull request #3931 from Citadel-Station-13/upstream-merge-32685
[MIRROR] Little things 2 Revenge of atmos components
This commit is contained in:
@@ -28,12 +28,6 @@ Class Variables:
|
|||||||
component_parts (list)
|
component_parts (list)
|
||||||
A list of component parts of machine used by frame based machines.
|
A list of component parts of machine used by frame based machines.
|
||||||
|
|
||||||
uid (num)
|
|
||||||
Unique id of machine across all machines.
|
|
||||||
|
|
||||||
gl_uid (global num)
|
|
||||||
Next uid value in sequence
|
|
||||||
|
|
||||||
stat (bitflag)
|
stat (bitflag)
|
||||||
Machine status bit flags.
|
Machine status bit flags.
|
||||||
Possible bit flags:
|
Possible bit flags:
|
||||||
@@ -77,9 +71,6 @@ Class Procs:
|
|||||||
|
|
||||||
Default definition does nothing.
|
Default definition does nothing.
|
||||||
|
|
||||||
assign_uid() 'game/machinery/machine.dm'
|
|
||||||
Called by machine to assign a value to the uid variable.
|
|
||||||
|
|
||||||
process() 'game/machinery/machine.dm'
|
process() 'game/machinery/machine.dm'
|
||||||
Called by the 'machinery subsystem' once per machinery tick for each machine that is listed in its 'machines' list.
|
Called by the 'machinery subsystem' once per machinery tick for each machine that is listed in its 'machines' list.
|
||||||
|
|
||||||
@@ -506,7 +497,7 @@ Class Procs:
|
|||||||
#if DM_VERSION >= 513
|
#if DM_VERSION >= 513
|
||||||
#warning 512 is definitely stable now, remove the old code
|
#warning 512 is definitely stable now, remove the old code
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DM_VERSION >= 512
|
#if DM_VERSION >= 512
|
||||||
. += hex2num(md5[i])
|
. += hex2num(md5[i])
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
/obj/machinery/atmospherics/components/unary/generator_input
|
|
||||||
|
|
||||||
icon_state = "he_intact"
|
|
||||||
density = TRUE
|
|
||||||
|
|
||||||
name = "generator input"
|
|
||||||
desc = "An input for a generator."
|
|
||||||
layer = LOW_OBJ_LAYER
|
|
||||||
|
|
||||||
var/update_cycle
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/generator_input/update_icon()
|
|
||||||
icon_state = NODE1 ? "intact" : "exposed"
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/generator_input/proc/return_exchange_air()
|
|
||||||
return AIR1
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
/obj/machinery/atmospherics/components/unary/oxygen_generator
|
|
||||||
|
|
||||||
icon_state = "o2gen_map"
|
|
||||||
|
|
||||||
name = "oxygen generator"
|
|
||||||
desc = "Generates oxygen."
|
|
||||||
|
|
||||||
dir = SOUTH
|
|
||||||
initialize_directions = SOUTH
|
|
||||||
layer = GAS_SCRUBBER_LAYER
|
|
||||||
|
|
||||||
var/on = FALSE
|
|
||||||
|
|
||||||
var/oxygen_content = 10
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/oxygen_generator/update_icon_nopipes()
|
|
||||||
|
|
||||||
cut_overlays()
|
|
||||||
if(showpipe)
|
|
||||||
add_overlay(getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "scrub_cap", initialize_directions)) //it works for now
|
|
||||||
|
|
||||||
if(!NODE1 || !on || !is_operational())
|
|
||||||
icon_state = "o2gen_off"
|
|
||||||
return
|
|
||||||
|
|
||||||
else
|
|
||||||
icon_state = "o2gen_on"
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/oxygen_generator/New()
|
|
||||||
..()
|
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
|
||||||
air_contents.volume = 50
|
|
||||||
AIR1 = air_contents
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/oxygen_generator/process_atmos()
|
|
||||||
|
|
||||||
..()
|
|
||||||
|
|
||||||
if(!on)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
|
||||||
|
|
||||||
var/total_moles = air_contents.total_moles()
|
|
||||||
|
|
||||||
if(total_moles < oxygen_content)
|
|
||||||
var/current_heat_capacity = air_contents.heat_capacity()
|
|
||||||
|
|
||||||
var/added_oxygen = oxygen_content - total_moles
|
|
||||||
|
|
||||||
air_contents.temperature = (current_heat_capacity*air_contents.temperature + 20*added_oxygen*T0C)/(current_heat_capacity+20*added_oxygen)
|
|
||||||
ASSERT_GAS(/datum/gas/oxygen, air_contents)
|
|
||||||
air_contents.gases[/datum/gas/oxygen][MOLES] += added_oxygen
|
|
||||||
|
|
||||||
update_parents()
|
|
||||||
|
|
||||||
return 1
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 33 KiB |
@@ -1203,10 +1203,8 @@
|
|||||||
#include "code\modules\atmospherics\machinery\components\trinary_devices\mixer.dm"
|
#include "code\modules\atmospherics\machinery\components\trinary_devices\mixer.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\trinary_devices\trinary_devices.dm"
|
#include "code\modules\atmospherics\machinery\components\trinary_devices\trinary_devices.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\cryo.dm"
|
#include "code\modules\atmospherics\machinery\components\unary_devices\cryo.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\generator_input.dm"
|
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\heat_exchanger.dm"
|
#include "code\modules\atmospherics\machinery\components\unary_devices\heat_exchanger.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\outlet_injector.dm"
|
#include "code\modules\atmospherics\machinery\components\unary_devices\outlet_injector.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\oxygen_generator.dm"
|
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\portables_connector.dm"
|
#include "code\modules\atmospherics\machinery\components\unary_devices\portables_connector.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\tank.dm"
|
#include "code\modules\atmospherics\machinery\components\unary_devices\tank.dm"
|
||||||
#include "code\modules\atmospherics\machinery\components\unary_devices\thermomachine.dm"
|
#include "code\modules\atmospherics\machinery\components\unary_devices\thermomachine.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user