Replaces HasEntered() with Crossed() and reduces redundant checks on turf/Enter()

This commit is contained in:
ZomgPonies
2013-10-28 06:45:15 -04:00
parent 78d2ccb0ef
commit 2c0614d3af
33 changed files with 70 additions and 68 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)
S.HasEntered(src)
S.Crossed(src)
return
loc = get_turf(src) //Get out of closets and such as a ghost
@@ -115,7 +115,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
x--
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
S.HasEntered(src)
S.Crossed(src)
/mob/dead/observer/examine()
if(usr)
@@ -80,7 +80,7 @@ var/const/MAX_ACTIVE_TIME = 400
/obj/item/clothing/mask/facehugger/equipped(mob/M)
Attach(M)
/obj/item/clothing/mask/facehugger/HasEntered(atom/target)
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
HasProximity(target)
return
@@ -428,7 +428,7 @@
// called when something steps onto a human
// this could be made more general, but for now just handle mulebot
/mob/living/carbon/human/HasEntered(var/atom/movable/AM)
/mob/living/carbon/human/Crossed(var/atom/movable/AM)
var/obj/machinery/bot/mulebot/MB = AM
if(istype(MB))
MB.RunOver(src)
@@ -170,7 +170,7 @@
src << "<span class='warning'>You are too small to pull anything.</span>"
return
/mob/living/simple_animal/mouse/HasEntered(AM as mob|obj)
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
if( ishuman(AM) )
if(!stat)
var/mob/M = AM