Tweaked the food system to allow for custom sounds.

Also switched the LiquidFood stuff and the soups to play the drink sound.
Signed-off-by: Lexus Langg <jaedonjacobi@yahoo.com>
This commit is contained in:
Lexus Langg
2012-06-04 12:21:38 -07:00
parent 81efb76970
commit 056697025a
4 changed files with 14 additions and 1 deletions

View File

@@ -1466,6 +1466,7 @@
icon_state = null icon_state = null
var/bitesize = 1 var/bitesize = 1
var/bitecount = 0 var/bitecount = 0
var/eatsound = 'eatfood.ogg'
var/trash = null var/trash = null
//Placeholder for effect that trigger on eating that aren't tied to reagents. //Placeholder for effect that trigger on eating that aren't tied to reagents.
@@ -1592,7 +1593,7 @@
spawn(5) spawn(5)
user.update_clothing() user.update_clothing()
playsound(M.loc,'eatfood.ogg', rand(10,50), 1) playsound(M.loc, eatsound, rand(10,50), 1)
return 1 return 1
else if(istype(M, /mob/living/simple_animal/livestock)) else if(istype(M, /mob/living/simple_animal/livestock))
if(M == user) //If you're eating it yourself. if(M == user) //If you're eating it yourself.

View File

@@ -20,6 +20,8 @@
// name = "Xenoburger" //Name that displays in the UI. // name = "Xenoburger" //Name that displays in the UI.
// desc = "Smells caustic. Tastes like heresy." //Duh // desc = "Smells caustic. Tastes like heresy." //Duh
// icon_state = "xburger" //Refers to an icon in food.dmi // icon_state = "xburger" //Refers to an icon in food.dmi
// eatsound = 'eatfood.ogg' //Don't touch this if you want your food to have a crunch sound.
// trash = "plate" //Refers to the trash item.
// New() //Don't mess with this. // New() //Don't mess with this.
// ..() //Same here. // ..() //Same here.
// reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste // reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste
@@ -944,6 +946,7 @@
name = "Meatball soup" name = "Meatball soup"
desc = "Smells like copper" desc = "Smells like copper"
icon_state = "meatballsoup" icon_state = "meatballsoup"
eatsound = 'drink.ogg'
New() New()
..() ..()
reagents.add_reagent("nutriment", 2) reagents.add_reagent("nutriment", 2)
@@ -954,6 +957,7 @@
/obj/item/weapon/reagent_containers/food/snacks/clownstears /obj/item/weapon/reagent_containers/food/snacks/clownstears
name = "Clown's Tears" name = "Clown's Tears"
desc = "Not very funny." desc = "Not very funny."
eatsound = 'drink.ogg'
icon_state = "clownstears" icon_state = "clownstears"
New() New()
..() ..()
@@ -967,6 +971,7 @@
desc = "A true vegan meal" //TODO desc = "A true vegan meal" //TODO
icon_state = "vegetablesoup" icon_state = "vegetablesoup"
trash = "snack_bowl" trash = "snack_bowl"
eatsound = 'drink.ogg'
New() New()
..() ..()
reagents.add_reagent("nutriment", 10) reagents.add_reagent("nutriment", 10)
@@ -977,6 +982,7 @@
name = "Nettle soup" name = "Nettle soup"
desc = "To think, the botanist would've beat you to death with one of these." desc = "To think, the botanist would've beat you to death with one of these."
icon_state = "nettlesoup" icon_state = "nettlesoup"
eatsound = 'drink.ogg'
trash = "snack_bowl" trash = "snack_bowl"
New() New()
..() ..()
@@ -989,6 +995,7 @@
name = "Mystery soup" name = "Mystery soup"
desc = "The mystery is, why aren't you eating it?" desc = "The mystery is, why aren't you eating it?"
icon_state = "mysterysoup" icon_state = "mysterysoup"
eatsound = 'drink.ogg'
trash = "snack_bowl" trash = "snack_bowl"
New() New()
..() ..()
@@ -1035,6 +1042,7 @@
desc = "I wish this was soup." desc = "I wish this was soup."
icon_state = "wishsoup" icon_state = "wishsoup"
trash = "snack_bowl" trash = "snack_bowl"
eatsound = 'drink.ogg'
New() New()
..() ..()
reagents.add_reagent("water", 10) reagents.add_reagent("water", 10)
@@ -1224,6 +1232,7 @@
desc = "Drinking this feels like being a vampire! A tomato vampire..." desc = "Drinking this feels like being a vampire! A tomato vampire..."
icon_state = "tomatosoup" icon_state = "tomatosoup"
trash = "snack_bowl" trash = "snack_bowl"
eatsound = 'drink.ogg'
New() New()
..() ..()
reagents.add_reagent("nutriment", 5) reagents.add_reagent("nutriment", 5)
@@ -1245,6 +1254,7 @@
name = "Stew" name = "Stew"
desc = "A nice and warm stew. Healthy and strong." desc = "A nice and warm stew. Healthy and strong."
icon_state = "stew" icon_state = "stew"
eatsound = 'drink.ogg'
New() New()
..() ..()
reagents.add_reagent("nutriment", 20) reagents.add_reagent("nutriment", 20)
@@ -1416,6 +1426,7 @@
name = "chantrelle soup" name = "chantrelle soup"
desc = "A delicious and hearty mushroom soup." desc = "A delicious and hearty mushroom soup."
icon_state = "mushroomsoup" icon_state = "mushroomsoup"
eatsound = 'drink.ogg'
trash = "snack_bowl" trash = "snack_bowl"
New() New()
..() ..()
@@ -1475,6 +1486,7 @@
name = "\improper \"LiquidFood\" ration" name = "\improper \"LiquidFood\" ration"
icon_state = "liquidfood" icon_state = "liquidfood"
desc = "A bland, tasteless pulp of what you need to survive. Packaged in a airtight bag, which you can drink through a straw. Strangely crunchy." desc = "A bland, tasteless pulp of what you need to survive. Packaged in a airtight bag, which you can drink through a straw. Strangely crunchy."
eatsound = 'drink.ogg'
trash = "liquidfood" trash = "liquidfood"
var/flavored = 0 var/flavored = 0
New() New()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB