Can't taste pills and patches

This commit is contained in:
FlattestGuitar
2017-06-14 18:39:08 +02:00
parent 77260eeceb
commit 086327ef65
3 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -12,9 +12,10 @@
var/apply_method = "swallow"
var/transfer_efficiency = 1.0
var/instant_application = 0 //if we want to bypass the forcedfeed delay
var/taste = TRUE//whether you can taste eating from this
burn_state = FLAMMABLE
/obj/item/weapon/reagent_containers/food/New()
..()
pixel_x = rand(-5, 5) //Randomizes postion
pixel_y = rand(-5, 5)
pixel_y = rand(-5, 5)
+4 -3
View File
@@ -953,7 +953,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
else
if(!forceFed(toEat, user, fullness))
return 0
consume(toEat, bitesize_override)
consume(toEat, bitesize_override, taste = toEat.taste)
score_foodeaten++
return 1
@@ -1006,7 +1006,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/*TO DO - If/when stomach organs are introduced, override this at the human level sending the item to the stomach
so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat, var/bitesize_override)
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat, var/bitesize_override, var/taste = 1)
var/this_bite = bitesize_override ? bitesize_override : toEat.bitesize
if(!toEat.reagents)
return
@@ -1015,7 +1015,8 @@ so that different stomachs can handle things in different ways VB*/
if(toEat.consume_sound)
playsound(loc, toEat.consume_sound, rand(10,50), 1)
if(toEat.reagents.total_volume)
taste_reagents(toEat.reagents)
if(taste)
taste_reagents(toEat.reagents)
var/fraction = min(this_bite/toEat.reagents.total_volume, 1)
toEat.reagents.reaction(src, toEat.apply_type, fraction)
toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency)
@@ -10,6 +10,7 @@
possible_transfer_amounts = null
volume = 50
consume_sound = null
taste = FALSE
/obj/item/weapon/reagent_containers/food/pill/New()
..()
@@ -108,4 +109,4 @@
name = "Salbutamol pill"
desc = "Used to treat respiratory distress."
icon_state = "pill8"
list_reagents = list("salbutamol" = 20)
list_reagents = list("salbutamol" = 20)