Exports
The client rotor export and the state bags other scripts can read.
In-development version. These docs cover the testing build of Recycling. The official release is still documented on the GitBook linked in its README.
Client
SetRecyclerRunning forces the spinning-rotor visual on a mrnewb_recycler_post entity. It does not start the machine or change what it produces. nil returns it to the server-driven state. It returns false if the entity does not exist or is a different model.
local ok = exports.MrNewb_Recycling:SetRecyclerRunning(entity, true)
exports.MrNewb_Recycling:SetRecyclerRunning(entity, nil)State
| Name | Meaning |
|---|---|
GlobalState.recyclingRunning | Table keyed by recycler id. A running recycler maps to its finish time (Unix seconds). Idle recyclers are absent |
Player(src).state.recyclerCarrying | Set on the player carrying someone (murder mode) |
Player(src).state.recyclerInserted | Set on the player being carried or inserted (murder mode) |
local running = GlobalState.recyclingRunning or {}
if running['my_recycler_id'] then
print(running['my_recycler_id'])
endMrNewb_Recycling:Server:*, MrNewb_Recycling:Client:*, and MrNewb_Recycling:Callback:* are internal. Do not call them from other scripts.