Migrate to modern plugins: fix errors in util/mt-ide-helper & add changes that fixes most errors in code. LG-1978
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
--- Used by `core.register_privilege`.
|
||||
--- @class PrivilegeDefinition
|
||||
local PrivilegeDefinition = {
|
||||
--- @type string Privilege description
|
||||
--- @type string? Privilege description
|
||||
description = "",
|
||||
|
||||
--- @type string Whether to grant the privilege to singleplayer.
|
||||
--- @type boolean? Whether to grant the privilege to singleplayer.
|
||||
give_to_singleplayer = true,
|
||||
|
||||
--- Whether to grant the privilege to the server admin.
|
||||
--- Uses value of 'give_to_singleplayer' by default.
|
||||
--- @type boolean
|
||||
--- @type boolean?
|
||||
give_to_admin = true,
|
||||
|
||||
--- Called when given to player 'name' by 'granter_name'.
|
||||
@@ -22,6 +25,7 @@ local PrivilegeDefinition = {
|
||||
--- @param name string for whom priv was granted
|
||||
--- @param granter_name string who gives the priv
|
||||
--- @return boolean
|
||||
--- @type nil|fun(name:string, granter_name:string):boolean
|
||||
on_grant = function(name, granter_name) end,
|
||||
|
||||
--- Called when taken from player 'name' by 'revoker_name'.
|
||||
@@ -35,5 +39,6 @@ local PrivilegeDefinition = {
|
||||
--- @param name string for whom priv was granted
|
||||
--- @param revoker_name string who gives the priv
|
||||
--- @return boolean
|
||||
--- @type nil|fun(name:string, revoker_name:string):boolean
|
||||
on_revoke = function(name, revoker_name) end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user