moved attackby proc to projectiles/guns/projectile.dm

This commit is contained in:
Granodd
2018-12-02 21:10:20 -05:00
parent 0a84835c84
commit 8fb45039c0
2 changed files with 7 additions and 16 deletions
+7 -1
View File
@@ -74,9 +74,15 @@
reload(AM, user)
to_chat(user, "<span class='notice'>You load a new magazine into \the [src].</span>")
return TRUE
else if(!can_reload() && !can_tactical)
else if(!can_tactical)
to_chat(user, "<span class='notice'>There's already a magazine in \the [src].</span>")
return TRUE
else
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>")
magazine.loc = get_turf(loc)
magazine.update_icon()
magazine = null
reload(AM, user)
else
to_chat(user, "<span class='notice'>You can't put this type of ammo in \the [src].</span>")
return TRUE
@@ -20,21 +20,6 @@
overlays += "[initial(icon_state)]burst"
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
. = ..()
if(.)
return
if(istype(A, /obj/item/ammo_box/magazine))
var/obj/item/ammo_box/magazine/AM = A
if(istype(AM, mag_type))
if(!can_reload())
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>")
magazine.loc = get_turf(loc)
magazine.update_icon()
magazine = null
reload(AM, user)
return
/obj/item/gun/projectile/automatic/ui_action_click()
burst_select()