public AtlasDef(string defName, string file, int pixelsPerTile, int pixelsPerUnit) : base("BB:Atlas", defName) { BB.Assert(pixelsPerUnit > pixelsPerTile); BB.Assert((pixelsPerUnit % pixelsPerTile) == 0); this.file = file; this.pixelsPerTile = pixelsPerTile; this.pixelsPerUnit = pixelsPerUnit; this.tilesPerUnit = pixelsPerUnit / pixelsPerTile; }
public TerrainDef(string defName, string name, AtlasDef atlas, Vec2I[] spriteFrames, bool passable = true) : base("BB:Terrain", defName, name) { BB.Assert(spriteFrames != null); BB.Assert(spriteFrames.Length > 0); this.atlas = atlas; this.spriteFrames = spriteFrames; this.passable = passable; }
public BldgWorkbenchDef( string defName, string name, BuildingBounds bounds, Vec2I workSpot, SpriteDef spriteDown, SpriteDef spriteRight, ItemInfo[] materials, RecipeDef[] recipes) : base("BB:Workbench", defName, name) { BB.Assert(bounds.IsAdjacent(workSpot)); this.bounds = bounds; this.workSpot = workSpot; this.spriteDown = spriteDown; this.spriteRight = spriteRight; this.materials = materials; this.recipes = recipes; }
public override void AbandonWork(Work work) { BB.Assert(activeWork == work); activeWork = null; }
public void Register(TDef def) { BB.Assert(!defs.ContainsKey(def.defName)); defs.Add(def.defName, def); }