mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Convert most of /obj/machinery to use Initialize rather than New (#17845)
* Switch a bunch of /obj/machinery from /New to /Initialize This is an easy and uncontroversial batch. No globs, no late init, and stuff. * Move more machinery to Initialize This time the ones dealing with GLOB vars, as well as some simpler ones i missed previously. * More tricky New -> Initialize migrations * The last of machinery Initialize conversion * fixups * Newscaster armor fix * styling * Comment on armor handling * Move newscaster armor definition back to datum * farie82 review * kill extra .= Co-authored-by: Farie82 <farie82@users.noreply.github.com> * farie's review part 2 Co-authored-by: Farie82 <farie82@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -32,15 +32,6 @@
|
||||
active_power_usage = 600
|
||||
idle_power_usage = 100
|
||||
|
||||
|
||||
// create a new disposal
|
||||
// find the attached trunk (if present)
|
||||
/obj/machinery/disposal/New()
|
||||
..()
|
||||
trunk_check()
|
||||
//gas.volume = 1.05 * CELLSTANDARD
|
||||
update()
|
||||
|
||||
/obj/machinery/disposal/proc/trunk_check()
|
||||
var/obj/structure/disposalpipe/trunk/T = locate() in loc
|
||||
if(!T)
|
||||
@@ -82,9 +73,9 @@
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct()
|
||||
|
||||
/obj/machinery/disposal/Initialize()
|
||||
/obj/machinery/disposal/Initialize(mapload)
|
||||
// this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
|
||||
..()
|
||||
. = ..()
|
||||
var/atom/L = loc
|
||||
var/datum/gas_mixture/env = new
|
||||
env.copy_from(L.return_air())
|
||||
@@ -92,6 +83,7 @@
|
||||
air_contents = new
|
||||
air_contents.merge(removed)
|
||||
trunk_check()
|
||||
update()
|
||||
|
||||
// attack by item places it in to disposal
|
||||
/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -274,12 +274,12 @@
|
||||
deconstructs_to = PIPE_DISPOSALS_CHUTE
|
||||
var/can_deconstruct = FALSE
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/New()
|
||||
..()
|
||||
spawn(5)
|
||||
trunk = locate() in src.loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
/obj/machinery/disposal/deliveryChute/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
trunk = locate() in src.loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/interact()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user