Skip to content

Commit

Permalink
New map: Frontier (#1414)
Browse files Browse the repository at this point in the history
* Add frontier scenario

* Updates to luackeckrc

* Move price_raffle from danger ore modules to features
  • Loading branch information
RedRafe authored Jul 31, 2024
1 parent 09ca909 commit 545a93f
Show file tree
Hide file tree
Showing 6 changed files with 500 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ stds.factorio_defines = {
'no_input_fluid',
'no_research_in_progress',
'no_minable_resources',
'launching_rocket',
'low_input_fluid',
'low_power',
'disabled_by_control_behavior',
Expand All @@ -999,6 +1000,8 @@ stds.factorio_defines = {
'marked_for_deconstruction',
'missing_required_fluid',
'missing_science_packs',
'preparing_rocket_for_launch',
'waiting_to_launch_rocket',
'waiting_for_source_items',
'waiting_for_space_in_destination',
}
Expand Down
File renamed without changes.
12 changes: 11 additions & 1 deletion locale/en/redmew_maps.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,14 @@ biters_disabled_ei=Launching the first [item=satellite] has killed all the biter
biters_disabled_py=Launching the first [item=satellite] has killed all the biters. Research [technology-name=pyrrhic] to win the game.
chest_reset=The hungry chest has renewed its offers! __1__
gps=[gps=__1__,__2__,__3__]
tile_unlock=__1__ has unlocked new grounds! __2__
tile_unlock=__1__ has unlocked new grounds! __2__
[frontier]
silo_forward=[color=blue][Mapkeeper][/color] Moved silo forward by __1__ tiles
silo_backward=[color=blue][Mapkeeper][/color] Moved silo backward by __1__ tiles
warning_max_distance=[color=blue][Mapkeeper][/color] Reached max distance for rocket silo. Adding one rocket launch to win for every __1__ tiles added this way
warning_min_distance=[color=blue][Mapkeeper][/color] Reached min distance for rocket silo. Removing one rocket launch to win for every __1__ tiles removed this way
kraken_eat=[color=purple][Kraken][/color] ate __1__ and was delicious!
rocket_launched=[color=blue][Mapkeeper][/color] __1__ __plural_for_parameter_1_{1=rocket|rest=rockets}__ launched, __2__ __plural_for_parameter_2_{1=rocket|rest=rockets}__ to go!
add_rocket=Adding __1__ extra __plural_for_parameter_1_{1=launch|rest=launches}__ thanks to the death of __2__. __3__ __plural_for_parameter_3_{1=rocket|rest=rockets}__ to go!
loot_chest=[achievement=golem] You find an hidden [color=orange]treasure[/color] beneath the enemy forces
6 changes: 3 additions & 3 deletions map_gen/maps/danger_ores/modules/expanse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local b = require 'map_gen.shared.builders'
local Event = require 'utils.event'
local Generate = require 'map_gen.shared.generate'
local Global = require 'utils.global'
local Price_raffle = require 'map_gen.maps.danger_ores.modules.price_raffle'
local PriceRaffle = require 'features.price_raffle'
local RS = require 'map_gen.shared.redmew_surface'
local table = require 'utils.table'
local Task = require 'utils.task'
Expand Down Expand Up @@ -142,7 +142,7 @@ return function(config)
local function get_remaining_budget(chest)
local budget = 0
for _, item_stack in pairs(chest.price) do
budget = budget + (item_stack.count * Price_raffle.get_item_worth(item_stack.name))
budget = budget + (item_stack.count * PriceRaffle.get_item_worth(item_stack.name))
end
return budget
end
Expand Down Expand Up @@ -235,7 +235,7 @@ return function(config)
for _ = 1, roll_count do
local value = math.floor(cell_value / roll_count)
local max_item_value = math.max(4, cell_value / (roll_count * 6))
for _, stack in pairs(Price_raffle.roll(value, 3, nil, max_item_value)) do
for _, stack in pairs(PriceRaffle.roll(value, 3, nil, max_item_value)) do
if not item_stacks[stack.name] then
item_stacks[stack.name] = stack.count
else
Expand Down
Loading

0 comments on commit 545a93f

Please sign in to comment.