Closed Denneisk closed 10 months ago
@Grocel You can check for wirelinks with this just by doing
function ENT:TriggerInput(name, value, ext)
local wired = self:IsConnectedInputWire(name) or istable(ext) and ext.wirelink
@Grocel You can check for wirelinks with this just by doing
function ENT:TriggerInput(name, value, ext) local wired = self:IsConnectedInputWire(name) or istable(ext) and ext.wirelink
Thanks, this is very helpful! Is it guaranteed to be passed with every trigger call that might come via wirelink? I think it could be helpful to pass the name of the wirelink it was coming from as well. Like if it was triggered via "wirelinkA" or "wirelinkB" etc. in case of multiple wirelink ports.
Is it guaranteed to be passed with every trigger call that might come via wirelink?
As far as I know, wirelinks are only usable with E2, so this will always exist for a wirelink input.
I think it could be helpful to pass the name of the wirelink it was coming from as well.
Wirelinks are just entities and they don't directly retain any information about Wiremod wires, so that's a lot more involved. I would recommend not creating multiple wirelink outputs since they're all the same.
As far as I know, wirelinks are only usable with E2, so this will always exist for a wirelink input. Wirelinks are just entities and they don't directly retain any information about Wiremod wires, so that's a lot more involved. I would recommend not creating multiple wirelink outputs since they're all the same.
That's fine for my part. I will apply your hint into my addon soon. I am not that familiar with the current Workshop release scheduling nowadays, but I think it will be quite a while until the next "stable" releases. So I will have to account for the older live version as well.
@Vurv78 @thegrb93 Do either of you have anything more to say?
Is https://github.com/wiremod/wire/pull/2941 able to be closed then?
Yes.
createWirelink
to reintroduce creating wirelink outputsTriggerOutput
now sends a table with fieldwirelink = true
to indicate it's a wirelink triggervalidWirelink
would consider most wirelinks invalidFixes #2940