Files
Citadel-Station-13-RP/code/modules/projectiles/guns/projectile/sniper.dm

124 lines
4.2 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."
icon_state = "heavysniper"
item_state_slots = list(slot_r_hand_str = "l6closed-empty", slot_l_hand_str = "l6closed-empty") // placeholder
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
force = 10
heavy = TRUE
slot_flags = SLOT_BACK
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
load_sound = 'sound/weapons/guns/interaction/rifle_load.ogg'
accuracy = -45
scoped_accuracy = 95
one_handed_penalty = 90
var/bolt_open = 0
/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 as mob)
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
bolt_open = !bolt_open
if(bolt_open)
if(chambered)
to_chat(user, "<span class='notice'>You work the bolt open, ejecting [chambered]!</span>")
chambered.loc = get_turf(src)
loaded -= chambered
chambered = null
else
to_chat(user, "<span class='notice'>You work the bolt open.</span>")
playsound(src.loc, 'sound/weapons/guns/interaction/rifle_boltback.ogg', 50, 1)
else
to_chat(user, "<span class='notice'>You work the bolt closed.</span>")
playsound(src.loc, 'sound/weapons/guns/interaction/rifle_boltforward.ogg', 50, 1)
bolt_open = 0
add_fingerprint(user)
update_icon()
/obj/item/gun/projectile/heavysniper/special_check(mob/user)
if(bolt_open)
to_chat(user, "<span class='warning'>You can't fire [src] while the bolt is open!</span>")
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/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 = "\improper Dragunov"
desc = "The SVD, also known as the Dragunov, is mass produced with an Optical Sniper Sight so simple that even Ivan can use it. Too bad for you that the inscriptions are written in Russian. Uses 7.62mm rounds."
icon_state = "SVD"
item_state = "SVD"
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK // Needs a sprite.
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 = 95
heavy = TRUE
// requires_two_hands = 1
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/verb/scope()
set category = "Object"
set name = "Use Scope"
set popup_menu = 1
toggle_scope(2.0)
/obj/item/gun/projectile/SVD/taj
name = "Adhomai sniper rifle"
desc = "The Hotaki Marksman rifle, in stark contrast to the usual products of Hotak's arms, is an elegant and precise rifle that has taken the lives of many high value targets in the name of defending the Democratic People's Republic of Adhomai."
icon_state = "svd-taj"
item_state = "svd-taj"
wielded_item_state = "svd-taj-wielded"
/obj/item/gun/projectile/SVD/taj/update_icon()
..()
if(ammo_magazine)
icon_state = "SVD-taj"
else
icon_state = "SVD-taj-empty"