User:Veerserif/Sandbox/Food infobox: Difference between revisions

From Vintage Story Wiki
(seeing if i can get lcfirst: working)
No edit summary
 
Line 7: Line 7:
{{User:Veerserif/Sandbox/Infobox row|label=Satiety|field={{ #if: {{{satiety|}}} | {{{satiety}}} {{#if: {{{category|}}}| {{ll|Satiety|{{lcfirst:{{{category|}}}}}}} }} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Satiety|field={{ #if: {{{satiety|}}} | {{{satiety}}} {{#if: {{{category|}}}| {{ll|Satiety|{{lcfirst:{{{category|}}}}}}} }} | N/A }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Ingredient|field={{ #if: {{{ingredient|}}} | Yes ({{{ingredient}}}) | No }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Ingredient|field={{ #if: {{{ingredient|}}} | Yes ({{{ingredient}}}) | No }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Shelf life|field={{{FreshTime|}}}, turns into {{#if:{{{TransitionRatio|}}} |{{{TransitionRatio|}}}x}} {{#if: {{{TransitionOutput|}}} | {{{TransitionOutput}}}|[[rot]] }} {{#if: {{{TransitionTime|}}} | over {{{TransitionTime|}}} }} }}
{{User:Veerserif/Sandbox/Infobox row|label=Fresh for|field={{{FreshTime|}}}, turns into {{#if:{{{TransitionRatio|}}} |{{{TransitionRatio|}}}x}} {{#if: {{{TransitionOutput|}}} | {{{TransitionOutput}}}|[[Special:MyLanguage/Rot|rot]] }} {{#if: {{{TransitionTime|}}} | over {{{TransitionTime|}}} }} }}
| footer =
| footer =
{{{notes|}}}
{{{notes|}}}

Latest revision as of 16:31, 1 September 2023

Veerserif/Sandbox
No image.png
Stackable

N/A

Edible

N/A

Satiety

N/A

Ingredient

No

Fresh for

, turns into rot

Food-specific infobox, and by "food" I mean "anything edible with or without processing". So as of 1.18.8 that includes honeycomb and cattail roots, but not, I don't know, sticks.

Parameters

Parameter Type Notes
stackable number Required. maximum stack size
edible string Required. Whether or not the item is edible - I suggest the values "Raw", "Cooked (Firepit)", "Cooked (Meal)", "Cooked (Oven)"
satiety number Required. Satiety number
category string Only displays if satiety exists. Satiety category - vegetable, protein, dairy, fruit
ingredient string What the food can be used to make - meals, pies, soup, etc.
FreshTime string Required. Shelf life of the item
TransitionRatio number Optional. Ratio of transition (i.e. a TransitionRatio of 0.5 means "0.5 of the stack of the original item becomes the TransitionOutput after TransitionTime")
TransitionOutput string Optional. Output of transition - defaults to "rot"
TransitionTime string Optional. Time taken, after FreshTime expires, for the item to fully transition into TransitionOutput.