mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-18 03:21:47 +02:00
Create player fix (#350)
* Finish removing admin promote * Fix errors from merge
This commit is contained in:
parent
263b8fb680
commit
5523cc50d8
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user