diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index f5798737018..81e14e2daa6 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -16,7 +16,7 @@ /obj/item/toy/blink = 2, /obj/item/clothing/under/syndicate/tacticool = 2, /obj/item/toy/sword = 2, - /obj/item/toy/gun = 2, + /obj/item/weapon/gun/projectile/revolver/capgun = 2, /obj/item/toy/crossbow = 2, /obj/item/clothing/suit/syndicatefake = 2, /obj/item/weapon/storage/fancy/crayons = 2, @@ -166,8 +166,8 @@ var/prizeselect = pickweight(prizes) new prizeselect(src.loc) - if(istype(prizeselect, /obj/item/toy/gun)) //Ammo comes with the gun - new /obj/item/toy/ammo/gun(src.loc) + if(istype(prizeselect, /obj/item/weapon/gun/projectile/revolver/capgun)) //Ammo comes with the gun + new /obj/item/projectile/bullet/pistol/cap(src.loc) else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit new /obj/item/clothing/head/syndicatefake(src.loc) diff --git a/code/game/machinery/computer3/computers/arcade.dm b/code/game/machinery/computer3/computers/arcade.dm index 746551079b5..8560750e997 100644 --- a/code/game/machinery/computer3/computers/arcade.dm +++ b/code/game/machinery/computer3/computers/arcade.dm @@ -7,7 +7,7 @@ /obj/item/toy/blink = 2, /obj/item/clothing/under/syndicate/tacticool = 2, /obj/item/toy/sword = 2, - /obj/item/toy/gun = 2, + /obj/item/weapon/gun/projectile/revolver/capgun = 2, /obj/item/toy/crossbow = 2, /obj/item/clothing/suit/syndicatefake = 2, /obj/item/weapon/storage/fancy/crayons = 2, @@ -28,8 +28,8 @@ if(computer && !computer.stat) var/prizeselect = pickweight(prizes) new prizeselect(computer.loc) - if(istype(prizeselect, /obj/item/toy/gun)) //Ammo comes with the gun - new /obj/item/toy/ammo/gun(computer.loc) + if(istype(prizeselect, /obj/item/weapon/gun/projectile/revolver/capgun)) //Ammo comes with the gun + new /obj/item/projectile/bullet/pistol/cap(src.loc) else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit new /obj/item/clothing/head/syndicatefake(computer.loc) feedback_inc("arcade_win_normal") diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 62d31185db5..088371c123b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -133,87 +133,6 @@ icon = 'icons/obj/singularity.dmi' icon_state = "singularity_s1" -/* - * Toy gun: Why isnt this an /obj/item/weapon/gun? - */ -/obj/item/toy/gun - name = "cap gun" - desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!" - icon = 'icons/obj/gun.dmi' - icon_state = "revolver" - item_state = "revolver" - item_icons = list( - icon_l_hand = 'icons/mob/items/lefthand_guns.dmi', - icon_r_hand = 'icons/mob/items/righthand_guns.dmi', - ) - flags = CONDUCT - slot_flags = SLOT_BELT|SLOT_HOLSTER - w_class = 3.0 - - matter = list("glass" = 10,DEFAULT_WALL_MATERIAL = 10) - - attack_verb = list("struck", "pistol whipped", "hit", "bashed") - var/bullets = 7.0 - - examine(mob/user) - if(..(user, 0)) - src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets) - return - - attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob) - - if (istype(A, /obj/item/toy/ammo/gun)) - if (src.bullets >= 7) - user << "It's already fully loaded!" - return 1 - if (A.amount_left <= 0) - user << "There is no more caps!" - return 1 - if (A.amount_left < (7 - src.bullets)) - src.bullets += A.amount_left - user << text("You reload [] caps\s!", A.amount_left) - A.amount_left = 0 - else - user << text("You reload [] caps\s!", 7 - src.bullets) - A.amount_left -= 7 - src.bullets - src.bullets = 7 - A.update_icon() - return 1 - return - - afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag) - if (flag) - return - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "You don't have the dexterity to do this!" - return - src.add_fingerprint(user) - if (src.bullets < 1) - user.show_message("*click* *click*", 2) - playsound(user, 'sound/weapons/empty.ogg', 100, 1) - return - playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1) - src.bullets-- - for(var/mob/O in viewers(user, null)) - O.show_message(text("\The [] fires a cap gun at []!", user, target), 1, "You hear a gunshot!", 2) - -/obj/item/toy/ammo/gun - name = "ammo-caps" - desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty." - icon = 'icons/obj/ammo.dmi' - icon_state = "357-7" - flags = CONDUCT - w_class = 1.0 - - matter = list(DEFAULT_WALL_MATERIAL = 10,"glass" = 10) - - var/amount_left = 7.0 - - update_icon() - src.icon_state = text("357-[]", src.amount_left) - src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left) - return - /* * Toy crossbow */ diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index ea7ea93ab7b..43b58a17264 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -84,7 +84,7 @@ /obj/item/toy/balloon, /obj/item/toy/blink, /obj/item/toy/crossbow, - /obj/item/toy/gun, + /obj/item/weapon/gun/projectile/revolver/capgun, /obj/item/toy/katana, /obj/item/toy/prize/deathripley, /obj/item/toy/prize/durand, diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index e4e6b4b08ab..57ebbd6e96d 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -67,9 +67,9 @@ /obj/item/ammo_magazine/c9mm name = "ammunition Box (9mm)" - icon_state = "9mm" + icon_state = "9mm" origin_tech = list(TECH_COMBAT = 2) - matter = list(DEFAULT_WALL_MATERIAL = 1800) + matter = list(DEFAULT_WALL_MATERIAL = 1800) caliber = "9mm" ammo_type = /obj/item/ammo_casing/c9mm max_ammo = 30 @@ -192,3 +192,12 @@ max_ammo = 20 multiple_sprites = 1 +/obj/item/ammo_magazine/caps + name = "speed loader (caps)" + icon_state = "T38" + caliber = "caps" + color = "#FF0000" + ammo_type = /obj/item/ammo_casing/cap + matter = list(DEFAULT_WALL_MATERIAL = 600) + max_ammo = 7 + multiple_sprites = 1 diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index 345752835bd..52c44af1d1f 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -158,3 +158,10 @@ icon_state = "rocketshell" projectile_type = /obj/item/missile caliber = "rocket" + +/obj/item/ammo_casing/cap + name = "cap" + desc = "A cap for children toys." + caliber = "caps" + color = "#FF0000" + projectile_type = /obj/item/projectile/bullet/pistol/cap diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 4375377ec0c..92d08e08675 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -84,4 +84,14 @@ flick("deckard-reload",src) ..() +/obj/item/weapon/gun/projectile/revolver/capgun + name = "cap gun" + desc = "Looks almost like the real thing! Ages 8 and up." + icon_state = "revolver" + item_state = "revolver" + caliber = "caps" + origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1) + handle_casings = CYCLE_CASINGS + max_shells = 7 + ammo_type = /obj/item/ammo_casing/cap diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 2038d718e0d..c9981933fb5 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -193,3 +193,13 @@ /obj/item/projectile/bullet/shotgun/practice name = "practice" damage = 5 + +/obj/item/projectile/bullet/pistol/cap + name = "cap" + damage = 0 + nodamage = 1 + embed = 0 + sharp = 0 + +/obj/item/projectile/bullet/pistol/cap/process() + return 0 \ No newline at end of file diff --git a/html/changelogs/chinsky-capguns.yml b/html/changelogs/chinsky-capguns.yml new file mode 100644 index 00000000000..e6b63e82d15 --- /dev/null +++ b/html/changelogs/chinsky-capguns.yml @@ -0,0 +1,7 @@ + +author: Chinsky + +delete-after: True + +changes: + - rscadd: "Made capguns into proper guns code-wise. It means you can now take people hostage with them, stick in your mouth, and all other things you can do with real guns but probably shouldn't." \ No newline at end of file