Skip to content

Commit

Permalink
Player-controlled simplemobs can now open lockers and morgue trays (#…
Browse files Browse the repository at this point in the history
…23543)

* Closets

* Morgue

* FIxes

* Whitespace

* AAAAA

* Update code/game/objects/structures/crates_lockers/closets.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 31, 2023
1 parent 8893663 commit a13e91a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
18 changes: 18 additions & 0 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,24 @@
add_fingerprint(user)
toggle(user)

/obj/structure/closet/attack_animal(mob/living/user)
if(user.a_intent == INTENT_HARM || welded || locked)
return ..()
if(!user.mind) // Stops mindless mobs from opening lockers + endlessly opening/closing crates instead of attacking
return ..()
if(user.mob_size < MOB_SIZE_HUMAN)
return ..()
add_fingerprint(user)
toggle(user)

/obj/structure/closet/attack_alien(mob/user)
if(user.a_intent == INTENT_HARM || welded || locked)
return ..()
if(!user.mind)
return ..()
add_fingerprint(user)
toggle(user)

/obj/structure/closet/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
toggle(user)
Expand Down
32 changes: 32 additions & 0 deletions code/game/objects/structures/morgue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,22 @@
update_state()
return

/obj/structure/morgue/attack_animal(mob/living/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(user.mob_size < MOB_SIZE_HUMAN)
return ..()
if(!user.mind) //Stops mindless mobs from doing weird stuff with them
return ..()
attack_hand(user)

/obj/structure/morgue/attack_alien(mob/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(!user.mind)
return ..()
attack_hand(user)

/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
if(is_pen(P))
var/t = rename_interactive(user, P)
Expand Down Expand Up @@ -250,6 +266,22 @@
qdel(src)
return

/obj/structure/m_tray/attack_animal(mob/living/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(user.mob_size < MOB_SIZE_HUMAN)
return ..()
if(!user.mind) //Stops mindless mobs from doing weird stuff with them
return ..()
attack_hand(user)

/obj/structure/m_tray/attack_alien(mob/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(!user.mind)
return ..()
attack_hand(user)

/obj/structure/m_tray/MouseDrop_T(atom/movable/O, mob/living/user)
if((!(istype(O, /atom/movable)) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
Expand Down

0 comments on commit a13e91a

Please sign in to comment.