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

implemented paint.enable

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

View File

@ -24,6 +24,9 @@ if global.scenario and global.config then
if global.scenario.config.fish_market then
global.scenario.config.fish_market.enable = nil
end
if global.scenario.config.paint then
global.scenario.config.paint.enable = nil
end
end
local function create_cave_miner_button(player)

View File

@ -9,7 +9,11 @@ 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.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

@ -24,7 +24,7 @@ require 'poll'
require 'tag_group'
require 'tasklist'
require 'blueprint_helper'
--require 'paint'
require 'paint'
require 'score'
require 'popup'
require 'cave_miner'

View File

@ -40,6 +40,9 @@ local filter_table_close_button_name = Gui.uid_name()
global.paint_brushes_by_player = {}
local function player_build_tile(event)
if not global.scenario.config.paint.enable then
return
end
if event.item.name ~= brush_tool then
return
end
@ -71,6 +74,9 @@ local function player_build_tile(event)
end
local function player_joined(event)
if not global.scenario.config.paint.enable then
return
end
local player = game.players[event.player_index]
if not player or not player.valid then
return