Files
GS13NG/code/modules/projectiles/ammunition/caseless/foam.dm
Dax Dupont a8a31c9e4b You can no longer print infinite ammunition. (#37626)
* You can no longer print infinite ammunition.

* henk

lazy

anus

Reduces .38

Casings now give a tiny bit of metal so the janitor gets a buff

spacing
2018-05-03 08:45:17 -05:00

65 lines
2.1 KiB
Plaintext

/obj/item/ammo_casing/caseless/foam_dart
name = "foam dart"
desc = "It's nerf or nothing! Ages 8 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart
caliber = "foam_force"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
var/modified = 0
harmful = FALSE
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
if (modified)
icon_state = "foamdart_empty"
desc = "It's nerf or nothing! ... Although, this one doesn't look too safe."
if(BB)
BB.icon_state = "foamdart_empty"
else
icon_state = initial(icon_state)
desc = "It's nerf or nothing! Ages 8 and up."
if(BB)
BB.icon_state = initial(BB.icon_state)
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/screwdriver) && !modified)
modified = 1
FD.modified = 1
FD.damage_type = BRUTE
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
update_icon()
else if (istype(A, /obj/item/pen))
if(modified)
if(!FD.pen)
harmful = TRUE
if(!user.transferItemToLoc(A, FD))
return
FD.pen = A
FD.damage = 5
FD.nodamage = 0
to_chat(user, "<span class='notice'>You insert [A] into [src].</span>")
else
to_chat(user, "<span class='warning'>There's already something in [src].</span>")
else
to_chat(user, "<span class='warning'>The safety cap prevents you from inserting [A] into [src].</span>")
else
return ..()
/obj/item/ammo_casing/caseless/foam_dart/attack_self(mob/living/user)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if(FD.pen)
FD.damage = initial(FD.damage)
FD.nodamage = initial(FD.nodamage)
user.put_in_hands(FD.pen)
to_chat(user, "<span class='notice'>You remove [FD.pen] from [src].</span>")
FD.pen = null
/obj/item/ammo_casing/caseless/foam_dart/riot
name = "riot foam dart"
desc = "Whose smart idea was it to use toys as crowd control? Ages 18 and up."
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/riot
icon_state = "foamdart_riot"
materials = list(MAT_METAL = 1000)