Requirements of WireLib to work #2668
-
Where can i find a full list of the requirements for WireLib to work with my own created entities? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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) For wire duping support, you'll need PreEntityCopy and PostEntityPaste (Note the inputs/outputs need to be setup first, probably in ENT:Initialize) |
Beta Was this translation helpful? Give feedback.
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