Removing priority overlays, update_icon() splitup for guns.
This commit is contained in:
@@ -18,13 +18,15 @@
|
||||
/obj/item/gun/ballistic/automatic/proto/unrestricted
|
||||
pin = /obj/item/firing_pin
|
||||
|
||||
/obj/item/gun/ballistic/automatic/update_icon()
|
||||
..()
|
||||
/obj/item/gun/ballistic/automatic/update_overlays()
|
||||
. = ..()
|
||||
if(automatic_burst_overlay)
|
||||
if(!select)
|
||||
add_overlay("[initial(icon_state)]semi")
|
||||
. += ("[initial(icon_state)]semi")
|
||||
if(select == 1)
|
||||
add_overlay("[initial(icon_state)]burst")
|
||||
. += "[initial(icon_state)]burst"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/attackby(obj/item/A, mob/user, params)
|
||||
@@ -115,8 +117,7 @@
|
||||
. = ..()
|
||||
empty_alarm()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/c20r/update_icon()
|
||||
..()
|
||||
/obj/item/gun/ballistic/automatic/c20r/update_icon_state()
|
||||
icon_state = "c20r[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550
|
||||
@@ -141,9 +142,8 @@
|
||||
. = ..()
|
||||
spread = 0
|
||||
|
||||
/obj/item/gun/ballistic/automatic/wt550/update_icon()
|
||||
..()
|
||||
icon_state = "wt550[magazine ? "-[CEILING(( (get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
|
||||
/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.
|
||||
|
||||
/obj/item/gun/ballistic/automatic/mini_uzi
|
||||
name = "\improper Type U3 Uzi"
|
||||
@@ -160,6 +160,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m556
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
can_suppress = FALSE
|
||||
automatic_burst_overlay = FALSE
|
||||
var/obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel
|
||||
burst_size = 3
|
||||
burst_shot_delay = 2
|
||||
@@ -191,18 +192,19 @@
|
||||
underbarrel.attackby(A, user, params)
|
||||
else
|
||||
..()
|
||||
/obj/item/gun/ballistic/automatic/m90/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/item/gun/ballistic/automatic/m90/update_overlays()
|
||||
. = ..()
|
||||
switch(select)
|
||||
if(0)
|
||||
add_overlay("[initial(icon_state)]semi")
|
||||
. += "[initial(icon_state)]semi"
|
||||
if(1)
|
||||
add_overlay("[initial(icon_state)]burst")
|
||||
. += "[initial(icon_state)]burst"
|
||||
if(2)
|
||||
add_overlay("[initial(icon_state)]gren")
|
||||
. += "[initial(icon_state)]gren"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/m90/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
|
||||
return
|
||||
|
||||
/obj/item/gun/ballistic/automatic/m90/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
switch(select)
|
||||
@@ -257,6 +259,7 @@
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
mag_type = /obj/item/ammo_box/magazine/m12g
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
automatic_burst_overlay = FALSE
|
||||
can_suppress = FALSE
|
||||
burst_size = 1
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
@@ -269,10 +272,13 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_overlays()
|
||||
. = ..()
|
||||
if(magazine)
|
||||
add_overlay("[magazine.icon_state]")
|
||||
. += "[magazine.icon_state]"
|
||||
icon_state = "bulldog[chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/afterattack()
|
||||
@@ -298,6 +304,7 @@
|
||||
burst_shot_delay = 1
|
||||
spread = 7
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
automatic_burst_overlay = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
|
||||
pin = /obj/item/firing_pin
|
||||
@@ -316,7 +323,7 @@
|
||||
playsound(user, 'sound/weapons/sawclose.ogg', 60, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/update_icon_state()
|
||||
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
|
||||
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
|
||||
|
||||
@@ -369,9 +376,10 @@
|
||||
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
|
||||
zoom_out_amt = 13
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
automatic_burst_overlay = FALSE
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon_state()
|
||||
if(magazine)
|
||||
icon_state = "sniper-mag"
|
||||
else
|
||||
@@ -397,9 +405,10 @@
|
||||
can_suppress = TRUE
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
automatic_burst_overlay = FALSE
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/surplus/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/surplus/update_icon_state()
|
||||
if(magazine)
|
||||
icon_state = "surplus"
|
||||
else
|
||||
@@ -413,6 +422,7 @@
|
||||
icon_state = "oldrifle"
|
||||
item_state = "arg"
|
||||
mag_type = /obj/item/ammo_box/magazine/recharge
|
||||
automatic_burst_overlay = FALSE
|
||||
fire_delay = 2
|
||||
can_suppress = FALSE
|
||||
burst_size = 1
|
||||
@@ -420,7 +430,5 @@
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
casing_ejector = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/laser/update_icon()
|
||||
..()
|
||||
/obj/item/gun/ballistic/automatic/laser/update_icon_state()
|
||||
icon_state = "oldrifle[magazine ? "-[CEILING(get_ammo(0)/4, 1)*4]" : ""]"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user