Skip to content

Commit

Permalink
added divable var to closet and its logic (#11208)
Browse files Browse the repository at this point in the history
  • Loading branch information
aramix273 authored Jul 19, 2024
1 parent 2004879 commit 8a42ad4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
var/opened = FALSE
var/welded = FALSE
var/locked = FALSE
var/divable = TRUE //controls whether someone with skittish trait can enter the closet with CtrlShiftClick
var/large = TRUE
var/wall_mounted = 0 //never solid (You can always pass over it)
var/breakout_time = 1200
Expand Down Expand Up @@ -173,7 +174,7 @@
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>"
if(isliving(user))
var/mob/living/L = user
if(HAS_TRAIT(L, TRAIT_SKITTISH))
if(divable && HAS_TRAIT(L, TRAIT_SKITTISH))
. += "<span class='notice'>Ctrl-Shift-click [src] to jump inside.</span>"

/obj/structure/closet/CanAllowThrough(atom/movable/mover, border_dir)
Expand Down Expand Up @@ -523,7 +524,7 @@
togglelock(user)

/obj/structure/closet/CtrlShiftClick(mob/living/user)
if(!HAS_TRAIT(user, TRAIT_SKITTISH))
if(!(divable && HAS_TRAIT(user, TRAIT_SKITTISH)))
return ..()
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(user.loc))
return
Expand Down
1 change: 1 addition & 0 deletions code/modules/cargo/supplypod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
allow_dense = TRUE
delivery_icon = null
can_weld_shut = FALSE
divable = FALSE
armor = list(MELEE = 30, BULLET = 50, LASER = 50, ENERGY = 100, BOMB = 100, BIO = 0, RAD = 0, FIRE = 100, ACID = 80, STAMINA = 0, BLEED = 0)
anchored = TRUE //So it cant slide around after landing
anchorable = FALSE
Expand Down

0 comments on commit 8a42ad4

Please sign in to comment.