Skip to content

Conversation

@quietust
Copy link
Member

and update the "createitem" plugin to specify it instead of creating a bunch of individual items in a loop.

Fixes #5481.

@quietust
Copy link
Member Author

I did not modify modtools/create-item, since it already has its own workaround code for handling item stacks (and it should continue to work as-is).

@quietust
Copy link
Member Author

quietust commented Jun 25, 2025

This appears to have broken modtools/create-item, despite my efforts to maintain compatibility: apparently, luaL_optint(state, 7, 1) returns zero when the parameter is absent, rather than returning 1 like I was expecting.

Numerous other functions are also using luaL_optint and are presumably expecting similar behavior, so we might need to review this in general, but for now I've pushed a workaround which appears to work correctly.

and update the "createitem" plugin to specify it instead of creating a bunch
of individual items in a loop.
@ab9rf ab9rf merged commit aa2b109 into DFHack:develop Jun 29, 2025
25 of 26 checks passed
@quietust quietust deleted the itemstack branch July 8, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

createitem no longer creates stacked items

2 participants