Where are max fuel settings located?
Hi,
I'm looking for better ways to do things i'm currently doing...
when an item is initted and it can contain a max of fuel for example:
miners hat 100
Lantern 500
Tuna lamp 500
China lantern 500
Candle hat 40

Are these references hardcoded in the init or is there some reference table some place.
I want to be able to pull these default max storable values .

Or do I have to generate my own tables & keep them syncronised with  RUST community...
Those items have a contents property pointing to an underlying ItemContainer instance which has a maxStackSize property. That is populated from the item definition. You can get the maxStackSize for the underlying container of an item from the item's definition as follows.

ItemManager.itemDictionaryByName["hat.miner"].GetComponent<ItemModContainer>().maxStackSize
lol.. .that's the baby.... thanks again

Also, how are programmers debuging this stuff,  i'm massivly afraid of getting my account banned for hacking  if I inject debuggers.
is it just compile & run.. like the old days (1980's)?

Merged post

Hmm.
that does to work for some items:

Found shortname: lantern Max Stack: 0
Found shortname: hat.miner Max Stack: 100
Found shortname: fogmachine Max Stack: 0
I just look at the game source code in a decompiler and make some educated guesses, and write some plugin code to test.

Those other items may use different approaches. I just tested the miner hat when I saw your post.
Yep.... not knocking your help......

That's why I must have done it the "other" way..... but then just forgot about it....

Merged post

ok....
we are a gussied up and ready to go..... went a bit further down the rabbit hole than I wanted to.....

Decided to do a complete re-write implementing your method with fixed to get round "RUST"  missing configs...

but we are all good now.