Files
CHOMPStation2/code/modules/projectiles/ammunition.dm
mport2004@gmail.com a72e6d6a84 Projectiles cleaned up a bit and moved into a /modules folder.
Solars should work a bit better now.
Removed the old shield item as it has not been used in forever and was cluttering up some of the mob code.
IonRifle only has 5 shots before it needs to be reloaded down from 10.
Lowered the weakbullet's stun to match the taser.
You can no longer recall the shuttle on meteor.
Fixed a bug I caused on rev where if the revs were in space and dead it would count them as living.
Bit of blob work.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2220 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-18 07:27:05 +00:00

72 lines
1.7 KiB
Plaintext

/obj/item/ammo_casing
name = "bullet casing"
desc = "A .357 bullet casing."
icon = 'ammo.dmi'
icon_state = "s-casing"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
throwforce = 1
w_class = 1.0
var
caliber = "357" //Which kind of guns it can be loaded into
projectile_type = "/obj/item/projectile"//The bullet type to create when New() is called
obj/item/projectile/BB = null //The loaded bullet
New()
..()
if(projectile_type)
BB = new projectile_type(src)
pixel_x = rand(-10.0, 10)
pixel_y = rand(-10.0, 10)
dir = pick(cardinal)
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/ammo_casing/AC in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += AC;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
//Boxes of ammo
/obj/item/ammo_magazine
name = "ammo box (.357)"
desc = "A box of .357 ammo"
icon_state = "357"
icon = 'ammo.dmi'
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
item_state = "syringe_kit"
m_amt = 50000
throwforce = 2
w_class = 1.0
throw_speed = 4
throw_range = 10
var
list/stored_ammo = list()
New()
for(var/i = 1, i <= 7, i++)
stored_ammo += new /obj/item/ammo_casing(src)
update_icon()
update_icon()
icon_state = text("[initial(icon_state)]-[]", stored_ammo.len)
desc = text("There are [] shell\s left!", stored_ammo.len)