mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Hostile mobs will now destroy windoors
This commit is contained in:
@@ -189,6 +189,14 @@
|
||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
/obj/machinery/door/window/attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
||||
take_damage(M.melee_damage_upper)
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
@@ -349,4 +357,4 @@
|
||||
/obj/machinery/door/window/brigdoor/southright
|
||||
dir = SOUTH
|
||||
icon_state = "rightsecure"
|
||||
base_state = "rightsecure"
|
||||
base_state = "rightsecure"
|
||||
|
||||
@@ -271,6 +271,8 @@
|
||||
for(var/atom/A in T)
|
||||
if(!A.Adjacent(src))
|
||||
continue
|
||||
if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/rack))
|
||||
if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || \
|
||||
istype(A, /obj/structure/table) || istype(A, /obj/structure/grille) || \
|
||||
istype(A, /obj/structure/rack) || istype(A, /obj/machinery/door/window))
|
||||
A.attack_animal(src)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user