mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-27 19:35:24 +01:00
Bulk LBMs (#14954)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user