1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-10 10:00:00 +02:00
RedMew/control.lua

76 lines
2.3 KiB
Lua
Raw Normal View History

2018-11-11 09:20:07 +02:00
-- Libraries. Removing these will likely lead to game crashes
2018-05-22 00:48:41 +02:00
require 'config'
require 'utils.utils'
require 'utils.list_utils'
2018-10-02 10:08:57 +02:00
require 'utils.math'
2018-09-23 00:25:13 +02:00
2018-11-11 23:02:04 +02:00
local Game = require 'utils.game'
local Event = require 'utils.event'
2018-08-23 15:57:23 +02:00
require 'map_gen.shared.perlin_noise'
2018-05-22 00:48:41 +02:00
require 'map_layout'
2018-08-13 17:04:02 +02:00
2018-11-11 09:20:07 +02:00
-- Specific to RedMew hosts, can be disabled safely if not hosting on RedMew servers
require 'features.bot'
-- Library modules which, if missing, will cause other feature modules to fail
require 'features.base_data'
require 'features.follow'
require 'features.user_groups'
-- Feature modules, each can be disabled
require 'features.autodeconstruct'
2018-11-11 23:02:04 +02:00
require 'features.chat_triggers'
2018-11-11 09:20:07 +02:00
require 'features.corpse_util'
2018-11-11 23:02:04 +02:00
require 'features.donator_messages'
require 'features.fish_market'
require 'features.free_item_logging'
2018-11-11 09:20:07 +02:00
--require 'features.infinite_storage_chest'
require 'features.nuke_control'
require 'features.player_colors'
require 'features.reactor_meltdown'
require 'features.train_saviour'
require 'features.train_station_names'
-- Contains various commands for users and admins alike
require 'features.custom_commands'
-- GUIs the order determines the order they appear from left to right.
-- These can be safely disabled. Some map presets will add GUI modules themselves.
local info = require 'features.gui.info'
2018-11-11 09:20:07 +02:00
require 'features.gui.player_list'
require 'features.gui.poll'
require 'features.gui.tag_group'
require 'features.gui.tasklist'
require 'features.gui.blueprint_helper'
require 'features.gui.paint'
require 'features.gui.score'
require 'features.gui.popup'
2017-06-13 13:16:07 +02:00
local function player_created(event)
local player = Game.get_player_by_index(event.player_index)
if not player or not player.valid then
return
end
if (global.scenario.config.fish_market.enable) then
player.insert {name = MARKET_ITEM, count = 10}
end
2018-05-22 00:48:41 +02:00
player.insert {name = 'iron-gear-wheel', count = 8}
player.insert {name = 'iron-plate', count = 16}
player.print('Trouble chatting? Change the keybinding in:')
player.print('Options -> Controls -> Toggle Lua console')
2017-06-13 13:16:07 +02:00
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
2017-09-30 15:49:04 +02:00
end
Event.add(defines.events.on_player_created, player_created)