1.5, added stuff, fixed stuff
- mod icon - fixes for new vanilla clipping issues - GenClosest optimization improving repairing, wardening, tending jobs - caching for new ListerBuildings methods - DynamicDrawManager single threading - Type.GetFields caching - StatParts analyzer category - removed duplicate steam warning and optionally window - added exception handling for debug menu, incidentworker, Graphic_Multi, InitializeComps, making all those now log what mod broke and not cause black screens or whatever
This commit is contained in:
@@ -8,14 +8,20 @@ namespace PerformanceFish;
|
||||
public record struct CellIndex(int Value)
|
||||
{
|
||||
public int Value = Value;
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public CellIndex(IntVec3 cell, Map map) : this(cell, map.cellIndices.mapSizeX) {}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public CellIndex(IntVec3 cell, int mapSizeX) : this(cell.CellToIndex(mapSizeX)) {}
|
||||
|
||||
public IntVec3 ToCell(Map map) => ToCell(map.cellIndices.mapSizeX);
|
||||
|
||||
public IntVec3 ToCell(int mapSizeX) => CellIndicesUtility.IndexToCell(Value, mapSizeX);
|
||||
|
||||
public List<Thing> GetThingList(Map map) => map.thingGrid.ThingsListAtFast(Value);
|
||||
public List<Thing> GetThingList(Map map) => map.thingGrid.thingGrid[Value];
|
||||
|
||||
public bool IsFogged(Map map) => map.fogGrid.fogGrid[Value];
|
||||
|
||||
public float GetSnowDepth(Map map) => map.snowGrid.depthGrid[Value];
|
||||
}
|
||||
Reference in New Issue
Block a user