Jump to content

(40.27) MultistageBuild Script (Drainable items)


Snakeman

Recommended Posts

I found a bug making a mod in MultistageBuild Script with drainable items.
When set drainable items in ItemsRequired string.
Ex: ItemsRequired:Base.Brick=9;Base.PaintWhite=1;Base.PaintBrown=1,
ContextMenu not becomes red if you don't have drainable item required, allowing the construction of that object. Also tooltip displays in red if you have 1/1 uses.

Edited by Snakeman
Link to comment
Share on other sites

I tested some more the issue... with this.
Ex: ItemsRequired:Base.Brick=9;Base.PaintWhite=1,
If i have 9 bricks i can do the object without having PaintWhite (ContextMenu Available not in red) .
context tooltip said i need PaintWhite to do the object. But if i clicked in the allowed option i can build that object anyways.

I think the MultistageBuild System not detect drainables to make the contextmenu option in red (available or not available option).

Link to comment
Share on other sites

Another thing i found, i tried to replace the paint item making a recipe to take some paint using a paint brush (Results a item with strings: Type:Normal, & ReplaceOnUse = Paintbrush,)
Everythings works ok but the MultistageBuilding not allow ReplaceOnUse strings... consming the Normal (paintbrush with whitepaint) :/

Link to comment
Share on other sites

How to fix it?
IsBuildMenu.lua
The drainable item string in red when 1/1 uses
line 84: (need equals)
if drainable and drainable:getRemainingUses() >= tonumber(v) then

The drainable validation.
Insert after line 91:
91  tooltip.description = tooltip.description .. " <RGB:1,0,0> " .. item:getName() .. " " .. useLeft .. "/" .. v .. " <LINE> ";
92 notAvailable = true;

Edited by Snakeman
Link to comment
Share on other sites

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...