Skip to content

Commit

Permalink
TGS Test Merge (#5724)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Apr 4, 2024
2 parents 03b028d + bd3eba7 commit 8f4c8a4
Show file tree
Hide file tree
Showing 21 changed files with 213 additions and 25 deletions.
7 changes: 4 additions & 3 deletions code/datums/ammo/bullet/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,22 @@

shrapnel_chance = 0 // This isn't leaving any shrapnel.
accuracy = HIT_ACCURACY_TIER_8
damage = 125
damage = 100
shell_speed = AMMO_SPEED_TIER_6

/datum/ammo/bullet/sniper/anti_materiel/on_hit_mob(mob/M,obj/projectile/P)
if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original)
var/mob/living/L = M
var/size_damage_mod = 0.8
var/size_damage_mod = 0.2
if(isxeno(M))
var/mob/living/carbon/xenomorph/target = M
if(target.mob_size >= MOB_SIZE_XENO)
size_damage_mod += 0.6
size_damage_mod += 0.4
if(target.mob_size >= MOB_SIZE_BIG)
size_damage_mod += 0.6
L.apply_armoured_damage(damage*size_damage_mod, ARMOR_BULLET, BRUTE, null, penetration)
// 180% damage to all targets (225), 240% (300) against non-Runner xenos, and 300% against Big xenos (375). -Kaga
// keeping above for book keeping sake, damage isnt that high anymore, does way less, very similar to normal sniper
to_chat(P.firer, SPAN_WARNING("Bullseye!"))

/datum/ammo/bullet/sniper/anti_materiel/vulture
Expand Down
6 changes: 6 additions & 0 deletions code/datums/beam.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@
strength = EYE_PROTECTION_FLASH
probability = 35

/obj/effect/ebeam/laser/purple
name = "purple laser beam"
alpha = 255
strength = EYE_PROTECTION_FLASH
probability = 45

/obj/effect/ebeam/laser/weak
name = "weak laser beam"
alpha = 150
Expand Down
23 changes: 23 additions & 0 deletions code/datums/elements/bullet_trait/penetrating/light.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/datum/element/bullet_trait_penetrating/light
// Generic bullet trait vars
element_flags = ELEMENT_DETACH|ELEMENT_BESPOKE
id_arg_index = 3

/// For every mob this pierces, how much damage should this lose?
var/damage_lost_per_hit = 15


/datum/element/bullet_trait_penetrating/light/Attach(datum/target, distance_loss_per_hit = 2, damage_lost_per_hit = 15)
. = ..()
if(. == ELEMENT_INCOMPATIBLE)
return

src.damage_lost_per_hit = damage_lost_per_hit

/datum/element/bullet_trait_penetrating/light/handle_passthrough_movables(obj/projectile/bullet, atom/movable/hit_movable, did_hit)
if(did_hit)
bullet.distance_travelled += distance_loss_per_hit
if(ismob(hit_movable))
bullet.damage -= damage_lost_per_hit

return COMPONENT_BULLET_PASS_THROUGH
8 changes: 4 additions & 4 deletions code/datums/supply_packs/spec_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@
containername = "M42A Incendiary Magazine Crate"
group = "Weapons Specialist Ammo"

//XM43E1 - Disabled during testing per request.
/*

/datum/supply_packs/ammo_amr_marksman
name = "XM43E1 anti-materiel rifle marksman magazines crate (x5)"
contains = list(
Expand All @@ -123,8 +122,9 @@
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "XM43E1 Anti-Materiel Magazine Crate"
group = "Specialist Ammo"
*/
group = "Weapons Specialist Ammo"


//M4RA

/datum/supply_packs/ammo_scout_mix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ GLOBAL_LIST_INIT(cm_vending_gear_spec, list(
list("M42A Flak Magazine (10x28mm)", 40, /obj/item/ammo_magazine/sniper/flak, null, VENDOR_ITEM_REGULAR),
list("M42A Incendiary Magazine (10x28mm)", 40, /obj/item/ammo_magazine/sniper/incendiary, null, VENDOR_ITEM_REGULAR),
list("M42A Marksman Magazine (10x28mm Caseless)", 40, /obj/item/ammo_magazine/sniper, null, VENDOR_ITEM_REGULAR),
list("XM43E1 Anti-Material (10x99mm Caseless)", 40, /obj/item/ammo_magazine/sniper/anti_materiel, null, VENDOR_ITEM_REGULAR),


list("EXTRA DEMOLITIONIST AMMUNITION", 0, null, null, null),
list("84mm Anti-Armor Rocket", 40, /obj/item/ammo_magazine/rocket/ap, null, VENDOR_ITEM_REGULAR),
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/devices/motion_detector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@
if(ishuman(holder.loc))
return holder.loc

/obj/item/device/motiondetector/xm43/get_user()
var/atom/holder = loc
if(ishuman(holder.loc))
return holder.loc

/obj/item/device/motiondetector/proc/apply_debuff(mob/M)
return

Expand Down
81 changes: 81 additions & 0 deletions code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,87 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
flags_inventory = BLOCKSHARPOBJ
clothing_traits = list(TRAIT_EAR_PROTECTION)
unacidable = TRUE
/obj/item/clothing/head/helmet/marine/xm43e1
name = "\improper XM-3VL pattern marksman helmet"
icon_state = "xm43e1_helmet"
item_state = "xm43e1_helmet"
specialty = "XM-3VL experimental light"
desc = "A state of the art helmet designed in tandem with the XM43E1, this helmets equiped with all the gizmos and gadgets, ballistics tracker, astrology, wind elevation, proper escalation, everything you can think of it has... probably, thats why the helmets flashing.. probably."
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
flags_atom = NO_SNOW_TYPE
flags_item = MOB_LOCK_ON_EQUIP|NO_CRYO_STORE

/// XM43 Integral Motion Detector Ability
actions_types = list(/datum/action/item_action/toggle, /datum/action/item_action/xm43/toggle_motion_detector)
var/motion_detector = FALSE
var/obj/item/device/motiondetector/xm43/proximity
var/long_range_cooldown = 2
var/recycletime = 120

/obj/item/clothing/head/helmet/marine/xm43e1/Initialize(mapload, ...)
. = ..()
proximity = new(src)
update_icon()

/datum/action/item_action/xm43/action_activate()
if(!ishuman(owner))
return

/datum/action/item_action/xm43/update_button_icon()
return

/datum/action/item_action/xm43/toggle_motion_detector/New(Target, obj/item/holder)
. = ..()
name = "Toggle Motion Detector"
action_icon_state = "motion_detector"
button.name = name
button.overlays.Cut()
button.overlays += image('icons/mob/hud/actions.dmi', button, action_icon_state)

/datum/action/item_action/xm43/toggle_motion_detector/action_activate()
. = ..()
var/obj/item/clothing/head/helmet/marine/xm43e1/recon = holder_item
recon.toggle_motion_detector(owner)

/datum/action/item_action/xm43/toggle_motion_detector/proc/update_icon()
if(!holder_item)
return
var/obj/item/clothing/head/helmet/marine/xm43e1/recon = holder_item
if(recon.motion_detector)
button.icon_state = "template_on"
else
button.icon_state = "template"

/obj/item/clothing/head/helmet/marine/xm43e1/process()
if(!motion_detector)
STOP_PROCESSING(SSobj, src)
if(motion_detector)
recycletime--
if(!recycletime)
recycletime = initial(recycletime)
proximity.refresh_blip_pool()
long_range_cooldown--
if(long_range_cooldown)
return
long_range_cooldown = initial(long_range_cooldown)
proximity.scan()

/obj/item/clothing/head/helmet/marine/xm43e1/proc/toggle_motion_detector(mob/user)
to_chat(user,SPAN_NOTICE("You [motion_detector? "<B>disable</b>" : "<B>enable</b>"] \the [src]'s motion detector."))
if(!motion_detector)
playsound(loc,'sound/items/detector_turn_on.ogg', 25, 1)
else
playsound(loc,'sound/items/detector_turn_off.ogg', 25, 1)
motion_detector = !motion_detector
var/datum/action/item_action/xm43/toggle_motion_detector/TMD = locate(/datum/action/item_action/xm43/toggle_motion_detector) in actions
TMD.update_icon()
motion_detector()

/obj/item/clothing/head/helmet/marine/xm43e1/proc/motion_detector()
if(motion_detector)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)

/obj/item/clothing/head/helmet/marine/pilot
name = "\improper M30 tactical helmet"
Expand Down
12 changes: 12 additions & 0 deletions code/modules/clothing/suits/marine_armor/_marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,18 @@
flags_item = MOB_LOCK_ON_EQUIP|NO_CRYO_STORE
unacidable = TRUE

/obj/item/clothing/suit/storage/marine/light/vest/xm43e1_vest
name = "\improper XM-3VL pattern fire support vest"
armor_melee = CLOTHING_ARMOR_MEDIUM
slowdown = SLOWDOWN_ARMOR_LIGHT
desc = "A smartgun rig mated to a lightweight combat vest intended to allow ease of transport durign field testing. The vest is equiped with a support arm similar to that of the smartgun, it helps keep the rifle steady more so than dampening recoil."
icon_state = "xm43e1_vest"
storage_slots = 3
uniform_restricted = list(/obj/item/clothing/under/marine)
armor_melee = CLOTHING_ARMOR_MEDIUM
flags_item = MOB_LOCK_ON_EQUIP|NO_CRYO_STORE
unacidable = TRUE

/obj/item/clothing/suit/storage/RO
name = "quartermaster jacket"
desc = "A green jacket worn by USCM personnel. The back has the flag of the United Americas on it."
Expand Down
46 changes: 41 additions & 5 deletions code/modules/cm_marines/equipment/kit_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@
kit_overlay = "sniper"

/obj/item/storage/box/spec/sniper/fill_preset_inventory()
// sniper
new /obj/item/spec_kit/sniper_weapon_selector(src)
new /obj/item/weapon/gun/pistol/vp78(src)
new /obj/item/ammo_magazine/pistol/vp78(src)
new /obj/item/ammo_magazine/pistol/vp78(src)

/obj/item/storage/box/spec/sniper/m42a/fill_preset_inventory()
new /obj/item/clothing/suit/storage/marine/ghillie(src)
new /obj/item/clothing/head/helmet/marine/ghillie(src)
new /obj/item/clothing/glasses/night/m42_night_goggles(src)
Expand All @@ -61,14 +66,21 @@
new /obj/item/ammo_magazine/sniper/flak(src)
new /obj/item/ammo_magazine/sniper/flak(src)
new /obj/item/storage/backpack/marine/smock(src)
new /obj/item/weapon/gun/pistol/vp78(src)
new /obj/item/ammo_magazine/pistol/vp78(src)
new /obj/item/ammo_magazine/pistol/vp78(src)
new /obj/item/weapon/gun/rifle/sniper/M42A(src)
new /obj/item/facepaint/sniper(src)
// spotter
new /obj/item/storage/box/kit/spotter(src)

/obj/item/storage/box/spec/sniper/antimaterial/fill_preset_inventory()
desc = "a large case containing a XM43E1 anti material rifle"
new /obj/item/clothing/suit/storage/marine/light/vest/xm43e1_vest(src)
new /obj/item/clothing/head/helmet/marine/xm43e1(src)
new /obj/item/weapon/gun/rifle/sniper/XM43E1(src)
new /obj/item/ammo_magazine/sniper/anti_materiel(src)
new /obj/item/ammo_magazine/sniper/anti_materiel(src)
new /obj/item/ammo_magazine/sniper/anti_materiel(src)
new /obj/item/ammo_magazine/sniper/anti_materiel(src)
new /obj/item/ammo_magazine/sniper/anti_materiel(src)

/obj/item/storage/box/spec/scout
name = "\improper Scout equipment case"
desc = "A large case containing an M4RA battle rifle, M3-S light armor and helmet, M4RA battle sight, M68 thermal cloak, V3 reactive thermal tarp, improved scout laser designator, ammunition and additional pieces of equipment.\nDrag this sprite onto yourself to open it up! NOTE: You cannot put items back inside this case."
Expand Down Expand Up @@ -278,6 +290,30 @@
return TRUE
return FALSE

//Sniper weapon selector snowflake
/obj/item/spec_kit/sniper_weapon_selector
name = "\improper Sniper weapon case"
desc = "A large case with the option of the M42A sniper rifle and the XM43E1 Anti-Material rifle."

/obj/item/spec_kit/sniper_weapon_selector/can_use(mob/living/carbon/human/user)
return TRUE

/obj/item/spec_kit/sniper_weapon_selector/select_and_spawn(mob/living/carbon/human/user)
var/sniper_selection = tgui_input_list(usr, "Select your weapon", "Weapon Selection", list("M42A sniper rifle", "XM43E1 Anti-Material rifle"))
if(!sniper_selection || QDELETED(src))
return FALSE
var/turf/T = get_turf(loc)
var/obj/item/storage/box/spec/weapon_box
switch(sniper_selection)
if("M42A sniper rifle")
weapon_box = new /obj/item/storage/box/spec/sniper/m42a(T)
user.put_in_hands(weapon_box)
return TRUE
if("XM43E1 Anti-Material rifle")
weapon_box = new /obj/item/storage/box/spec/sniper/antimaterial(T)
user.put_in_hands(weapon_box)
return TRUE
return FALSE

//******************************************PFC Kits****************************************************************/

Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@
var/datum/action/item_action/intel/toggle_motion_detector/TMD = locate(/datum/action/item_action/intel/toggle_motion_detector) in xm4.actions
TMD.update_icon()
xm4.motion_detector()
if(istype(i, /obj/item/clothing/head/helmet/marine/xm43e1))
var/obj/item/clothing/head/helmet/marine/xm43e1/xm43 = i
if(xm43.motion_detector)
xm43.motion_detector = FALSE
var/datum/action/item_action/xm43/toggle_motion_detector/TMD = locate(/datum/action/item_action/xm43/toggle_motion_detector) in xm43.actions
TMD.update_icon()
xm43.motion_detector()

/mob/living/carbon/human/proc/disable_headsets()
//Disable all radios to reduce radio spam for dead people
Expand Down
34 changes: 23 additions & 11 deletions code/modules/projectiles/guns/specialist/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,17 +346,17 @@
unacidable = TRUE
indestructible = 1

fire_sound = 'sound/weapons/sniper_heavy.ogg'
fire_sound = 'sound/weapons/xm43e1_fire.ogg'
current_mag = /obj/item/ammo_magazine/sniper/anti_materiel //Renamed from anti-tank to align with new identity/description. Other references have been changed as well. -Kaga
force = 12
wield_delay = WIELD_DELAY_HORRIBLE //Ends up being 1.6 seconds due to scope
zoomdevicename = "scope"
attachable_allowed = list(/obj/item/attachable/bipod)
flags_gun_features = GUN_AUTO_EJECTOR|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER
starting_attachment_types = list(/obj/item/attachable/pmc_sniperbarrel)
sniper_beam_type = /obj/effect/ebeam/laser/intense
sniper_beam_icon = "laser_beam_intense"
sniper_lockon_icon = "sniper_lockon_intense"
sniper_beam_type = /obj/effect/ebeam/laser/purple
sniper_beam_icon = "laser_beam_purple"
sniper_lockon_icon = "sniper_lockon_purple"

/obj/item/weapon/gun/rifle/sniper/XM43E1/handle_starting_attachment()
..()
Expand All @@ -376,6 +376,7 @@
..()
set_fire_delay(FIRE_DELAY_TIER_6 * 6 )//Big boy damage, but it takes a lot of time to fire a shot.
//Kaga: Adjusted from 56 (Tier 4, 7*8) -> 30 (Tier 6, 5*6) ticks. 95 really wasn't big-boy damage anymore, although I updated it to 125 to remain consistent with the other 10x99mm caliber weapon (M42C). Now takes only twice as long as the M42A.
//Backsea: keeping above for progress updates and such adjusted to meet current CM standards, deals less damage since this thing shredded the fuck out of xenos
set_burst_amount(BURST_AMOUNT_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT + 2*HIT_ACCURACY_MULT_TIER_10 //Who coded this like this, and why? It just calculates out to 1+1=2. Leaving a note here to check back later.
scatter = SCATTER_AMOUNT_TIER_10
Expand All @@ -385,24 +386,35 @@
/obj/item/weapon/gun/rifle/sniper/XM43E1/set_bullet_traits()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff),
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating),
BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 11, GLOB.damage_boost_turfs),
BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 11, GLOB.damage_boost_breaching),
//At 1375 per shot it'll take 1 shot to break resin turfs, and a full mag of 8 to break reinforced walls.
BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 6, GLOB.damage_boost_pylons)
//At 750 per shot it'll take 3 to break a Pylon (1800 HP). No Damage Boost vs other xeno structures yet, those will require a whole new list w/ the damage_boost trait.
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating/light),
BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_turfs),
BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_breaching),
//edited to take 5 shots for heavy resin and 3 for normal resin walls, since it wallbangs this shouldnt be a issue i dont think it would be an issue
BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 2, GLOB.damage_boost_pylons)
//At 200 per shot it'll take 9 to break a Pylon (1800 HP). No Damage Boost vs other xeno structures yet, those will require a whole new list w/ the damage_boost trait.
))

/*
//Disabled until an identity is better defined. -Kaga
/obj/item/weapon/gun/rifle/sniper/M42B/afterattack(atom/target, mob/user, flag)
/obj/item/weapon/gun/rifle/sniper/XM43E1/afterattack(atom/target, mob/user, flag)
if(able_to_fire(user))
if(get_dist(target,user) <= 8)
to_chat(user, SPAN_WARNING("The [src.name] beeps, indicating that the target is within an unsafe proximity to the rifle, refusing to fire."))
return
else ..()
// i cant figure this shit out and with the current state of the rifle it should be fine with this disabled, if someone somehow manages to make shit worse ill figure out how to make this work lol
*/

/obj/item/weapon/gun/rifle/sniper/XM43E1/simulate_recoil(total_recoil = 2, mob/user, atom/target)
. = ..()
if(.)
var/mob/living/carbon/human/xm43e1_vest = user
if(xm43e1_vest.body_position == STANDING_UP && !istype(xm43e1_vest.wear_suit,/obj/item/clothing/suit/storage/marine/light/vest/xm43e1_vest))
xm43e1_vest.visible_message(SPAN_WARNING("[xm43e1_vest] is blown backwards from the recoil of the [src.name]!"),SPAN_HIGHDANGER("You are knocked prone by the blowback!"))
step(xm43e1_vest,turn(xm43e1_vest.dir,180))
xm43e1_vest.KnockDown(1)
xm43e1_vest.Stun(1)

/obj/item/weapon/gun/rifle/sniper/elite
name = "\improper M42C anti-tank sniper rifle"
desc = "A high-end superheavy magrail sniper rifle from Weyland-Armat chambered in a specialized variant of the heaviest ammo available, 10x99mm Caseless. This weapon requires a specialized armor rig for recoil mitigation in order to be used effectively."
Expand Down
6 changes: 4 additions & 2 deletions code/modules/projectiles/magazines/specialist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
//XM43E1 Magazine
/obj/item/ammo_magazine/sniper/anti_materiel
name = "\improper XM43E1 marksman magazine (10x99mm)"
desc = "A magazine of caseless 10x99mm anti-materiel rounds."
desc = "A magazine of caseless 10x99mm anti-materiel rounds, these rounds easily penetrate armour with little to no spall, be mindful of over penetration."
max_rounds = 8
caliber = "10x99mm"
default_ammo = /datum/ammo/bullet/sniper/anti_materiel
gun_type = /obj/item/weapon/gun/rifle/sniper/XM43E1

icon_state = "xm43e1"
ammo_band_icon = "+m42c_band"
ammo_band_icon_empty = "+m42c_band_e"
//M42C magazine

/obj/item/ammo_magazine/sniper/elite
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@
#include "code\datums\elements\bullet_trait\ignored_range.dm"
#include "code\datums\elements\bullet_trait\incendiary.dm"
#include "code\datums\elements\bullet_trait\penetrating\heavy.dm"
#include "code\datums\elements\bullet_trait\penetrating\light.dm"
#include "code\datums\elements\bullet_trait\penetrating\penetrating.dm"
#include "code\datums\elements\traitbound\_traitbound.dm"
#include "code\datums\elements\traitbound\crawler.dm"
Expand Down
Binary file modified icons/effects/Targeted.dmi
Binary file not shown.
Binary file modified icons/effects/beam.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/head_1.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/suit_1.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/cm_hats.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/cm_suits.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/ammo_by_faction/uscm.dmi
Binary file not shown.
Binary file added sound/weapons/xm43e1_fire.ogg
Binary file not shown.

0 comments on commit 8f4c8a4

Please sign in to comment.