mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Added Reson to cant open left
This commit is contained in:
@@ -141,12 +141,14 @@ function left._left.toggle(event)
|
|||||||
elseif err == true then open = true
|
elseif err == true then open = true
|
||||||
elseif global.over_ride_left_can_open then
|
elseif global.over_ride_left_can_open then
|
||||||
if is_type(Ranking,'table') and Ranking._presets and Ranking._presets().meta.rank_count > 0 then
|
if is_type(Ranking,'table') and Ranking._presets and Ranking._presets().meta.rank_count > 0 then
|
||||||
if Ranking.get_rank(player):allowed(_left.name) then open = true end
|
if Ranking.get_rank(player):allowed(_left.name) then open = true
|
||||||
|
else open = {gui.unauthorized} end
|
||||||
end
|
end
|
||||||
end
|
else open == err end
|
||||||
else
|
else
|
||||||
if is_type(Ranking,'table') and Ranking._presets and Ranking._presets().meta.rank_count > 0 then
|
if is_type(Ranking,'table') and Ranking._presets and Ranking._presets().meta.rank_count > 0 then
|
||||||
if Ranking.get_rank(player):allowed(_left.name) then open = true end
|
if Ranking.get_rank(player):allowed(_left.name) then open = true
|
||||||
|
else open = {gui.unauthorized} end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if open and left.style.visible ~= true then
|
if open and left.style.visible ~= true then
|
||||||
@@ -154,7 +156,8 @@ function left._left.toggle(event)
|
|||||||
else
|
else
|
||||||
left.style.visible = false
|
left.style.visible = false
|
||||||
end
|
end
|
||||||
if not open then player_return('You can not open this panel right now',defines.text_color.crit,player) player.play_sound{path='utility/cannot_build'} end
|
if open == false then player_return({'gui.cant-open-no-reason'},defines.text_color.crit,player) player.play_sound{path='utility/cannot_build'}
|
||||||
|
else open ~= true then player_return({'gui.cant-open',open},defines.text_color.crit,player) player.play_sound{path='utility/cannot_build'} end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- draws the left guis when a player first joins, fake_event is just because i am lazy
|
-- draws the left guis when a player first joins, fake_event is just because i am lazy
|
||||||
|
|||||||
@@ -10,4 +10,9 @@ rank-print=[__1__]: __2__
|
|||||||
rank-up=__1__ was promoted to __2__ by __3__
|
rank-up=__1__ was promoted to __2__ by __3__
|
||||||
rank-down=__1__ was demoted to __2__ by __3__
|
rank-down=__1__ was demoted to __2__ by __3__
|
||||||
rank-given=You have been given the __1__ Rank!
|
rank-given=You have been given the __1__ Rank!
|
||||||
tag-reset=Your Tag was reset due to a Rank change
|
tag-reset=Your Tag was reset due to a Rank change
|
||||||
|
|
||||||
|
[gui]
|
||||||
|
unauthorized=401 - Unauthorized: Access is denied due to invalid credentials
|
||||||
|
cant-open=You can not open this panel right now, reason: __1__
|
||||||
|
cant-open-no-reason=You can not open this panel right now
|
||||||
Reference in New Issue
Block a user