Skip to content

Commit b24314f

Browse files
authored
Update Diggy scenario (#1551)
* Address exploit of container dump module * Update market chest exchange values * Diggy updates * Revert c dump module changes * Revert market chest changes * Revert changes to experience
1 parent 56c5d25 commit b24314f

File tree

5 files changed

+16
-19
lines changed

5 files changed

+16
-19
lines changed

map_gen/maps/diggy/feature/blueprint_tools.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ local Ranks = require 'resources.ranks'
2525
local Settings = require 'utils.redmew_settings'
2626
local Template = require 'map_gen.maps.diggy.template'
2727

28+
local is_diggy_rock = Template.is_diggy_rock
2829
local is_support_beam = Template.is_support_beam
2930
local required_rank = Ranks.regular
3031
local ENTITIES = prototypes.entity
@@ -189,6 +190,11 @@ local function on_marked_for_deconstruction(event)
189190
name = entity.surface.get_tile(entity.position.x, entity.position.y).name
190191
end
191192

193+
-- Rocks are always allowed
194+
if is_diggy_rock(name) then
195+
return
196+
end
197+
192198
-- Entity is not a support
193199
if not is_support_beam(name) then
194200
return

map_gen/maps/diggy/feature/night_time.lua

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
-- @module NightTime
44
--
55

6-
76
-- dependencies
87
local Event = require 'utils.event'
98
local RS = require 'map_gen.shared.redmew_surface'
@@ -19,30 +18,17 @@ local NightTime = {}
1918
local function on_built_entity(event)
2019
local player = game.get_player(event.player_index)
2120
local entity = event.entity
22-
if (entity.name == 'solar-panel') then
23-
Popup.player(
24-
player, {'diggy.night_time_warning'}
25-
)
21+
if entity.name == 'solar-panel' then
22+
Popup.player(player, { 'diggy.night_time_warning' })
2623
end
2724
end
2825

29-
--- Event handler for on_research_finished
30-
-- sets the force, which the research belongs to, recipe for solar-panel-equipment
31-
-- to false, to prevent wastefully crafting. The technology is needed for further progression
32-
-- @param event table containing the on_research_finished event specific attributes
33-
--
34-
local function on_research_finished(event)
35-
local force = event.research.force
36-
force.recipes["solar-panel-equipment"].enabled = false
37-
end
38-
3926
--- Setup of on_built_entity and on_research_finished events
4027
-- assigns the two events to the corresponding local event handlers
4128
-- @param config table containing the configurations for NightTime.lua
4229
--
4330
function NightTime.register()
4431
Event.add(defines.events.on_built_entity, on_built_entity)
45-
Event.add(defines.events.on_research_finished, on_research_finished)
4632
end
4733

4834
--- Sets the daytime to 0.5 and freezes the day/night circle.
@@ -51,8 +37,12 @@ end
5137
function NightTime.on_init()
5238
local surface = RS.get_surface()
5339

54-
surface.daytime = 0.5
40+
surface.daytime = 0.42 --0.5
5541
surface.freeze_daytime = true
42+
surface.solar_power_multiplier = 0
43+
surface.min_brightness = 0.11
44+
surface.show_clouds = false
45+
surface.brightness_visual_weights = { 1 / 0.85, 1 / 0.85, 1 / 0.85 }
5646
end
5747

5848
return NightTime

map_gen/maps/diggy/presets/danger_ores.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ local config = {
361361
entity_name = 'coal',
362362
},
363363
disable_mining_productivity = {
364-
enabled = true,
364+
enabled = false,
365365
load = function() return require 'map_gen.maps.diggy.feature.mining_productivity' end,
366366
replace = script.active_mods['redmew-data'] == nil, -- replace mining productivity with robot cargo capacity
367367
},

map_gen/maps/diggy/presets/danger_ores_BnB.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ local config = {
361361
entity_name = 'coal',
362362
},
363363
disable_mining_productivity = {
364-
enabled = true,
364+
enabled = false,
365365
load = function() return require 'map_gen.maps.diggy.feature.mining_productivity' end,
366366
replace = script.active_mods['redmew-data'] == nil, -- replace mining productivity with robot cargo capacity
367367
},

map_gen/maps/diggy/scenario.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function Scenario.register(diggy_config)
5353
-- disabled redmew features for diggy
5454
local redmew_config = storage.config
5555
redmew_config.market.enabled = false
56+
redmew_config.redmew_surface.enabled = false
5657
redmew_config.reactor_meltdown.enabled = false
5758
redmew_config.hodor.enabled = false
5859
redmew_config.paint.enabled = false

0 commit comments

Comments
 (0)