• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.

Defining deck plans in code

agorski

SOC-13
Admin Award
So I've been playing around with how to draw deck plans in code. My premise is that a deck plan is just a collection of deck squares. I'm not going to mess around with diagonal lines and curves as this opens a gigantic can of worms.

Deck square borders can conflict with the borders of adjacent squares, so my idea is to only draw top and left borders. If you need a bottom or right border just use an adjacent square. Squares used for this purpose can have their default grid borders turned off so you can't even tell there's a square there.

The interior of a deck square can have one and only one feature, like a workstation for example. There's an infinitude of possible features, but I've attempted to boil them down to a manageable list of things. No toilets or sinks. I've taken my inspiration from published deck plans which are generally pretty spartan. Features that are described as "inset" are inset about a quarter of the way into the square, allowing more flexibility in drawing walls and equipment offset from the grid.

Each square can also have a small text label at the bottom edge to label a space or function ("helm").

Let me know of any features you absolutely can't live without.

Code:
Left & Top Edge

Default
    Nothing

Bulkheads
    Bulkhead
    Bulkhead, inset, left
    Bulkhead, inset, right
    Bulkhead, hatch
    Bulkhead, iris valve
    Bulkhead, access, inside
    Bulkhead, access, outside

    Cargo door, lefthand, socket outer
    Cargo door, lefthand, socket inner
    Cargo door, lefthand, inner
    Cargo door, lefthand, outer
    Cargo door, righthand, socket outer
    Cargo door, righthand, socket inner
    Cargo door, righthand, inner
    Cargo door, righthand, outer

Walls
    Partition
    Partition, inset, left
    Partition, inset, right
    Partition, door, left
    Partition, door, right
    Partition, transparent

Center

Default
    Empty square

Bulkheads
    Bulkhead, inset, left
    Bulkhead, inset, left, hatch
    Bulkhead, inset, left, iris valve
    Bulkhead, inset, left, access, inside
    Bulkhead, inset, left, access, outside
    Bulkhead, inset, right
    Bulkhead, inset, right, hatch
    Bulkhead, inset, right, iris valve
    Bulkhead, inset, right, access, inside
    Bulkhead, inset, right, access, outside
    Bulkhead, inset, top
    Bulkhead, inset, top, hatch
    Bulkhead, inset, top, iris valve
    Bulkhead, inset, top, access, inside
    Bulkhead, inset, top, access, outside
    Bulkhead, inset, bottom
    Bulkhead, inset, bottom, hatch
    Bulkhead, inset, bottom, iris valve
    Bulkhead, inset, bottom, access, inside
    Bulkhead, inset, bottom, access, outside
    Bulkhead, inset, corner, upper left
    Bulkhead, inset, corner, upper right
    Bulkhead, inset, corner, lower left
    Bulkhead, inset, corner, lower right

Controls
    Control panel, left
    Control panel, right
    Control panel, up
    Control panel, down

    Couch, left
    Couch, left, console
    Couch, left, console & panel
    Couch, right
    Couch, right, console
    Couch, right, console & panel
    Couch, up
    Couch, up, console
    Couch, up, console & panel
    Couch, down
    Couch, down, console
    Couch, down, console & panel

    Workstation, left
    Workstation, left, console
    Workstation, left, console & panel
    Workstation, right
    Workstation, right, console
    Workstation, right, console & panel
    Workstation, up
    Workstation, up, console
    Workstation, up, console & panel
    Workstation, down
    Workstation, down, console
    Workstation, down, console & panel

Circulation
    Lift, small

    Lift, large, upper left
    Lift, large, upper right
    Lift, large, lower left
    Lift, large, lower right

    Stairs, left to right
    Stairs, top to bottom

Equipment
    Equipment, black, full
    Equipment, black, inset, upper left
    Equipment, black, inset, upper right
    Equipment, black, inset, lower left
    Equipment, black, inset, lower right
    Equipment, black, inset, left
    Equipment, black, inset, right
    Equipment, black, inset, top
    Equipment, black, inset, bottom

    Equipment, gray, full
    Equipment, gray, inset, upper left
    Equipment, gray, inset, upper right
    Equipment, gray, inset, lower left
    Equipment, gray, inset, lower right
    Equipment, gray, inset, left
    Equipment, gray, inset, right
    Equipment, gray, inset, top
    Equipment, gray, inset, bottom

    Equipment, light gray, full
    Equipment, light gray, inset, upper left
    Equipment, light gray, inset, upper right
    Equipment, light gray, inset, lower left
    Equipment, light gray, inset, lower right
    Equipment, light gray, inset, left
    Equipment, light gray, inset, right
    Equipment, light gray, inset, top
    Equipment, light gray, inset, bottom


Hatches
    Iris valve, deck
    Iris valve, above
    Iris valve, deck & above

    Hatch, deck
    Hatch, above
    Hatch, deck & above

Seating
    Desk, left
    Desk, right
    Desk, up
    Desk, down

    Sofa, left, top half
    Sofa, left, bottom half
    Sofa, right, top half
    Sofa, right, bottom half
    Sofa, up, left half
    Sofa, up, right half
    Sofa, down, left half
    Sofa, down, right half

    Table & chairs, round
    Table & chairs, square
    Table & chairs, square, diagonal

    Table, mess, left half
    Table, mess, right half
    Table, mess, top half
    Table, mess, bottom half

Stateroom
    Bunk, left, top half
    Bunk, left, top half & storage
    Bunk, left, bottom half
    Bunk, right, top half
    Bunk, right, top half & storage
    Bunk, right, bottom half
    Bunk, up, left half
    Bunk, up, left half & storage
    Bunk, up, right half
    Bunk, down, left half
    Bunk, down, left half & storage
    Bunk, down, right half

    Fresher, small

Walls
    Partition, inset, left
    Partition, inset, left, door, left
    Partition, inset, left, door, right
    Partition, inset, left, transparent
    Partition, inset, right
    Partition, inset, right, door, left
    Partition, inset, right, door, right
    Partition, inset, right, transparent
    Partition, inset, top
    Partition, inset, top, door, left
    Partition, inset, top, door, right
    Partition, inset, top, transparent
    Partition, inset, bottom
    Partition, inset, bottom, door, left
    Partition, inset, bottom, door, right
    Partition, inset, bottom, transparent
    Partition, inset, corner, upper left
    Partition, inset, corner, upper right
    Partition, inset, corner, lower left
    Partition, inset, corner, lower right
 
Code:
Walls
    Partition
    Partition, inset, left
    Partition, inset, right
    Partition, door, left
    Partition, door, right
    Partition, transparent
Doors, hatches, and iris valves can be north and south too, not just east and west?

Walls and doors can be combined with other symbols in the same square, including other walls and doors?
 
Yes, there are versions for the left and top edges. Walls and doors are on edges so they don’t conflict with a center feature. In the case of inset walls, which can have a door, those are a center feature and there’s no room for anything else.
 
Back
Top