[MIRROR] barricade breakthrough (#11657)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-09-14 20:38:41 -07:00
committed by GitHub
parent be4c2baee2
commit 26bb8c46a9
2 changed files with 32 additions and 12 deletions

View File

@@ -26,6 +26,19 @@
/obj/structure/barricade/get_material()
return material
/obj/structure/barricade/bullet_act(obj/item/projectile/P, def_zone)
. = ..()
var/barricade_damage = P.get_structure_damage()
if(!barricade_damage)
return
if(barricade_damage > 30)
var/base_multiplier = P.damage_type == BURN ? 0.5 : 0.25
health -= barricade_damage * base_multiplier
else
var/base_multiplier = P.damage_type == BURN ? 0.25 : 0.1
health -= barricade_damage * base_multiplier
CheckHealth()
/obj/structure/barricade/attackby(obj/item/W as obj, mob/user as mob)
user.setClickCooldown(user.get_attack_speed(W))
if(istype(W, /obj/item/stack))
@@ -43,18 +56,18 @@
visible_message(span_notice("[user] repairs \the [src]."))
return
return
switch(W.damtype)
if(BURN)
health -= W.force * 1
if(BRUTE)
health -= W.force * 0.75
if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
switch(W.damtype)
if(BURN)
health -= W.force * 1
if(BRUTE)
health -= W.force * 0.75
if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
CheckHealth()
..()
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
CheckHealth()
..()
/obj/structure/barricade/proc/CheckHealth()
if(health <= 0)

View File

@@ -292,7 +292,14 @@
// Kill common obstacle in the way like tables.
var/obj/structure/obstacle = locate(/obj/structure, problem_turf)
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
var/list/common_obstacles = list(/obj/structure/window,
/obj/structure/closet,
/obj/structure/table,
/obj/structure/grille,
/obj/structure/barricade,
/obj/structure/girder,
)
if(is_type_in_list(obstacle, common_obstacles))
ai_log("destroy_surroundings() : Attacking generic structure.", AI_LOG_INFO)
return melee_attack(obstacle)