mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-03 14:53:01 +02:00
implemented fish_market.enable
This commit is contained in:
parent
3ea6a301f1
commit
9f4da47429
@ -9,11 +9,10 @@ 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 = {}
|
||||
global.scenario.config.fish_market.enable = true
|
||||
global.scenario.config.paint = {}
|
||||
global.scenario.config.paint.enable = true
|
||||
global.scenario.config.fish_market = {}
|
||||
global.scenario.config.fish_market.enable = true
|
||||
global.scenario.config.nuke_control = {}
|
||||
global.scenario.config.nuke_control.enable_autokick = true
|
||||
global.scenario.config.nuke_control.enable_autoban = true
|
||||
|
@ -31,10 +31,6 @@ local function spawn_market(cmd)
|
||||
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
|
||||
|
||||
@ -452,6 +448,9 @@ local function fish_player_crafted_item(event)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_init()
|
||||
|
||||
if global.scenario.config.fish_market.enable then
|
||||
commands.add_command('market', 'Places a fish market near you. (Admins only)', spawn_market)
|
||||
|
||||
Event.on_nth_tick(180, on_180_ticks)
|
||||
@ -459,3 +458,7 @@ Event.add(defines.events.on_pre_player_mined_item, pre_player_mined_item)
|
||||
Event.add(defines.events.on_entity_died, fish_drop_entity_died)
|
||||
Event.add(defines.events.on_market_item_purchased, market_item_purchased)
|
||||
Event.add(defines.events.on_player_crafted_item, fish_player_crafted_item)
|
||||
end
|
||||
end
|
||||
Event.on_init(init)
|
||||
Event.on_load(init)
|
||||
|
@ -52,6 +52,9 @@ if global.scenario and global.scenario.config then
|
||||
global.scenario.nuke_control.enable_autokick = nil
|
||||
global.scenario.nuke_control.enable_autoban = 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)
|
||||
|
@ -19,7 +19,7 @@ local tiles_per_tick = 32
|
||||
--require "map_gen.combined.dimensions"
|
||||
--require "map_gen.combined.dagobah_swamp"
|
||||
--require "map_gen.combined.meteor_strike" --unfinished
|
||||
require 'map_gen.combined.cave_miner.cave_miner'
|
||||
--require 'map_gen.combined.cave_miner.cave_miner'
|
||||
|
||||
|
||||
--presets--
|
||||
|
Loading…
x
Reference in New Issue
Block a user