public EntContentsTable(Base_Static owner, EntContentsTable copy_from) { this.owner = owner; var tmp = this.contents; this.contents = copy_from.contents; copy_from.contents = tmp; }
public Base_Tile(dynamic loc) { if (loc != null) { if (loc is Base_Tile) { Base_Tile old_tile = (Base_Tile)loc; _x = old_tile._x; _y = old_tile._y; _z = old_tile._z; old_tile._x = -1; old_tile._y = -1; old_tile._z = -1; _contents = new EntContentsTable(this, (EntContentsTable)old_tile.contents); if (old_tile._loc != null) { old_tile._loc.contents.Add(this); old_tile._loc.contents.Remove(old_tile); } Map13.__Map[_x - 1, _y - 1, _z - 1] = (Game.Tile) this; } else { throw new Exception("BAD LOC FOR TILE!"); } } else { _contents = new EntContentsTable(this); if (use_next) { _x = next_x; _y = next_y; _z = next_z; Map13.__Map[_x - 1, _y - 1, _z - 1] = (Game.Tile) this; } } }