diff --git a/code/game/objects/items/weapons/grenades/confetti_grenade_ch.dm b/code/game/objects/items/weapons/grenades/confetti_grenade_ch.dm index 800b317dff..3f0583ba66 100644 --- a/code/game/objects/items/weapons/grenades/confetti_grenade_ch.dm +++ b/code/game/objects/items/weapons/grenades/confetti_grenade_ch.dm @@ -28,4 +28,24 @@ sleep(10) qdel(src) + return + +/obj/item/weapon/grenade/confetti/party_ball //Intended to be used only with the confetti cannon. + name = "party ball" + desc = "Full of !!FUN!!" + icon = 'icons/obj/grenade_ch.dmi' + icon_state = "party_ball" + confetti_strength = 2 + det_time = 1 + throwforce = 0 //Confetti cannon is only fun to shoot at people if it deals no damage. + +/obj/item/weapon/grenade/confetti/party_ball/detonate() //Could condense this by making the sound a variable in the parent but I'm lazy. + playsound(src.loc, 'sound/effects/confetti_ball.ogg', 50, 1, -3) + src.confetti_spread.set_up(10, 0, usr.loc) + spawn(0) + for(var/i = 1 to confetti_strength) + src.confetti_spread.start() + sleep(10) + qdel(src) + return \ No newline at end of file diff --git a/code/modules/projectiles/guns/launcher/confetti_ch.dm b/code/modules/projectiles/guns/launcher/confetti_ch.dm new file mode 100644 index 0000000000..c068ffba8c --- /dev/null +++ b/code/modules/projectiles/guns/launcher/confetti_ch.dm @@ -0,0 +1,51 @@ +//The confetti cannon is a simple weapon meant to be a toy. You shoot confetti at people and it makes a funny sound. Don't give this any combat use. +/obj/item/weapon/gun/launcher/confetti_cannon + name = "confetti cannon" + desc = "For those times when you absolutely need colored paper everywhere." + icon = 'icons/obj/weapons_ch.dmi' + icon_state = "confetti_cannon" + item_state = "confetti_cannon" + w_class = ITEMSIZE_NORMAL + origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 2) + var/obj/item/weapon/grenade/confetti/party_ball/chambered = null + + var/confetti_charge = 0 + var/max_confetti = 20 + +/obj/item/weapon/gun/launcher/confetti_cannon/examine(mob/user) + . = ..() + if(get_dist(user, src) <= 2) + . += "It's loaded with [confetti_charge] balls of confetti." + +/obj/item/weapon/gun/launcher/confetti_cannon/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/shreddedp)) + if(confetti_charge < max_confetti) + user.drop_item() + ++confetti_charge + to_chat(usr, "You put the paper in the [src].") + qdel(I) + else + to_chat(usr, "[src] cannot hold more paper.") + +/obj/item/weapon/gun/launcher/confetti_cannon/proc/pump(mob/M as mob) + playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) + if(!chambered) + if(confetti_charge) + chambered = new /obj/item/weapon/grenade/confetti/party_ball + --confetti_charge + to_chat(usr, "You compress a new confetti ball.") + else + to_chat(usr, "The [src] is out of confetti!") + else + to_chat(usr, "The [src] is already loaded!") + +/obj/item/weapon/gun/launcher/confetti_cannon/attack_self(mob/user) + pump(user) + +/obj/item/weapon/gun/launcher/confetti_cannon/consume_next_projectile() + if(chambered) + chambered.activate(null) + return chambered + +/obj/item/weapon/gun/launcher/confetti_cannon/handle_post_fire(mob/user) + chambered = null \ No newline at end of file diff --git a/code/modules/research/designs/weapons_ch.dm b/code/modules/research/designs/weapons_ch.dm new file mode 100644 index 0000000000..6461d319fb --- /dev/null +++ b/code/modules/research/designs/weapons_ch.dm @@ -0,0 +1,8 @@ +//Misc weapons +/datum/design/item/weapon/gun/launcher/confetti_cannon + desc = "Stuff it with paper and shoot! You'll be a hit at every party." + id = "confetti_cannon" + req_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) + materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 3000) + build_path = /obj/item/weapon/gun/launcher/confetti_cannon + sort_string = "MAAVD" \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 34d1cedf61..6bec370314 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -3338,6 +3338,7 @@ #include "code\modules\projectiles\guns\energy\cell_loaded_vr\nerd_cells.dm" #include "code\modules\projectiles\guns\energy\cell_loaded_vr\nsfw.dm" #include "code\modules\projectiles\guns\energy\cell_loaded_vr\nsfw_cells.dm" +#include "code\modules\projectiles\guns\launcher\confetti_ch.dm" #include "code\modules\projectiles\guns\launcher\crossbow.dm" #include "code\modules\projectiles\guns\launcher\grenade_launcher.dm" #include "code\modules\projectiles\guns\launcher\pneumatic.dm" @@ -3515,6 +3516,7 @@ #include "code\modules\research\designs\subspace_parts.dm" #include "code\modules\research\designs\tech_disks.dm" #include "code\modules\research\designs\weapons.dm" +#include "code\modules\research\designs\weapons_ch.dm" #include "code\modules\research\designs\weapons_vr.dm" #include "code\modules\research\designs\weapons_yw.dm" #include "code\modules\research\designs\xenoarch_toys.dm"