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

E2: Add entity:linkComponent(entity) function #1900

Closed
CaptainPRICE opened this issue Apr 27, 2019 · 3 comments
Closed

E2: Add entity:linkComponent(entity) function #1900

CaptainPRICE opened this issue Apr 27, 2019 · 3 comments

Comments

@CaptainPRICE
Copy link
Contributor

CaptainPRICE commented Apr 27, 2019

A function similar to what Starfall and Expression Advanced have.
To allow linking wire components (keyboard, cam/pod controller, eyepod, etc.) to the vehicle/prop (appropriately, to whatever entity a link demands to be linked to in order to make a successful link), make certain wiring stuff a whole lot easier.

A full usecase E2 sample, (by default) allowing only owner to type into the keyboard via seat:
https://gist.github.com/CaptainPRICE/0f0d445e437c1499f6a2ae2c8e95c1dd

Removing a link should be possible by passing noentity() as an argument (to avoid creating extra E2 function). Due to how linking works with some components, there will have to be a separate function for unlinking :/
Additionally, there should also be a function which could be used to return an array of entities to which a component is currently being linked to: array=entity:linkedTo().
These new functions should be a part of the wiring E2 core (which is disabled by default).

@CaptainPRICE
Copy link
Contributor Author

See discussion at Discord (dev-wiremod).

@thegrb93
Copy link
Contributor

I don't like reading discord. what's the problem

@CaptainPRICE
Copy link
Contributor Author

(in short, just drama with gohidas/@adosikas.. Divran came and approved this idea as long as it is going to be a part of disabled-by-default E2 core, and wiring core is exactly that, as I proposed above)
So, reopening it, PR incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants