This commit is contained in:
shellspeed1
2022-09-16 17:55:10 -07:00
parent bc13bdb177
commit 91c095989a
4 changed files with 85 additions and 120 deletions
@@ -5,7 +5,7 @@
var/automatic_burst_overlay = TRUE
can_suppress = TRUE
burst_size = 3
burst_shot_delay = 2
fire_delay = 2
fire_select_modes = list(SELECT_SEMI_AUTOMATIC, SELECT_BURST_SHOT, SELECT_FULLY_AUTOMATIC)
/obj/item/gun/ballistic/automatic/proto
@@ -17,10 +17,6 @@
pin = null
burst_size = 1
/obj/item/gun/ballistic/automatic/proto/Initialize()
. = ..()
AddComponent(/datum/component/automatic_fire, 0.2 SECONDS)
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/firing_pin
@@ -60,34 +56,6 @@
else
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
/obj/item/gun/ballistic/automatic/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_firemode))
burst_select()
else
return ..()
/obj/item/gun/ballistic/automatic/proc/burst_select()
var/mob/living/carbon/human/user = usr
select = !select
if(!select)
disable_burst()
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
else
enable_burst()
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/gun/ballistic/automatic/proc/enable_burst()
burst_size = initial(burst_size)
/obj/item/gun/ballistic/automatic/proc/disable_burst()
burst_size = 1
/obj/item/gun/ballistic/automatic/can_shoot()
return get_ammo()
@@ -141,18 +109,10 @@
knife_y_offset = 12
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/wt550/enable_burst()
. = ..()
spread = 15
/obj/item/gun/ballistic/automatic/wt550/afterattack()
. = ..()
empty_alarm()
/obj/item/gun/ballistic/automatic/wt550/disable_burst()
. = ..()
spread = 0
/obj/item/gun/ballistic/automatic/wt550/update_icon_state()
icon_state = "wt550[magazine ? "-[CEILING(((get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
@@ -216,6 +176,7 @@
/obj/item/gun/ballistic/automatic/m90/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
/*
/obj/item/gun/ballistic/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
switch(select)
@@ -233,6 +194,7 @@
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
*/
/obj/item/gun/ballistic/automatic/tommygun
name = "\improper Thompson SMG"