To the lua wizards: where in firepit_component.lua can i tell i to gather something other than wood?

to the lua wizards: where in firepit_component.lua can i tell i to gather something other than wood?firepit_component.lua (9.8 KB)

because ime looking at it and i see no URI or filter of any kind, so i think im missing something in the total-functionality-of-the-thing.

function FirepitComponent:get_fuel_material()
   return 'wood resource'
end
1 Like

Hero!
Restofthelettersrequired
(ffs how did I miss that :’))

1 Like

It would be better if that was in the constants file, so a simple json change would do instead of overwriting this hardcoded value

yeah i was going for the aproach of copy the entire file, give it its own alias in my manifest, and then instead of having the item point at stonehearth:firepit {} look at nordlingmod:firepit {}
this though did not work. :confused:

EDIT @BrunoSupremo tried to over write the edited lua over the existing one and just edition those filter words wont make them use different stuff as burnable fuel, so something else must be going on with what is actually gotten and used for firepits.

@max99x do you happen to know about the firepit? specifically how i would make it so it stops using logs and starts using actual firewood (a processed material, different material tags)

@Wouter_Sikkema, did you declare your component inside “aliases” or inside “components”, in your manifest?
It should have worked :thinking:

It would actually be inside the component itself (in the json), or perhaps inside entity_data, so that it can be different for each firepit item. I don’t like that it’s still hardcoded :slightly_frowning_face:

Oh, wait, there is a components part in the manifest XD? -checks- this explains a thing or two… lemme see if it does work if i actually put it in there too.
yeah that was it, forgot to put it in there. yaay it works :smiley:

yeah it would have been a bit nicer if the existing firepit function would look at where its being used so you can either use nothing (default behavior) or a filter, or a URI, kinda like crafting recipes. but eh, making a new function wasnt that hard now that i know i actually gotta put it in functions in the manifest.