mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Fixes unconscious mob standing still when removed from cryo cell, closet, containers.
Fixes mobs inside cryo cells getting pipes overlay(ventcrawl). Ventcrawler can no longer move in or out of the cryo cell, which fixes ventcrawler going into cryo cell and getting stuck in it. Being inside a cryo cell now give you a nearsight overlay (same as closet). Brains no longer get the red circles overlay when damaged. MMI now properly updates its icon when the brain mob dies. Fixes getting stuck with a grab inside you when grabbing someone buckled. Silicon stunned, weakened and paralysis is now properly updated.
This commit is contained in:
@@ -131,8 +131,7 @@
|
||||
. = ..()
|
||||
if(client)
|
||||
reset_perspective(destination)
|
||||
if(pipes_shown.len && !istype(loc, /obj/machinery/atmospherics))
|
||||
remove_ventcrawl()
|
||||
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
|
||||
|
||||
/mob/living/carbon/brain/forceMove(atom/destination)
|
||||
if(container)
|
||||
|
||||
@@ -127,8 +127,7 @@ Class Procs:
|
||||
/obj/machinery/Destroy()
|
||||
machines.Remove(src)
|
||||
SSmachine.processing -= src
|
||||
if(occupant)
|
||||
dropContents()
|
||||
dropContents()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/attackby(obj/item/weapon/W, mob/user, params)
|
||||
@@ -160,10 +159,14 @@ Class Procs:
|
||||
|
||||
/obj/machinery/proc/dropContents()
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in src)
|
||||
L.loc = T
|
||||
L.reset_perspective(null)
|
||||
L.update_canmove() //so the mob falls if he became unconscious inside the machine.
|
||||
. += L
|
||||
|
||||
T.contents += contents
|
||||
if(occupant)
|
||||
occupant.reset_perspective(null)
|
||||
occupant = null
|
||||
occupant = null
|
||||
|
||||
/obj/machinery/proc/close_machine(mob/living/target = null)
|
||||
state_open = 0
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
for(var/mob/M in src)
|
||||
M.loc = loc
|
||||
M.reset_perspective(null)
|
||||
M.update_canmove() //to make the mob fall if he went unconscious inside the closet for example.
|
||||
if(throwing)
|
||||
step(M, dir)
|
||||
if(throwing)
|
||||
|
||||
@@ -532,13 +532,14 @@
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
icon_state = "alarmp"
|
||||
return
|
||||
switch(max(danger_level, alarm_area.atmosalm))
|
||||
if (0)
|
||||
src.icon_state = "alarm0"
|
||||
if (1)
|
||||
src.icon_state = "alarm2" //yes, alarm2 is yellow alarm
|
||||
if (2)
|
||||
src.icon_state = "alarm1"
|
||||
if(alarm_area)
|
||||
switch(max(danger_level, alarm_area.atmosalm))
|
||||
if (0)
|
||||
src.icon_state = "alarm0"
|
||||
if (1)
|
||||
src.icon_state = "alarm2" //yes, alarm2 is yellow alarm
|
||||
if (2)
|
||||
src.icon_state = "alarm1"
|
||||
|
||||
/obj/machinery/airalarm/process()
|
||||
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||
|
||||
@@ -45,8 +45,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
qdel(stored)
|
||||
stored = null
|
||||
|
||||
for(var/mob/living/L in src)
|
||||
L.forceMove(get_turf(src))
|
||||
dropContents()
|
||||
if(pipe_vision_img)
|
||||
qdel(pipe_vision_img)
|
||||
|
||||
@@ -298,4 +297,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/update_remote_sight(mob/user)
|
||||
user.sight |= (SEE_TURFS|BLIND)
|
||||
user.update_pipe_vision(src)
|
||||
|
||||
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
|
||||
/obj/machinery/atmospherics/proc/can_see_pipes()
|
||||
return 1
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
conduction_coefficient = initial(conduction_coefficient) * C
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy()
|
||||
var/turf/T = loc
|
||||
T.contents += contents
|
||||
beaker = null
|
||||
return ..()
|
||||
|
||||
@@ -143,12 +141,12 @@
|
||||
return occupant
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/user)
|
||||
usr << "<span class='notice'>You struggle inside the cryotube, kicking the release with your foot.</span>"
|
||||
usr << "<span class='notice'>You struggle inside the cryotube, kicking the release with your foot... (This will take around 30 seconds and you need to stand still.)</span>"
|
||||
audible_message("<span class='notice'>You hear a thump from [src].</span>")
|
||||
addtimer(src, "resist_open", 300, FALSE, user)
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/proc/resist_open(mob/user)
|
||||
if(occupant && (user in src)) // Check they're still here.
|
||||
if(occupant && occupant == user) // Check they're still here.
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user)
|
||||
@@ -256,3 +254,15 @@
|
||||
beaker = null
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user)
|
||||
return //we don't see the pipe network while inside cryo.
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/can_crawl_through()
|
||||
return //can ventcrawl in or out of cryo.
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/can_see_pipes()
|
||||
return 0 //you can't see the pipe network when inside a cryo cell.
|
||||
@@ -262,7 +262,9 @@ Doesn't work on other aliens/AI.*/
|
||||
for(var/atom/movable/A in user.stomach_contents)
|
||||
user.stomach_contents.Remove(A)
|
||||
A.loc = user.loc
|
||||
A.update_pipe_vision()
|
||||
if(isliving(A))
|
||||
var/mob/M = A
|
||||
M.reset_perspective()
|
||||
user.visible_message("<span class='alertealien'>[user] hurls out the contents of their stomach!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
/obj/item/device/mmi/update_icon()
|
||||
if(brain)
|
||||
if(istype(brain,/obj/item/organ/internal/brain/alien))
|
||||
if(brain.brainmob && brain.brainmob.stat == DEAD)
|
||||
if(brainmob && brainmob.stat == DEAD)
|
||||
icon_state = "mmi_alien_dead"
|
||||
else
|
||||
icon_state = "mmi_alien"
|
||||
braintype = "Xenoborg" //HISS....Beep.
|
||||
else
|
||||
if(brain.brainmob && brain.brainmob.stat == DEAD)
|
||||
if(brainmob && brainmob.stat == DEAD)
|
||||
icon_state = "mmi_dead"
|
||||
else
|
||||
icon_state = "mmi_full"
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
return
|
||||
|
||||
if(brainmob)
|
||||
else if(brainmob)
|
||||
O.attack(brainmob, user) //Oh noooeeeee
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -37,4 +37,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/brain/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
return // no eyes, no flashing
|
||||
return // no eyes, no flashing
|
||||
|
||||
/mob/living/carbon/brain/update_damage_hud()
|
||||
return //no red circles for brain
|
||||
@@ -1,15 +1,15 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
|
||||
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
|
||||
var/obj/item/device/mmi = container
|
||||
mmi.visible_message("<span class='warning'>[src]'s MMI flatlines!</span>", \
|
||||
"<span class='italics'>You hear something flatline.</span>")
|
||||
mmi.update_icon()
|
||||
|
||||
stat = DEAD
|
||||
|
||||
return ..(gibbed)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/brain/gib(animation = 0)
|
||||
if(container && istype(container, /obj/item/device/mmi))
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
set_blindness(0)
|
||||
|
||||
|
||||
|
||||
/* //currently unused feature, since brain outside a mmi is always dead.
|
||||
/mob/living/carbon/brain/proc/handle_brain_revival_life()
|
||||
if(stat != DEAD)
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
sleeping = 0
|
||||
update_sight()
|
||||
update_vision_overlays()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
update_canmove()
|
||||
|
||||
|
||||
@@ -184,13 +184,14 @@
|
||||
|
||||
add_logs(user, src, "grabbed", addition="passively")
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(user, src)
|
||||
if(anchored || !user.Adjacent(src))
|
||||
return 0
|
||||
if(buckled)
|
||||
user << "<span class='warning'>You cannot grab [src], \he is buckled in!</span>"
|
||||
return 0
|
||||
if(!G) //the grab will delete itself in New if src is anchored
|
||||
return 0
|
||||
user.put_in_active_hand(G)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(user, src)
|
||||
if(!user.put_in_active_hand(G)) //if we can't put the grab in our hand for some reason, we delete it.
|
||||
qdel(G)
|
||||
G.synch()
|
||||
LAssailant = user
|
||||
|
||||
|
||||
@@ -10,13 +10,10 @@
|
||||
if("sandbox")
|
||||
CanBuild()
|
||||
|
||||
update_sight()
|
||||
update_vision_overlays()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
|
||||
//Vents
|
||||
if(ventcrawler)
|
||||
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
|
||||
//Should update regardless of if we can ventcrawl, since we can end up in pipes in other ways.
|
||||
update_pipe_vision(loc)
|
||||
|
||||
|
||||
@@ -485,3 +485,34 @@
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2,easing = EASE_IN|EASE_OUT)
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/silicon/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(amount,0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustStunned(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(stunned + amount,0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/Weaken(amount, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetWeakened(amount)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(amount,0)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(weakened + amount,0)
|
||||
update_stat()
|
||||
|
||||
@@ -78,7 +78,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
|
||||
|
||||
|
||||
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
|
||||
if(!istype(starting_machine))
|
||||
if(!istype(starting_machine) || !starting_machine.can_see_pipes())
|
||||
return
|
||||
var/list/totalMembers = list()
|
||||
|
||||
|
||||
@@ -284,6 +284,7 @@ var/next_mob_id = 0
|
||||
if(..())
|
||||
update_sight()
|
||||
update_vision_overlays()
|
||||
update_pipe_vision()
|
||||
|
||||
|
||||
/mob/proc/show_inv(mob/user)
|
||||
|
||||
@@ -19,14 +19,9 @@
|
||||
|
||||
/obj/item/weapon/grab/New(mob/user, mob/victim)
|
||||
..()
|
||||
loc = user
|
||||
assailant = user
|
||||
affecting = victim
|
||||
|
||||
if(affecting.anchored || !user.Adjacent(victim))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
hud = new /obj/screen/grab(src)
|
||||
hud.icon_state = "reinforce"
|
||||
hud.name = "reinforce grab"
|
||||
|
||||
@@ -94,8 +94,6 @@
|
||||
if (tr_flags & TR_DEFAULTMSG)
|
||||
O << "<B>You are now a monkey.</B>"
|
||||
|
||||
O.update_pipe_vision()
|
||||
|
||||
for(var/A in loc.vars)
|
||||
if(loc.vars[A] == src)
|
||||
loc.vars[A] = O
|
||||
@@ -216,8 +214,6 @@
|
||||
if (tr_flags & TR_DEFAULTMSG)
|
||||
O << "<B>You are now a human.</B>"
|
||||
|
||||
O.update_pipe_vision()
|
||||
|
||||
. = O
|
||||
|
||||
for(var/A in loc.vars)
|
||||
@@ -263,8 +259,6 @@
|
||||
else
|
||||
O.key = key
|
||||
|
||||
O.update_pipe_vision()
|
||||
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name != "AI")
|
||||
@@ -345,8 +339,6 @@
|
||||
else
|
||||
O.key = key
|
||||
|
||||
O.update_pipe_vision()
|
||||
|
||||
if (config.rename_cyborg)
|
||||
O.rename_self("cyborg")
|
||||
|
||||
@@ -385,7 +377,6 @@
|
||||
new_xeno.key = key
|
||||
|
||||
new_xeno << "<B>You are now an alien.</B>"
|
||||
new_xeno.update_pipe_vision()
|
||||
. = new_xeno
|
||||
qdel(src)
|
||||
|
||||
@@ -418,7 +409,6 @@
|
||||
new_slime.key = key
|
||||
|
||||
new_slime << "<B>You are now a slime. Skreee!</B>"
|
||||
new_slime.update_pipe_vision()
|
||||
. = new_slime
|
||||
qdel(src)
|
||||
|
||||
@@ -467,7 +457,6 @@
|
||||
new_corgi.key = key
|
||||
|
||||
new_corgi << "<B>You are now a Corgi. Yap Yap!</B>"
|
||||
new_corgi.update_pipe_vision()
|
||||
. = new_corgi
|
||||
qdel(src)
|
||||
|
||||
@@ -501,7 +490,6 @@
|
||||
|
||||
|
||||
new_mob << "You suddenly feel more... animalistic."
|
||||
new_mob.update_pipe_vision()
|
||||
. = new_mob
|
||||
qdel(src)
|
||||
|
||||
@@ -519,7 +507,6 @@
|
||||
new_mob.key = key
|
||||
new_mob.a_intent = "harm"
|
||||
new_mob << "You feel more... animalistic"
|
||||
new_mob.update_pipe_vision()
|
||||
|
||||
. = new_mob
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user