mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
[MIRROR] Some Bolt-Action Fixes (sniper rifle mag manip independent of bolt, among other things) [MDB IGNORE] (#21236)
* Some Bolt-Action Fixes (sniper rifle mag manip independent of bolt, among other things) (#75079) - because pipeguns can no longer misfire, removes the code relevant to cleaning them with a cloth - the above makes it so that you can insert/remove a sniper rifle's magazine regardless of bolt open/close status, which is neat - also nudges some code around so that affixing a bayonet or whacking your gun with any item no longer spams it with "can't jam!" or "bolt closed!" ## Why It's Good For The Game less random irrelevant popups, and also the magazine on sniper rifles thing just kind of irked me * Some Bolt-Action Fixes (sniper rifle mag manip independent of bolt, among other things) --------- Co-authored-by: Hatterhat <31829017+Hatterhat@users.noreply.github.com>
This commit is contained in:
@@ -32,12 +32,6 @@
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/ballistic/rifle/attackby(obj/item/A, mob/user, params)
|
||||
if (!bolt_locked && !istype(A, /obj/item/stack/sheet/cloth))
|
||||
balloon_alert(user, "[bolt_wording] is closed!")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/ballistic/rifle/examine(mob/user)
|
||||
. = ..()
|
||||
. += "The bolt is [bolt_locked ? "open" : "closed"]."
|
||||
@@ -101,19 +95,20 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/attackby(obj/item/item, mob/user, params)
|
||||
. = ..()
|
||||
if(!can_jam)
|
||||
balloon_alert(user, "can't jam!")
|
||||
return
|
||||
|
||||
if(!bolt_locked)
|
||||
if(!bolt_locked && !istype(item, /obj/item/knife))
|
||||
balloon_alert(user, "bolt closed!")
|
||||
return
|
||||
|
||||
if(istype(item, /obj/item/gun_maintenance_supplies) && do_after(user, 10 SECONDS, target = src))
|
||||
user.visible_message(span_notice("[user] finishes maintenance of [src]."))
|
||||
jamming_chance = initial(jamming_chance)
|
||||
qdel(item)
|
||||
. = ..()
|
||||
|
||||
if(istype(item, /obj/item/gun_maintenance_supplies))
|
||||
if(!can_jam)
|
||||
balloon_alert(user, "can't jam!")
|
||||
return
|
||||
if(do_after(user, 10 SECONDS, target = src))
|
||||
user.visible_message(span_notice("[user] finishes maintaining [src]."))
|
||||
jamming_chance = initial(jamming_chance)
|
||||
qdel(item)
|
||||
|
||||
/obj/item/gun/ballistic/rifle/boltaction/blow_up(mob/user)
|
||||
. = FALSE
|
||||
@@ -181,7 +176,6 @@
|
||||
initial_fire_sound = 'sound/weapons/gun/sniper/shot.ogg'
|
||||
alternative_fire_sound = 'sound/weapons/gun/shotgun/shot.ogg'
|
||||
can_modify_ammo = TRUE
|
||||
can_misfire = FALSE
|
||||
can_bayonet = TRUE
|
||||
knife_y_offset = 11
|
||||
can_be_sawn_off = FALSE
|
||||
|
||||
Reference in New Issue
Block a user