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 db8fb788c83e..daa0eb5d02f0 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 c9c0c6f52790..02a57202ff53 100644 --- a/code/datums/ammo/shrapnel.dm +++ b/code/datums/ammo/shrapnel.dm @@ -27,6 +27,14 @@ xeno.apply_effect(4, SLOW) // multiple hits dont stack they just renew the duration xeno.apply_armoured_damage(damage * 0.6, ARMOR_BULLET, BRUTE, , penetration) // xenos have a lot of HP +/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/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm index bf889e7d176a..e9113a5b9c0f 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm @@ -144,7 +144,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_engi, list( list("M276 General Revolver Holster Rig", 0, /obj/item/storage/belt/gun/m44, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("M276 Shotgun Shell Loading Rig", 0, /obj/item/storage/belt/shotgun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 Mortar Operator Belt", 0, /obj/item/storage/belt/gun/mortarbelt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("M276 Toolbelt Rig (Full)", 0, /obj/item/storage/belt/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_MANDATORY), list("M276 M40 Grenade Rig", 0, /obj/item/storage/belt/grenade, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("M277 Pattern Construction Rig", 0, /obj/item/storage/belt/utility/construction, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), diff --git a/code/game/objects/items/pamphlets.dm b/code/game/objects/items/pamphlets.dm index 5ae5ad81b56e..90184513e997 100644 --- a/code/game/objects/items/pamphlets.dm +++ b/code/game/objects/items/pamphlets.dm @@ -161,6 +161,39 @@ user.update_minimap_icon() GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Loader") +/obj/item/pamphlet/skill/mortar_operator + name = "Mortar Operator instructional pamphlet" + desc = "A pamphlet used to quickly impart vital knowledge. This one has the image of a mortar on it." + icon_state = "pamphlet_mortar" + trait = /datum/character_trait/skills/mortar + bypass_pamphlet_limit = TRUE + +/obj/item/pamphlet/skill/mortar_operator/can_use(mob/living/carbon/human/user) + if(user.job != JOB_SQUAD_MARINE) + to_chat(user, SPAN_WARNING("Only squad riflemen can use this.")) + return + + var/obj/item/card/id/ID = user.get_idcard() + if(!ID) //not wearing an ID + to_chat(user, SPAN_WARNING("You should wear your ID before doing this.")) + return FALSE + if(!ID.check_biometrics(user)) + to_chat(user, SPAN_WARNING("You should wear your ID before doing this.")) + return FALSE + + return ..() + +/obj/item/pamphlet/skill/mortar_operator/on_use(mob/living/carbon/human/user) + . = ..() + user.rank_fallback = "mortar" + user.hud_set_squad() + + var/obj/item/card/id/ID = user.get_idcard() + ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "Mortar Operator") + ID.minimap_icon_override = "mortar" + user.update_minimap_icon() + GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Mortar Operator") + /obj/item/pamphlet/skill/k9_handler name = "K9 handler instructional pamphlet" desc = "A pamphlet used to quickly impart vital knowledge. This one has the image of a Synthetic K9 Rescue unit on it." diff --git a/code/modules/character_traits/skills.dm b/code/modules/character_traits/skills.dm index 35d4d14da9c4..e95973bc21df 100644 --- a/code/modules/character_traits/skills.dm +++ b/code/modules/character_traits/skills.dm @@ -105,6 +105,15 @@ skill_cap = SKILL_ENDURANCE_TRAINED skill_increment = 1 +/datum/character_trait/skills/mortar + trait_name = "Mortar Training" + trait_desc = "Boosts the engineering skill by 1 and JTAC skill by 2." + skill = SKILL_ENGINEER + secondary_skill = SKILL_JTAC + skill_cap = SKILL_ENGINEER_NOVICE + secondary_skill_cap = SKILL_JTAC_TRAINED + skill_increment = 2 + /datum/character_trait/skills/k9_handler trait_name = "K9 Handler Training" trait_desc = "Allows the user to interface with Wey-Yu Synthetic K9 Units for rescue purposes" diff --git a/code/modules/cm_marines/equipment/kit_boxes.dm b/code/modules/cm_marines/equipment/kit_boxes.dm index aae504616a5f..5701d4af230c 100644 --- a/code/modules/cm_marines/equipment/kit_boxes.dm +++ b/code/modules/cm_marines/equipment/kit_boxes.dm @@ -202,6 +202,31 @@ new /obj/item/clothing/head/helmet/marine/specialist(src) new /obj/item/clothing/suit/storage/marine/specialist(src) +/obj/item/storage/box/spec/mortar + name = "\improper Mortar Kit" + desc = "Contains the equipment needed for the mortar." + kit_overlay = "mortar" + +/obj/item/storage/box/spec/mortar/fill_preset_inventory() + new /obj/item/mortar_kit(src) + new /obj/item/pamphlet/skill/mortar_operator(src) + new /obj/item/pamphlet/skill/mortar_operator(src) + new /obj/item/storage/belt/gun/mortarbelt(src) + new /obj/item/storage/belt/gun/mortarbelt(src) + new /obj/item/storage/backpack/marine/mortarpack(src) + new /obj/item/mortar_shell/incendiary(src) + new /obj/item/mortar_shell/incendiary(src) + new /obj/item/mortar_shell/he(src) + new /obj/item/mortar_shell/he(src) + new /obj/item/mortar_shell/frag(src) + new /obj/item/mortar_shell/frag(src) + new /obj/item/mortar_shell/flare(src) + new /obj/item/mortar_shell/flare(src) + new /obj/item/tool/wrench(src) + new /obj/item/device/binoculars/range(src) + new /obj/item/device/binoculars/range(src) + + //-----------------SPEC KIT BOX------------------ //For events/WO, allows the user to choose a specalist kit out of available ones in spec_kit_boxes_left list in gloabl_lists.dm 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 56998010d19f..802e2cbe34dc 100644 --- a/code/modules/cm_marines/equipment/mortar/mortars.dm +++ b/code/modules/cm_marines/equipment/mortar/mortars.dm @@ -33,6 +33,10 @@ 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 = 75 + /// The min range the mortar can fire at + var/min_range = 25 var/obj/structure/machinery/computer/cameras/mortar/internal_camera @@ -388,9 +392,12 @@ if(test_dial_y + test_targ_y > world.maxy || test_dial_y + test_targ_y < 0) to_chat(user, SPAN_WARNING("You cannot [dialing ? "dial to" : "aim at"] this coordinate, it is outside of the area of operations.")) return FALSE - if(get_dist(src, locate(test_targ_x + test_dial_x, test_targ_y + test_dial_y, z)) < 10) + if(get_dist(src, locate(test_targ_x + test_dial_x, test_targ_y + test_dial_y, z)) < min_range) 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 +410,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 293122fff181..4290f1f83caa 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) diff --git a/icons/mob/hud/marine_hud.dmi b/icons/mob/hud/marine_hud.dmi index 7e2aad81a8dc..24e65555ef02 100644 Binary files a/icons/mob/hud/marine_hud.dmi and b/icons/mob/hud/marine_hud.dmi differ diff --git a/icons/obj/items/pamphlets.dmi b/icons/obj/items/pamphlets.dmi index a3056319645d..fc7591eb6277 100644 Binary files a/icons/obj/items/pamphlets.dmi and b/icons/obj/items/pamphlets.dmi differ diff --git a/icons/obj/items/storage/kits.dmi b/icons/obj/items/storage/kits.dmi index c5bdb9575b7c..3ce71b1d4baa 100644 Binary files a/icons/obj/items/storage/kits.dmi and b/icons/obj/items/storage/kits.dmi differ diff --git a/icons/ui_icons/map_blips.dmi b/icons/ui_icons/map_blips.dmi index 0e29d5430e7c..1c5fa93c60c4 100644 Binary files a/icons/ui_icons/map_blips.dmi and b/icons/ui_icons/map_blips.dmi differ diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index ea932b246a08..a083879a88b5 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -17529,12 +17529,6 @@ "dmA" = ( /turf/open/floor/almayer, /area/almayer/living/synthcloset) -"dmE" = ( -/obj/structure/surface/rack, -/obj/item/mortar_shell/incendiary, -/obj/item/mortar_shell/incendiary, -/turf/open/floor/almayer/cargo, -/area/almayer/squads/req) "dmF" = ( /obj/structure/machinery/disposal, /obj/structure/disposalpipe/trunk, @@ -27711,12 +27705,6 @@ /obj/structure/platform/metal/almayer/west, /turf/open/floor/almayer, /area/almayer/lifeboat_pumps/north1) -"hAc" = ( -/obj/structure/surface/rack, -/obj/item/mortar_shell/flare, -/obj/item/mortar_shell/flare, -/turf/open/floor/almayer/cargo, -/area/almayer/squads/req) "hAf" = ( /obj/structure/machinery/iv_drip, /turf/open/floor/almayer/sterile_green_side/north, @@ -27787,10 +27775,6 @@ /obj/structure/pipes/standard/simple/hidden/supply, /turf/open/floor/almayer/plating/northeast, /area/almayer/hallways/lower/vehiclehangar) -"hBz" = ( -/obj/item/mortar_kit, -/turf/open/floor/almayer/plating/northeast, -/area/almayer/squads/req) "hBF" = ( /obj/structure/pipes/standard/manifold/hidden/supply, /turf/open/floor/plating/plating_catwalk, @@ -41226,12 +41210,6 @@ }, /turf/open/floor/almayer/red/northwest, /area/almayer/shipboard/brig/lobby) -"ngw" = ( -/obj/structure/surface/rack, -/obj/item/mortar_shell/frag, -/obj/item/mortar_shell/frag, -/turf/open/floor/almayer/cargo, -/area/almayer/squads/req) "ngA" = ( /obj/structure/pipes/standard/manifold/hidden/supply{ dir = 4 @@ -67735,8 +67713,7 @@ /area/almayer/maint/hull/lower/p_bow) "xId" = ( /obj/structure/surface/rack, -/obj/item/mortar_shell/he, -/obj/item/mortar_shell/he, +/obj/item/storage/box/spec/mortar, /turf/open/floor/almayer/cargo, /area/almayer/squads/req) "xIj" = ( @@ -111121,7 +111098,7 @@ bdl bEi bZr bmD -ngw +bNP pjG boz bpR @@ -111527,7 +111504,7 @@ bdl bEl wup bmD -hBz +bmD pjG boA bpR @@ -111730,7 +111707,7 @@ bdl buz bZr bmD -dmE +bNP pjG boz bpR @@ -111933,7 +111910,7 @@ bdl bEm bZr bmD -hAc +bNP pjG boz bpR