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

Add Vehicle Inputs To Cam Controllers And EGP Huds #3263

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

LengthenedGradient
Copy link
Contributor

Adds a "Vehicle" input to Cam Controllers and EGP Huds, inline with Pod Controllers.

I understand this is somewhat redundant for Cam Controllers but I feel it's relevant.

I am working on some addon stuff where a seat may not exist on spawn (generated by another entity). In this case, wire I/O is a reliable way to persist linkages through dupes.

Adds a "Vehicle" input to Cam Controllers and EGP Huds, inline with Pod Controllers.

I understand this is somewhat redundant for Cam Controllers but I feel it's relevant.

I am working on some addon stuff where a seat may not exist on spawn (generated by another entity). In this case, wire I/O is a reliable way to persist linkages through dupes.
@thegrb93
Copy link
Contributor

Can 'Vehicles' entity array input be used instead? You can add that to the egp hud.

@LengthenedGradient
Copy link
Contributor Author

LengthenedGradient commented Feb 12, 2025

Can 'Vehicles' entity array input be used instead? You can add that to the egp hud.

Could I do this:

  • Add 'Vehicles' to pod controllers (out of concern for backwards compatibility, since it already has a 'Vehicle' input)
  • Add 'Vehicles' to egp huds

If absolutely need be I can avoid adding that "redundant" input to pod controllers but I believe it would be more accessible if they all could use the same 'Vehicles' input.

Instead of adding 'Vehichle' to Cam Controllers and EGP
@deltamolfar
Copy link
Contributor

There is no real reason to add Vehicle input to hud/cam, as you already can set a single vehicle manually, and when you want to set a vehicle programmatically or via gates - you always have access to arrays

@LengthenedGradient
Copy link
Contributor Author

There is no real reason to add Vehicle input to hud/cam, as you already can set a single vehicle manually, and when you want to set a vehicle programmatically or via gates - you always have access to arrays

The reason I want to add a vehicle input is for accessibility reasons.

I have an entity that creates a seat on spawn that's intentionally meant to be invisible to the player, but intended to be used in contraptions.

Because the seat is generated by another entity on spawn and is not duplicateable, it also cannot be linked to via the normal wire link system.

I can output the seat from the entity as a wire output, which would be more accessible than forcing everyone using the addon to need to use a chip for this.

@thegrb93
Copy link
Contributor

looks good I think. I can fully review tomorrow

@@ -471,6 +472,12 @@ function ENT:TriggerInput(name, value)
if value:IsNPC() then return end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update this to use the TypeID and IsValid check, instead of IsPlayer IsNPC? All the rest of the code looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should work now. Apologies for the delay.

@@ -468,8 +468,8 @@ function ENT:TriggerInput(name, value)
self:SetShowCursor(value)
elseif name == "Vehicle" then
if not IsValid(value) then return end -- Only link if the input is valid. That way, it won't be unlinked if the wire is disconnected
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which line are you referring to? I am having a skill issue. Line 470?

Redundant check removed.
@thegrb93 thegrb93 merged commit ee170bb into wiremod:master Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants