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 3, 2024
2 parents 3bfd378 + 6b8e450 commit f56cd83
Show file tree
Hide file tree
Showing 22 changed files with 283 additions and 29 deletions.
34 changes: 31 additions & 3 deletions code/datums/ammo/bullet/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,51 @@

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/wallpopper/
name = "wallpopper sniper bullet"

shrapnel_chance = 0 // hesh leaves no shrapnel
accuracy = HIT_ACCURACY_TIER_8
damage = 55
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/wallpopper/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff),
// BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 30, GLOB.damage_boost_turfs), //2550, 2 taps colony walls, 4 taps reinforced walls
// BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 0.23, GLOB.damage_boost_turfs_xeno), //2550*0.23 = 586, 2 taps resin walls, 3 taps thick resin
// BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 15, GLOB.damage_boost_breaching), //1275, enough to 1 tap airlocks
// BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 6, GLOB.damage_boost_pylons), //510, 4 shots to take out a pylon
))

/datum/ammo/bullet/sniper/anti_materiel/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff),
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating/light),
// BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_damage_boost, 3, GLOB.damage_boost_turfs),
// BULLET_TRAIT_ENTRY(/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( /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.
))
/datum/ammo/bullet/sniper/anti_materiel/vulture
damage = 400 // Fully intended to vaporize anything smaller than a mini cooper
accurate_range_min = 10
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
2 changes: 1 addition & 1 deletion code/datums/elements/bullet_trait/damage_boost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile))
COMSIG_BULLET_PRE_HANDLE_OBJ,
COMSIG_BULLET_PRE_HANDLE_TURF,
COMSIG_BULLET_PRE_HANDLE_MOB,
), PROC_REF(handle_bullet))
), PROC_REF(handle_bullet), override = TRUE)

/datum/element/bullet_trait_damage_boost/proc/check_type(atom/A)
if(istype(A, /obj/structure/machinery/door)) return "door"
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
22 changes: 18 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,23 @@
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "XM43E1 Anti-Materiel Magazine Crate"
group = "Specialist Ammo"
*/
group = "Weapons Specialist Ammo"


/datum/supply_packs/ammo_amr_wallpopper
name = "XM43E1 anti-materiel rifle wallpopper magazines crate (x5)"
contains = list(
/obj/item/ammo_magazine/sniper/wallpopper,
/obj/item/ammo_magazine/sniper/wallpopper,
/obj/item/ammo_magazine/sniper/wallpopper,
/obj/item/ammo_magazine/sniper/wallpopper,
/obj/item/ammo_magazine/sniper/wallpopper,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "XM43E1 Wall-Popper Magazine Crate"
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/wallpopper(src)
new /obj/item/ammo_magazine/sniper/wallpopper(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
Loading

0 comments on commit f56cd83

Please sign in to comment.