mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
More initialize tweaks (#2971)
changes: Organs now use Initialize(). The observe message now shows the configured respawn delay instead of always 30 minutes. Seed datums no longer have a timer in New(). External organs no longer have a timer in New()/Initialize() Converted some spawns in organs to timers. Floor init no longer breaks to plating first for mapped in tiles. Added the INITIALIZE_IMMEDIATE macro to make Initialize() not wait for SSatoms init. Mannequins now use INITIALIZE_IMMEDIATE instead of a custom-defined New(). Mannequins (from get_mannequin) now delete themselves if unused for 5 minutes or longer.
This commit is contained in:
@@ -32,12 +32,15 @@
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
|
||||
/obj/item/organ/brain/New()
|
||||
..()
|
||||
/obj/item/organ/brain/Initialize(mapload)
|
||||
. = ..()
|
||||
health = config.default_brain_health
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
if (!mapload)
|
||||
addtimer(CALLBACK(src, .proc/clear_screen), 5)
|
||||
|
||||
/obj/item/organ/brain/proc/clear_screen()
|
||||
if (brainmob && brainmob.client)
|
||||
brainmob.client.screen.Cut()
|
||||
|
||||
/obj/item/organ/brain/Destroy()
|
||||
if(brainmob)
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
real_name = "Test Dummy"
|
||||
status_flags = GODMODE|CANPUSH
|
||||
|
||||
/mob/living/carbon/human/dummy/mannequin/New(location, ...)
|
||||
..()
|
||||
if (!initialized)
|
||||
args[1] = TRUE
|
||||
SSatoms.InitAtom(src, args)
|
||||
INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin)
|
||||
|
||||
/mob/living/carbon/human/dummy/mannequin/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -114,13 +114,13 @@
|
||||
new_player_panel_proc()
|
||||
|
||||
if(href_list["observe"])
|
||||
if (SSatoms.initialized < INITIALIZATION_INNEW_REGULAR)
|
||||
if (!SSATOMS_IS_PROBABLY_DONE)
|
||||
// Don't allow players to observe until initialization is more or less complete.
|
||||
// Letting them join too early breaks things, they can wait.
|
||||
src << span("alert", "The server is still initializing, try observing again in a minute or so.")
|
||||
return
|
||||
alert(src, "Please wait, the map is not initialized yet.")
|
||||
return 0
|
||||
|
||||
if(alert(src,"Are you sure you wish to observe? You will have to wait 30 minutes before being able to respawn!","Player Setup","Yes","No") == "Yes")
|
||||
if(alert(src,"Are you sure you wish to observe? You will have to wait [config.respawn_delay] minutes before being able to respawn!","Player Setup","Yes","No") == "Yes")
|
||||
if(!client) return 1
|
||||
var/mob/dead/observer/observer = new /mob/dead/observer(src)
|
||||
spawning = 1
|
||||
|
||||
Reference in New Issue
Block a user