예제 #1
0
        private bool StackableAt(Thing thing, Map map, CellStorage cellStorage, float unitWeight)
        {
            if (!CanStore(thing, map))
            {
                return(false);
            }

            return(cellStorage.CanAccept(thing, unitWeight));
        }
예제 #2
0
        public static void PrintStates(this Deep_Storage_Cell_Storage_Model cellStorage)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine($"Storage at {cellStorage.Cell} has:");
            stringBuilder.AppendLine($"Stack: {cellStorage.Count}");
            stringBuilder.AppendLine($"TotalWeight: {cellStorage.TotalWeight}");
            stringBuilder.AppendLine($"NonFullThings:");
            foreach (KeyValuePair <Thing, Thing> nonFullThing in cellStorage.NonFullThings)
            {
                stringBuilder.AppendLine($"{nonFullThing.Value}: {nonFullThing.Value.stackCount}");
            }

            Log.Warning($"{stringBuilder}");
        }