Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiring panel #38

Open
tatjam opened this issue Dec 10, 2022 · 0 comments
Open

Wiring panel #38

tatjam opened this issue Dec 10, 2022 · 0 comments
Labels
editor Issues related to the vehicle editor enhancement New feature or request

Comments

@tatjam
Copy link
Collaborator

tatjam commented Dec 10, 2022

Here's a to-do list on how to build the wiring panel before release. This should allow very complex wire setups to be built relatively effortlessly.

Auto wiring

Wiring everything manually can be really boring, so we must allow an automatic wiring function. This can be implemented using a series of toggle-able auto-wiring modes, implemented as lua scripts. By default, we offer a simple auto-wiring mode:

Each added machine is checked against a condition, for example, whether it belongs to a certain group or contains a certain machine interface. If it does, it's wired with all of the following which are present:

  • A list of machines selected manually by the user
  • All machines which satisfy a certain condition, (same as the initial check)
  • Furthermore, machines may only build wires within their own group (without the need to manually specify which group in conditions)

Wires can be created bidirectionally by the wiring system, or in a certain direction (ie from added machine to target, or from target to the added machine).

To implement more advanced wiring functionality, the user can "stack" multiple scripts, all of which are run and the total wires added together. Furthermore, "auto wiring presets", which consist of a series of scripts and their configurations can be saved and loaded. Some defaults could be provided.
Finally, complex auto-wiring stuff could be implemented as a lua script with more complex logic.

Idea for a default wiring setup

Everything works within groups, so there should be only one capsule and staging controller per group. Maybe it's interesting to allow auto-wires to give warnings to the user?

  • Wire capsule machines directly to staging managing machines, and any "joystick" controllable machine (fins, engine gimbals, etc...)
  • Wire the staging manager to all machines with "activable" interface that has the "staging" tag (TODO: Implement interface tags too! See the related issue)
  • Other stuff is directly wired to the capsule so it can be controlled directly.

The wiring preset used should be controllable using a keyboard shortcut, and should be visible at all times in the attach and plumbing modes. (Plumbing is needed because machines can be created there too!)

Batch wiring

This allow working with many wires all at once, when auto-wiring is not practical / was forgotten to be enabled:

  • Wire selected machine to all other machines which satisfy a condition
  • Wire all machines which satisfy a condition with other machines that satisfy another set of conditions
  • Remove all wires which start in a given machine
  • Remove all wires which end in a given machine
  • Remove all wires which satisfy certain conditions
  • Remove all wires

Symmetry wiring

(Naming is not final!)
Eventually, symmetry will be implemented in the editor. There needs to be a way to control how are symmetric parts wired.

  • When a machine belonging to a symmetry group is wired to a part that doesn't belong to a symmetry group, all parts within the symmetry group are wired to the non-symmetric part. This may optionally be disabled from the wiring panel, and is bidirectional, the same happens if a non symmetric machine is wired to a symmetric machine.
  • When a part belonging to a symmetry group is wired to a part within the same symmetry group, there are two possible modes:
    • Cyclic wiring: Only possible if using radial symmetry, the machines are wired in the same / reverse order of geometric placement
    • All-to-all wiring: The default, all symmetric origin machines are wired to all symmetric target machines, over all possible pair permutations.
  • When a machine belonging to a symmetry group is wired to a machine within a different symmetry group:
    • Exhaustive wiring: All symmetric start machines are wired to all symmetric end machines, over all possible pair combinations
    • Pair wiring: All symmetric start machines are wired to all symmetric end machines, one-to-one, following geometric placement
    • All origin wiring: All symmetric start machines are wired to the selected end machine (ignoring symmetry in the end group)
    • All end wiring: The start machine (ignoring symmetry in start group) is wired to all symmetric end machines
@tatjam tatjam added enhancement New feature or request editor Issues related to the vehicle editor labels Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Issues related to the vehicle editor enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant