More New() -> Initialize() for /obj/structure (#15158)

* More New() -> Initialize() for /obj/structure

* Updates these

* Tweaks + Fixes
This commit is contained in:
AffectedArc07
2020-12-29 10:42:39 -05:00
committed by GitHub
parent 3f80ce3076
commit 43ee2488c7
41 changed files with 221 additions and 239 deletions
+6 -6
View File
@@ -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()
+2 -2
View File
@@ -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())