[MIRROR] More Initialize() fixes, requires someone to test with DB (#2857)

* More Initialize() fixes, requires someone to test with DB

* fucking mirror failure
This commit is contained in:
CitadelStationBot
2017-09-22 23:35:22 -05:00
committed by Poojawa
parent 6717720356
commit 2a860d1954
45 changed files with 161 additions and 160 deletions
+7 -7
View File
@@ -14,8 +14,8 @@
name = "bookcase"
icon = 'icons/obj/library.dmi'
icon_state = "bookempty"
anchored = FALSE
density = TRUE
anchored = FALSE
density = TRUE
opacity = 0
resistance_flags = FLAMMABLE
max_integrity = 200
@@ -25,12 +25,12 @@
/obj/structure/bookcase/Initialize(mapload)
..()
. = ..()
if(!mapload)
return
state = 2
icon_state = "book-0"
anchored = TRUE
anchored = TRUE
for(var/obj/item/I in loc)
if(istype(I, /obj/item/book))
I.loc = src
@@ -44,7 +44,7 @@
playsound(loc, I.usesound, 100, 1)
if(do_after(user, 20*I.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = TRUE
anchored = TRUE
state = 1
if(istype(I, /obj/item/crowbar))
playsound(loc, I.usesound, 100, 1)
@@ -63,7 +63,7 @@
if(istype(I, /obj/item/wrench))
playsound(loc, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You unwrench the frame.</span>")
anchored = FALSE
anchored = FALSE
state = 0
if(2)
@@ -317,4 +317,4 @@
to_chat(user, "<font color=green>Computer has been associated with this unit.</font>")
else
to_chat(user, "<font color=red>No associated computer found. Only local scans will function properly.</font>")
to_chat(user, "\n")
to_chat(user, "\n")
+4 -4
View File
@@ -1,18 +1,18 @@
/obj/item/book/manual/random/Initialize()
. = ..()
..()
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
var/newtype = pick(subtypesof(/obj/item/book/manual) - banned_books)
new newtype(loc)
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/item/book/random
var/amount = 1
var/category = null
/obj/item/book/random/Initialize()
. = ..()
..()
create_random_books(amount, src.loc, TRUE, category)
qdel(src)
return INITIALIZE_HINT_QDEL
/obj/item/book/random/triple
amount = 3