public void Deregister(Gas_Spreading gas, int index) { var c = map.cellIndices.IndexToCell(index); things[index].RemoveAll(g => g == gas); foreach (var offset in GenAdj.AdjacentCellsAndInside) { var cell = c + offset; var center = cell.Equals(c); if (!cell.InBounds(map)) { continue; } var i = map.cellIndices.CellToIndex(c + offset); cumulativeThings[i].RemoveAll(g => g == gas); grid[i] = cumulativeThings[index].Count; } }
public void Deregister(Gas_Spreading gas, IntVec3 cell) { Deregister(gas, map.cellIndices.CellToIndex(cell)); }
public void RegisterAt(Gas_Spreading gas, IntVec3 cell) { RegisterAt(gas, map.cellIndices.CellToIndex(cell)); }