RimWorld

RimWorld

Beeralope Squad
Automatic Beer Patch
Good morning.

I am a fan of this Mod and its humorous content, and I thought that I could help you improve it. As you know, there are many Recipes that make use of normal Beer.

However, did you know that you can write a single Patch that adds your Beer as a potential ingredient to every Recipe that uses normal Beer?

Implement this Patch as written, and unleash the power of beer:
<?xml version="1.0" encoding="utf-8" ?> <!-- This code was provided by the user 'I Exist', and then butchered and simplified on Dub's Discord chat room by Kyoutaigo --> <Patch> <Operation Class="PatchOperationConditional"> <!-- Does this exist? --> <xpath>/Defs/ThingDef[defName="NaturalBeer"]</xpath> <!-- If it does, LET'S FASTING GOOOOOOOOOO!!! --> <match Class="PatchOperationSequence"> <!-- <success>Always</success> --> <operations> <li Class="PatchOperationInsert"> <xpath>/Defs/RecipeDef/ingredients/li/filter/thingDefs/li[text()="Beer"]</xpath> <success>Always</success> <value> <li MayRequire="mlem.beeralope">NaturalBeer</li> </value> </li> <li Class="PatchOperationInsert"> <xpath>/Defs/RecipeDef/fixedIngredientFilter/thingDefs/li[text()="Beer"]</xpath> <success>Always</success> <value> <li MayRequire="mlem.beeralope">NaturalBeer</li> </value> </li> <li Class="PatchOperationInsert"> <xpath>/Defs/RecipeDef/defaultIngredientFilter/thingDefs/li[text()="Beer"]</xpath> <success>Always</success> <value> <li MayRequire="mlem.beeralope">NaturalBeer</li> </value> </li> </operations> </match> </Operation> </Patch>


Have fun!
-TURTLESHROOM
Last edited by TurtleShroom; Oct 9, 2023 @ 3:10am