Further gun updates

This commit is contained in:
Markolie
2015-09-14 04:36:41 +02:00
parent 700a4797cc
commit 591f2747ca
4 changed files with 282 additions and 260 deletions
@@ -186,10 +186,10 @@
/obj/item/clothing/suit/space/freedom
name = "eagle suit"
desc = "An advanced, light suit, fabricated from a mixture of synthetic feathers and space-resistant material. A gun holster appears to be intergrated into the suit and the wings appear to be stuck in 'freedom' mode."
desc = "An advanced, light suit, fabricated from a mixture of synthetic feathers and space-resistant material. A gun holster appears to be integrated into the suit and the wings appear to be stuck in 'freedom' mode."
icon_state = "freedom"
item_state = "freedom"
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank)
armor = list(melee = 40, bullet = 40, laser = 30,energy = 25, bomb = 100, bio = 100, rad = 100)
slowdown = 1
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
@@ -29,8 +29,26 @@
return
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
if(..() && chambered)
alarmed = 0
. = ..()
if(.)
return
if(istype(A, /obj/item/ammo_box/magazine))
var/obj/item/ammo_box/magazine/AM = A
if(istype(AM, text2path(mag_type)))
if(magazine)
user << "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>"
magazine.forceMove(get_turf(src.loc))
magazine.update_icon()
magazine = null
else
user << "<span class='notice'>You insert the magazine into \the [src].</span>"
user.remove_from_mob(AM)
magazine = AM
magazine.forceMove(src)
chamber_round()
A.update_icon()
update_icon()
return 1
/obj/item/weapon/gun/projectile/automatic/ui_action_click()
burst_select()
@@ -260,13 +260,17 @@
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
if(magazine)
src.overlays = 0
overlays.Cut()
overlays += "[magazine.icon_state]"
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/update_icon()
src.overlays = 0
overlays.Cut()
update_magazine()
if(!select)
overlays += "[initial(icon_state)]semi"
if(select)
overlays += "[initial(icon_state)]burst"
icon_state = "bulldog[chambered ? "" : "-e"]"
return