mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Replaces HasEntered() with Crossed() and reduces redundant checks on turf/Enter()
This commit is contained in:
@@ -1123,7 +1123,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
src.id.loc = get_turf(src.loc)
|
||||
..()
|
||||
|
||||
/obj/item/device/pda/clown/HasEntered(AM as mob|obj) //Clown PDA is slippery.
|
||||
/obj/item/device/pda/clown/Crossed(AM as mob|obj) //Clown PDA is slippery.
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if ((istype(M, /mob/living/carbon/human) && (istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) || M.m_intent == "walk")
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
|
||||
/obj/item/weapon/shard/Crossed(AM as mob|obj)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M << "\red <B>You step in the broken glass!</B>"
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
del(src)
|
||||
|
||||
/obj/item/toy/snappop/HasEntered(H as mob|obj)
|
||||
/obj/item/toy/snappop/Crossed(H as mob|obj)
|
||||
if((ishuman(H))) //i guess carp and shit shouldn't set them off
|
||||
var/mob/living/carbon/M = H
|
||||
if(M.m_intent == "run")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/*
|
||||
* Banana Peals
|
||||
*/
|
||||
/obj/item/weapon/bananapeel/HasEntered(AM as mob|obj)
|
||||
/obj/item/weapon/bananapeel/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
|
||||
@@ -23,7 +23,7 @@
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
var/turf/T
|
||||
|
||||
/obj/item/weapon/grenade/bananade
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
HasEntered(AM as mob|obj)
|
||||
Crossed(AM as mob|obj)
|
||||
var/burned = rand(2,5)
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
|
||||
Reference in New Issue
Block a user