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

NameMeaning
GlobalState.recyclingRunningTable keyed by recycler id. A running recycler maps to its finish time (Unix seconds). Idle recyclers are absent
Player(src).state.recyclerCarryingSet on the player carrying someone (murder mode)
Player(src).state.recyclerInsertedSet 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'])
end

MrNewb_Recycling:Server:*, MrNewb_Recycling:Client:*, and MrNewb_Recycling:Callback:* are internal. Do not call them from other scripts.

On this page