mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
Bulk LBMs (#14954)
This commit is contained in:
parent
7ae51382c8
commit
811adf5d42
9 changed files with 126 additions and 49 deletions
|
@ -217,8 +217,9 @@ local function init()
|
|||
-- Wrap register_lbm() to automatically instrument lbms.
|
||||
local orig_register_lbm = core.register_lbm
|
||||
core.register_lbm = function(spec)
|
||||
spec.action = instrument {
|
||||
func = spec.action,
|
||||
local k = spec.bulk_action ~= nil and "bulk_action" or "action"
|
||||
spec[k] = instrument {
|
||||
func = spec[k],
|
||||
class = "LBM",
|
||||
label = spec.label or spec.name,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue