diff --git a/code/datums/ASRS.dm b/code/datums/ASRS.dm index 5bd82ef6c532..38778822c93b 100644 --- a/code/datums/ASRS.dm +++ b/code/datums/ASRS.dm @@ -93,17 +93,6 @@ reference_package = /datum/supply_packs/ammo_flamer_mixed cost = ASRS_VERY_LOW_WEIGHT -//=================================== -// Mortar ammo -/datum/supply_packs_asrs/ammo_mortar_he - reference_package = /datum/supply_packs/ammo_mortar_he - -/datum/supply_packs_asrs/ammo_mortar_incend - reference_package = /datum/supply_packs/ammo_mortar_incend - -/datum/supply_packs_asrs/ammo_mortar_flare - reference_package = /datum/supply_packs/ammo_mortar_flare - //=================================== // Misc supplies /datum/supply_packs_asrs/flares diff --git a/code/datums/ammo/ammo.dm b/code/datums/ammo/ammo.dm index 43f4e8ac0031..94272bc1b366 100644 --- a/code/datums/ammo/ammo.dm +++ b/code/datums/ammo/ammo.dm @@ -89,6 +89,9 @@ /// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all. var/hit_effect_color = "#FF0000" + /// Whether or not this ammo ignores mobs that are lying down + var/hits_lying_mobs = FALSE + /datum/ammo/New() set_bullet_traits() diff --git a/code/datums/ammo/shrapnel.dm b/code/datums/ammo/shrapnel.dm index 92f82dd61f1e..80ccc4546890 100644 --- a/code/datums/ammo/shrapnel.dm +++ b/code/datums/ammo/shrapnel.dm @@ -25,6 +25,15 @@ B.health -= rand(2, 5) B.update_health(1) +/datum/ammo/bullet/shrapnel/breaching/set_bullet_traits() + . = ..() + LAZYADD(traits_to_give, list( + BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 5, GLOB.damage_boost_turfs), + BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 10.8, GLOB.damage_boost_breaching), + BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 5, GLOB.damage_boost_pylons) + )) + + /datum/ammo/bullet/shrapnel/rubber name = "rubber pellets" icon_state = "rubber_pellets" diff --git a/code/datums/supply_packs/mortar.dm b/code/datums/supply_packs/mortar.dm index c9f53e49ce7d..cfa021516d02 100644 --- a/code/datums/supply_packs/mortar.dm +++ b/code/datums/supply_packs/mortar.dm @@ -30,7 +30,7 @@ /datum/supply_packs/ammo_mortar_he name = "M402 mortar shells crate (x6 HE)" - cost = 20 + cost = 15 contains = list( /obj/item/mortar_shell/he, /obj/item/mortar_shell/he, @@ -45,7 +45,7 @@ /datum/supply_packs/ammo_mortar_incend name = "M402 mortar shells crate (x6 Incend)" - cost = 20 + cost = 15 contains = list( /obj/item/mortar_shell/incendiary, /obj/item/mortar_shell/incendiary, @@ -60,7 +60,7 @@ /datum/supply_packs/ammo_mortar_flare name = "M402 mortar shells crate (x6 Flare/Camera)" - cost = 20 + cost = 10 contains = list( /obj/item/mortar_shell/flare, /obj/item/mortar_shell/flare, @@ -75,7 +75,7 @@ /datum/supply_packs/ammo_mortar_frag name = "M402 mortar shells crate (x6 Frag)" - cost = 20 + cost = 10 contains = list( /obj/item/mortar_shell/frag, /obj/item/mortar_shell/frag, diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 6c6b2fb3ba53..d8bb3de2793d 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -45,7 +45,7 @@ item_state = "mortar_ammo_frag" /obj/item/mortar_shell/frag/detonate(turf/T) - create_shrapnel(T, 60, cause_data = cause_data) + create_shrapnel(T, 60, cause_data = cause_data, shrapnel_type = /datum/ammo/bullet/shrapnel/breaching) sleep(2) cell_explosion(T, 60, 20, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, cause_data) @@ -61,7 +61,6 @@ var/fire_type = FIRE_VARIANT_TYPE_B //Armor Shredding Greenfire /obj/item/mortar_shell/incendiary/detonate(turf/T) - explosion(T, 0, 2, 4, 7, explosion_cause_data = cause_data) flame_radius(cause_data, radius, T, flame_level, burn_level, flameshape, null, fire_type) playsound(T, 'sound/weapons/gun_flamethrower2.ogg', 35, 1, 4) diff --git a/code/modules/cm_marines/equipment/mortar/mortars.dm b/code/modules/cm_marines/equipment/mortar/mortars.dm index 7ef86ab11ee4..bec66071840b 100644 --- a/code/modules/cm_marines/equipment/mortar/mortars.dm +++ b/code/modules/cm_marines/equipment/mortar/mortars.dm @@ -33,6 +33,8 @@ var/fixed = FALSE /// if true, blows up the shell immediately var/ship_side = FALSE + /// The max range the mortar can fire at + var/max_range = 50 var/obj/structure/machinery/computer/cameras/mortar/internal_camera @@ -391,6 +393,9 @@ if(get_dist(src, locate(test_targ_x + test_dial_x, test_targ_y + test_dial_y, z)) < 10) to_chat(user, SPAN_WARNING("You cannot [dialing ? "dial to" : "aim at"] this coordinate, it is too close to your mortar.")) return FALSE + if(get_dist(src, locate(test_targ_x + test_dial_x, test_targ_y + test_dial_y, z)) > max_range) + to_chat(user, SPAN_WARNING("You cannot [dialing ? "dial to" : "aim at"] this coordinate, it is too far from your mortar.")) + return FALSE if(busy) to_chat(user, SPAN_WARNING("Someone else is currently using this mortar.")) return FALSE @@ -403,6 +408,7 @@ /obj/structure/mortar/wo fixed = TRUE offset_per_turfs = 50 // The mortar is located at the edge of the map in WO, This to to prevent mass FF + max_range = 999 //The portable mortar item /obj/item/mortar_kit diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 1e9f712de958..347915abd229 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -841,7 +841,7 @@ /mob/living/proc/get_projectile_hit_chance(obj/projectile/P) if(HAS_TRAIT(src, TRAIT_NO_STRAY) && src != P.original) return FALSE - if(body_position == LYING_DOWN && src != P.original && world.time - body_position_changed > 0.1 SECONDS) + if(body_position == LYING_DOWN && src != P.original && world.time - body_position_changed > 0.1 SECONDS && !P.ammo.hits_lying_mobs) return FALSE // Fixes for buckshot projectiles not hitting stunned targets var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_XENO)