Skip to content

Commit

Permalink
Updates/crash site (#1468)
Browse files Browse the repository at this point in the history
* Increase barrage/airstrike effects

* Add uranium processing auto-unlock

* Adjust market cost
  • Loading branch information
RedRafe authored Dec 7, 2024
1 parent 0b09adf commit f8c9477
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
16 changes: 8 additions & 8 deletions map_gen/maps/crash_site/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ function Public.control(config)
end

local radius = 5 + (radius_level * 3)
local count = (count_level - 2) * 5 + 3
local strikeCost = count * 4 -- the number of poison-capsules required in the chest as payment
local count = (count_level - 2) * 10 + 3
local strikeCost = count * 2 -- the number of poison-capsules required in the chest as payment

-- parse GPS coordinates from map ping
for m in string.gmatch(location_string, "(%-?%d*%.?%d+)") do -- Assuming the surface name isn't a valid number.
Expand Down Expand Up @@ -508,8 +508,8 @@ function Public.control(config)
end

local radius = 25 + (radius_level * 5)
local count = (count_level-1) * 6
local strikeCost = count * 4
local count = (count_level-1) * 12
local strikeCost = count * 2

-- parse GPS coordinates from map ping
for m in string.gmatch(location_string, "(%-?%d*%.?%d+)") do -- Assuming the surface name isn't a valid number.
Expand Down Expand Up @@ -602,8 +602,8 @@ function Public.control(config)
local radius_level = airstrike_data.radius_level -- max radius of the strike area
local count_level = airstrike_data.count_level -- the number of poison capsules launched at the enemy
local radius = 5 + (radius_level * 3)
local count = (count_level - 1) * 5 + 3
local strikeCost = count * 4
local count = (count_level - 1) * 10 + 3
local strikeCost = count * 2

local name = item.name
local player_name = event.player.name
Expand Down Expand Up @@ -661,8 +661,8 @@ function Public.control(config)
local radius_level = barrage_data.radius_level -- max radius of the strike area
local count_level = barrage_data.count_level -- the number of poison capsules launched at the enemy
local radius = 25 + (radius_level * 5)
local count = count_level * 6
local strikeCost = count * 4
local count = count_level * 12
local strikeCost = count * 2

local name = item.name
local player_name = event.player.name
Expand Down
9 changes: 8 additions & 1 deletion map_gen/maps/crash_site/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -573,4 +573,11 @@ Event.add(
local player = game.get_player(event.player_index)
set_timeout_in_ticks(1, spawn_player, player)
end
)
)

Event.add(defines.events.on_research_finished, function(event)
local research = event.research
if research.name == 'uranium-mining' then
research.force.technologies['uranium-processing'].researched = true
end
end)

0 comments on commit f8c9477

Please sign in to comment.