Files
VOREStation/code/modules/projectiles/guns/projectile/sniper.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

117 lines
3.9 KiB
Plaintext

////////////// PTR-7 Anti-Materiel Rifle //////////////
/obj/item/gun/projectile/heavysniper
name = "anti-materiel rifle"
desc = "A portable anti-armour rifle fitted with a scope, the HI PTR-7 Rifle was originally designed to used against armoured exosuits. It is capable of punching through windows and non-reinforced walls with ease. Fires armor piercing 14.5mm shells."
description_fluff = "The leading arms producer in the SCG, Hephaestus typically only uses its 'top level' branding for its military-grade equipment used by professional armed forces across human space."
icon_state = "heavysniper"
wielded_item_state = "heavysniper-wielded"
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK
actions_types = list(/datum/action/item_action/use_scope)
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
caliber = "14.5mm"
recoil = 5 //extra kickback
handle_casings = HOLD_CASINGS
load_method = SINGLE_CASING
max_shells = 1
ammo_type = /obj/item/ammo_casing/a145
projectile_type = /obj/item/projectile/bullet/rifle/a145
accuracy = -75
scoped_accuracy = 75
one_handed_penalty = 90
var/bolt_open = 0
special_weapon_handling = TRUE
/obj/item/gun/projectile/heavysniper/update_icon()
if(bolt_open)
icon_state = "heavysniper-open"
else
icon_state = "heavysniper"
/obj/item/gun/projectile/heavysniper/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
bolt_open = !bolt_open
if(bolt_open)
if(chambered)
to_chat(user, span_notice("You work the bolt open, ejecting [chambered]!"))
chambered.loc = get_turf(src)
loaded -= chambered
chambered = null
else
to_chat(user, span_notice("You work the bolt open."))
else
to_chat(user, span_notice("You work the bolt closed."))
bolt_open = 0
add_fingerprint(user)
update_icon()
/obj/item/gun/projectile/heavysniper/special_check(mob/user)
if(bolt_open)
to_chat(user, span_warning("You can't fire [src] while the bolt is open!"))
return 0
return ..()
/obj/item/gun/projectile/heavysniper/load_ammo(var/obj/item/A, mob/user)
if(!bolt_open)
return
..()
/obj/item/gun/projectile/heavysniper/unload_ammo(mob/user, var/allow_dump=1)
if(!bolt_open)
return
..()
/obj/item/gun/projectile/heavysniper/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/projectile/heavysniper/verb/scope()
set category = "Object"
set name = "Use Scope"
set popup_menu = 1
toggle_scope(2.0)
////////////// Dragunov Sniper Rifle //////////////
/obj/item/gun/projectile/SVD
name = "sniper rifle"
desc = "The PCA S19 Jalgarr, also known by its translated name the 'Dragon', is mass produced with an Optical Sniper Sight so simple that even a Tajaran can use it. Too bad for you that the inscriptions are written in Siik. Uses 7.62mm rounds."
icon_state = "SVD"
item_state = "SVD"
wielded_item_state = "heavysniper-wielded" //Placeholder
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK // Needs a sprite.
actions_types = list(/datum/action/item_action/use_scope)
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
caliber = "7.62mm"
load_method = MAGAZINE
accuracy = -45 //shooting at the hip
scoped_accuracy = 0
one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.
fire_sound = 'sound/weapons/Gunshot_SVD.ogg' // Has a very unique sound.
magazine_type = /obj/item/ammo_magazine/m762svd
allowed_magazines = list(/obj/item/ammo_magazine/m762svd)
/obj/item/gun/projectile/SVD/update_icon()
..()
if(ammo_magazine)
icon_state = "SVD"
else
icon_state = "SVD-empty"
/obj/item/gun/projectile/SVD/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/projectile/SVD/verb/scope()
set category = "Object"
set name = "Use Scope"
set popup_menu = 1
toggle_scope(2.0)