Skip to content

[PipeSystem] CompConvertToThing: Cannot set max amount to spawn thing, if Props.maxOutputStackSize equals or higher than thing's stackLimit #155

@Nathan8489

Description

@Nathan8489

As the title says, it always uses the Thing's max stack count instead of the target stack count set by the player.
This bug can be easily reproduced by loading both Big and Small - Framework and Vanilla Nutrient Paste Expanded at the same time.

The XML patch that causes the issue is here: https://github.com/RedMattis/BigSmall_Framework/blob/78349d158e652cf7cb4aec2111ce8306b58f992a/1.6/Base/Patches/compatibilityPatches.xml#L37-L47
Related Steam discussion: https://steamcommunity.com/workshop/filedetails/discussion/2920385763/4632609113412572695/

However, it's clearly not an issue with Big and Small - Framework, so I'm reporting it here instead.

This issue can also be triggered by changing the nutrient paste stack size to 5 or lower — and there are already many mods that modify stack sizes.

A simple fix is to comment out the following code:

if (Props.maxOutputStackSize != -1)
return Props.maxOutputStackSize < Props.thing.stackLimit ? maxHeldThingStackSize : Props.thing.stackLimit;

if (Props.maxOutputStackSize != -1)
max = Props.maxOutputStackSize < heldThing.def.stackLimit ? maxHeldThingStackSize : heldThing.def.stackLimit;
else

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions