mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] barricade breakthrough (#11657)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
be4c2baee2
commit
26bb8c46a9
@@ -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,7 +56,7 @@
|
||||
visible_message(span_notice("[user] repairs \the [src]."))
|
||||
return
|
||||
return
|
||||
else
|
||||
|
||||
switch(W.damtype)
|
||||
if(BURN)
|
||||
health -= W.force * 1
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user