mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Merge branch 'patch/6.0.8'
This commit is contained in:
@@ -132,15 +132,8 @@ local Roles = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
--- When global is loaded it will have the metatable re-assigned to the roles
|
--- When global is loaded it will have the metatable re-assigned to the roles
|
||||||
Global.register(Roles.config,function(tbl)
|
Global.register(Roles.config.players, function(tbl)
|
||||||
Roles.config = tbl
|
Roles.config.players = tbl
|
||||||
for _,role in pairs(Roles.config.roles) do
|
|
||||||
setmetatable(role,{__index=Roles._prototype})
|
|
||||||
local parent = Roles.config.roles[role.parent]
|
|
||||||
if parent then
|
|
||||||
setmetatable(role.allowed_actions, {__index=parent.allowed_actions})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--- Getter.
|
--- Getter.
|
||||||
@@ -433,8 +426,10 @@ Roles.override_player_roles{
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
function Roles.override_player_roles(player_name,roles)
|
function Roles.override_player_roles(player_name,roles)
|
||||||
|
local player_roles = Roles.config.players
|
||||||
if not roles then
|
if not roles then
|
||||||
Roles.config.players = player_name
|
for k in pairs(player_roles) do player_roles[k] = nil end
|
||||||
|
for k, new_roles in pairs(player_name) do player_roles[k] = new_roles end
|
||||||
else
|
else
|
||||||
Roles.config.players[player_name] = roles
|
Roles.config.players[player_name] = roles
|
||||||
end
|
end
|
||||||
@@ -821,7 +816,7 @@ end)
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
function Roles._prototype:set_auto_assign_condition(callback)
|
function Roles._prototype:set_auto_assign_condition(callback)
|
||||||
_C.error_if_runetime_closure(callback)
|
_C.error_if_runtime()
|
||||||
self.auto_promote_condition = callback
|
self.auto_promote_condition = callback
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ Gui.element(function(event_trigger,parent,warp)
|
|||||||
type = 'sprite-button',
|
type = 'sprite-button',
|
||||||
sprite = 'item/'..warp.icon,
|
sprite = 'item/'..warp.icon,
|
||||||
tooltip = {'warp-list.goto-tooltip',warp_position.x,warp_position.y},
|
tooltip = {'warp-list.goto-tooltip',warp_position.x,warp_position.y},
|
||||||
style = 'slot_sized_button'
|
style = 'slot_button'
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
:style(Styles.sprite32)
|
:style(Styles.sprite32)
|
||||||
|
|||||||
Reference in New Issue
Block a user