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 17, 2025
2 parents ccef04e + 2983105 commit f1b6963
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 48 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
8 changes: 8 additions & 0 deletions code/datums/ammo/shrapnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
33 changes: 33 additions & 0 deletions code/game/objects/items/pamphlets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,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 && user.job != JOB_SQUAD_ENGI && user.job != JOB_SQUAD_TEAM_LEADER)
to_chat(user, SPAN_WARNING("You cannot 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."
Expand Down
9 changes: 9 additions & 0 deletions code/modules/character_traits/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,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"
Expand Down
25 changes: 25 additions & 0 deletions code/modules/cm_marines/equipment/kit_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

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
10 changes: 9 additions & 1 deletion code/modules/cm_marines/equipment/mortar/mortars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
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
Binary file modified icons/mob/hud/marine_hud.dmi
Binary file not shown.
Binary file modified icons/obj/items/pamphlets.dmi
Binary file not shown.
Binary file modified icons/obj/items/storage/kits.dmi
Binary file not shown.
Binary file modified icons/ui_icons/map_blips.dmi
Binary file not shown.
33 changes: 5 additions & 28 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -17524,12 +17524,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,
Expand Down Expand Up @@ -27709,12 +27703,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,
Expand Down Expand Up @@ -27785,10 +27773,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,
Expand Down Expand Up @@ -41231,12 +41215,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
Expand Down Expand Up @@ -67738,8 +67716,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" = (
Expand Down Expand Up @@ -111124,7 +111101,7 @@ bdl
bEi
bZr
bmD
ngw
bNP
pjG
boz
bpR
Expand Down Expand Up @@ -111530,7 +111507,7 @@ bdl
bEl
wup
bmD
hBz
bmD
pjG
boA
bpR
Expand Down Expand Up @@ -111733,7 +111710,7 @@ bdl
buz
bZr
bmD
dmE
bNP
pjG
boz
bpR
Expand Down Expand Up @@ -111936,7 +111913,7 @@ bdl
bEm
bZr
bmD
hAc
bNP
pjG
boz
bpR
Expand Down

0 comments on commit f1b6963

Please sign in to comment.