public override SketchEntity DeepCopy() { SketchRoof sketchRoof = (SketchRoof)base.DeepCopy(); sketchRoof.roof = this.roof; return(sketchRoof); }
public Sketch ToSketch(ThingDef coverStuff, ThingDef floorStuff = null) { Sketch sketch = new Sketch(); sketch.Rotate(rotation); for (int r = 0; r < layout.Count; r++) { for (int c = 0; c < layout[r].Count; c++) { IntVec3 loc = new IntVec3(c, 0, r) - center; TentLayout cellLayout = layout[r][c]; if (cellLayout != TentLayout.empty && cellLayout != TentLayout.other) { // Add roof SketchRoof sr = new SketchRoof { pos = loc, roof = TentDefOf.NCS_TentRoof }; sketch.Add(sr, false); // Add floor if applicable if (floorStuff != null) { sketch.AddTerrain(TentDefOf.NCS_TentFloor, loc); } } if (cellLayout == TentLayout.wall) { sketch.AddThing(TentDefOf.NCS_TentWall, loc, rotation, coverStuff); } else if (cellLayout == TentLayout.door) { sketch.AddThing(TentDefOf.NCS_TentDoor, loc, rotation, coverStuff); } } } return(sketch); }