From 157b3c56bb350a5c8139b1cecbbd9c5a928a14df Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sat, 23 Sep 2017 17:24:54 +0100 Subject: [PATCH] Moved Rank Presets --- .../ExpGaming - Rank Control.lua | 1 + .../ExpGaming - Rank Presets.lua | 55 ------------------- locale/ExpGaming-Core/file-header.lua | 1 - 3 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 locale/ExpGaming-Core/ExpGaming - Rank Presets.lua diff --git a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua index 130e12a6..bb5748e3 100644 --- a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua +++ b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua @@ -200,5 +200,6 @@ Event.register(-1,function() end end) Event.register(defines.events.on_player_joined_game,function(event) find_new_rank(game.players[event.player_index]) end) +Event.register(-1,function() global.preset_ranks = {} end) --Please Only Edit Above This Line----------------------------------------------------------- return credits \ No newline at end of file diff --git a/locale/ExpGaming-Core/ExpGaming - Rank Presets.lua b/locale/ExpGaming-Core/ExpGaming - Rank Presets.lua deleted file mode 100644 index 50fb44db..00000000 --- a/locale/ExpGaming-Core/ExpGaming - Rank Presets.lua +++ /dev/null @@ -1,55 +0,0 @@ ---[[ -Explosive Gaming - -This file can be used with permission but this and the credit below must remain in the file. -Contact a member of management on our discord to seek permission to use our code. -Any changes that you may make to the code are yours but that does not make the script yours. -Discord: https://discord.gg/XSsBV6b - -The credit below may be used by another script do not remove. -]] -local credits = {{ - name='ExpGaming - Rank Preset Table', - owner='Explosive Gaming', - dev='Cooldude2606', - description='The ranks that players are given upon joining', - factorio_version='0.15.23', - show=false - }} -local function credit_loop(reg) for _,cred in pairs(reg) do table.insert(credits,cred) end end ---Please Only Edit Below This Line----------------------------------------------------------- --- we run an exturnle script which syncs this table with discord, only top ranks are filled in case of error -local preset_ranks = { - Owner={'badgamernl'}, - - ['Community Manager']={'arty714'}, - - Developer={'Cooldude2606'}, - - Admin={ - 'eissturm', - 'PropangasEddy', - 'mark9064', - 'Smou'}, - - Mod={}, - - Donator={}, - - Veteran={}, - - Member={}, - - Regular={}, - - Guest={}, - - Jail={} -} --- returns this list, or just one rank if given -function get_rank_presets(rank) - if rank then return global.preset_ranks[rank] else return global.preset_ranks end -end -Event.register(-1,function() global.preset_ranks = preset_ranks end) ---Please Only Edit Above This Line----------------------------------------------------------- -return credits diff --git a/locale/ExpGaming-Core/file-header.lua b/locale/ExpGaming-Core/file-header.lua index 1fb889cd..4d95dfbf 100644 --- a/locale/ExpGaming-Core/file-header.lua +++ b/locale/ExpGaming-Core/file-header.lua @@ -21,7 +21,6 @@ local function credit_loop(reg) for _,cred in pairs(reg) do table.insert(credits --As this is the core file, the order in which the files are loaded does matter. Do not change! credit_loop(require("ExpGaming - Lib")) credit_loop(require("ExpGaming - Rank Table")) -credit_loop(require("ExpGaming - Rank Presets")) credit_loop(require("ExpGaming - Rank Control")) credit_loop(require("GUI/file-header")) credit_loop(require("ExpGaming - Command Maker"))