Sign in to follow this  
Stanlee

[Fixed] Fuel rune appears to not work on forges

Recommended Posts

Found whilst codediving, so issue may be on my end.

 

com.wurmonline.server.items.Item.class

Line 10419, private void coolOutSideItem(boolean everySecond, boolean insideStructure)

 

Issue seems to be that forges, kilns and other heating items run their cooling amount BEFORE the rune applies (the rune applies inside pollLightSource, which begins within this function)

 

A solution may be

      if ((templateId == 37) || (templateId == 178) || (templateId == 1178) || (templateId == 180) || (templateId == 1023) || (templateId == 1028)) {
        speed* = 1 - RuneUtilities.getModifier(getSpellEffects().getRuneEffect(), RuneUtilities.ModifierEffect.ENCH_FUELUSE);

inserted after line 10433 (where it uses an exponent of rarity)

Share this post


Link to post
Share on other sites

That code is for item cooling, not fuel usage.

 

The rune is taken into account when the actual fuel count of the item is ticked down.

Share this post


Link to post
Share on other sites

I thought that, but the rune hooks into pollLightSouce, which changes the rate at which the fuel AuxData depletes.

 

When I look at the fuel code in FireBehaviour.class, all changes to AuxData are gated behind the item being an open fireplace or beesmoker, indicating that the various heaters rely on Temperature, not AuxData

 

Furthermore, when testing in WU, fuelling does not increment AuxData:

[00:56:54] You fuel the forge with a huge shod club.

[00:57:00] Auxdata=0, creator=Stan

 

And two identical forges, fuelled identically, with the rune different, lost temperature (since AuxData never went above 0) and went out at the same time.

 

I don't mean to accuse you of lying: but I would like to know, for my own code-learning, what I've missed here.

Edited by Stanlee
  • Like 1

Share this post


Link to post
Share on other sites

Code I cannot read, but I know that out of my stills, the ones with the rune go out at the same pace as the ones without, and even seem to produce less liquid in the time they are on.

Share this post


Link to post
Share on other sites

Ah you're right sorry.

 

Thanks for that, fixed for next update.

  • Like 2

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this