midspace / midspace/Space-Engineers-Admin-script-mod

Teleport reworking

Open
#82 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
43
Forks
12
PR merge metrics
No merged PRs in 30d

Description

A full refactor of what /tp does.

This will affect all of the following open issues in some way.
#74 #75 #7 #8 #15 #16 #37

  1. /tp will provide safe teleport always.
    /tpx will provide unsafe teleport. [DONE]
  2. Teleport player to ship need to check for a functional cockpit with Main, and then any functional cockpit before trying for any other seat. [DONE]
  3. Teleport player to ship needs to check for free space first by finding an empty grid in the ship (or interior light as they practically have no collision model). Safe teleport will just recheck from this point.
  4. Teleport to X, Y, Z or GPS needs to check for safe location. [DONE]
  5. Teleport needs to reorient the player to face in the right direction of the target entity.
    5B. I haven't included reorienting a ship here, as I'm not sure how to get all the bits of multiple attached grids to rotate together, and maintain possible velocity and turn rates.
  6. Teleport ship should include all connected pistons, rotors, connectors, mergeblocks, landing gear. The same as how the Jump Drive works. [DONE]
  7. Thoroughly test how multiple grids are teleported, as connected grids are partly automatically teleported together.
    Issues previously noted include:
    On server, piston and rotor physics try to catch up with their connected grid and can sometimes end up ripping apart. [Haven't reproduced this]
    On single player, station cubes connected via landing gear to ship, will visually teleport but the physics remain in the start position along with the ship.
    Will need to consider pausing the physics of the grids before teleport.

Have noticed when teleporting "Explorer" prefab ship, side pistons detach.
Jumping the same ship works fine.

  1. /tp will need to present the following hotlist options going forwards.
    S# = Ship. [DONE]
    P# = Planet. [DONE]
    A# = Asteroid. [DONE]
    C# = Character player. [DONE]
    B# = Bot npc.
    ID = Last Id'd item. [DONE]
  2. Additional teleport to planet work.
    Currently I've put in teleporting the player to the Zenith. Approximately the North pole.
    It really needs to use the closet point on the surface compared to where the player is currently before they teleport. [DONE]
  3. Ships need to be able to teleport to planets.
  4. No work has been carried out to check for a safe teleport spot for multiple connected ship grids. Keen have ignored this with the Jump Drive, by simply declaring a need for 2Km of free space around the target destination. [Needs thorough testing]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the /tp command implementation and compare its behavior with /tpx and the Jump Drive behavior described here. Reproduce the listed multi-grid and physics cases, then consider the work complete when safe teleport checks, orientation, connected-grid handling, and the remaining planet and hotlist cases are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.