diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index f381c0de53a..179e56db9b4 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -26,7 +26,7 @@ ///Check if the object can be unwrenched var/can_unwrench = FALSE ///Bitflag of the initialized directions (NORTH | SOUTH | EAST | WEST) - var/initialize_directions = NONE + var/initialize_directions = ALL_CARDINALS ///The color of the pipe var/pipe_color = ATMOS_COLOR_OMNI ///What layer the pipe is in (from 1 to 5, default 3) @@ -81,29 +81,15 @@ fire = 100 acid = 70 -/obj/machinery/atmospherics/post_machine_initialize() - . = ..() - update_name() - -/obj/machinery/atmospherics/examine(mob/user) - . = ..() - . += span_notice("[src] is on layer [piping_layer].") - if((vent_movement & VENTCRAWL_ENTRANCE_ALLOWED) && isliving(user)) - var/mob/living/L = user - if(HAS_TRAIT(L, TRAIT_VENTCRAWLER_NUDE) || HAS_TRAIT(L, TRAIT_VENTCRAWLER_ALWAYS)) - . += span_notice("Alt-click to crawl through it.") - -/obj/machinery/atmospherics/New(loc, process = TRUE, setdir, init_dir = ALL_CARDINALS) +/obj/machinery/atmospherics/Initialize(mapload, process = TRUE, setdir, init_dir = initialize_directions) if(!isnull(setdir)) setDir(setdir) if(pipe_flags & PIPING_CARDINAL_AUTONORMALIZE) normalize_cardinal_directions() nodes = new(device_type) init_processing = process - ..() set_init_directions(init_dir) -/obj/machinery/atmospherics/Initialize(mapload) if(mapload && name != initial(name)) override_naming = TRUE var/turf/turf_loc = null @@ -120,6 +106,10 @@ SSair.start_processing_machine(src) return ..() +/obj/machinery/atmospherics/post_machine_initialize() + . = ..() + update_name() + /obj/machinery/atmospherics/Destroy() for(var/i in 1 to device_type) nullify_node(i) @@ -132,6 +122,14 @@ return ..() +/obj/machinery/atmospherics/examine(mob/user) + . = ..() + . += span_notice("[src] is on layer [piping_layer].") + if((vent_movement & VENTCRAWL_ENTRANCE_ALLOWED) && isliving(user)) + var/mob/living/L = user + if(HAS_TRAIT(L, TRAIT_VENTCRAWLER_NUDE) || HAS_TRAIT(L, TRAIT_VENTCRAWLER_ALWAYS)) + . += span_notice("Alt-click to crawl through it.") + /** * Sets up our pipe hiding logic, consolidated in one place so subtypes may override it. * This lets subtypes implement their own hiding logic without needing to worry about conflicts with the parent hiding logic. diff --git a/code/modules/atmospherics/machinery/bluespace_vendor.dm b/code/modules/atmospherics/machinery/bluespace_vendor.dm index 87f1e09a1a1..0973e70dcbd 100644 --- a/code/modules/atmospherics/machinery/bluespace_vendor.dm +++ b/code/modules/atmospherics/machinery/bluespace_vendor.dm @@ -62,7 +62,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/bluespace_vendor, 30) fire = 80 acid = 30 -/obj/machinery/bluespace_vendor/New(loc, ndir, nbuild) +/obj/machinery/bluespace_vendor/Initialize(mapload, ndir, nbuild) . = ..() if(nbuild) @@ -70,8 +70,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/bluespace_vendor, 30) update_appearance() -/obj/machinery/bluespace_vendor/Initialize(mapload) - . = ..() purchased_gas_mix = new(100) AddComponent(/datum/component/payment, 0, SSeconomy.get_dep_account(ACCOUNT_ENG), PAYMENT_ANGRY) find_and_hang_on_wall( FALSE) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index 338be57fbbb..962cd3e9d68 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -102,8 +102,8 @@ /obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume name = "large dual-port air vent" -/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New() - ..() +/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/Initialize(mapload) + . = ..() var/datum/gas_mixture/air1 = airs[1] var/datum/gas_mixture/air2 = airs[2] air1.volume = 1000 diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 27634707145..414aba876ad 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -28,14 +28,10 @@ return . /obj/machinery/atmospherics/components/Initialize(mapload) - . = ..() - update_appearance() - -/obj/machinery/atmospherics/components/New() parents = new(device_type) airs = new(device_type) - ..() + . = ..() for(var/i in 1 to device_type) if(airs[i]) @@ -44,6 +40,8 @@ component_mixture.volume = 200 airs[i] = component_mixture + update_appearance() + // Iconnery /** diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 685237ae395..13a52bba627 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -19,6 +19,9 @@ /obj/machinery/atmospherics/components/trinary/mixer/Initialize(mapload) . = ..() + var/datum/gas_mixture/air3 = airs[3] + air3.volume = 300 + airs[3] = air3 register_context() /obj/machinery/atmospherics/components/trinary/mixer/add_context(atom/source, list/context, obj/item/held_item, mob/user) @@ -58,12 +61,6 @@ var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational icon_state = "mixer_[on_state ? "on" : "off"]-[set_overlay_offset(piping_layer)][flipped ? "_f" : ""]" -/obj/machinery/atmospherics/components/trinary/mixer/New() - ..() - var/datum/gas_mixture/air3 = airs[3] - air3.volume = 300 - airs[3] = air3 - /obj/machinery/atmospherics/components/trinary/mixer/process_atmos() ..() if(!on || !(nodes[1] && nodes[2] && nodes[3]) && !is_operational) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm index 7129db8f32c..2a473287163 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/airlock_pump.dm @@ -153,7 +153,7 @@ tile_air_pressure = max(0, local_turf.return_air().return_pressure()) on_dock_request(tile_air_pressure) -/obj/machinery/atmospherics/components/unary/airlock_pump/New() +/obj/machinery/atmospherics/components/unary/airlock_pump/Initialize(mapload) . = ..() var/datum/gas_mixture/distro_air = airs[1] var/datum/gas_mixture/waste_air = airs[2] diff --git a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm index 13b76f33826..c23f5457efc 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm @@ -20,7 +20,7 @@ ///Reference to the connected device var/obj/machinery/portable_atmospherics/connected_device -/obj/machinery/atmospherics/components/unary/portables_connector/New() +/obj/machinery/atmospherics/components/unary/portables_connector/Initialize(mapload) . = ..() var/datum/gas_mixture/air_contents = airs[1] air_contents.volume = 0 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 4d0f4a614ad..5528b838ff0 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -366,8 +366,8 @@ name = "large air vent" power_channel = AREA_USAGE_EQUIP -/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New() - ..() +/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/Initialize(mapload) + . = ..() var/datum/gas_mixture/air_contents = airs[1] air_contents.volume = 1000 diff --git a/code/modules/atmospherics/machinery/pipes/multiz.dm b/code/modules/atmospherics/machinery/pipes/multiz.dm index 0d82afa3972..dfbd4097cdc 100644 --- a/code/modules/atmospherics/machinery/pipes/multiz.dm +++ b/code/modules/atmospherics/machinery/pipes/multiz.dm @@ -24,11 +24,7 @@ ///Reference to the node var/obj/machinery/atmospherics/front_node = null -/* We use New() instead of Initialize() because these values are used in update_icon() - * in the mapping subsystem init before Initialize() is called in the atoms subsystem init. - * This is true for the other manifolds (the 4 ways and the heat exchanges) too. - */ -/obj/machinery/atmospherics/pipe/multiz/New() +/obj/machinery/atmospherics/pipe/multiz/Initialize(mapload, process, setdir, init_dir) icon_state = "" center = mutable_appearance(icon, "adapter_center", layer = HIGH_OBJ_LAYER) pipe = mutable_appearance(icon, "pipe-[piping_layer]") diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index 8f77d733653..b4c48341f83 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -22,11 +22,11 @@ buckle_requires_restraints = TRUE buckle_lying = NO_BUCKLE_LYING -/obj/machinery/atmospherics/pipe/New() +/obj/machinery/atmospherics/pipe/Initialize(mapload, process, setdir, init_dir) add_atom_colour(pipe_color, FIXED_COLOUR_PRIORITY) if (!volume) // Pipes can have specific volumes or have it determined by their device_type. volume = UNARY_PIPE_VOLUME * device_type - . = ..() + return ..() /obj/machinery/atmospherics/pipe/proc/set_volume(new_volume) if(volume == new_volume)