Jump to content

Recommended Posts

Let's say I want a char that would ignore any ingredient of "cutgrass" from any recipe (since he's made of grass, lol) -- this includes any recipes (original or mod) -- is this possible? How (hints)?

 

Example:

Grass bomb (I just made that up). Ingredients:

Cut grass = 10

Flint = 1

Nitre = 2

 

Recipe then becomes

Flint = 1

Nitre = 2

(can still show Cut grass = 10 but won't use any cut grass)

 

Thanks.

I think it uses the inventory:Has function to check that, 

Sorry, which component/prefab/widget should I look? :-)

I looked at widgets\crafting.lua but it looks like that's only for UI.

Thanks!

 

Edit:

How about this?

function Inventory:ConsumeByName(item, amount)

in components\inventory.lua

Edited by SenL

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...