Skip to content

ItemAcceptedDef

KylianB edited this page Oct 6, 2022 · 6 revisions

The item accepted def, as its name implies, defines which items are accepted in a given item processor building. For example, a cheese press needs to have an ItemAcceptedDef saying "Milk" goes in slot "1" of the Building "VCE_CheesePress"

For an example of this, you can check out the ItemAcceptedDefs of our Vanilla Cooking Expanded mod here

    //ItemAcceptedDef is a simple custom def that assigns products to buildings, and slots.
    //Ingredient insertion code reads from these defs, so if an ingredient isn't there, it won't appear on any item processor

    //defName of the building accepting these ingredients
    public string building;
    //Which slot of the building will these ingredients be inserted on?
    public int slot = 1;
    //A list of ingredient defNames
    public List<string> items;

New item accepted defs can be added via patching too. Imagine for example you want to add a new type of milk to the already existing Cheese Press in Vanilla Cooking Expanded. You can check an example here. NOTE that you'll also need to create a CombinationDef that tells the press what to do with that milk! Only adding the input wouldn't do much.

Note that machines that have isMachineSpecifiesOutput set to true don't need an ItemAcceptedDef, since they specify an output and get all the needed info from a CombinationDef.

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Genes

Apparel

Cuisine

Furniture

Plants

Deprecated

Clone this wiki locally