1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-16 02:46:55 +02:00

implemented fish_market.enable

This commit is contained in:
Maik Wild 2018-09-11 16:07:53 +02:00
parent d92dd1a6dd
commit 842182e7b4
4 changed files with 14 additions and 3 deletions

View File

@ -17,8 +17,13 @@ local simplex_noise = require 'map_gen.shared.simplex_noise'
local Event = require 'utils.event'
local market_items = require "cave_miner_market_items"
if global.scenario and global.config and global.config.player_list then
global.scenario.config.player_list.enable_coin_col = nil
if global.scenario and global.config then
if global.config.player_list then
global.scenario.config.player_list.enable_coin_col = nil
end
if global.scenario.config.fish_market then
global.scenario.config.fish_market.enable = nil
end
end
local function create_cave_miner_button(player)

View File

@ -9,6 +9,7 @@ global.scenario.variables.player_deaths = {}
global.scenario.config = {}
global.scenario.config.player_list = {}
global.scenario.config.player_list.enable_coin_col = true
global.scenario.config.fish_market.enable = true
global.scenario.custom_functions = {}
global.scenario.config.nuke_min_time_hours = 3 --how long a player must be on the server to be allowed to use the nuke
global.newline = '\n'

View File

@ -10,7 +10,7 @@ require 'follow'
require 'autodeconstruct'
require 'corpse_util'
--require 'infinite_storage_chest'
--require 'fish_market'
require 'fish_market'
require 'reactor_meltdown'
require 'train_saviour'
require 'map_gen.shared.perlin_noise'

View File

@ -30,6 +30,11 @@ local function spawn_market(cmd)
cant_run(cmd.name)
return
end
if not global.scenario.config.fish_market.enable then
game.player.print("Cannot spawn market. Market is disabled in the scenario config.")
return
end
local surface = player.surface
local force = player.force