From aa6c76e02e9f01e573f683bdf33c09d86b736281 Mon Sep 17 00:00:00 2001 From: DeadLine Date: Sat, 2 Dec 2023 13:27:44 +0300 Subject: [PATCH 1/5] First mine test --- code/_onclick/item_attack.dm | 5 +- .../modules/mob/living/basic/basic_defense.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 2 +- mojave/code/game/objects/traps/mine.dm | 71 ++++++++++++++++++ mojave/code/game/objects/traps/ms13_traps.dm | 2 + mojave/icons/objects/ms_traps.dmi | Bin 0 -> 9000 bytes .../Datums/weather_datum_types.dm | 2 +- mojave/sound/ms13machines/frag_mine_arm.ogg | Bin 0 -> 13929 bytes tgstation.dme | 2 + 9 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 mojave/code/game/objects/traps/mine.dm create mode 100644 mojave/code/game/objects/traps/ms13_traps.dm create mode 100644 mojave/icons/objects/ms_traps.dmi create mode 100644 mojave/sound/ms13machines/frag_mine_arm.ogg diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 722e9ec6668..3d0fa253738 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -265,8 +265,9 @@ /mob/living/attacked_by(obj/item/I, mob/living/user) send_item_attack_message(I, user) - if(I.force) - apply_damage(I.force, I.damtype) + var/no_defended = damage_armor(I.force, MELEE, I.damtype) + if(no_defended) + apply_damage(no_defended, I.damtype) if(I.damtype == BRUTE) if(prob(33)) I.add_mob_blood(src) diff --git a/code/modules/mob/living/basic/basic_defense.dm b/code/modules/mob/living/basic/basic_defense.dm index 7296561029f..9f5d279ce89 100644 --- a/code/modules/mob/living/basic/basic_defense.dm +++ b/code/modules/mob/living/basic/basic_defense.dm @@ -142,7 +142,7 @@ . = ..() if(QDELETED(src)) return - var/bomb_armor = getarmor(null, BOMB) + var/bomb_armor = getsubarmor(null, CUTTING) switch (severity) if (EXPLODE_DEVASTATE) if(prob(bomb_armor)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index ce1ca4af82a..de89b5f0e73 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -435,7 +435,7 @@ return var/brute_loss = 0 var/burn_loss = 0 - var/bomb_armor = getarmor(null, BOMB) + var/bomb_armor = getsubarmor(null, CUTTING) //200 max knockdown for EXPLODE_HEAVY //160 max knockdown for EXPLODE_LIGHT diff --git a/mojave/code/game/objects/traps/mine.dm b/mojave/code/game/objects/traps/mine.dm new file mode 100644 index 00000000000..61b89daa798 --- /dev/null +++ b/mojave/code/game/objects/traps/mine.dm @@ -0,0 +1,71 @@ + +/obj/effect/mine/ms13/explosive + name = "Frag" + icon_state = "frag_primed" + var/inactive_state = "frag_armed" + /// The devastation range of the resulting explosion. + var/range_devastation = 0 + /// The heavy impact range of the resulting explosion. + var/range_heavy = 1 + /// The light impact range of the resulting explosion. + var/range_light = 2 + /// The flame range of the resulting explosion. + var/range_flame = 0 + /// The flash range of the resulting explosion. + var/range_flash = 3 + + arm_delay = 5 SECONDS + +/obj/effect/mine/ms13/explosive/Initialize(mapload) + . = ..() + if(arm_delay) + armed = FALSE + icon_state = inactive_state + addtimer(CALLBACK(src, .proc/now_armed), arm_delay) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = .proc/on_entered, + ) + AddElement(/datum/element/connect_loc, loc_connections) + +/obj/effect/mine/ms13/explosive/examine(mob/user) + . = ..() + if(!armed) + . += "\tIt appears to be inactive..." + +/// The effect of the mine +/obj/effect/mine/ms13/explosive/mineEffect(mob/victim) + explosion(src, range_devastation, range_heavy, range_light, range_flame, range_flash) + +/// If the landmine was previously inactive, this beeps and displays a message marking it active +/obj/effect/mine/ms13/explosive/now_armed() + armed = TRUE + icon_state = initial(icon_state) + playsound(src, 'mojave/sound/ms13machines/frag_mine_arm.ogg', 40, FALSE, -2) + visible_message(span_danger("\The [src] beeps softly, indicating it is now active."), vision_distance = COMBAT_MESSAGE_RANGE) + +/obj/effect/mine/ms13/explosive/on_entered(datum/source, atom/movable/AM) + . = ..() + +/obj/effect/mine/ms13/explosive/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir) + . = ..() + triggermine() + +/// When something sets off a mine +/obj/effect/mine/ms13/explosive/triggermine(atom/movable/triggerer) + if(iseffect(triggerer)) + return + if(triggered) //too busy detonating to detonate again + return + if(triggerer) + visible_message(span_danger("[triggerer] sets off [icon2html(src, viewers(src))] [src]!")) + else + visible_message(span_danger("[icon2html(src, viewers(src))] [src] detonates!")) + + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(3, 1, src) + s.start() + if(ismob(triggerer)) + mineEffect(triggerer) + triggered = TRUE + SEND_SIGNAL(src, COMSIG_MINE_TRIGGERED, triggerer) + qdel(src) diff --git a/mojave/code/game/objects/traps/ms13_traps.dm b/mojave/code/game/objects/traps/ms13_traps.dm new file mode 100644 index 00000000000..18f6b326dc0 --- /dev/null +++ b/mojave/code/game/objects/traps/ms13_traps.dm @@ -0,0 +1,2 @@ +/obj/effect/mine/ms13 + icon = 'mojave/icons/objects/ms_traps.dmi' diff --git a/mojave/icons/objects/ms_traps.dmi b/mojave/icons/objects/ms_traps.dmi new file mode 100644 index 0000000000000000000000000000000000000000..46fa45e93305ef85899733e8e06e5f54a2121b1d GIT binary patch literal 9000 zcma)iby$>N*X}Ta%rGEb(hi7pN{F=7j}DP;25AH-8B#zg0THA}x;vCE0m(tS8%CtN z;XJ(Wb>8co?|kRFzCYj@c-G#}e)d}HzVE%(glVWL5a2z;1A#yUN{TPEfa~Jj59B`Z z`yrRz5^yB?uehhpOk|zKwQ5mnm&i}@%&m%JA=sVH*SUnl1BRo4PSmvY52(kO% zPsib-pxU%x+`kEv3BH>{d1&PO1JpOlYOda`fG6mIujtp_W+=bX?ySi4Aev)OL;ua} ztO)rNAy*gX9z#8*Xgc4>eU8t$Ex4EJ-SB%nbS_(!6Gj0V_~jmqdJCYU>p1${Ay7LM4x^ z?Iy!KCk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6U}NE%l@-mNI;E1Hm!g7XzYrdjheAWb?$|)e4mYS9U_|_oY>0{tk?o+ z0PvsCO)Zy;tAqiDxfZIaKG2upHi^e2#2S8ab(i4}rwLx}f2;Aj`osP`5!zShZxr9a zzgtLqnBgTja^ZkEl zQv1ik&HG>^%>*%NDFgQCvT zFY+JJTf@LR2uvo4d6?NgyYp9g%3i}V#P%%5LT%&3z$>$0n8$9N$U)7Cf5_aoD`frd z?lP)w_ROOb30l=})%V{uxT+xL?sC1G(J1VKW-&X_A^{~<%6Y4+K~3A%t|>7wx(7xO zKL^R-cIxm_tb`DB*HaO1exhDoqQ-QZY4pMT{0E&m?<}w;27;L{Vl%h`5dA#;^3mc* neU=*AjV`QT!%vy7Pu9y#h!<);_2l)lX99vnN`Ek^b;17!VFIY6 literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index 306326812e2..86e1317c4b0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4415,6 +4415,8 @@ #include "mojave\code\game\objects\item_wield.dm" #include "mojave\code\game\objects\effects\displacement_maps.dm" #include "mojave\code\game\objects\effects\displacement\fat.dm" +#include "mojave\code\game\objects\traps\mine.dm" +#include "mojave\code\game\objects\traps\ms13_traps.dm" #include "mojave\code\modules\ai\effect_node.dm" #include "mojave\code\modules\asset_cache\assets\mouse.dm" #include "mojave\code\modules\atmosphere\atmosphere.dm" From 5a46d28961a4f4484a258292e7755cc836aebc66 Mon Sep 17 00:00:00 2001 From: DeadLineSS13 Date: Wed, 6 Dec 2023 16:04:46 +0300 Subject: [PATCH 2/5] Fixes --- .../modules/mob/living/basic/basic_defense.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 29 +++++++++++++++---- .../mob/living/carbon/human/human_armor.dm | 21 ++++++++++++++ .../Datums/weather_datum_types.dm | 2 +- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/basic/basic_defense.dm b/code/modules/mob/living/basic/basic_defense.dm index 9f5d279ce89..7296561029f 100644 --- a/code/modules/mob/living/basic/basic_defense.dm +++ b/code/modules/mob/living/basic/basic_defense.dm @@ -142,7 +142,7 @@ . = ..() if(QDELETED(src)) return - var/bomb_armor = getsubarmor(null, CUTTING) + var/bomb_armor = getarmor(null, BOMB) switch (severity) if (EXPLODE_DEVASTATE) if(prob(bomb_armor)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index de89b5f0e73..e809d0705f8 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -435,7 +435,7 @@ return var/brute_loss = 0 var/burn_loss = 0 - var/bomb_armor = getsubarmor(null, CUTTING) + var/bomb_armor = getallsubarmor(CUTTING) //200 max knockdown for EXPLODE_HEAVY //160 max knockdown for EXPLODE_LIGHT @@ -459,7 +459,7 @@ brute_loss = 500 var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) throw_at(throw_target, 200, 4) - damage_clothes(400 - bomb_armor, BRUTE, BOMB) + damage_clothes(400 - bomb_armor, BRUTE, CUTTING) if (EXPLODE_HEAVY) throw_alert_text(/atom/movable/screen/alert/text/sad, "What the f-", override = FALSE) // MOJAVE SUN EDIT - FO text alert @@ -468,7 +468,7 @@ if(bomb_armor) brute_loss = 30*(2 - round(bomb_armor*0.01, 0.05)) burn_loss = brute_loss //damage gets reduced from 120 to up to 60 combined brute+burn - damage_clothes(200 - bomb_armor, BRUTE, BOMB) + damage_clothes(200 - bomb_armor, BRUTE, CUTTING) if (ears && !HAS_TRAIT_FROM(src, TRAIT_DEAF, CLOTHING_TRAIT)) ears.adjustEarDamage(30, 120) Unconscious(20) //short amount of time for follow up attacks against elusive enemies like wizards @@ -479,7 +479,7 @@ brute_loss = 30 if(bomb_armor) brute_loss = 15*(2 - round(bomb_armor*0.01, 0.05)) - damage_clothes(max(50 - bomb_armor, 0), BRUTE, BOMB) + damage_clothes(max(50 - bomb_armor, 0), BRUTE, CUTTING) if (ears && !HAS_TRAIT_FROM(src, TRAIT_DEAF, CLOTHING_TRAIT)) ears.adjustEarDamage(15,60) Knockdown(160 - (bomb_armor * 1.6)) //100 bomb armor will prevent knockdown altogether @@ -505,7 +505,7 @@ probability = 50 for(var/X in bodyparts) var/obj/item/bodypart/BP = X - if(prob(probability) && !prob(getarmor(BP, BOMB)) && BP.body_zone != BODY_ZONE_HEAD && BP.body_zone != BODY_ZONE_CHEST) + if(prob(probability) && !prob(getsubarmor(BP, CUTTING)) && BP.body_zone != BODY_ZONE_HEAD && BP.body_zone != BODY_ZONE_CHEST && !istype(BP.owner:wear_suit, /obj/item/clothing/suit/space/hardsuit/ms13/power_armor)) BP.brute_dam = BP.max_damage BP.dismember() max_limb_loss-- @@ -1002,5 +1002,22 @@ if(leg_clothes) torn_items |= leg_clothes + var/power_armor_safe = FALSE for(var/obj/item/I in torn_items) - I.take_damage(damage_amount, damage_type, damage_flag, 0) + if(istype(I, /obj/item/clothing/suit/space/hardsuit/ms13/power_armor)) + var/obj/item/clothing/suit/space/hardsuit/ms13/power_armor/pa = I + I.take_damage(damage_amount, damage_type, damage_flag, 0) + for(var/part_zone as anything in pa.module_armor) + if(part_zone == BODY_ZONE_HEAD) + continue + var/obj/item/ms13/power_armor/PA_part = pa.module_armor[part_zone] + if(PA_part != null) + PA_part.take_damage(damage_amount, damage_type, damage_flag, 0) + power_armor_safe = TRUE + + //POWER_ARMOR SAFE ITEMS ON YOUR SLOTS + if(power_armor_safe) + return + + for(var/obj/item/I in torn_items) + I.take_damage(damage_amount, damage_type, damage_flag, 0) diff --git a/mojave/code/modules/mob/living/carbon/human/human_armor.dm b/mojave/code/modules/mob/living/carbon/human/human_armor.dm index 421d4f2d138..cccfc596f7b 100644 --- a/mojave/code/modules/mob/living/carbon/human/human_armor.dm +++ b/mojave/code/modules/mob/living/carbon/human/human_armor.dm @@ -46,6 +46,22 @@ return clothing.subarmor.getRating(SUBARMOR_FLAGS) return physiology.subarmor.getRating(SUBARMOR_FLAGS) +/mob/living/carbon/human/proc/getallsubarmor(d_type) + if(!d_type) + return 0 + + var/static/list/converstion_table = list(MELEE, BULLET) + if(d_type in converstion_table) + d_type = CRUSHING + stack_trace("Called checksubarmor with invalid d_type ([d_type])!") + + var/protection = 0 + for(var/X in bodyparts) + var/obj/item/bodypart/BP = X + protection += checksubarmor(BP, d_type) + + return protection + /mob/living/carbon/human/proc/checksubarmor(obj/item/bodypart/def_zone, d_type) if(!d_type) return 0 @@ -69,6 +85,11 @@ var/protection = 0 var/list/clothings = clothingonpart(affecting) for(var/obj/item/clothing as anything in clothings) + if(istype(clothing, /obj/item/clothing/suit/space/hardsuit/ms13/power_armor)) + var/obj/item/clothing/suit/space/hardsuit/ms13/power_armor/pa = clothing + var/obj/item/ms13/power_armor/PA_part = pa.module_armor[def_zone.body_zone] + if(PA_part != null) + protection += PA_part.subarmor.getRating(d_type) protection += clothing.subarmor.getRating(d_type) protection += physiology.subarmor.getRating(d_type) return protection diff --git a/mojave/modules/outdoor_effects/code/datums/particle_weather/Datums/weather_datum_types.dm b/mojave/modules/outdoor_effects/code/datums/particle_weather/Datums/weather_datum_types.dm index 5b282b78985..b13f811f7cf 100644 --- a/mojave/modules/outdoor_effects/code/datums/particle_weather/Datums/weather_datum_types.dm +++ b/mojave/modules/outdoor_effects/code/datums/particle_weather/Datums/weather_datum_types.dm @@ -39,7 +39,7 @@ //STOLEN /datum/particle_weather/radiation_storm/weather_act(mob/living/L) - var/resist = L.getsubarmor(null) + var/resist = L.getsubarmor() if(prob(40)) if(ishuman(L)) var/mob/living/carbon/human/H = L From c302ae7ec2a74d732b129e237ce16af7c7525bb2 Mon Sep 17 00:00:00 2001 From: DeadLineSS13 Date: Wed, 6 Dec 2023 17:29:30 +0300 Subject: [PATCH 3/5] Spawner rand --- mojave/code/game/objects/traps/mine.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mojave/code/game/objects/traps/mine.dm b/mojave/code/game/objects/traps/mine.dm index 61b89daa798..f1fcd8e1a47 100644 --- a/mojave/code/game/objects/traps/mine.dm +++ b/mojave/code/game/objects/traps/mine.dm @@ -69,3 +69,10 @@ triggered = TRUE SEND_SIGNAL(src, COMSIG_MINE_TRIGGERED, triggerer) qdel(src) + +/obj/effect/spawner/random/ms13/explosive_mines + name = "Explosive mines" + spawn_loot_chance = 50 + loot = list( + /obj/effect/mine/ms13/explosive + ) From 39313c714aabbfa969fcd5511f06e76b16eb26f7 Mon Sep 17 00:00:00 2001 From: DeadLine Date: Wed, 6 Dec 2023 17:39:26 +0300 Subject: [PATCH 4/5] Damn, TAB --- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index e809d0705f8..a97de61c167 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -1020,4 +1020,4 @@ return for(var/obj/item/I in torn_items) - I.take_damage(damage_amount, damage_type, damage_flag, 0) + I.take_damage(damage_amount, damage_type, damage_flag, 0) From f7f529c8176e30d01e3dd33eaae45903de792f15 Mon Sep 17 00:00:00 2001 From: DeadLine Date: Thu, 7 Dec 2023 17:14:11 +0300 Subject: [PATCH 5/5] Fixes --- code/modules/mob/living/carbon/human/human_defense.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a97de61c167..a3e00d4d03d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -459,7 +459,7 @@ brute_loss = 500 var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) throw_at(throw_target, 200, 4) - damage_clothes(400 - bomb_armor, BRUTE, CUTTING) + damage_clothes(max(400 - bomb_armor, round(bomb_armor * 0.05, 1)), BRUTE, CUTTING) if (EXPLODE_HEAVY) throw_alert_text(/atom/movable/screen/alert/text/sad, "What the f-", override = FALSE) // MOJAVE SUN EDIT - FO text alert @@ -468,11 +468,11 @@ if(bomb_armor) brute_loss = 30*(2 - round(bomb_armor*0.01, 0.05)) burn_loss = brute_loss //damage gets reduced from 120 to up to 60 combined brute+burn - damage_clothes(200 - bomb_armor, BRUTE, CUTTING) + damage_clothes(max(200 - bomb_armor, round(bomb_armor * 0.05, 1)), BRUTE, CUTTING) if (ears && !HAS_TRAIT_FROM(src, TRAIT_DEAF, CLOTHING_TRAIT)) ears.adjustEarDamage(30, 120) Unconscious(20) //short amount of time for follow up attacks against elusive enemies like wizards - Knockdown(200 - (bomb_armor * 1.6)) //between ~4 and ~20 seconds of knockdown depending on bomb armor + Knockdown(max(200 - (bomb_armor * 1.6), round(bomb_armor * 0.05, 1))) //between ~4 and ~20 seconds of knockdown depending on bomb armor if(EXPLODE_LIGHT) throw_alert_text(/atom/movable/screen/alert/text/nohappy, "That's not good!", override = FALSE) // MOJAVE SUN EDIT - FO text alert @@ -482,7 +482,7 @@ damage_clothes(max(50 - bomb_armor, 0), BRUTE, CUTTING) if (ears && !HAS_TRAIT_FROM(src, TRAIT_DEAF, CLOTHING_TRAIT)) ears.adjustEarDamage(15,60) - Knockdown(160 - (bomb_armor * 1.6)) //100 bomb armor will prevent knockdown altogether + Knockdown(max(160 - (bomb_armor * 1.6), round(bomb_armor * 0.05, 1))) //100 bomb armor will prevent knockdown altogether take_overall_damage(brute_loss,burn_loss)