adds crushing cans on your head and bottle flipping (#9340)

This commit is contained in:
Wowzewow (Wezzy)
2020-07-30 17:59:28 +08:00
committed by GitHub
parent 22e4100975
commit 4b1faebb80
17 changed files with 144 additions and 61 deletions

View File

@@ -255,7 +255,7 @@
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 10,
/obj/item/reagent_containers/food/drinks/cans/root_beer = 10,
/obj/item/reagent_containers/food/drinks/cans/starkist = 10,
/obj/item/reagent_containers/food/drinks/cans/waterbottle = 10,
/obj/item/reagent_containers/food/drinks/waterbottle = 10,
/obj/item/reagent_containers/food/drinks/cans/dyn = 10,
/obj/item/reagent_containers/food/drinks/cans/space_up = 10,
/obj/item/reagent_containers/food/drinks/cans/iced_tea = 10,
@@ -278,7 +278,7 @@
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 16,
/obj/item/reagent_containers/food/drinks/cans/root_beer = 13,
/obj/item/reagent_containers/food/drinks/cans/starkist = 15,
/obj/item/reagent_containers/food/drinks/cans/waterbottle = 12,
/obj/item/reagent_containers/food/drinks/waterbottle = 12,
/obj/item/reagent_containers/food/drinks/cans/dyn = 18,
/obj/item/reagent_containers/food/drinks/cans/space_up = 15,
/obj/item/reagent_containers/food/drinks/cans/iced_tea = 13,

View File

@@ -139,9 +139,14 @@
/obj/item/trash/can
name = "used can"
icon_state = "can-used"
icon_state = "cola"
drop_sound = 'sound/items/drop/soda.ogg'
pickup_sound = 'sound/items/pickup/soda.ogg'
randpixel = 4
/obj/item/trash/can/Initialize()
. = ..()
randpixel_xy()
/obj/item/trash/tuna
name = "\improper Tuna Snax"

View File

@@ -493,7 +493,7 @@
/obj/structure/closet/crate/freezer/rations/fill()
for(var/i=1,i<=6,i++)
new /obj/item/reagent_containers/food/snacks/liquidfood(src)
new /obj/item/reagent_containers/food/drinks/cans/waterbottle(src)
new /obj/item/reagent_containers/food/drinks/waterbottle(src)
/obj/structure/closet/crate/bin
name = "large bin"

View File

@@ -4,6 +4,25 @@
flags = 0 //starts closed
drop_sound = 'sound/items/drop/soda.ogg'
pickup_sound = 'sound/items/pickup/soda.ogg'
desc_info = "Click it in your hand to open it.\
If it's carbonated and closed, you can shake it by clicking on it with harm intent. \
If it's empty, you can crush it on your forehead by selecting your head and clicking on yourself with harm intent. \
You can also crush cans on other people's foreheads as well."
/obj/item/reagent_containers/food/drinks/cans/attack(mob/living/M, mob/user, var/target_zone)
if(iscarbon(M) && !reagents.total_volume && user.a_intent == I_HURT && target_zone == BP_HEAD)
if(M == user)
user.visible_message(SPAN_WARNING("[user] crushes the can of [src.name] on [user.get_pronoun(1)] forehead!"), SPAN_NOTICE("You crush the can of [src.name] on your forehead."))
else
user.visible_message(SPAN_WARNING("[user] crushes the can of [src.name] on [M]'s forehead!"), SPAN_NOTICE("You crush the can of [src.name] on [M]'s forehead."))
M.apply_damage(2,BRUTE,BP_HEAD) // ouch.
playsound(M,'sound/items/soda_crush.ogg', rand(10,50), TRUE)
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(M.loc)
crushed_can.icon_state = icon_state
qdel(src)
user.put_in_hands(crushed_can)
return TRUE
. = ..()
//DRINKS
@@ -14,16 +33,6 @@
center_of_mass = list("x"=16, "y"=10)
reagents_to_add = list(/datum/reagent/drink/space_cola = 30)
/obj/item/reagent_containers/food/drinks/cans/waterbottle
name = "bottled water"
desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles."
icon_state = "waterbottle"
center_of_mass = list("x"=16, "y"=8)
drop_sound = 'sound/items/drop/disk.ogg'
pickup_sound = 'sound/items/pickup/disk.ogg'
reagents_to_add = list(/datum/reagent/water = 30)
/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind
name = "\improper Space Mountain Wind"
desc = "Blows right through you like a space wind."
@@ -148,7 +157,7 @@
/obj/item/reagent_containers/food/drinks/cans/zorahozm
name = "\improper High Octane Zorane Might"
desc = "A can of fizzy, acidic energy, with plenty V'krexi additives. It tastes like the bottom of your mouth is being impaled by a freezing cold spear, a spear laced with bees and salt."
desc = "A can of fizzy, acidic energy, with plenty of V'krexi additives. Tastes like impaling the bottom of your mouth with a freezing cold spear laced with bees and salt."
icon_state = "hozm"
center_of_mass = list("x"=16, "y"=8)
@@ -156,7 +165,7 @@
/obj/item/reagent_containers/food/drinks/cans/zoravenom
name = "\improper Zo'ra Soda Sour Venom Grass (Diet!)"
desc = "A diet can of Venom Grass flavored energy drink, with V'krexi additives. It still tastes like a cloud of stinging polytrinic bees, but calories are nowhere to be found."
desc = "A diet can of Venom Grass flavored energy drink, with V'krexi additives. Still tastes like a cloud of stinging polytrinic bees, but calories are nowhere to be found."
icon_state = "sourvenomgrass"
center_of_mass = list("x"=16, "y"=8)
@@ -212,7 +221,7 @@
/obj/item/reagent_containers/food/drinks/cans/dyn
name = "Cooling Breeze"
desc = "The most refreshing thing you can find on the market, based on a Skrell medicinal plant. No salt or sugar. "
desc = "The most refreshing thing you can find on the market, based on a Skrell medicinal plant. No salt or sugar."
icon_state = "dyncan"
center_of_mass = list("x"=16, "y"=10)
reagents_to_add = list(/datum/reagent/drink/dynjuice/cold = 30)

View File

@@ -65,8 +65,8 @@ If you add a drink with no empty icon sprite, ensure it is flagged as NO_EMPTY_I
open(user)
/obj/item/reagent_containers/food/drinks/proc/open(mob/user as mob)
playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1)
user.visible_message("<b>[user]</b> opens \the [src].", SPAN_NOTICE("You open \the [src] with an audible pop!"), "You can hear a pop,")
playsound(loc,'sound/items/soda_open.ogg', rand(10,50), 1)
user.visible_message("<b>[user]</b> opens \the [src].", SPAN_NOTICE("You open \the [src] with an audible pop!"), "You can hear a pop.")
flags |= OPENCONTAINER
/obj/item/reagent_containers/food/drinks/proc/boom(mob/user as mob)
@@ -276,6 +276,33 @@ If you add a drink with no empty icon sprite, ensure it is flagged as NO_EMPTY_I
else
is_liquid = TRUE
/obj/item/reagent_containers/food/drinks/waterbottle
name = "bottled water"
desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles."
icon_state = "waterbottle"
flags = 0 //starts closed
center_of_mass = list("x"=16, "y"=8)
drop_sound = 'sound/items/drop/disk.ogg'
pickup_sound = 'sound/items/pickup/disk.ogg'
reagents_to_add = list(/datum/reagent/water = 30)
//heehoo bottle flipping
/obj/item/reagent_containers/food/drinks/waterbottle/throw_impact()
. = ..()
if(!QDELETED(src))
if(prob(10)) // landed upright
src.visible_message(SPAN_NOTICE("\The [src] lands upright!"))
if(prob(1)) // landed upright on ITS CAP
src.visible_message(SPAN_NOTICE("\The [src] lands upright on its cap!"))
animate(src, transform = matrix(prob(50)? 180 : -180, MATRIX_ROTATE), time = 3, loop = 0)
else // landed on it's side
animate(src, transform = matrix(prob(50)? 90 : -90, MATRIX_ROTATE), time = 3, loop = 0)
/obj/item/reagent_containers/food/drinks/waterbottle/pickup()
. = ..()
animate(src, transform = null, time = 1, loop = 0)
/obj/item/reagent_containers/food/drinks/sillycup
name = "paper cup"
desc = "A paper water cup."

View File

@@ -54,7 +54,7 @@ var/list/lunchables_snacks_ = list(
var/list/lunchables_drinks_ = list(
/obj/item/reagent_containers/food/drinks/cans/cola,
/obj/item/reagent_containers/food/drinks/cans/waterbottle,
/obj/item/reagent_containers/food/drinks/waterbottle,
/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind,
/obj/item/reagent_containers/food/drinks/cans/dr_gibb,
/obj/item/reagent_containers/food/drinks/cans/starkist,