TG: - Added water balloons (sprites courtesy of Sieve,) these can be filled with

most reagents and burst on throwing if filled, applying the reagents to whatever
is hit (along with everything else on that tile.) These are winnable from the
arcade, for now. I'll probably think of a better way to implement them.
Revision: r3075
Author: 	 quartz235
This commit is contained in:
Ren Erthilo
2012-04-22 03:03:05 +01:00
parent a63280b6db
commit 867f2d77af
3 changed files with 63 additions and 1 deletions
+61 -1
View File
@@ -387,4 +387,64 @@
set src in usr
usr << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
..()
return
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"
+2
View File
@@ -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
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB