Adds a sniper bolt action rifle (#15899)

* Adds a sniper bolt action rifle

* Update code/modules/mob/mob_helpers.dm

Co-authored-by: mikomyazaki <47489928+mikomyazaki@users.noreply.github.com>

* hunting

* scope for him too

---------

Co-authored-by: mikomyazaki <47489928+mikomyazaki@users.noreply.github.com>
This commit is contained in:
Alberyk
2023-03-06 13:10:01 +00:00
committed by GitHub
co-authored by mikomyazaki
parent ae948d0de6
commit fa603b245b
6 changed files with 28 additions and 4 deletions
+2
View File
@@ -444,6 +444,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
var/current_time = world.time
if(!M || !M.client || (M.shakecamera > current_time)|| M.stat || isEye(M) || isAI(M))
return
if(((M.client.view != world.view) || (M.client.pixel_x != 0) || (M.client.pixel_y != 0))) //to prevent it while zooming, because zoom does not play well with this code
return
M.shakecamera = current_time + max(TICKS_PER_RECOIL_ANIM, duration)
strength = abs(strength)*PIXELS_PER_STRENGTH_VAL
var/steps = min(1, Floor(duration/TICKS_PER_RECOIL_ANIM))-1
@@ -24,6 +24,21 @@
desc = "A replica of a traditional adhomian bolt action rifle. It has the seal of the Grand Romanovich Casino on its stock. Uses 7.62mm rounds."
ammo_type = /obj/item/ammo_casing/a762/blank
/obj/item/gun/projectile/shotgun/pump/rifle/scope
name = "sniper bolt action rifle"
desc = "A cheap ballistic rifle often found in the hands of Tajaran conscripts. This one has a telescopic sight attached to it. Uses 7.62mm rounds."
icon = 'icons/obj/guns/bolt_scope.dmi'
/obj/item/gun/projectile/shotgun/pump/rifle/scope/verb/scope()
set category = "Object"
set name = "Use Scope"
set popup_menu = 1
if(wielded)
toggle_scope(2.0, usr)
else
to_chat(usr, SPAN_WARNING ("You can't look through the scope without stabilizing the rifle!"))
/obj/item/gun/projectile/shotgun/pump/rifle/saw_off(mob/user, obj/item/tool)
icon = 'icons/obj/guns/obrez.dmi'
icon_state = "obrez"
+7
View File
@@ -0,0 +1,7 @@
author: Alberyk, Atteria
delete-after: True
changes:
- rscadd: "Added a sniper bolt action rifle."
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -40,11 +40,11 @@
/obj/item/gun/projectile/pistol/adhomai = 1,
/obj/item/ammo_magazine/mc9mm = 2,
/obj/item/grenade/frag = 1,
/obj/item/ammo_magazine/d762 = 2
/obj/item/ammo_magazine/boltaction = 3
)
l_ear = null
back = /obj/item/gun/projectile/dragunov
back = /obj/item/gun/projectile/shotgun/pump/rifle/scope
id = null
l_pocket = /obj/item/material/caltrops
r_pocket = /obj/item/material/caltrops
@@ -64,7 +64,7 @@
suit = /obj/item/clothing/suit/storage/tajaran/hunting
id = null
suit_store = /obj/item/gun/projectile/shotgun/pump/rifle
suit_store = /obj/item/gun/projectile/shotgun/pump/rifle/scope
backpack_contents = list(/obj/item/storage/wallet/random = 1)
/datum/ghostspawner/human/matake_hunter
@@ -105,5 +105,5 @@
/obj/item/material/sword/sabre/silver
)
id = null
back = /obj/item/gun/projectile/shotgun/pump/rifle
back = /obj/item/gun/projectile/shotgun/pump/rifle/scope
l_pocket = list(/obj/item/storage/wallet/random = 1)