diff --git a/map_gen/maps/diggy/feature/blueprint_tools.lua b/map_gen/maps/diggy/feature/blueprint_tools.lua index 1d8bc47d2..e19a3439f 100644 --- a/map_gen/maps/diggy/feature/blueprint_tools.lua +++ b/map_gen/maps/diggy/feature/blueprint_tools.lua @@ -25,6 +25,7 @@ local Ranks = require 'resources.ranks' local Settings = require 'utils.redmew_settings' local Template = require 'map_gen.maps.diggy.template' +local is_diggy_rock = Template.is_diggy_rock local is_support_beam = Template.is_support_beam local required_rank = Ranks.regular local ENTITIES = prototypes.entity @@ -189,6 +190,11 @@ local function on_marked_for_deconstruction(event) name = entity.surface.get_tile(entity.position.x, entity.position.y).name end + -- Rocks are always allowed + if is_diggy_rock(name) then + return + end + -- Entity is not a support if not is_support_beam(name) then return diff --git a/map_gen/maps/diggy/feature/night_time.lua b/map_gen/maps/diggy/feature/night_time.lua index bc1d7d780..a9e92880d 100644 --- a/map_gen/maps/diggy/feature/night_time.lua +++ b/map_gen/maps/diggy/feature/night_time.lua @@ -3,7 +3,6 @@ -- @module NightTime -- - -- dependencies local Event = require 'utils.event' local RS = require 'map_gen.shared.redmew_surface' @@ -19,30 +18,17 @@ local NightTime = {} local function on_built_entity(event) local player = game.get_player(event.player_index) local entity = event.entity - if (entity.name == 'solar-panel') then - Popup.player( - player, {'diggy.night_time_warning'} - ) + if entity.name == 'solar-panel' then + Popup.player(player, { 'diggy.night_time_warning' }) end end ---- Event handler for on_research_finished --- sets the force, which the research belongs to, recipe for solar-panel-equipment --- to false, to prevent wastefully crafting. The technology is needed for further progression --- @param event table containing the on_research_finished event specific attributes --- -local function on_research_finished(event) - local force = event.research.force - force.recipes["solar-panel-equipment"].enabled = false -end - --- Setup of on_built_entity and on_research_finished events -- assigns the two events to the corresponding local event handlers -- @param config table containing the configurations for NightTime.lua -- function NightTime.register() Event.add(defines.events.on_built_entity, on_built_entity) - Event.add(defines.events.on_research_finished, on_research_finished) end --- Sets the daytime to 0.5 and freezes the day/night circle. @@ -51,8 +37,12 @@ end function NightTime.on_init() local surface = RS.get_surface() - surface.daytime = 0.5 + surface.daytime = 0.42 --0.5 surface.freeze_daytime = true + surface.solar_power_multiplier = 0 + surface.min_brightness = 0.11 + surface.show_clouds = false + surface.brightness_visual_weights = { 1 / 0.85, 1 / 0.85, 1 / 0.85 } end return NightTime diff --git a/map_gen/maps/diggy/presets/danger_ores.lua b/map_gen/maps/diggy/presets/danger_ores.lua index b414ca1b0..cb85ffbf9 100644 --- a/map_gen/maps/diggy/presets/danger_ores.lua +++ b/map_gen/maps/diggy/presets/danger_ores.lua @@ -361,7 +361,7 @@ local config = { entity_name = 'coal', }, disable_mining_productivity = { - enabled = true, + enabled = false, load = function() return require 'map_gen.maps.diggy.feature.mining_productivity' end, replace = script.active_mods['redmew-data'] == nil, -- replace mining productivity with robot cargo capacity }, diff --git a/map_gen/maps/diggy/presets/danger_ores_BnB.lua b/map_gen/maps/diggy/presets/danger_ores_BnB.lua index 76f8a392c..d78bfbd70 100644 --- a/map_gen/maps/diggy/presets/danger_ores_BnB.lua +++ b/map_gen/maps/diggy/presets/danger_ores_BnB.lua @@ -361,7 +361,7 @@ local config = { entity_name = 'coal', }, disable_mining_productivity = { - enabled = true, + enabled = false, load = function() return require 'map_gen.maps.diggy.feature.mining_productivity' end, replace = script.active_mods['redmew-data'] == nil, -- replace mining productivity with robot cargo capacity }, diff --git a/map_gen/maps/diggy/scenario.lua b/map_gen/maps/diggy/scenario.lua index 8598d4dbf..e7525a6fe 100644 --- a/map_gen/maps/diggy/scenario.lua +++ b/map_gen/maps/diggy/scenario.lua @@ -53,6 +53,7 @@ function Scenario.register(diggy_config) -- disabled redmew features for diggy local redmew_config = storage.config redmew_config.market.enabled = false + redmew_config.redmew_surface.enabled = false redmew_config.reactor_meltdown.enabled = false redmew_config.hodor.enabled = false redmew_config.paint.enabled = false