From 5523cc50d84172925d4d39ab2f5a72ae9ca9615d Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 15 Nov 2018 17:58:21 -0500 Subject: [PATCH] Create player fix (#350) * Finish removing admin promote * Fix errors from merge --- features/player_create.lua | 12 ++++++++---- features/user_groups.lua | 6 ------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/features/player_create.lua b/features/player_create.lua index af375753..fee38da1 100644 --- a/features/player_create.lua +++ b/features/player_create.lua @@ -1,6 +1,7 @@ local Game = require 'utils.game' local Event = require 'utils.event' -local UserGroups = require 'features.user_groups' + +local info = require 'features.gui.info' local function player_created(event) local player = Game.get_player_by_index(event.player_index) @@ -14,13 +15,16 @@ local function player_created(event) end player.insert {name = 'iron-gear-wheel', count = 8} player.insert {name = 'iron-plate', count = 16} - player.print('Welcome to our Server. You can join our Discord at: redmew.com/discord') - player.print('Click the question mark in the top left corner for server infomation and map details.') - player.print('And remember.. Keep Calm And Spaghetti!') + + player.print('Trouble chatting? Change the keybinding in:') + player.print('Options -> Controls -> Toggle Lua console') local gui = player.gui gui.top.style = 'slot_table_spacing_horizontal_flow' gui.left.style = 'slot_table_spacing_vertical_flow' + if info ~= nil then + info.show_info({player = player}) + end end Event.add(defines.events.on_player_created, player_created) diff --git a/features/user_groups.lua b/features/user_groups.lua index 4a54abcb..01d53b6f 100644 --- a/features/user_groups.lua +++ b/features/user_groups.lua @@ -1,7 +1,6 @@ global.regulars = require 'resources.regulars' local Donators = require 'resources.donators' global.donators = Donators.donators -global.admins = require 'resources.admins' local Event = require 'utils.event' local Utils = require 'utils.utils' local Game = require 'utils.game' @@ -20,11 +19,6 @@ local function update_file() game.write_file('regulars.lua', table.concat(data), false, 0) end -Module.is_admin = - function(player_name) - return Utils.cast_bool(global.admins[player_name] or global.admins[player_name:lower()]) --to make it backwards compatible? -end - Module.is_regular = function(player_name) return Utils.cast_bool(global.regulars[player_name] or global.regulars[player_name:lower()]) --to make it backwards compatible