Compiles, and guns work™

This commit is contained in:
TheDZD
2016-05-31 22:50:55 -04:00
parent 95d7a68a75
commit a4e950d21a
74 changed files with 288 additions and 550 deletions
+7 -3
View File
@@ -17,7 +17,6 @@
var/randomspread = 0 //Randomspread for automatics
var/click_cooldown_override = 0 //Override this to make your gun have a faster fire rate, in tenths of a second. 4 is the default gun cooldown.
/obj/item/ammo_casing/New()
..()
if(projectile_type)
@@ -32,6 +31,11 @@
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
desc = "[initial(desc)][BB ? "" : " This one is spent"]"
/obj/item/ammo_casing/proc/newshot() //For energy weapons, shotgun shells and wands (!).
if (!BB)
BB = new projectile_type(src)
return
/obj/item/ammo_casing/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/ammo_box))
var/obj/item/ammo_box/box = I
@@ -99,7 +103,7 @@
update_icon()
/obj/item/ammo_box/Destroy()
for(atom/A in stored_ammo)
for(var/atom/A in stored_ammo)
qdel(A)
stored_ammo = null
return ..()
@@ -128,7 +132,7 @@
for(var/obj/item/ammo_casing/AC in stored_ammo)
if(!AC.BB)//found a spent ammo
stored_ammo -= AC
AC.loc = get_turf(src.loc)
AC.loc = get_turf(loc)
stored_ammo += R
R.loc = src