Attempts to deal with the potential future problem of people stunlocking

This commit is contained in:
Fermi
2019-08-06 16:43:55 +01:00
parent 53e9c140cf
commit f4c5e6fd2f
3 changed files with 23 additions and 6 deletions
@@ -22,6 +22,7 @@
speak_emote = list("echos")
movement_type = FLYING
var/pseudo_death = FALSE
var/posses_safe = FALSE
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 0
minbodytemp = 0
@@ -40,6 +41,17 @@
..()
if(pseudo_death == FALSE)
if(isliving(A))
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H.reagents.has_reagent("astral") && !H.mind)
var/datum/reagent/fermi/astral/As = locate(/datum/reagent/fermi/astral) in H.reagents.reagent_list
if(As.originalmind == src.mind && As.current_cycle < 10)
to_chat(src, "<span class='warning'><b><i>The intensity of the astrogen in your body is too much allow you to return to yourself yet!</b></i></span>")
return
to_chat(src, "<b><i>You astrally possess [H]!</b></i>")
log_game("FERMICHEM: [src] has astrally possessed [A]!")
src.mind.transfer_to(H)
qdel(src)
var/message = html_decode(stripped_input(src, "Enter a message to send to [A]", MAX_MESSAGE_LEN))
if(!message)
return
@@ -52,10 +52,10 @@ I'd like to point out from my calculations it'll take about 60-80 minutes to die
qdel(O)
/datum/reagent/fermi/astral/on_mob_life(mob/living/M) // Gives you the ability to astral project for a moment!
/datum/reagent/fermi/astral/on_mob_life(mob/living/carbon/M) // Gives you the ability to astral project for a moment!
M.alpha = 255
originalmind = M.mind
if(current_cycle == 0)
originalmind = M.mind
log_game("FERMICHEM: [M] ckey: [M.key] became an astral ghost")
origin = M
if (G == null)
@@ -64,7 +64,8 @@ I'd like to point out from my calculations it'll take about 60-80 minutes to die
var/datum/action/chem/astral/AS = new(G)
AS.origin = M
AS.ghost = G
M.mind.transfer_to(G)
if(M.mind)
M.mind.transfer_to(G)
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Astral projections")
if(overdosed)
if(prob(50))
@@ -77,13 +78,16 @@ I'd like to point out from my calculations it'll take about 60-80 minutes to die
if(G.stat == DEAD || G.pseudo_death == TRUE)
G.mind.transfer_to(M)
qdel(G)
else
M.Sleeping(20, 0)
M.reagents.remove_reagent(id, 2, FALSE)
..()
/datum/reagent/fermi/astral/on_mob_delete(mob/living/carbon/M)
if(!G)
if(M.mind)
if(!M.reagents.has_reagent("astral")) //I have no idea how you got here with a mind and no astral, but this is in case.
message_admins("No astral!")
var/mob/living/simple_animal/astral/G = new(get_turf(M.loc))
M.mind.transfer_to(G)//Just in case someone else is inside of you, it makes them a ghost and should hopefully bring them home at the end.
to_chat(G, "<span class='warning'>[M]'s conciousness snaps back to them as their astrogen runs out, kicking your projected mind out!'</b></span>")
originalmind.transfer_to(M)
else if(G.mind)
G.mind.transfer_to(origin)
@@ -138,6 +138,7 @@
M.emote("cough")
var/obj/item/toy/plush/P = pick(subtypesof(/obj/item/toy/plush))
new P(T)
to_chat(M, "<span class='warning'>You feel a lump form in your throat, as you suddenly cough up what seems to be a hairball?</b></span>")
var/list/seen = viewers(8, T)
for(var/mob/S in seen)
to_chat(S, "<span class='warning'>[M] suddenly coughs up a [P.name]!</b></span>")