Skip to content

Commit

Permalink
TGS Test Merge (#8015)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Jan 7, 2025
2 parents 6d3a023 + e3c4e66 commit 0962376
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
11 changes: 0 additions & 11 deletions code/datums/ASRS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
9 changes: 9 additions & 0 deletions code/datums/ammo/shrapnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions code/datums/supply_packs/mortar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions code/modules/cm_marines/equipment/mortar/mortar_shells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions code/modules/cm_marines/equipment/mortar/mortars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0962376

Please sign in to comment.