边缘世界 RimWorld

边缘世界 RimWorld

LWM's Deep Storage
ignis 2022 年 3 月 13 日 上午 9:08
Deep Refrigerator and Nutrient Paste Dispenser
Fridge can be used as hopper for NPD, but only top stack in fridge is considered. So if top stack is not enough to dispense a portion, it won't work.
< >
正在显示第 1 - 5 条,共 5 条留言
lilwhitemouse  [开发者] 2023 年 1 月 14 日 上午 11:51 
! That is a problem I had not considered :(

Do you know if this is fixed in version 1.4?
ignis 2023 年 1 月 19 日 上午 4:02 
Nope, unless it was in last month (cant check right now).
lilwhitemouse  [开发者] 2023 年 1 月 19 日 下午 4:30 
That's ....actually really weird - everything in the vanilla code base looks like it should work just fine, as long as rimfridges are hoppers?
ignis 2023 年 1 月 19 日 下午 7:03 
The problem is a method Building_NutrientPasteDispenser.HasEnoughFeedstockInHoppers

Note how it only takes one food Thing from each cell to check.

Also FindFeedInAnyHopper() may need patching as well.

public virtual bool HasEnoughFeedstockInHoppers() { float num = 0f; for (int i = 0; i < AdjCellsCardinalInBounds.Count; i++) { IntVec3 c = AdjCellsCardinalInBounds;
Thing thing = null;
Thing thing2 = null;
List<Thing> thingList = c.GetThingList(base.Map);
for (int j = 0; j < thingList.Count; j++)
{
Thing thing3 = thingList[j];
if (IsAcceptableFeedstock(thing3.def))
{
thing = thing3;
}
if (thing3.IsHopper())
{
thing2 = thing3;
}
}
if (thing != null && thing2 != null)
{
num += (float)thing.stackCount * thing.GetStatValue(StatDefOf.Nutrition);
}
if (num >= def.building.nutritionCostPerDispense)
{
return true;
}
}
return false;
}
最后由 ignis 编辑于; 2023 年 1 月 19 日 下午 7:04
lilwhitemouse  [开发者] 2023 年 1 月 19 日 下午 7:32 
Okay, looked again and my brain successfully put the brackets in the right places this time around. It is, of course, all too irritatingly difficult to fix easily. I'll see what I can do
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50