From 21d31c57634fbab0cfb470b55c283cfb96a3a12f Mon Sep 17 00:00:00 2001 From: Poojawa Date: Fri, 5 Oct 2018 15:30:51 -0500 Subject: [PATCH] Gives APCs inherent damage resistance/deflection --- code/modules/power/apc.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index cdd5aa3689..7c377ffa22 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -54,6 +54,7 @@ req_access = null max_integrity = 300 integrity_failure = 50 + var/damage_deflection = 10 resistance_flags = FIRE_PROOF interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON @@ -742,6 +743,11 @@ if(!(flags_1 & NODECONSTRUCT_1)) set_broken() +/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < damage_deflection) + return 0 + . = ..() + /obj/machinery/power/apc/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) if(!(stat & BROKEN))