Jump to content

[Solved] Make items stack higher than 250?


Recommended Posts

Hello, if someone can help me out with this or tell me if this is not possible that'd be great :D!

In my mod I want items can stack to 999 but it seems going beyond 250 makes stuff get wonky, is 250 the max limit and no way to pass that? If someone can tell me that'd really help me out :)!

Thanks for your time, have a good rest of your time :wilson_flower:!

Edit: oops it seems I didn't add the code

modmain.lua

Spoiler

local stackable_replica = require "components/stackable_replica"
local IsServer = GLOBAL.TheNet:GetIsServer()
local TUNING = GLOBAL.TUNING
local net_byte = GLOBAL.net_byte
TUNING.STACK_SIZE_LARGEITEM = 250
TUNING.STACK_SIZE_MEDITEM = 250
TUNING.STACK_SIZE_SMALLITEM = 250 

local stackable_replica_ctorBase = stackable_replica._ctor or function() return true end    
function stackable_replica._ctor(self, inst)
	self.inst = inst
	self._stacksize = net_byte(inst.GUID, "stackable._stacksize", "stacksizedirty")
	self._maxsize = 250
end
local stackable_replicaSetMaxSize_Base = stackable_replica.SetMaxSize or function() return true end
function stackable_replica:SetMaxSize(maxsize)
	self._maxsize = 250
end
local stackable_replicaMaxSize_Base = stackable_replica.MaxSize or function() return true end
function stackable_replica:MaxSize()
	return self._maxsize
end

 

 

Edited by SuperDavid
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
 Share

×
  • Create New...