diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index 06d545def21..e8566d50fcc 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -212,8 +212,25 @@ caliber = "foam_force" icon = 'icons/obj/toy.dmi' icon_state = "foamdart" + var/modified = 0 -/obj/item/ammo_casing/update_icon() +/obj/item/ammo_casing/caseless/foam_dart/attackby(var/obj/item/A as obj, mob/user as mob, params) + ..() + if (istype(A, /obj/item/weapon/screwdriver) && !modified) + modified = 1 + BB.damage_type = BRUTE + icon_state = "foamdart_empty" + desc = "Its nerf or nothing! ...Although, this one doesn't look too safe." + user << "You pop the safety cap off of [src]." + else if ((istype(A, /obj/item/weapon/pen) || istype(A, /obj/item/weapon/reagent_containers/syringe)) && modified && !BB.contents.len) + user.drop_item() + A.loc = BB + BB.damage = 5 + BB.nodamage = 0 + user << "You insert [A] into [src]." + return + +/obj/item/ammo_casing/caseless/foam_dart/update_icon() ..() icon_state = "[initial(icon_state)]" diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index bb06ad9a480..d77a0a26b8a 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -237,6 +237,9 @@ obj/item/ammo_box/magazine/tommygunm45 max_ammo = 18 multiple_sprites = 2 +/obj/item/ammo_box/magazine/toy/riot + ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot + /obj/item/ammo_box/magazine/toy/pistol name = "foam force pistol magazine" icon_state = "9x19p" @@ -244,4 +247,4 @@ obj/item/ammo_box/magazine/tommygunm45 multiple_sprites = 2 /obj/item/ammo_box/magazine/toy/pistol/riot - ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot \ No newline at end of file + ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index acce8548cde..b977b39f01d 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -133,7 +133,7 @@ return boolets /obj/item/weapon/gun/projectile/suicide_act(mob/user) - if (src.chambered) + if (src.chambered && src.chambered.BB && !src.chambered.BB.nodamage) user.visible_message("[user] is putting the barrel of the [src.name] in \his mouth. It looks like \he's trying to commit suicide.") sleep(25) if(user.l_hand == src || user.r_hand == src) diff --git a/code/modules/projectiles/guns/projectile/toy.dm b/code/modules/projectiles/guns/projectile/toy.dm index a848fc2bb39..7560d24322f 100644 --- a/code/modules/projectiles/guns/projectile/toy.dm +++ b/code/modules/projectiles/guns/projectile/toy.dm @@ -1,7 +1,7 @@ /obj/item/weapon/gun/projectile/automatic/toy name = "foam force SMG" desc = "A bullpup three-round burst toy SMG. Ages 8 and up." - icon = 'icons/obj/toy.dmi' + icon = 'icons/obj/guns/toy.dmi' icon_state = "saber" item_state = "c20r" mag_type = /obj/item/ammo_box/magazine/toy @@ -36,7 +36,7 @@ /obj/item/weapon/gun/projectile/shotgun/toy name = "foam force shotgun" desc = "A toy shotgun with wood furniture and a four-shell capacity underneath. Ages 8 and up." - icon = 'icons/obj/toy.dmi' + icon = 'icons/obj/guns/toy.dmi' force = 0 throwforce = 0 origin_tech = null diff --git a/code/modules/projectiles/projectile/reusable.dm b/code/modules/projectiles/projectile/reusable.dm index 5fc838b4478..118a9c60a1d 100644 --- a/code/modules/projectiles/projectile/reusable.dm +++ b/code/modules/projectiles/projectile/reusable.dm @@ -6,12 +6,22 @@ /obj/item/projectile/bullet/reusable/on_hit(var/atom/target, var/blocked = 0) if(!proj_hit) proj_hit = 1 - new ammo_type(src.loc) + if (src.contents.len) + var/obj/content + for(content in src.contents) + content.loc = src.loc + else + new ammo_type(src.loc) ..() /obj/item/projectile/bullet/reusable/on_range() if(!proj_hit) - new ammo_type(src.loc) + if (src.contents.len) + var/obj/content + for(content in src.contents) + content.loc = src.loc + else + new ammo_type(src.loc) ..() /obj/item/projectile/bullet/reusable/magspear @@ -25,6 +35,8 @@ name = "foam dart" desc = "I hope you're wearing eye protection." damage = 0 // It's a damn toy. + damage_type = OXY + nodamage = 1 icon = 'icons/obj/toy.dmi' icon_state = "foamdart" ammo_type = /obj/item/ammo_casing/caseless/foam_dart @@ -34,4 +46,4 @@ name = "riot foam dart" icon_state = "foamdart_riot" ammo_type = /obj/item/ammo_casing/caseless/foam_dart/riot - stamina = 24 \ No newline at end of file + stamina = 25 \ No newline at end of file diff --git a/icons/obj/guns/toy.dmi b/icons/obj/guns/toy.dmi new file mode 100644 index 00000000000..5abffe316bf Binary files /dev/null and b/icons/obj/guns/toy.dmi differ diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index 8e76f75029b..81b43e75966 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ