Fixes omen component door crushing failing, fixes tilted vendors double dipping on omen people (#74692)

## About The Pull Request

- Fixed door crush always failing. 
- It passed `forced = TRUE` and not `force_crush = TRUE`, so it just did
a limp close -> re-open. Fixed that

- Fixed tilted vendor double dip
- It checked for tiltable but not already tilted, meaning you can get
crushed -> move -> get crushed by the same vendor. Fixes that

## Why It's Good For The Game

Curses

## Changelog

🆑 Melbert
fix: Omen Component door crush works
fix: Omen Component vendors will no longer double dip (double tip)
/🆑
This commit is contained in:
MrMelbert
2023-04-13 21:49:56 -06:00
committed by GitHub
parent 77655ad8a2
commit 1c1e2da831
+20 -15
View File
@@ -59,15 +59,14 @@
return
var/our_guy_pos = get_turf(living_guy)
for(var/turf_content in our_guy_pos)
if(istype(turf_content, /obj/machinery/door/airlock))
to_chat(living_guy, span_warning("A malevolent force launches your body to the floor..."))
var/obj/machinery/door/airlock/darth_airlock = turf_content
living_guy.apply_status_effect(/datum/status_effect/incapacitating/paralyzed, 10)
INVOKE_ASYNC(darth_airlock, TYPE_PROC_REF(/obj/machinery/door/airlock, close), TRUE)
if(!permanent && !prob(66.6))
qdel(src)
return
for(var/obj/machinery/door/airlock/darth_airlock in our_guy_pos)
if(darth_airlock.locked || !darth_airlock.hasPower())
continue
to_chat(living_guy, span_warning("A malevolent force launches your body to the floor..."))
living_guy.Paralyze(1 SECONDS, ignore_canstun = TRUE)
INVOKE_ASYNC(src, PROC_REF(slam_airlock), darth_airlock)
return
if(istype(our_guy_pos, /turf/open/floor/noslip/tram_plate/energized))
var/turf/open/floor/noslip/tram_plate/energized/future_tram_victim = our_guy_pos
@@ -87,12 +86,18 @@
return
for(var/obj/machinery/vending/darth_vendor in the_turf)
if(darth_vendor.tiltable)
to_chat(living_guy, span_warning("A malevolent force tugs at the [darth_vendor]..."))
INVOKE_ASYNC(darth_vendor, TYPE_PROC_REF(/obj/machinery/vending, tilt), living_guy)
if(!permanent)
qdel(src)
return
if(!darth_vendor.tiltable || darth_vendor.tilted)
continue
to_chat(living_guy, span_warning("A malevolent force tugs at the [darth_vendor]..."))
INVOKE_ASYNC(darth_vendor, TYPE_PROC_REF(/obj/machinery/vending, tilt), living_guy)
if(!permanent)
qdel(src)
return
/datum/component/omen/proc/slam_airlock(obj/machinery/door/airlock/darth_airlock)
. = darth_airlock.close(force_crush = TRUE)
if(. && !permanent && !prob(66.6))
qdel(src)
/// If we get knocked down, see if we have a really bad slip and bash our head hard
/datum/component/omen/proc/check_slip(mob/living/our_guy, amount)