Adds more quality of life for bartending. (#9630)

This commit is contained in:
Matt Atlas
2020-08-26 02:36:15 +02:00
committed by GitHub
parent 4afa4208ef
commit 7bec3db5f4
8 changed files with 94 additions and 61 deletions
+4 -5
View File
@@ -109,20 +109,19 @@
if(!reagents.total_volume)
to_chat(user, SPAN_WARNING("\The [initial(name)] is dry!"))
else
if ( !(last_clean && world.time < last_clean + 120) )
user.visible_message("\The <b>[user]</b> starts to wipe down \the [A] with \the [src]!")
if (!(last_clean && world.time < last_clean + 120) )
user.visible_message("<b>[user]</b> starts to wipe [A] with [src].")
clean_msg = TRUE
last_clean = world.time
else
clean_msg = FALSE
playsound(loc, 'sound/effects/mop.ogg', 25, 1)
reagents.splash(A, 1) //get a small amount of liquid on the thing we're wiping.
update_name()
update_icon()
if(do_after(user,cleantime))
if(clean_msg)
user.visible_message("\The [user] finishes wiping off \the [A]!")
A.clean_blood()
user.visible_message("<b>[user]</b> finishes wiping [A].")
A.on_rag_wipe(src)
/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
if(isliving(target))
-6
View File
@@ -30,7 +30,6 @@ calculate text size per text.
var/list/out = list()
var/list/tastes = list() //descriptor = strength
var/lukewarm = 0 // should we allow it to be lukewarm or not
if(minimum_percent <= 100)
for(var/datum/reagent/R in reagent_list)
if(!R.taste_mult)
@@ -49,8 +48,6 @@ calculate text size per text.
tastes[taste_desc] += taste_amount
else
tastes[taste_desc] = taste_amount
if(R.default_temperature >= (T0C + 15) && R.default_temperature <= (T0C + 25))
lukewarm = 1
//deal with percentages
var/total_taste = 0
@@ -82,9 +79,6 @@ calculate text size per text.
temp_text = "cold"
if(T0C to T0C + 15)
temp_text = "cool"
if(T0C + 15 to T0C + 25)
if(lukewarm)
temp_text = "lukewarm"
if(T0C + 25 to T0C + 40)
temp_text = "warm"
if(T0C + 40 to T0C + 100)
@@ -22,7 +22,6 @@
/obj/machinery/chemical_dispenser/Initialize()
. = ..()
if(spawn_cartridges)
for(var/type in spawn_cartridges)
add_cartridge(new type(src))
@@ -166,7 +165,7 @@
else if(href_list["ejectBeaker"])
if(container)
var/obj/item/reagent_containers/B = container
B.forceMove(loc)
usr.put_in_hands(B)
container = null
if(icon_state_active)
icon_state = initial(icon_state)
@@ -36,6 +36,9 @@ If you add a drink with no empty icon sprite, ensure it is flagged as NO_EMPTY_I
/obj/item/reagent_containers/food/drinks/on_reagent_change()
update_icon()
/obj/item/reagent_containers/food/drinks/on_rag_wipe(var/obj/item/reagent_containers/glass/rag/R)
clean_blood()
/obj/item/reagent_containers/food/drinks/update_icon()
if(!reagents.total_volume)
if(drink_flags & UNIQUE_EMPTY_ICON)
@@ -6,59 +6,49 @@
icon_state = "glass_empty"
amount_per_transfer_from_this = 5
volume = 30
unacidable = 1 //glass
unacidable = TRUE //glass
center_of_mass = list("x"=16, "y"=10)
drop_sound = 'sound/items/drop/drinkglass.ogg'
pickup_sound = 'sound/items/pickup/drinkglass.ogg'
pickup_sound = 'sound/items/pickup/drinkglass.ogg'
matter = list(MATERIAL_GLASS = 300)
drink_flags = NO_EMPTY_ICON //This should not be removed unless a total overhaul of drink reagent sprites is done.
on_reagent_change()
/*if(reagents.reagent_list.len > 1 )
icon_state = "glass_brown"
name = "Glass of Hooch"
desc = "Two or more drinks, mixed together."*/
/*else if(reagents.reagent_list.len == 1)
for(var/datum/reagent/R in reagents.reagent_list)
switch(R.type)*/
if (reagents.reagent_list.len > 0)
var/datum/reagent/R = reagents.get_master_reagent()
/obj/item/reagent_containers/food/drinks/drinkingglass/on_reagent_change()
if (reagents.reagent_list.len > 0)
var/datum/reagent/R = reagents.get_master_reagent()
if(R.glass_icon_state)
icon_state = R.glass_icon_state
else
icon_state = "glass_brown"
if(R.glass_name)
name = R.glass_name
else
name = "glass of.. what?"
if(R.glass_desc)
desc = R.glass_desc
else
desc = "You can't really tell what this is."
if(R.glass_center_of_mass)
center_of_mass = R.glass_center_of_mass
else
center_of_mass = list("x"=16, "y"=10)
if(R.glass_icon_state)
icon_state = R.glass_icon_state
else
icon_state = "nothing"
if(R.glass_name)
name = R.glass_name
else
name = "glass of something"
if(R.glass_desc)
desc = R.glass_desc
else
desc = "You can't really tell what this is."
if(R.glass_center_of_mass)
center_of_mass = R.glass_center_of_mass
else
icon_state = "glass_empty"
name = "glass"
desc = "Your standard drinking glass."
center_of_mass = list("x"=16, "y"=10)
return
else
icon_state = "glass_empty"
name = "glass"
desc = "Your standard drinking glass."
center_of_mass = list("x"=16, "y"=10)
// for /obj/machinery/vending/sovietsoda
/obj/item/reagent_containers/food/drinks/drinkingglass/soda
Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/drink/sodawater, 50)
on_reagent_change()
// for /obj/machinery/vending/sovietsoda
/obj/item/reagent_containers/food/drinks/drinkingglass/soda/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/drink/sodawater, 50)
on_reagent_change()
/obj/item/reagent_containers/food/drinks/drinkingglass/cola
Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/drink/space_cola, 50)
on_reagent_change()
/obj/item/reagent_containers/food/drinks/drinkingglass/cola/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/drink/space_cola, 50)
on_reagent_change()