Comments (6)
Same issue here also able to replicate on my end
from rimatomics.
Here's how the new(est) rimfridge fork fixed the same issue: just-harry/rimworld-rimfridge-now-with-shelves@5b5ee14
In short, the GroupingLabel
property returns a null value.
from rimatomics.
Unfortunately, setting GroupingLabels doesn't fix it. No other storage mods like LWM use it, so it's not an issue with that property.
from rimatomics.
The exception thrown shows that there is a null argument (dict key) being passed to ContainsKey
when called in RimWorld.Dialog_BillConfig.FillOutputDropdownOptions
. There are two calls to ContainsKey
in that function, both of which provide a group label as a key:
private void FillOutputDropdownOptions(
ref List<FloatMenuOption> opts,
string prefix,
Action<ISlotGroup> selected)
{
List<SlotGroup> listInPriorityOrder = this.bill.billStack.billGiver.Map.haulDestinationManager.AllGroupsListInPriorityOrder;
Dialog_BillConfig.tmpGroups.ClearValueLists<string, ISlotGroup>();
for (int index = 0; index < listInPriorityOrder.Count; ++index)
{
SlotGroup slotGroup = listInPriorityOrder[index];
if (slotGroup.StorageGroup != null)
{
StorageGroup storageGroup = slotGroup.StorageGroup;
// First instance
if (!Dialog_BillConfig.tmpGroups.ContainsKey(storageGroup.GroupingLabel))
Dialog_BillConfig.tmpGroups.Add(storageGroup.GroupingLabel, new List<ISlotGroup>());
if (!Dialog_BillConfig.tmpGroups[storageGroup.GroupingLabel].Contains((ISlotGroup) slotGroup.StorageGroup))
Dialog_BillConfig.tmpGroups[storageGroup.GroupingLabel].Add((ISlotGroup) slotGroup.StorageGroup);
}
else if (!(slotGroup.parent is Building_Storage parent) || parent is IRenameable)
{
// Second instance
if (!Dialog_BillConfig.tmpGroups.ContainsKey(slotGroup.GroupingLabel))
Dialog_BillConfig.tmpGroups.Add(slotGroup.GroupingLabel, new List<ISlotGroup>());
Dialog_BillConfig.tmpGroups[slotGroup.GroupingLabel].Add((ISlotGroup) slotGroup);
}
}
foreach (KeyValuePair<string, List<ISlotGroup>> keyValuePair in (IEnumerable<KeyValuePair<string, List<ISlotGroup>>>) Dialog_BillConfig.tmpGroups.OrderBy<KeyValuePair<string, List<ISlotGroup>>, int>((Func<KeyValuePair<string, List<ISlotGroup>>, int>) (kvp => kvp.Value.Count <= 0 ? 0 : kvp.Value[0].GroupingOrder)))
{
KeyValuePair<string, List<ISlotGroup>> kvp = keyValuePair;
if (this.ShouldCollapseGroup(kvp.Key))
opts.Add(new FloatMenuOption(kvp.Key, (Action) (() =>
{
List<FloatMenuOption> floatMenuOptionList = new List<FloatMenuOption>();
this.FillSlotGroupOptions(kvp.Value, floatMenuOptionList, prefix, selected);
Find.WindowStack.Add((Window) new FloatMenu(floatMenuOptionList));
})));
}
foreach (KeyValuePair<string, List<ISlotGroup>> keyValuePair in (IEnumerable<KeyValuePair<string, List<ISlotGroup>>>) Dialog_BillConfig.tmpGroups.OrderBy<KeyValuePair<string, List<ISlotGroup>>, int>((Func<KeyValuePair<string, List<ISlotGroup>>, int>) (kvp => kvp.Value.Count <= 0 ? 0 : kvp.Value[0].GroupingOrder)))
{
if (!this.ShouldCollapseGroup(keyValuePair.Key))
this.FillSlotGroupOptions(keyValuePair.Value, opts, prefix, selected);
}
}
What am I missing here?
from rimatomics.
To preface this, I have very little experience in rimworld modding, especially when it comes to assemblies.
Most other storage things in other rimworld mods are part of the Building_Storage
thingClass, whereas the storage pool has the thingClass Rimatomics.Building_storagePool
. I'm assuming the thingClass tag is probably (based on semantics) used to link the c# class instance that should be instantiated to an object when it's spawned.
I can't remember exactly what the behavior was in 1.4. Did the storage pool show up before as a haul destination?
Regardless, stepping through the current behavior, it appears to correctly build and register a storage group since it's getting through the null check to see if slotGroup.StorageGroup
exists in the first place, but is almost assuredly failing on the first ContainsKey
since we can validate this happens with only a single storage pool. If that's the case, it's failing (I assume) because the assembly is failing to pass along a GroupingLabel in its registered storage group, regardless of if one is defined in the defs. I feel somewhat safe in saying that since I copied the exact behavior that the just-Harry did with rimFridge, including translation inject defs, and it still didn't work. I could of course also be blowing smoke since I haven't done any sort of heavy-duty modding like this in Rimworld before.
from rimatomics.
Here's someone more qualified than me talking about the changes: lilwhitemouse/RimWorld-LWM.DeepStorage#151 (comment)
Specifically demonstrates through the code that it's likely an issue in the assemblies that needs to be fixed. Also supports my theory that the c# assembly isn't currently written to expose the GroupingLabel property, leading to the null key check.
from rimatomics.
Related Issues (20)
- Rimmatomics symbol missing from bottom tab HOT 2
- Suggestion to add more control over reactor auto tuning levels.
- Suggestion: ADS upgrade HOT 1
- Can't perform extra construction step on Reactor Type X / Reactor Type V HOT 1
- incompatibility with "android tiers" mod
- Fuel rods in storage pools not countable in bills HOT 1
- Nuclear Waste still causes radiation in transport pod
- "Need research project"
- Biotech Constructoids won't continue to build reactor, this looked relevant in the log HOT 1
- Adding compactibility Misc.Robots++ (forked) with your mod
- Plutonium3: description has leading whitespace
- Wrong skill description while Rimatomics mod is active HOT 3
- Auto throttle
- plutonium processing speed option
- Log Errors
- Error Log
- [Bug] TACS breaks active threats from Anomaly HOT 2
- Low Yield Liberator missile causes crash HOT 8
- rimatomics crafting table stack trace issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rimatomics.