mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-20 19:43:13 +01:00
Part of backend stuff required for #19188. Should probably be test merged. --------- Co-authored-by: Cody Brittain <cbrittain10@live.com>
122 lines
3.2 KiB
Plaintext
Executable File
122 lines
3.2 KiB
Plaintext
Executable File
// This mob is a lie. Similar to /mob/abstract it's not really supposed to do much.
|
|
// It is used as a fake announcer so that we have a lightweight mob to pass to radio broadcasts.
|
|
// To use it simply instantiate it, store a reference to it - it can be reused, so no reason
|
|
// to delete it immediately. Just before a broadcast call PrepareBroadcast with desired arguments,
|
|
// then right after the broadcast call ResetAfterBroadcast so you can re-use the mob without issues next time.
|
|
|
|
/mob/living/announcer
|
|
name = "Announcer"
|
|
voice_name = "synthesized voice"
|
|
accent = ACCENT_TTS
|
|
|
|
icon = 'icons/mob/AI.dmi'
|
|
icon_state = "ai"
|
|
gender = NEUTER
|
|
|
|
status_flags = GODMODE|NO_ANTAG|NOFALL
|
|
invisibility = INVISIBILITY_ABSTRACT
|
|
mob_thinks = FALSE
|
|
|
|
universal_understand = TRUE
|
|
tesla_ignore = TRUE
|
|
stop_sight_update = TRUE
|
|
density = FALSE
|
|
burn_mod = 0
|
|
brute_mod = 0
|
|
|
|
/mob/living/announcer/Initialize()
|
|
// we specifically do not call parent Initialize here because this mob should not need it and its point is to be lightweight
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
|
|
if(flags_1 & INITIALIZED_1)
|
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
|
flags_1 |= INITIALIZED_1
|
|
|
|
for(var/K in GLOB.all_languages)
|
|
add_language(K)
|
|
default_language = GLOB.all_languages[LANGUAGE_TCB]
|
|
|
|
return INITIALIZE_HINT_NORMAL
|
|
|
|
/mob/living/announcer/Destroy()
|
|
for(var/C in contents) // make doubly sure the contents don't get dropped on ground or something
|
|
qdel(C)
|
|
// calling parent shouldn't be required, but let's do it just in case; contains cleanup stuff
|
|
return ..()
|
|
|
|
/mob/living/announcer/proc/PrepareBroadcast(var/name = "", var/datum/language/lang = null, var/voice_name = null, var/accent = null)
|
|
src.name = name
|
|
if(!isnull(lang))
|
|
src.default_language = lang
|
|
if(!isnull(voice_name))
|
|
src.voice_name = voice_name
|
|
if(!isnull(accent))
|
|
src.accent = accent
|
|
|
|
/mob/living/announcer/proc/ResetAfterBroadcast()
|
|
src.name = initial(name)
|
|
src.default_language = GLOB.all_languages[LANGUAGE_TCB]
|
|
src.voice_name = initial(voice_name)
|
|
src.accent = initial(accent)
|
|
|
|
/mob/living/announcer/Life(seconds_per_tick, times_fired)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
return
|
|
|
|
/mob/living/announcer/Move()
|
|
return
|
|
|
|
/mob/living/announcer/zMove()
|
|
return
|
|
|
|
/mob/living/announcer/getBruteLoss()
|
|
return 0
|
|
|
|
/mob/living/announcer/burn_skin()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/adjustBodyTemp()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/get_contents()
|
|
return list()
|
|
|
|
/mob/living/announcer/check_contents_for()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/can_inject()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/seizure()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/InStasis()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/flash_act(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, ignore_inherent = FALSE, type = /atom/movable/screen/fullscreen/flash, length = 2.5 SECONDS)
|
|
return FALSE
|
|
|
|
/mob/living/announcer/dust()
|
|
qdel(src)
|
|
|
|
/mob/living/announcer/gib()
|
|
qdel(src)
|
|
|
|
/mob/living/announcer/can_fall()
|
|
return FALSE
|
|
|
|
/mob/living/announcer/conveyor_act()
|
|
return
|
|
|
|
/mob/living/announcer/ex_act()
|
|
return
|
|
|
|
/mob/living/announcer/singularity_act()
|
|
return
|
|
|
|
/mob/living/announcer/singularity_pull()
|
|
return
|
|
|
|
/mob/living/announcer/singuloCanEat()
|
|
return FALSE
|