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

implemented fish_market.enable

This commit is contained in:
Valansch 2018-09-12 08:41:56 +02:00
parent 3ea6a301f1
commit 9f4da47429
4 changed files with 260 additions and 255 deletions

View File

@ -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 = {}
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

View File

@ -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,10 +448,17 @@ local function fish_player_crafted_item(event)
end
end
commands.add_command('market', 'Places a fish market near you. (Admins only)', spawn_market)
local function on_init()
Event.on_nth_tick(180, on_180_ticks)
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)
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)
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)

File diff suppressed because it is too large Load Diff

View File

@ -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--
@ -107,9 +107,9 @@ local entity_modules = {
--require "map_gen.misc.loot_items",
--require "map_gen.terrain.mines",
--require "map_gen.terrain.deathworld",
--require "map_gen.ores.glitter_ores",
--require "map_gen.ores.glitter_ores",
--require "map_gen.terrain.worms",
--require "map_gen.misc.wreck_items",
--require "map_gen.misc.wreck_items",
--require "map_gen.ores.neko_crazy_ores",
--require "map_gen.ores.fluffy_rainbows",
--require "map_gen.ores.harmonic_gen",