public CheckFloorValid ( FSO.LotView.Model.LotTilePos pos, FSO.LotView.Model.FloorTile floor ) : bool | ||
pos | FSO.LotView.Model.LotTilePos | |
floor | FSO.LotView.Model.FloorTile | |
return | bool |
public bool SetFloor(short tileX, short tileY, sbyte level, FloorTile floor, bool force) { //returns false on failure var offset = GetOffset(tileX, tileY); if (!force) { //first check if we're supported if (floor.Pattern > 65533 && level > 1 && RoomData[(int)Rooms[level - 2].Map[offset] & 0xFFFF].IsOutside) { return(false); } if (level > 1 && !Supported[level - 2][offset]) { return(false); } //check if objects need/don't need floors if (!Context.CheckFloorValid(LotTilePos.FromBigTile((short)tileX, (short)tileY, level), floor)) { return(false); } } Floors[level - 1][offset] = floor; if (RealMode) { FloorsDirty = true; } Redraw = true; return(true); }