mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-11-06 09:09:26 +02:00
implemented paint.enable
This commit is contained in:
@@ -24,6 +24,9 @@ if global.scenario and global.config then
|
|||||||
if global.scenario.config.fish_market then
|
if global.scenario.config.fish_market then
|
||||||
global.scenario.config.fish_market.enable = nil
|
global.scenario.config.fish_market.enable = nil
|
||||||
end
|
end
|
||||||
|
if global.scenario.config.paint then
|
||||||
|
global.scenario.config.paint.enable = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function create_cave_miner_button(player)
|
local function create_cave_miner_button(player)
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ global.scenario.variables.player_deaths = {}
|
|||||||
global.scenario.config = {}
|
global.scenario.config = {}
|
||||||
global.scenario.config.player_list = {}
|
global.scenario.config.player_list = {}
|
||||||
global.scenario.config.player_list.enable_coin_col = true
|
global.scenario.config.player_list.enable_coin_col = true
|
||||||
|
global.scenario.config.fish_market = {}
|
||||||
global.scenario.config.fish_market.enable = true
|
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.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.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'
|
global.newline = '\n'
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ require 'poll'
|
|||||||
require 'tag_group'
|
require 'tag_group'
|
||||||
require 'tasklist'
|
require 'tasklist'
|
||||||
require 'blueprint_helper'
|
require 'blueprint_helper'
|
||||||
--require 'paint'
|
require 'paint'
|
||||||
require 'score'
|
require 'score'
|
||||||
require 'popup'
|
require 'popup'
|
||||||
require 'cave_miner'
|
require 'cave_miner'
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ local filter_table_close_button_name = Gui.uid_name()
|
|||||||
|
|
||||||
global.paint_brushes_by_player = {}
|
global.paint_brushes_by_player = {}
|
||||||
local function player_build_tile(event)
|
local function player_build_tile(event)
|
||||||
|
if not global.scenario.config.paint.enable then
|
||||||
|
return
|
||||||
|
end
|
||||||
if event.item.name ~= brush_tool then
|
if event.item.name ~= brush_tool then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -71,6 +74,9 @@ local function player_build_tile(event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function player_joined(event)
|
local function player_joined(event)
|
||||||
|
if not global.scenario.config.paint.enable then
|
||||||
|
return
|
||||||
|
end
|
||||||
local player = game.players[event.player_index]
|
local player = game.players[event.player_index]
|
||||||
if not player or not player.valid then
|
if not player or not player.valid then
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user