Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates/crash site #1468

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading