Merge pull request #4928 from Citadel-Station-13/upstream-merge-34512
[MIRROR] Moves creating tag before intialization
This commit is contained in:
@@ -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
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user