From 37b14bae39ae46b2397c0cbabce806790a03bd5c Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 12 Dec 2014 11:05:18 +0100 Subject: [PATCH] Fixes manual runtimes, ensures initialize is called even after round start. --- code/game/machinery/alarm.dm | 2 -- code/game/objects/items/weapons/manuals.dm | 14 +++++++------- code/game/objects/objs.dm | 6 ++++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 3819c2d9d53..68c6b3364ea 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -111,8 +111,6 @@ pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24) pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0 update_icon() - if(ticker && ticker.current_state == 3)//if the game is running - src.initialize() return first_run() diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 14511fdcfbe..c827278b870 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -13,7 +13,7 @@ author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned title = "Station Repairs and Construction" -/obj/item/weapon/book/manual/engineering_construction/New() +/obj/item/weapon/book/manual/engineering_construction/initialize() ..() dat = {" @@ -34,7 +34,7 @@ author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned title = "Particle Accelerator User's Guide" -/obj/item/weapon/book/manual/engineering_particle_accelerator/New() +/obj/item/weapon/book/manual/engineering_particle_accelerator/initialize() ..() dat = {" @@ -81,7 +81,7 @@ author = "Waleed Asad" title = "Supermatter Engine User's Guide" -/obj/item/weapon/book/manual/supermatter_engine/New() +/obj/item/weapon/book/manual/supermatter_engine/initialize() ..() dat = {" @@ -193,7 +193,7 @@ author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned title = "Hacking" -/obj/item/weapon/book/manual/engineering_hacking/New() +/obj/item/weapon/book/manual/engineering_hacking/initialize() ..() dat = {" @@ -750,7 +750,7 @@ author = "NanoTrasen" title = "Corporate Regulations" -/obj/item/weapon/book/manual/security_space_law/New() +/obj/item/weapon/book/manual/security_space_law/initialize() ..() dat = {" @@ -774,7 +774,7 @@ author = "NanoTrasen Medicine Department" title = "NT Medical Diagnostics Manual" -/obj/item/weapon/book/manual/medical_diagnostics_manual/New() +/obj/item/weapon/book/manual/medical_diagnostics_manual/initialize() ..() dat = {" @@ -821,7 +821,7 @@ author = "Engineering Encyclopedia" title = "Engineering Textbook" -/obj/item/weapon/book/manual/engineering_guide/New() +/obj/item/weapon/book/manual/engineering_guide/initialize() ..() dat = {" diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 44fc441926f..99da4160f8d 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -16,6 +16,12 @@ var/damtype = "brute" var/force = 0 +/obj/New() + ..() + // If the game is already underway initialize will no longer be called for us + if(ticker && ticker.current_state == GAME_STATE_PLAYING) + initialize() + /obj/Topic(href, href_list, var/nowindow = 0) // Calling Topic without a corresponding window open causes runtime errors if(nowindow)