Skip to content

Requirements of WireLib to work #2668

Answered by thegrb93
Hotchkisska asked this question in Q&A
Discussion options

You must be logged in to vote

In ENT:Initialize or anywhere you can set the inputs and outputs with AdjustInputs and AdjustOutputs.

Then you just need to implement these functions (ReadCell and WriteCell are optional)
https://github.com/thegrb93/StarfallEx/blob/56ef565c47b405b624f9a1fceba0599f3cebd9e0/lua/starfall/libs_sv/wire.lua#L62-L87

For wire duping support, you'll need PreEntityCopy and PostEntityPaste (Note the inputs/outputs need to be setup first, probably in ENT:Initialize)
https://github.com/thegrb93/StarfallEx/blob/master/lua/entities/starfall_processor/init.lua#L145
https://github.com/thegrb93/StarfallEx/blob/master/lua/entities/starfall_processor/init.lua#L175

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Vurv78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants