mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
moved attackby proc to projectiles/guns/projectile.dm
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user