switch to tg method, override /mob/dead/forceMove, revert all previous component changes

This commit is contained in:
Kyep
2018-11-22 18:26:36 -08:00
parent 49c3bb4a38
commit 3fe6c8b019
4 changed files with 36 additions and 21 deletions
+25
View File
@@ -0,0 +1,25 @@
/mob/dead/forceMove(atom/destination)
// Exactly the same as code/game/atoms_movable.dm#141 except doesn't call for(var/atom/movable/AM in destination) AM.Crossed(src)
// Overriden to prevent things like mice squeaking when ghosts walk on them.
var/turf/old_loc = loc
loc = destination
if(old_loc)
old_loc.Exited(src, destination)
for(var/atom/movable/AM in old_loc)
AM.Uncrossed(src)
if(destination)
destination.Entered(src)
if(isturf(destination) && opacity)
var/turf/new_loc = destination
new_loc.reconsider_lights()
if(isturf(old_loc) && opacity)
old_loc.reconsider_lights()
for(var/datum/light_source/L in light_sources)
L.source_atom.update_light()
return 1
@@ -35,7 +35,6 @@
/mob/living/simple_animal/mouse/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/effects/mousesqueek.ogg' = 1), 50)
/mob/living/simple_animal/mouse/handle_automated_speech()
..()
@@ -91,9 +90,10 @@
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
if(ishuman(AM))
if(!stat)
if(stat == CONSCIOUS)
var/mob/M = AM
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
M << 'sound/effects/mousesqueek.ogg'
..()
/mob/living/simple_animal/mouse/death(gibbed)