Initialize Refactor

This commit is contained in:
CitadelStationBot
2017-04-26 16:03:17 -05:00
parent e7df2bc14a
commit cea81a3357
25 changed files with 277 additions and 105 deletions
+10
View File
@@ -0,0 +1,10 @@
diff a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm (rejected hunks)
@@ -220,7 +220,7 @@
id = newid
update()
- return INITIALIZE_HINT_LATELOAD
+ return INITIALIZE_HINT_LATELOAD //for machines list
/obj/machinery/conveyor_switch/LateInitialize()
conveyors = list()
+11 -11
View File
@@ -64,17 +64,17 @@
deconstruct()
/obj/machinery/disposal/Initialize(mapload)
. = mapload //late-initialize, we need turfs to have air
if(initialized) //will only be run on late mapload initialization
//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())
var/datum/gas_mixture/removed = env.remove(SEND_PRESSURE + 1)
air_contents.merge(removed)
trunk_check()
else
..()
..()
return INITIALIZE_HINT_LATELOAD //we need turfs to have air
/obj/machinery/disposal/LateInitialize()
//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())
var/datum/gas_mixture/removed = env.remove(SEND_PRESSURE + 1)
air_contents.merge(removed)
trunk_check()
/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)