Skip to content

Commit

Permalink
escape check
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jan 16, 2024
1 parent faeb23b commit 6f284b5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions code/modules/vehicles/interior/objects/fancy_locker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,26 @@
icon = 'icons/obj/structures/doors/mineral_doors.dmi'
icon_state = "wood"
density = TRUE

/obj/structure/interior_exit/fancy/attackby(obj/item/O, mob/M)
attack_hand(M)

/obj/structure/interior_exit/fancy/attack_hand(mob/escapee)
var/obj/structure/closet/fancy/closet = find_closet()
if(istype(closet) && !closet.can_open())
to_chat(escapee, SPAN_WARNING("Something is blocking the exit!"))
return
..()

/obj/structure/interior_exit/fancy/attack_alien(mob/living/carbon/xenomorph/escapee, dam_bonus)
var/obj/structure/closet/fancy/closet = find_closet()
if(istype(closet) && !closet.can_open())
to_chat(escapee, SPAN_XENOWARNING("Something is blocking the exit!"))
return
..()

/obj/structure/interior_exit/fancy/proc/find_closet()
var/obj/structure/closet/fancy/possible_closet = interior.exterior
if(istype(possible_closet))
return possible_closet
return

0 comments on commit 6f284b5

Please sign in to comment.