mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 20:46:29 +01:00
Update every initialize() proc to return an initialize hint.
* Yes, all of them. * Also did a few corrections to redundant New() and broken Destroy() along the way * Renamed the turf_initializer.initialize() proc to InitializeTurf to avoid confusion. * Subsumed /area/proc/initialize into /atom/proc/initialize() - Made /area's LateInitialize to get same behavior as before.
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
pixel_y = 0
|
||||
|
||||
/obj/structure/sign/poster/initialize()
|
||||
. = ..()
|
||||
if (poster_type)
|
||||
var/path = text2path(poster_type)
|
||||
var/datum/poster/design = new path
|
||||
|
||||
@@ -104,7 +104,7 @@ steam.start() -- spawns the effect
|
||||
T.hotspot_expose(1000,100)
|
||||
|
||||
/obj/effect/effect/sparks/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
schedule_task_in(5 SECONDS, /proc/qdel, list(src))
|
||||
|
||||
/obj/effect/effect/sparks/Destroy()
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
delete_me = 1
|
||||
|
||||
/obj/effect/landmark/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(delete_me)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/Destroy(var/force = FALSE)
|
||||
if(delete_me || force)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/temporary_effect/cleave_attack/initialize() // Makes the slash fade smoothly. When completely transparent it should qdel itself.
|
||||
. = ..()
|
||||
animate(src, alpha = 0, time = time_to_die - 1)
|
||||
|
||||
/obj/effect/temporary_effect/shuttle_landing
|
||||
@@ -44,4 +45,4 @@
|
||||
|
||||
/obj/effect/temporary_effect/shuttle_landing/initialize()
|
||||
flick("shuttle_warning", src) // flick() forces the animation to always begin at the start.
|
||||
..()
|
||||
. = ..()
|
||||
@@ -129,6 +129,7 @@
|
||||
var/landmark_id = null
|
||||
|
||||
/obj/effect/step_trigger/teleporter/landmark/initialize()
|
||||
. = ..()
|
||||
for(var/obj/effect/landmark/teleport_mark/mark in tele_landmarks)
|
||||
if(mark.landmark_id == landmark_id)
|
||||
the_landmark = mark
|
||||
|
||||
@@ -110,7 +110,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/security/initialize()
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/detective
|
||||
name = "\improper D.E.T.E.C.T. cartridge"
|
||||
@@ -166,7 +166,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/signal/initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/quartermaster
|
||||
name = "\improper Space Parts & Space Vendors cartridge"
|
||||
@@ -200,7 +200,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/hos/initialize()
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/ce
|
||||
name = "\improper Power-On DELUXE"
|
||||
@@ -225,7 +225,7 @@ var/list/civilian_cartridges = list(
|
||||
|
||||
/obj/item/weapon/cartridge/rd/initialize()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/cartridge/captain
|
||||
name = "\improper Value-PAK cartridge"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/power_use = 1
|
||||
|
||||
/obj/item/device/flashlight/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/New()
|
||||
|
||||
@@ -18,6 +18,7 @@ var/list/GPS_list = list()
|
||||
var/can_hide_signal = FALSE // If it can toggle the above var.
|
||||
|
||||
/obj/item/device/gps/initialize()
|
||||
. = ..()
|
||||
GPS_list += src
|
||||
name = "global positioning system ([gps_tag])"
|
||||
update_icon()
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
ks1type = /obj/item/device/encryptionkey/raider
|
||||
|
||||
/obj/item/device/radio/headset/raider/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
set_frequency(RAID_FREQ)
|
||||
|
||||
/obj/item/device/radio/headset/binary
|
||||
|
||||
@@ -80,7 +80,7 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
|
||||
. = ..()
|
||||
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
|
||||
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
to_chat(usr, "Audio feed is [radio.broadcasting ? "on" : "off"]")
|
||||
|
||||
/obj/item/device/tvcamera/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
camera = new(src)
|
||||
camera.c_tag = channel
|
||||
camera.status = FALSE
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/apply_tape = FALSE
|
||||
|
||||
/obj/item/taperoll/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(apply_tape)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
@@ -20,7 +20,7 @@
|
||||
var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in T
|
||||
if(airlock)
|
||||
afterattack(airlock, null, TRUE)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
var/list/image/hazard_overlays
|
||||
|
||||
@@ -979,7 +979,7 @@ var/list/multi_point_spawns
|
||||
var/weight // Probability weight for this spawn point
|
||||
|
||||
/obj/random_multi/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
weight = max(1, round(weight))
|
||||
|
||||
if(!multi_point_spawns)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
var/static/list/possible_tech = list(TECH_MATERIAL, TECH_ENGINEERING, TECH_PHORON, TECH_POWER, TECH_BIO, TECH_COMBAT, TECH_MAGNET, TECH_DATA)
|
||||
|
||||
/obj/item/prop/alien/junk/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
icon_state = pick(possible_states)
|
||||
var/list/techs = possible_tech.Copy()
|
||||
origin_tech = list()
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/catwalk/initialize()
|
||||
. = ..()
|
||||
for(var/obj/structure/catwalk/O in range(1))
|
||||
O.update_icon()
|
||||
for(var/obj/structure/catwalk/C in get_turf(src))
|
||||
if(C != src)
|
||||
warning("Duplicate [type] in [loc] ([x], [y], [z])")
|
||||
qdel(C)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
update_icon()
|
||||
|
||||
/obj/structure/catwalk/Destroy()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/list/will_contain
|
||||
|
||||
/obj/structure/closet/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(will_contain)
|
||||
create_objects_in_loc(src, will_contain)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
density = 1
|
||||
|
||||
/obj/structure/largecrate/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/obj/I in src.loc)
|
||||
if(I.density || I.anchored || I == src || !I.simulated)
|
||||
continue
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
/obj/structure/flora/sif/subterranean/initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,2)]"
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/flora/sif/eyes
|
||||
name = "mysterious bulbs"
|
||||
@@ -315,4 +315,4 @@
|
||||
|
||||
/obj/structure/flora/sif/eyes/initialize()
|
||||
icon_state = "[initial(icon_state)][rand(1,3)]"
|
||||
..()
|
||||
. = ..()
|
||||
@@ -55,7 +55,7 @@
|
||||
var/delay_to_try_again = 20 MINUTES // How long to wait if first attempt fails. Set to 0 to never try again.
|
||||
|
||||
/obj/structure/ghost_pod/automatic/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
spawn(delay_to_self_open)
|
||||
if(src)
|
||||
trigger()
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
// flags = CONDUCT
|
||||
|
||||
/obj/structure/lattice/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/mineral)))
|
||||
qdel(src)
|
||||
return
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
for(var/obj/structure/lattice/LAT in src.loc)
|
||||
if(LAT != src)
|
||||
qdel(LAT)
|
||||
crash_with("Found multiple lattices at '[log_info_line(loc)]'")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
icon = 'icons/obj/smoothlattice.dmi'
|
||||
icon_state = "latticeblank"
|
||||
updateOverlays()
|
||||
|
||||
@@ -119,7 +119,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
|
||||
|
||||
/obj/structure/loot_pile/maint/initialize()
|
||||
icon_state = pick(icon_states_to_use)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
// Has large amounts of possible items, most of which may or may not be useful.
|
||||
/obj/structure/loot_pile/maint/junk
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
I.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
. = ..()
|
||||
|
||||
//attaching papers!!
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
verbs += /obj/structure/proc/climb_on
|
||||
|
||||
/obj/structure/railing/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(src.anchored)
|
||||
update_icon(0)
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ FLOOR SAFES
|
||||
|
||||
|
||||
/obj/structure/safe/initialize()
|
||||
. = ..()
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
|
||||
I.forceMove(src)
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
|
||||
if(user && canhear)
|
||||
@@ -175,7 +175,7 @@ obj/structure/safe/ex_act(severity)
|
||||
layer = 2.5
|
||||
|
||||
/obj/structure/safe/floor/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
if(istype(T) && !T.is_plating())
|
||||
hide(1)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
return FALSE
|
||||
|
||||
/obj/effect/wingrille_spawn/initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!win_path)
|
||||
return
|
||||
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
|
||||
|
||||
Reference in New Issue
Block a user