This commit is contained in:
kevinz000
2019-07-09 08:20:45 -07:00
parent a2d52c0ed9
commit 69f06444e6
7 changed files with 37 additions and 21 deletions
@@ -58,12 +58,10 @@
var/mob/living/carbon/human/user = usr
select = !select
if(!select)
burst_size = 1
fire_delay = 0
disable_burst()
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
else
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
enable_burst()
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
@@ -72,6 +70,14 @@
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/gun/ballistic/automatic/proc/enable_burst()
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
/obj/item/gun/ballistic/automatic/proc/disable_burst()
burst_size = 1
fire_delay = 0
/obj/item/gun/ballistic/automatic/can_shoot()
return get_ammo()
@@ -118,14 +124,21 @@
icon_state = "wt550"
item_state = "arg"
mag_type = /obj/item/ammo_box/magazine/wt550m9
fire_delay = 2
fire_delay = 4
can_suppress = FALSE
burst_size = 0
actions_types = list()
burst_size = 2
can_bayonet = TRUE
knife_x_offset = 25
knife_y_offset = 12
/obj/item/gun/ballistic/automatic/wt550/enable_burst()
. = ..()
spread = 5
/obj/item/gun/ballistic/automatic/wt550/disable_burst()
. = ..()
spread = 0
/obj/item/gun/ballistic/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"