SlimeVoid / DynamicTransport

7 stars 7 forks source link

Redo transport setup to allow for real dynamic transport #40

Open Tarig0 opened 9 years ago

Tarig0 commented 9 years ago

We will have the following.

  1. Origin Pylon - Computer (will have yellow as a main color)
  2. Pylon - floor marker (white)
  3. Transport block - elevator block (unchanged)
  4. Transport Tool
  5. connector block (not usable by player)

We will use the OP to create the first stop on a Transport System (TS)

To add stops/routes to the TS

  1. right click on (origin) pylon with transport tool
  2. right click on next pylon with transport tool
  3. pylons will check to see if they are within 16 blocks and have line of sight, then connect optional: shift-right click to make pylon a way-point and not a stop. These pylons can be at any angle from each other. including 3-d angles optional2: right click with the tool to rename the stop. Repeat till you have all the stops you want

To add a Transport platform/room to the TS

1.Place a transport block(TB) on a pylon, preferably the origin a. This will combine the two blocks and set the current position of the transport b. This will also be the floor select block, right click to access floor selection (configurable)

  1. shift-right click the TB with the transport tool
  2. place down another TB within 3 blocks of another TB
  3. right click the new TB
  4. Repeat till satisfied

TB are the only block that can be camoed, pylons will be able to be hidden when a player is not holding an elevator tool, will add an option for pylon - in/visible, connector - invisible/wires/light beams, this will be set from the origin pylon

Camo will be moved to its own mod, which will reside in SlimevoidLib.

We should add a maintainers list to the origin pylon so that players can restrict access to the elevator, this will default to just the player that set the pylon, this default can be changed by each player by calling commands such as. /addDefaultMantianer Tarig0,/remDefaultMantianer Tarig0 and /resDefaultMantianer

each pylon will store

  1. parent pylon loc
  2. child pylon loc
  3. is Stop
  4. transport present (is pylon residing in the same block as transport block)
  5. stop ID
  6. stop name
  7. Pylon visibility (set by Origin)

Origin Pylon (chunkloaded)

  1. child pylon
  2. transport present
  3. stop name
  4. transport name
  5. transports pos (ID of current stop)
  6. Pylon visibility
  7. connection visibility
  8. request spool
  9. stop list
  10. current state (waiting, inTransit)

Transport Block

  1. Parent Block (offset to block on pylon)
  2. Isfloorselect
Tarig0 commented 9 years ago

Request can be sent from a pylon when it receives a redstone signal.

  1. add request to origin pylons spool

    a.requested stop ID in spool ignore

  2. Start moving transport

    a. find current pylon the transport residues on b. instruct pylon to construct transport to generate transport entity

  3. Transport arrives

    a. destruct transport entity back into blocks b. remove current stopID from spool c. check to see if spool contains another request

Might want to add another block that can be bound to the pylons so its easier to make calls.

Return of the call button?

Tarig0 commented 9 years ago

Enity will pass from one pylon to the next till it stops at the desired pylon

  1. Entity Created

    a. Determine if going to child or parent pylon b. calculate motion ratios x-y-z c. begin acceleration

  2. Entity reaches Pylon (assumed not dest for ease of documentation)

    a. recalculate motion ratios b. determine if next pylon is destination

  3. Begin approach to dest

    a. begin de-acceleration

  4. Arrive- destroy entity

Entity Stores

  1. Destination ID
  2. Motion Ratios (x-y-z)

    a. Each will be a percentage of the total motion to be placed in each block to get the desired direction (yea maths)

  3. Anything pretaining to Display and current motion of the entity