Bug: Unable to set custom inventory sizes without causing error. Help welcomed to fix this (I have no idea right now).
Long-standing issue #100 was the result of trying to set custom inventory sizes for pylons. I was able to fix that issue with:
Delete the Container script from the prefab
Add it via code instead & set the name
Do not attempt to resize the container/inventory -> instantly results in this error
// originally the Container was set on the prefab in unity and set up properly, but it will cause the
// problem here: https://github.com/jpw1991/chebs-necromancy/issues/100
// So we add it here like this instead.
// Pros: No bug
// Cons: Cannot set custom width/height
_container = gameObject.AddComponent<Container>();
_container.m_name = "$chebgonaz_neckrogathererpylon_name";
// _container.m_width = ContainerWidth.Value;
// _container.m_height = ContainerHeight.Value;
var inv = _container.GetInventory();
inv.m_name = Localization.instance.Localize(_container.m_name);
// trying to set width causes error here: https://github.com/jpw1991/chebs-necromancy/issues/100
// inv.m_width = ContainerWidth.Value;
// inv.m_height = ContainerHeight.Value;
Describe the bug
Bug: Unable to set custom inventory sizes without causing error. Help welcomed to fix this (I have no idea right now).
Long-standing issue #100 was the result of trying to set custom inventory sizes for pylons. I was able to fix that issue with: