ParadiseSS13 / Paradise

Paradise Station's GitHub main repository.
https://www.paradisestation.org/forum
GNU Affero General Public License v3.0
407 stars 1.21k forks source link

Morgue tray status and resurrections alert issues for Offered-to-ghost bodies #20480

Closed Komrad822 closed 2 months ago

Komrad822 commented 1 year ago

Issue Description: When a ghost takes over the body of a character and then dies and the body is placed in a morgue tray, the light is red instead of purple if the new player is not in the body at the time of morgue tray closing. Additionally, the ghost does not get a notification of cloning attempts or (the initial) defib attempt.

NOTE: The body must have been controlled by another ckey PRIOR to you taking control of it. The body must be OFFERED, not force taken over via admin perms.

What did you expect to happen: That once I die, that I get resurrection notifications and the morgue tray properly displays me as still in round (purple).

What happened instead: I did not get a cloning attempt notification and the tray shows a red light, not a purple one.

Why is this bad/What are the consequences: Mechanics based around revival should work properly without the person having to stay in the body to get revived. Also, incase they do not realise this is an issue, they essentially come back to being set to dnr since rarely do people cycle/check the trays.

Steps to reproduce the problem:

  1. Have a body that was controlled by another ckey be offered to ghost
  2. Have said new owner die in their new body
  3. Have them ghost away from their corpse
  4. Attempt to revive via cloning and notice no cloning notification
  5. Place their body in a morgue tray with the soul separate from the body and notice the light is red.
  6. Cry

When did the problem start happening: No idea, but noticed it 2/14/2023 when it occurred to me.

Extra information: I have an unedited video of Bjam and myself testing it out on mentor box. If need be I can do some simple editing so it isn't longer than it needs to be.

warriorstar-orion commented 1 year ago

This sounds like some mindcode thing @GDNgit

GDNgit commented 1 year ago

The body must have been controlled by another ckey PRIOR to you taking control of it. The body must be OFFERED

Yeah so offering up bodies is a bit fucked rn and will keep the mind.current as whatever it was previously, this causes issues with a whole bunch of things but this is one of them.

/mob/proc/update_morgue()
    if(stat == DEAD)
        var/obj/structure/morgue/morgue
        var/mob/living/C = src
        var/mob/dead/observer/G = src
        if(istype(G) && G.can_reenter_corpse && G.mind) //We're a ghost, let's find our corpse
            C = G.mind.current
        if(istype(C)) //We found our corpse, is it inside a morgue?
            morgue = get(C.loc, /obj/structure/morgue)
            if(morgue)
                morgue.update_icon(UPDATE_OVERLAYS)

Checks for the guy who got their body given up, not the current person