Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulture tweaks #4456

Merged
merged 4 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/game/objects/items/devices/vulture_spotter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
. = ..()
to_chat(user, SPAN_WARNING("[src] needs to be mounted on a tripod to use!"))

/obj/item/device/vulture_spotter_scope/skillless

/obj/item/device/vulture_spotter_tripod
name = "\improper M707 spotter tripod"
desc = "A tripod, meant for stabilizing a spotting scope for the M707 anti-materiel rifle."
Expand Down
14 changes: 11 additions & 3 deletions code/game/objects/structures/vulture_spotter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
var/darkness_view = 12
/// The maximum distance this can be from the sniper scope
var/max_sniper_distance = 7
/// If this requires the vulture_user trait to use
var/skillless = FALSE

/obj/structure/vulture_spotter_tripod/Initialize(mapload)
. = ..()
Expand All @@ -36,7 +38,10 @@
/obj/structure/vulture_spotter_tripod/deconstruct(disassembled)
. = ..()
if(scope_attached && bound_rifle)
new /obj/item/device/vulture_spotter_scope(get_turf(src), bound_rifle)
if(skillless)
new /obj/item/device/vulture_spotter_scope/skillless(get_turf(src), bound_rifle)
else
new /obj/item/device/vulture_spotter_scope(get_turf(src), bound_rifle)
new /obj/item/device/vulture_spotter_tripod(get_turf(src))

/obj/structure/vulture_spotter_tripod/get_examine_text(mob/user)
Expand All @@ -63,7 +68,7 @@
return
var/mob/living/carbon/human/user = usr //this is us

if(!HAS_TRAIT(user, TRAIT_VULTURE_USER))
if(!HAS_TRAIT(user, TRAIT_VULTURE_USER) && !skillless)
to_chat(user, SPAN_WARNING("You don't know how to use this!"))
return

Expand Down Expand Up @@ -153,10 +158,13 @@
user.pixel_y = 0

/// Handler for when the scope is being attached to the tripod
/obj/structure/vulture_spotter_tripod/proc/on_scope_attach(mob/user, obj/structure/vulture_spotter_tripod/scope)
/obj/structure/vulture_spotter_tripod/proc/on_scope_attach(mob/user, obj/item/device/vulture_spotter_scope/scope)
if(scope_attached)
return

if(istype(scope, /obj/item/device/vulture_spotter_scope/skillless))
Zonespace27 marked this conversation as resolved.
Show resolved Hide resolved
skillless = TRUE

user.visible_message(SPAN_NOTICE("[user] attaches [scope] to [src]."), SPAN_NOTICE("You attach [scope] to [src]."))
icon_state = "vulture_scope"
setDir(user.dir)
Expand Down
11 changes: 10 additions & 1 deletion code/modules/cm_marines/equipment/guncases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
name = "\improper M707 anti-materiel rifle case"
desc = "A gun case containing the M707 \"Vulture\" anti-materiel rifle and its requisite spotting tools."
icon_state = "guncase_blue"
storage_slots = 7
storage_slots = 5
Zonespace27 marked this conversation as resolved.
Show resolved Hide resolved
can_hold = list(
/obj/item/weapon/gun/boltaction/vulture,
/obj/item/ammo_magazine/rifle/boltaction/vulture,
Expand All @@ -325,6 +325,15 @@
new /obj/item/pamphlet/trait/vulture(src) //both pamphlets give use of the scope and the rifle
new /obj/item/pamphlet/trait/vulture(src)

/obj/item/storage/box/guncase/vulture/skillless

/obj/item/storage/box/guncase/vulture/skillless/fill_preset_inventory()
var/obj/item/weapon/gun/boltaction/vulture/skillless/rifle = new(src)
new /obj/item/ammo_magazine/rifle/boltaction/vulture(src)
new /obj/item/device/vulture_spotter_tripod(src)
new /obj/item/device/vulture_spotter_scope/skillless(src, WEAKREF(rifle))
new /obj/item/tool/screwdriver(src) // Spotter scope needs a screwdriver to disassemble

//Handgun case for Military police vendor three mag , a railflashligh and the handgun.

//88 Mod 4 Combat Pistol
Expand Down
17 changes: 13 additions & 4 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1217,9 +1217,9 @@ Defined in conflicts.dm of the #defines folder.
/// If the gun should experience scope drift
var/scope_drift = TRUE
/// % chance for the scope to drift on process with a spotter using their scope
var/spotted_drift_chance = 33
var/spotted_drift_chance = 25
/// % chance for the scope to drift on process without a spotter using their scope
var/unspotted_drift_chance = 100
var/unspotted_drift_chance = 90
/// If the scope should use do_afters for adjusting and moving the sight
var/slow_use = TRUE
/// Cooldown for interacting with the scope's adjustment or position
Expand Down Expand Up @@ -1290,7 +1290,7 @@ Defined in conflicts.dm of the #defines folder.
return
to_chat(scoper, SPAN_NOTICE("You begin adjusting [src]..."))
COOLDOWN_START(src, scope_interact_cd, 0.5 SECONDS)
Zonespace27 marked this conversation as resolved.
Show resolved Hide resolved
if(!do_after(scoper, 0.5 SECONDS))
if(!do_after(scoper, 0.4 SECONDS))
return

adjust_offset(direction)
Expand All @@ -1308,7 +1308,7 @@ Defined in conflicts.dm of the #defines folder.

to_chat(scoper, SPAN_NOTICE("You begin moving [src]..."))
COOLDOWN_START(src, scope_interact_cd, 1 SECONDS)
Zonespace27 marked this conversation as resolved.
Show resolved Hide resolved
if(!do_after(scoper, 1 SECONDS))
if(!do_after(scoper, 0.8 SECONDS))
return

adjust_position(direction)
Expand Down Expand Up @@ -3244,6 +3244,8 @@ Defined in conflicts.dm of the #defines folder.
attachment_action_type = /datum/action/item_action/toggle
var/initial_mob_dir = NORTH // the dir the mob faces the moment it deploys the bipod
var/bipod_deployed = FALSE
/// If this should anchor the user while in use
var/heavy_bipod = FALSE

/obj/item/attachable/bipod/New()
..()
Expand Down Expand Up @@ -3309,6 +3311,9 @@ Defined in conflicts.dm of the #defines folder.
if(G.flags_gun_features & GUN_SUPPORT_PLATFORM)
G.remove_firemode(GUN_FIREMODE_AUTOMATIC)

if(heavy_bipod)
user.anchored = FALSE

if(!QDELETED(G))
playsound(user,'sound/items/m56dauto_rotate.ogg', 55, 1)
update_icon()
Expand Down Expand Up @@ -3348,6 +3353,9 @@ Defined in conflicts.dm of the #defines folder.
if(G.flags_gun_features & GUN_SUPPORT_PLATFORM)
G.add_firemode(GUN_FIREMODE_AUTOMATIC)

if(heavy_bipod)
user.anchored = TRUE

else
to_chat(user, SPAN_NOTICE("You retract [src]."))
undeploy_bipod(G)
Expand Down Expand Up @@ -3396,6 +3404,7 @@ Defined in conflicts.dm of the #defines folder.
desc = "A set of rugged telescopic poles to keep a weapon stabilized during firing."
icon_state = "bipod_m60"
attach_icon = "vulture_bipod"
heavy_bipod = TRUE

/obj/item/attachable/burstfire_assembly
name = "burst fire assembly"
Expand Down
4 changes: 4 additions & 0 deletions code/modules/projectiles/guns/boltaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,7 @@
to_chat(user, SPAN_DANGER("The splint on your [limb.display_name] comes apart under the recoil!"))
user.pain.apply_pain(PAIN_BONE_BREAK_SPLINTED)
user.update_med_icon()


/obj/item/weapon/gun/boltaction/vulture/skillless
bypass_trait = TRUE
Loading