diff --git a/code/defines/obj/toy.dm b/code/defines/obj/toy.dm index 9011ac00c0d..00ac66c93cc 100644 --- a/code/defines/obj/toy.dm +++ b/code/defines/obj/toy.dm @@ -387,4 +387,64 @@ set src in usr usr << text("\icon[] [] units of water left!", src, src.reagents.total_volume) ..() - return \ No newline at end of file + return + +/obj/item/toy/balloon + name = "water balloon" + desc = "A translucent balloon. There's nothing in it." + icon = 'toy.dmi' + icon_state = "waterballoon-e" + item_state = "balloon-empty" + +/obj/item/toy/balloon/New() + var/datum/reagents/R = new/datum/reagents(10) + reagents = R + R.my_atom = src + +/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob) + return + +/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob) + if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1) + A.reagents.trans_to(src, 10) + user << "\blue You fill the balloon with the contents of [A]." + src.desc = "A translucent balloon with some form of liquid sloshing around in it." + src.update_icon() + return + +/obj/item/toy/balloon/attackby(obj/O as obj, mob/user as mob) + if(istype(O, /obj/item/weapon/reagent_containers/glass)) + if(O.reagents) + if(O.reagents.total_volume < 1) + user << "The [O] is empty." + else if(O.reagents.total_volume >= 1) + if(O.reagents.has_reagent("pacid", 1)) + user << "The acid chews through the balloon!" + O.reagents.reaction(user) + del(src) + else + src.desc = "A translucent balloon with some form of liquid sloshing around in it." + user << "\blue You fill the balloon with the contents of [O]." + O.reagents.trans_to(src, 10) + src.update_icon() + return + +/obj/item/toy/balloon/throw_impact(atom/hit_atom) + if(src.reagents.total_volume >= 1) + src.visible_message("\red The [src] bursts!","You hear a pop and a splash.") + src.reagents.reaction(get_turf(hit_atom)) + for(var/atom/A in get_turf(hit_atom)) + src.reagents.reaction(A) + src.icon_state = "burst" + spawn(5) + if(src) + del(src) + return + +/obj/item/toy/balloon/update_icon() + if(src.reagents.total_volume >= 1) + icon_state = "waterballoon" + item_state = "balloon" + else + icon_state = "waterballoon-e" + item_state = "balloon-empty" \ No newline at end of file diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index c6c2eac9296..083c12c5378 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -146,6 +146,8 @@ new /obj/item/toy/crayonbox(src.loc) if(9) new /obj/item/toy/spinningtoy(src.loc) + // if(10) //Commented out on Urist-chan's orders~ + // new /obj/item/toy/balloon(src.loc) //Until it gets a better sprite~ else var/atom/movable/Prize = pick(contents) Prize.loc = src.loc diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index 907789f99ca..8650435b56e 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ