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 :wirelink() broken backwards-compat #2940

Closed
Fasteroid opened this issue Dec 12, 2023 · 2 comments · Fixed by #2942
Closed

E2 :wirelink() broken backwards-compat #2940

Fasteroid opened this issue Dec 12, 2023 · 2 comments · Fixed by #2942

Comments

@Fasteroid
Copy link
Contributor

Using :wirelink() on an entity that doesn't have one by default now returns an invalid wirelink.
Seems to have been broken by #2891 since entity:wirelink() no longer creates a wirelink.

Before:

e2function wirelink entity:wirelink()
if not IsValid(this) then return self:throw("Invalid entity!", nil) end
if not isOwner(self, this) then return self:throw("You do not own this entity!", nil) end
if not this.extended then
WireLib.CreateWirelinkOutput( self.player, this, {true} )
end
return this
end

After:

e2function wirelink entity:wirelink()
if not IsValid(this) then return self:throw("Invalid entity!", nil) end
if not isOwner(self, this) then return self:throw("You do not own this entity!", nil) end
return this
end
__e2setcost(10)

Probably easy to fix if this tiny change is reverted.

Fasteroid added a commit to Fasteroid/wire that referenced this issue Dec 12, 2023
@Denneisk
Copy link
Member

Thanks for reporting this.

@Fasteroid Fasteroid changed the title E2 :wirelink() doesn't work with cam controllers anymore E2 :wirelink() broken backwards-compat Dec 13, 2023
@Fasteroid
Copy link
Contributor Author

bruh

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 a pull request may close this issue.

2 participants