mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Food update from Farart:
Replaced some sprites. Added: -popcorn (corn in microwave) -tofuburger (tofu+floor in microwave) -carpburger (carp meat+floor in microwave) Unchecked files restored. Reagents now transfers proportionally without rounding. Popcorn's bitesize=0.1 works correctly. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1267 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -58,6 +58,26 @@ datum
|
||||
return the_id
|
||||
|
||||
trans_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
if (!target)
|
||||
return
|
||||
var/datum/reagents/R = target.reagents
|
||||
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
|
||||
var/part = amount / src.total_volume
|
||||
var/trans_data = null
|
||||
for (var/datum/reagent/current_reagent in src.reagent_list)
|
||||
var/current_reagent_transfer = current_reagent.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
|
||||
src.update_total()
|
||||
R.update_total()
|
||||
R.handle_reactions()
|
||||
src.handle_reactions()
|
||||
return amount
|
||||
|
||||
/*
|
||||
if (!target) return
|
||||
var/total_transfered = 0
|
||||
var/current_list_element = 1
|
||||
@@ -83,11 +103,11 @@ datum
|
||||
total_transfered++
|
||||
src.update_total()
|
||||
R.update_total()
|
||||
|
||||
R.handle_reactions()
|
||||
handle_reactions()
|
||||
|
||||
return total_transfered
|
||||
*/
|
||||
|
||||
metabolize(var/mob/M)
|
||||
for(var/A in reagent_list)
|
||||
|
||||
@@ -973,8 +973,13 @@
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
if(reagents.total_volume > bitesize)
|
||||
/*
|
||||
* I totally cannot understand what this code supposed to do.
|
||||
* Right now every snack consumes in 2 bites, my popcorn does not work right, so I simplify it. -- rastaf0
|
||||
var/temp_bitesize = max(reagents.total_volume /2, bitesize)
|
||||
reagents.trans_to(M, temp_bitesize)
|
||||
*/
|
||||
reagents.trans_to(M, bitesize)
|
||||
else
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
bitecount++
|
||||
@@ -2142,6 +2147,34 @@
|
||||
reagents.add_reagent("capsaicin", 3)
|
||||
bitesize = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/popcorn
|
||||
name = "Popcorn"
|
||||
desc = "Now let's find some cinema."
|
||||
icon_state = "popcorn"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 3)
|
||||
bitesize = 0.1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fishburger
|
||||
name = "Carpburger"
|
||||
desc = "Nanotracen: wasting rare ingridients for fastfood since 2548"
|
||||
icon_state = "fishburger"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
reagents.add_reagent("carpotoxin", 3)
|
||||
bitesize = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tofuburger
|
||||
name = "Togu Burger"
|
||||
desc = "What.. is that meat?"
|
||||
icon_state = "tofuburger"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
bitesize = 1
|
||||
|
||||
/////////////////////////////////////////////////Sliceable////////////////////////////////////////
|
||||
// All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user