Moves creating tag before intialization (#34512)

* Moves creating tag before intialization

* Two nukes for price of one.

* coord
This commit is contained in:
AnturK
2018-01-19 15:40:40 +01:00
committed by CitadelStationBot
parent c6f227fc18
commit 6354c6eec5
3 changed files with 17 additions and 9 deletions
+6
View File
@@ -32,6 +32,9 @@
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
GLOB._preloader.load(src)
if(use_tag)
GenerateTag()
var/do_initialize = SSatoms.initialized
if(do_initialize != INITIALIZATION_INSSATOMS)
args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD
@@ -539,3 +542,6 @@
/atom/proc/wirecutter_act(mob/user, obj/item/tool)
return
/atom/proc/GenerateTag()
return
+8 -8
View File
@@ -82,6 +82,14 @@
use_tag = TRUE
//ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb
/obj/machinery/nuclearbomb/syndicate/GenerateTag()
var/obj/machinery/nuclearbomb/existing = locate("syndienuke") in GLOB.nuke_list
if(existing)
stack_trace("Attempted to spawn a syndicate nuke while one already exists at [COORD(existing.loc)]")
use_tag = FALSE
return
tag = "syndienuke"
/obj/machinery/nuclearbomb/syndicate/get_cinematic_type(off_station)
var/datum/game_mode/nuclear/NM = SSticker.mode
switch(off_station)
@@ -96,14 +104,6 @@
return CINEMATIC_NUKE_FAR
return CINEMATIC_NUKE_FAR
/obj/machinery/nuclearbomb/syndicate/Initialize()
. = ..()
var/obj/machinery/nuclearbomb/existing = locate("syndienuke") in GLOB.nuke_list
if(existing)
stack_trace("Attempted to spawn a syndicate nuke while one already exists at [existing.loc.x],[existing.loc.y],[existing.loc.z]")
return INITIALIZE_HINT_QDEL
tag = "syndienuke"
/obj/machinery/nuclearbomb/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/disk/nuclear))
if(!user.transferItemToLoc(I, src))
+3 -1
View File
@@ -20,7 +20,6 @@
return QDEL_HINT_HARDDEL
/mob/Initialize()
tag = "mob_[next_mob_id++]"
GLOB.mob_list += src
GLOB.mob_directory[tag] = src
if(stat == DEAD)
@@ -37,6 +36,9 @@
hook_vr("mob_new",list(src))
. = ..()
/mob/GenerateTag()
tag = "mob_[next_mob_id++]"
/atom/proc/prepare_huds()
hud_list = list()
for(var/hud in hud_possible)