mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
Fixed Srom not working properly (#19357)
Fixed srom not working properly. Fixed a runtime with translators implants. Aligned runechat correctly in srom mobs. Turned the srom entry points into a GLOB list. Fixes #19207
This commit is contained in:
@@ -5,25 +5,44 @@
|
||||
|
||||
alpha = 200
|
||||
|
||||
var/image/ghostimage = null
|
||||
var/mob/living/carbon/human/body = null
|
||||
|
||||
|
||||
/mob/living/brain_ghost/Initialize()
|
||||
/mob/living/brain_ghost/Initialize(mapload, mob/living/carbon/human/dreamer)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/form = loc
|
||||
if(!istype(form))
|
||||
qdel(src)
|
||||
return
|
||||
overlays += image(form.icon,form,form.icon_state)
|
||||
overlays += form.overlays
|
||||
name = form.real_name
|
||||
loc = pick(dream_entries)
|
||||
body = form
|
||||
|
||||
body = dreamer
|
||||
if(!istype(body))
|
||||
//This is to handle the unit tests
|
||||
if(!isnull(body))
|
||||
stack_trace("No /mob/living/carbon/human found for brain ghost as loc!")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
name = body.real_name
|
||||
old_mob = body
|
||||
|
||||
var/mutable_appearance/MA = new(body)
|
||||
MA.appearance_flags |= KEEP_APART | RESET_TRANSFORM
|
||||
MA.transform = matrix() //Mutable appearances copy various vars, including transform, so we have to reset it here
|
||||
|
||||
AddOverlays(MA)
|
||||
|
||||
|
||||
var/turf/T = pick(GLOB.dream_entries)
|
||||
if(!T)
|
||||
stack_trace("No dream entries found for Srom!")
|
||||
awaken_impl(TRUE)
|
||||
return
|
||||
|
||||
src.forceMove(T)
|
||||
|
||||
if(client)
|
||||
client.screen |= body.healths
|
||||
LateLogin()
|
||||
|
||||
/mob/living/brain_ghost/Destroy()
|
||||
body = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/mob/living/brain_ghost/LateLogin()
|
||||
..()
|
||||
@@ -79,3 +98,7 @@
|
||||
body.set_stat(UNCONSCIOUS) // Toggled before anything else can happen. Ideally.
|
||||
|
||||
..(message, speaking, verb="says", alt_name="")
|
||||
|
||||
|
||||
/mob/living/brain_ghost/get_floating_chat_y_offset()
|
||||
return 8
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var/list/dream_entries = list()
|
||||
///A list of `/turf` where the Srom is located, and people entering the shared dream (presumably Skrells sleeping) will be casted to
|
||||
GLOBAL_LIST_EMPTY_TYPED(dream_entries, /turf)
|
||||
|
||||
/mob
|
||||
var/mob/living/brain_ghost/bg
|
||||
@@ -8,12 +9,14 @@ var/list/dream_entries = list()
|
||||
var/datum/weakref/srom_pulling
|
||||
|
||||
/mob/living/carbon/human/proc/handle_shared_dreaming(var/force_wakeup = FALSE)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
// If they're an Unconsious person with the abillity to do Skrellepathy.
|
||||
// If either changes, they should be nocked back to the real world.
|
||||
var/mob/living/carbon/human/srom_puller = srom_pulled_by?.resolve()
|
||||
if((has_psionics() || (srom_puller && Adjacent(srom_puller))) && stat == UNCONSCIOUS && sleeping > 1)
|
||||
if(!istype(bg) && client) // Don't spawn a brainghost if we're not logged in.
|
||||
bg = new /mob/living/brain_ghost(src) // Generate a new brainghost.
|
||||
bg = new /mob/living/brain_ghost(src, src) // Generate a new brainghost.
|
||||
if(isnull(bg)) // Prevents you from getting kicked if the brain ghost didn't spawn - geeves
|
||||
return
|
||||
vr_mob = bg
|
||||
|
||||
Reference in New Issue
Block a user