New() goes in the trash, we've gotta Initialize()

This commit is contained in:
CitadelStationBot
2017-04-26 17:15:48 -05:00
parent e7df2bc14a
commit bcab389ca2
69 changed files with 358 additions and 245 deletions
+6 -6
View File
@@ -24,8 +24,8 @@
// Auto conveyour is always on unless unpowered
/obj/machinery/conveyor/auto/New(loc, newdir)
..(loc, newdir)
/obj/machinery/conveyor/auto/Initialize(mapload, newdir)
. = ..()
operating = 1
update_move_direction()
@@ -43,8 +43,8 @@
icon_state = "conveyor[operating * verted]"
// create a conveyor
/obj/machinery/conveyor/New(loc, newdir)
..(loc)
/obj/machinery/conveyor/Initialize(mapload, newdir)
. = ..()
if(newdir)
setDir(newdir)
update_move_direction()
@@ -326,8 +326,8 @@
w_class = WEIGHT_CLASS_BULKY
var/id = "" //inherited by the switch
/obj/item/conveyor_switch_construct/New()
..()
/obj/item/conveyor_switch_construct/Initialize()
. = ..()
id = rand() //this couldn't possibly go wrong
/obj/item/conveyor_switch_construct/afterattack(atom/A, mob/user, proximity)
+16 -23
View File
@@ -147,8 +147,8 @@
var/obj/structure/disposalconstruct/stored
// new pipe, set the icon_state as on map
/obj/structure/disposalpipe/New(loc,var/obj/structure/disposalconstruct/make_from)
..()
/obj/structure/disposalpipe/Initialize(mapload, obj/structure/disposalconstruct/make_from)
. = ..()
if(make_from && !QDELETED(make_from))
base_icon_state = make_from.base_state
@@ -176,7 +176,6 @@
stored.ptype = DISP_SORTJUNCTION
if("pipe-j2s")
stored.ptype = DISP_SORTJUNCTION_FLIP
return
// pipe is deleted
@@ -359,15 +358,14 @@
/obj/structure/disposalpipe/segment
icon_state = "pipe-s"
/obj/structure/disposalpipe/segment/New()
..()
/obj/structure/disposalpipe/segment/Initialize()
. = ..()
if(stored.ptype == DISP_PIPE_STRAIGHT)
dpdir = dir | turn(dir, 180)
else
dpdir = dir | turn(dir, -90)
update()
return
@@ -376,8 +374,8 @@
/obj/structure/disposalpipe/junction
icon_state = "pipe-j1"
/obj/structure/disposalpipe/junction/New()
..()
/obj/structure/disposalpipe/junction/Initialize()
. = ..()
switch(stored.ptype)
if(DISP_JUNCTION)
dpdir = dir | turn(dir, -90) | turn(dir,180)
@@ -386,7 +384,6 @@
if(DISP_YJUNCTION)
dpdir = dir | turn(dir,90) | turn(dir, -90)
update()
return
// next direction to move
@@ -452,8 +449,8 @@
dpdir = sortdir | posdir | negdir
/obj/structure/disposalpipe/sortjunction/New()
..()
/obj/structure/disposalpipe/sortjunction/Initialize()
. = ..()
// Generate a list of soring tags.
if(sortType)
@@ -468,7 +465,6 @@
updatedir()
update()
return
/obj/structure/disposalpipe/sortjunction/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/destTagger))
@@ -516,8 +512,8 @@
var/negdir = 0
var/sortdir = 0
/obj/structure/disposalpipe/wrapsortjunction/New()
..()
/obj/structure/disposalpipe/wrapsortjunction/Initialize()
. = ..()
posdir = dir
if(stored.ptype == DISP_SORTJUNCTION)
sortdir = turn(posdir, -90)
@@ -529,7 +525,6 @@
dpdir = sortdir | posdir | negdir
update()
return
// next direction to move
// if coming in from negdir, then next is primary dir or sortdir
@@ -557,14 +552,13 @@
icon_state = "pipe-t"
var/obj/linked // the linked obj/machinery/disposal or obj/disposaloutlet
/obj/structure/disposalpipe/trunk/New()
..()
/obj/structure/disposalpipe/trunk/Initialize()
. = ..()
dpdir = dir
spawn(1)
getlinked()
update()
return
/obj/structure/disposalpipe/trunk/Destroy()
if(linked)
@@ -631,8 +625,8 @@
// i.e. will be treated as an empty turf
desc = "A broken piece of disposal pipe."
/obj/structure/disposalpipe/broken/New()
..()
/obj/structure/disposalpipe/broken/Initialize()
. = ..()
update()
// the disposal outlet machine
@@ -655,9 +649,8 @@
var/start_eject = 0
var/eject_range = 2
/obj/structure/disposaloutlet/New(loc, var/obj/structure/disposalconstruct/make_from)
..()
/obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from)
. = ..()
if(make_from)
setDir(make_from.dir)
make_from.loc = src
+4 -5
View File
@@ -26,9 +26,8 @@
// create a new disposal
// find the attached trunk (if present) and init gas resvr.
/obj/machinery/disposal/New(loc, var/obj/structure/disposalconstruct/make_from)
..()
/obj/machinery/disposal/Initialize(mapload, obj/structure/disposalconstruct/make_from)
. = ..()
if(make_from)
setDir(make_from.dir)
make_from.loc = 0
@@ -445,8 +444,8 @@
icon_state = "intake"
pressure_charging = FALSE // the chute doesn't need charging and always works
/obj/machinery/disposal/deliveryChute/New(loc,var/obj/structure/disposalconstruct/make_from)
..()
/obj/machinery/disposal/deliveryChute/Initialize(mapload, obj/structure/disposalconstruct/make_from)
. = ..()
stored.ptype = DISP_END_CHUTE
spawn(5)
trunk = locate() in loc