mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
More New() -> Initialize() for /obj/structure (#15158)
* More New() -> Initialize() for /obj/structure * Updates these * Tweaks + Fixes
This commit is contained in:
@@ -418,8 +418,8 @@
|
||||
var/obj/structure/spacevine_controller/master = null
|
||||
var/list/mutations = list()
|
||||
|
||||
/obj/structure/spacevine/New()
|
||||
..()
|
||||
/obj/structure/spacevine/Initialize(mapload)
|
||||
. = ..()
|
||||
color = "#ffffff"
|
||||
|
||||
/obj/structure/spacevine/examine(mob/user)
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
/obj/structure/bookcase/manuals/medical
|
||||
name = "Medical Manuals bookcase"
|
||||
|
||||
/obj/structure/bookcase/manuals/medical/New()
|
||||
..()
|
||||
/obj/structure/bookcase/manuals/medical/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/book/manual/medical_cloning(src)
|
||||
update_icon()
|
||||
|
||||
@@ -108,8 +108,8 @@
|
||||
/obj/structure/bookcase/manuals/engineering
|
||||
name = "Engineering Manuals bookcase"
|
||||
|
||||
/obj/structure/bookcase/manuals/engineering/New()
|
||||
..()
|
||||
/obj/structure/bookcase/manuals/engineering/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/book/manual/engineering_construction(src)
|
||||
new /obj/item/book/manual/engineering_particle_accelerator(src)
|
||||
new /obj/item/book/manual/engineering_hacking(src)
|
||||
@@ -121,8 +121,8 @@
|
||||
/obj/structure/bookcase/manuals/research_and_development
|
||||
name = "R&D Manuals bookcase"
|
||||
|
||||
/obj/structure/bookcase/manuals/research_and_development/New()
|
||||
..()
|
||||
/obj/structure/bookcase/manuals/research_and_development/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/book/manual/research_and_development(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
icon_state = "random_bookcase"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bookcase/random/New()
|
||||
/obj/structure/bookcase/random/Initialize()
|
||||
. = ..()
|
||||
if(!book_count || !isnum(book_count))
|
||||
update_icon()
|
||||
@@ -54,7 +54,7 @@
|
||||
if(category)
|
||||
c = " AND category=:category"
|
||||
sql_params["category"] = category
|
||||
|
||||
|
||||
sql_params["amount"] = amount
|
||||
var/datum/db_query/query_get_random_books = SSdbcore.NewQuery("SELECT author, title, content FROM [format_table_name("library")] WHERE (isnull(flagged) OR flagged = 0)[c] GROUP BY title ORDER BY rand() LIMIT :amount", sql_params)
|
||||
if(!query_get_random_books.warn_execute())
|
||||
|
||||
@@ -162,8 +162,8 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
density = FALSE
|
||||
var/beacon_network = "station"
|
||||
|
||||
/obj/structure/extraction_point/New()
|
||||
..()
|
||||
/obj/structure/extraction_point/Initialize(mapload)
|
||||
. = ..()
|
||||
name += " ([rand(100,999)]) ([get_location_name(src)])"
|
||||
GLOB.total_extraction_beacons += src
|
||||
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
icon_state = "stickyweb1"
|
||||
var/creator_ckey = null
|
||||
|
||||
/obj/structure/spider/terrorweb/New()
|
||||
..()
|
||||
/obj/structure/spider/terrorweb/Initialize(mapload)
|
||||
. = ..()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
desc = "This multi-layered web seems to be able to resist air pressure."
|
||||
|
||||
|
||||
/obj/structure/spider/terrorweb/queen/New()
|
||||
/obj/structure/spider/terrorweb/queen/Initialize(mapload)
|
||||
. = ..()
|
||||
air_update_turf(TRUE)
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
var/debug_ai_choices = FALSE
|
||||
var/movement_disabled = FALSE
|
||||
|
||||
/obj/structure/spider/spiderling/terror_spiderling/New()
|
||||
..()
|
||||
/obj/structure/spider/spiderling/terror_spiderling/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.ts_spiderling_list += src
|
||||
if(is_away_level(z))
|
||||
spider_awaymission = TRUE
|
||||
@@ -186,8 +186,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/terror_spider/proc/DoLayTerrorEggs(lay_type, lay_number)
|
||||
stop_automated_movement = 1
|
||||
var/obj/structure/spider/eggcluster/terror_eggcluster/C = new /obj/structure/spider/eggcluster/terror_eggcluster(get_turf(src))
|
||||
C.spiderling_type = lay_type
|
||||
var/obj/structure/spider/eggcluster/terror_eggcluster/C = new /obj/structure/spider/eggcluster/terror_eggcluster(get_turf(src), lay_type)
|
||||
C.spiderling_number = lay_number
|
||||
C.spider_myqueen = spider_myqueen
|
||||
C.spider_mymother = src
|
||||
@@ -209,27 +208,29 @@
|
||||
var/spiderling_number = 1
|
||||
var/list/enemies = list()
|
||||
|
||||
/obj/structure/spider/eggcluster/terror_eggcluster/New()
|
||||
..()
|
||||
/obj/structure/spider/eggcluster/terror_eggcluster/Initialize(mapload, lay_type)
|
||||
. = ..()
|
||||
GLOB.ts_egg_list += src
|
||||
spawn(50)
|
||||
if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/red)
|
||||
spiderling_type = lay_type
|
||||
|
||||
switch(spiderling_type)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/red)
|
||||
name = "red terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/gray)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/gray)
|
||||
name = "gray terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/green)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/green)
|
||||
name = "green terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/black)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/black)
|
||||
name = "black terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/purple)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/purple)
|
||||
name = "purple terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/white)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/white)
|
||||
name = "white terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/mother)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/mother)
|
||||
name = "mother of terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/prince)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/prince)
|
||||
name = "prince of terror eggs"
|
||||
else if(spiderling_type == /mob/living/simple_animal/hostile/poison/terror_spider/queen)
|
||||
if(/mob/living/simple_animal/hostile/poison/terror_spider/queen)
|
||||
name = "queen of terror eggs"
|
||||
|
||||
/obj/structure/spider/eggcluster/terror_eggcluster/Destroy()
|
||||
|
||||
@@ -187,9 +187,9 @@ GLOBAL_LIST_EMPTY(employmentCabinets)
|
||||
icon_state = "employmentcabinet"
|
||||
var/populated = FALSE
|
||||
|
||||
/obj/structure/filingcabinet/employment/New()
|
||||
/obj/structure/filingcabinet/employment/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.employmentCabinets += src
|
||||
return ..()
|
||||
|
||||
/obj/structure/filingcabinet/employment/Destroy()
|
||||
GLOB.employmentCabinets -= src
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
return FALSE //so we can refill them via their afterattack.
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/New()
|
||||
/obj/structure/reagent_dispensers/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(tank_volume)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
..()
|
||||
|
||||
/obj/structure/reagent_dispensers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
var/base_state
|
||||
var/dpdir = 0 // directions as disposalpipe
|
||||
|
||||
/obj/structure/disposalconstruct/New(loc, pipe_type, direction)
|
||||
..()
|
||||
/obj/structure/disposalconstruct/Initialize(mapload, pipe_type, direction)
|
||||
. = ..()
|
||||
if(pipe_type)
|
||||
ptype = pipe_type
|
||||
if(dir)
|
||||
|
||||
@@ -692,8 +692,8 @@
|
||||
var/base_icon_state // initial icon state on map
|
||||
|
||||
// new pipe, set the icon_state as on map
|
||||
/obj/structure/disposalpipe/New()
|
||||
..()
|
||||
/obj/structure/disposalpipe/Initialize(mapload)
|
||||
. = ..()
|
||||
base_icon_state = icon_state
|
||||
|
||||
|
||||
@@ -753,8 +753,8 @@
|
||||
|
||||
// update the icon_state to reflect hidden status
|
||||
/obj/structure/disposalpipe/proc/update()
|
||||
var/turf/T = src.loc
|
||||
hide(T.intact && !istype(T,/turf/space)) // space never hides pipes
|
||||
var/turf/T = get_turf(src)
|
||||
hide(T.intact && !istype(T, /turf/space)) // space never hides pipes
|
||||
update_icon()
|
||||
|
||||
// hide called by levelupdate if turf intact status changes
|
||||
@@ -934,13 +934,12 @@
|
||||
/obj/structure/disposalpipe/segment
|
||||
icon_state = "pipe-s"
|
||||
|
||||
/obj/structure/disposalpipe/segment/New()
|
||||
..()
|
||||
/obj/structure/disposalpipe/segment/Initialize(mapload)
|
||||
. = ..()
|
||||
if(icon_state == "pipe-s")
|
||||
dpdir = dir | turn(dir, 180)
|
||||
else
|
||||
dpdir = dir | turn(dir, -90)
|
||||
|
||||
update()
|
||||
|
||||
|
||||
@@ -949,8 +948,8 @@
|
||||
/obj/structure/disposalpipe/junction
|
||||
icon_state = "pipe-j1"
|
||||
|
||||
/obj/structure/disposalpipe/junction/New()
|
||||
..()
|
||||
/obj/structure/disposalpipe/junction/Initialize(mapload)
|
||||
. = ..()
|
||||
if(icon_state == "pipe-j1")
|
||||
dpdir = dir | turn(dir, -90) | turn(dir,180)
|
||||
else if(icon_state == "pipe-j2")
|
||||
@@ -1015,8 +1014,8 @@
|
||||
|
||||
dpdir = sortdir | posdir | negdir
|
||||
|
||||
/obj/structure/disposalpipe/sortjunction/New()
|
||||
..()
|
||||
/obj/structure/disposalpipe/sortjunction/Initialize(mapload)
|
||||
. = ..()
|
||||
updatedir()
|
||||
updatedesc()
|
||||
update()
|
||||
@@ -1082,8 +1081,8 @@
|
||||
var/negdir = 0
|
||||
var/sortdir = 0
|
||||
|
||||
/obj/structure/disposalpipe/wrapsortjunction/New()
|
||||
..()
|
||||
/obj/structure/disposalpipe/wrapsortjunction/Initialize(mapload)
|
||||
. = ..()
|
||||
posdir = dir
|
||||
if(icon_state == "pipe-j1s")
|
||||
sortdir = turn(posdir, -90)
|
||||
@@ -1137,11 +1136,10 @@
|
||||
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(mapload)
|
||||
. = ..()
|
||||
dpdir = dir
|
||||
spawn(1)
|
||||
getlinked()
|
||||
addtimer(CALLBACK(src, .proc/getlinked), 0) // This has a delay of 0, but wont actually start until the MC is done
|
||||
|
||||
update()
|
||||
return
|
||||
@@ -1243,8 +1241,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(mapload)
|
||||
. = ..()
|
||||
update()
|
||||
return
|
||||
|
||||
@@ -1269,13 +1267,16 @@
|
||||
var/obj/structure/disposalpipe/trunk/linkedtrunk
|
||||
var/mode = 0
|
||||
|
||||
/obj/structure/disposaloutlet/New()
|
||||
..()
|
||||
spawn(1)
|
||||
target = get_ranged_target_turf(src, dir, 10)
|
||||
var/obj/structure/disposalpipe/trunk/T = locate() in loc
|
||||
if(T)
|
||||
T.nicely_link_to_other_stuff(src)
|
||||
/obj/structure/disposaloutlet/Initialize(mapload)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/setup), 0) // Wait of 0, but this wont actually do anything until the MC is firing
|
||||
|
||||
|
||||
/obj/structure/disposaloutlet/proc/setup()
|
||||
target = get_ranged_target_turf(src, dir, 10)
|
||||
var/obj/structure/disposalpipe/trunk/T = locate() in get_turf(src)
|
||||
if(T)
|
||||
T.nicely_link_to_other_stuff(src)
|
||||
|
||||
/obj/structure/disposaloutlet/Destroy()
|
||||
if(linkedtrunk)
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
var/datum/construction/construct
|
||||
|
||||
/obj/structure/spacepod_frame/New()
|
||||
..()
|
||||
/obj/structure/spacepod_frame/Initialize(mapload)
|
||||
. = ..()
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
|
||||
Reference in New Issue
Block a user