mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Replaces HasEntered() with Crossed() and reduces redundant checks on turf/Enter()
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
spawn(DRYING_TIME * (amount+1))
|
||||
dry()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/HasEntered(mob/living/carbon/human/perp)
|
||||
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
@@ -77,7 +77,7 @@
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green/HasEntered(mob/living/carbon/human/perp)
|
||||
/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
|
||||
@@ -331,7 +331,7 @@ steam.start() -- spawns the effect
|
||||
return 1
|
||||
|
||||
|
||||
/obj/effect/effect/bad_smoke/HasEntered(mob/living/carbon/M as mob )
|
||||
/obj/effect/effect/bad_smoke/Crossed(mob/living/carbon/M as mob )
|
||||
..()
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
|
||||
@@ -423,7 +423,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/effect/chem_smoke/HasEntered(mob/living/carbon/M as mob )
|
||||
/obj/effect/effect/chem_smoke/Crossed(mob/living/carbon/M as mob )
|
||||
..()
|
||||
reagents.reaction(M)
|
||||
|
||||
@@ -553,7 +553,7 @@ steam.start() -- spawns the effect
|
||||
M.coughedtime = 0
|
||||
return
|
||||
|
||||
/obj/effect/effect/sleep_smoke/HasEntered(mob/living/carbon/M as mob )
|
||||
/obj/effect/effect/sleep_smoke/Crossed(mob/living/carbon/M as mob )
|
||||
..()
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
|
||||
@@ -642,7 +642,7 @@ steam.start() -- spawns the effect
|
||||
R.updatehealth()
|
||||
return
|
||||
|
||||
/obj/effect/effect/mustard_gas/HasEntered(mob/living/carbon/human/R as mob )
|
||||
/obj/effect/effect/mustard_gas/Crossed(mob/living/carbon/human/R as mob )
|
||||
..()
|
||||
if (istype(R, /mob/living/carbon/human))
|
||||
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
|
||||
@@ -882,7 +882,7 @@ steam.start() -- spawns the effect
|
||||
delete()
|
||||
|
||||
|
||||
/obj/effect/effect/foam/HasEntered(var/atom/movable/AM)
|
||||
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/effect/mine/New()
|
||||
icon_state = "uglyminearmed"
|
||||
|
||||
/obj/effect/mine/HasEntered(AM as mob|obj)
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
Bumped(AM)
|
||||
|
||||
/obj/effect/mine/Bumped(mob/M as mob|obj)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/HasEntered(AM as mob|obj)
|
||||
/obj/effect/portal/Crossed(AM as mob|obj)
|
||||
spawn(0)
|
||||
src.teleport(AM)
|
||||
return
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/obj/effect/step_trigger/proc/Trigger(var/atom/movable/A)
|
||||
return 0
|
||||
|
||||
/obj/effect/step_trigger/HasEntered(H as mob|obj)
|
||||
/obj/effect/step_trigger/Crossed(H as mob|obj)
|
||||
..()
|
||||
if(!H)
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -284,4 +284,12 @@
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
icon_state = icon_opened
|
||||
|
||||
// Objects that try to exit a locker by stepping were doing so successfully,
|
||||
// and due to an oversight in turf/Enter() were going through walls. That
|
||||
// should be independently resolved, but this is also an interesting twist.
|
||||
/obj/structure/closet/Exit(atom/movable/AM)
|
||||
open()
|
||||
if(AM.loc == src) return 0
|
||||
return 1
|
||||
@@ -189,7 +189,7 @@
|
||||
del(mymist)
|
||||
ismist = 0
|
||||
|
||||
/obj/machinery/shower/HasEntered(atom/movable/O)
|
||||
/obj/machinery/shower/Crossed(atom/movable/O)
|
||||
..()
|
||||
wash(O)
|
||||
if(ismob(O))
|
||||
|
||||
Reference in New Issue
Block a user