1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-03 13:12:11 +02:00
This commit is contained in:
danielmartin0 2021-10-14 10:23:34 +01:00
parent b97cf73e25
commit a752eb8217
21 changed files with 149 additions and 112 deletions

View File

@ -13,7 +13,7 @@ softmod_info_new_players_1=For New Players
softmod_info_new_players_2=Try asking the captain what you can help with, or just mine resources and bring them to the ship.
softmod_info_tips_1=Features of the game that are hard to work out alone
softmod_info_tips_2=• Resources granted to the ship appear in the captain's cabin.\n• After the first island, the ship makes ore over time.\n• Charging a silo launches a rocket. This makes gold and coin, but also pollution and evo.\n• Charging a silo drains power from everything else on its network.\n• Once a silo has launched a rocket, biters will ignore it.\n• If X marks the spot, use inserters to dig.\n• You can steer the boat from the crow's nest by placing 100 rail signals in one of the blue boxes.\n• Labs producitivity increases with each league.\n• To launch a second parallel run, you need a fifth of the server's pirates to endorse it.\n• Time increase in evolution, and the strength of attacks, are both proportional to the number of remaining nests. However, destroying a nest will immediately jump evolution by roughly the amount it 'would have' made had it survived. \n• At Abandoned Labs, biters don't care if you emit pollution. They only care how long you stay.
softmod_info_tips_2=• Resources granted to the ship appear in the captain's cabin.\n• After the first island, the ship makes ore over time. It also passively pollutes, especially when staying on one island for a long time.\n• Charging a silo launches a rocket. This makes gold and coin, but also pollution and evo.\n• Charging a silo drains power from everything else on its network.\n• Once a silo has launched a rocket, biters will ignore it.\n• If X marks the spot, use inserters to dig.\n• You can steer the boat from the crow's nest by placing 100 rail signals in one of the blue boxes.\n• Labs producitivity increases with each league.\n• To launch a second parallel run, you need a fifth of the server's pirates to endorse it.\n• Time increase in evolution, and the strength of attacks, are both proportional to the number of remaining nests. However, destroying a nest will immediately jump evolution by roughly the amount it 'would have' made had it survived. \n• At Abandoned Labs, biters don't care if you emit pollution. They only care how long you stay.
softmod_info_updates_1=Development
softmod_info_updates_2=After more than a year on and off development, Pirate Ship is released. Not everything made it into 1.0. We don't have a 'city' in the lobby with a practice boat, nor 'biter forts' on the top lane, 'maze wurld', localisation to other languages, nor pvp. But for now, it is time to enjoy and tweak 1.0.

View File

@ -29,6 +29,10 @@ function Public.scripted_biters_pollution_cost_multiplier()
return 1.33
end
function Public.cost_to_leave_multiplier()
return Common.difficulty()
end
Public.rocket_launch_coin_reward = 5000
function Public.onthefly_scaling_with_players_rule()
@ -61,7 +65,7 @@ end
function Public.silo_total_pollution()
return (
280 * (Common.difficulty()^(1.5)) * Public.onthefly_scaling_with_players_rule()^(4/5) * (1 + 1 * (Common.overworldx()/40)^(1.75))
260 * (Common.difficulty()^(1.2)) * Public.onthefly_scaling_with_players_rule()^(4/5) * (1 + 1 * (Common.overworldx()/40)^(1.6))
)
end
@ -88,15 +92,15 @@ end
function Public.boat_passive_pollution_per_minute(time)
local boost = 1
local T = Public.max_time_on_island_formula()
if time and time >= 19/20 * T then
if time and time >= 90/100 * T then
boost = 15
elseif time and time >= 9/10 * T then
elseif time and time >= 85/100 * T then
boost = 8
elseif time and time >= 8/10 * T then
elseif time and time >= 75/100 * T then
boost = 5
elseif time and time >= 6/10 * T then
elseif time and time >= 55/100 * T then
boost = 3
elseif time and time >= 4/10 * T then
elseif time and time >= 40/100 * T then
boost = 2
end
@ -107,7 +111,7 @@ end
function Public.base_evolution()
local evo = (0.03 + 0.02 * (Common.overworldx()/40)) * Math.sloped(Common.difficulty(), 1/5)
local evo = (0.019 * (Common.overworldx()/40)) * Math.sloped(Common.difficulty(), 1/5)
if Common.overworldx()/40 == 0 then evo = 0 end
return evo
end
@ -162,11 +166,12 @@ function Public.evolution_per_full_silo_charge()
return 0.09
end
function Public.bonus_enemy_unit_damage_to_humans()
local ret = 0.5
function Public.bonus_damage_to_humans()
local ret = 0.35
local diff = Common.difficulty()
if diff <= 0.5 then ret = 0.25 end
if diff > 1.5 then ret = 0.75 end
if diff >= 1.5 then ret = 0.5 end
if diff >= 3 then ret = 0.65 end
return ret
end
@ -213,7 +218,7 @@ function Public.island_richness_avg_multiplier()
end
function Public.resource_quest_multiplier()
return (1.0 + 0.1 * (Common.overworldx()/40)^(4/3)) * Math.sloped(Common.difficulty(), 1/2) * (Public.onthefly_scaling_with_players_rule())^(1/3)
return (1.0 + 0.1 * (Common.overworldx()/40)^(1)) * Math.sloped(Common.difficulty(), 1/2) * (Public.onthefly_scaling_with_players_rule())^(1/3)
end

View File

@ -47,10 +47,10 @@ function Public.ore_abstract_to_real(amount)
end
function Public.oil_real_to_abstract(amount)
return amount/(8000)
return amount/(9000)
end
function Public.oil_abstract_to_real(amount)
return Math.ceil(amount*8000)
return Math.ceil(amount*9000)
end
function Public.difficulty() return Memory.get_crew_memory().difficulty end

View File

@ -5,8 +5,8 @@ local inspect = require 'utils.inspect'.inspect
local Public = {}
Public.scenario_id_name = 'pirates'
Public.version_string = '1.0.1.6.1'
Public.version_float = 1.0161
Public.version_string = '1.0.1.7'
Public.version_float = 1.017
Public.victory_x = 1000

View File

@ -784,7 +784,7 @@ function Public.reset_crew_and_enemy_force(id)
crew_force.technologies['refined-flammables-7'].enabled = false
crew_force.technologies['stronger-explosives-7'].enabled = false
crew_force.technologies['logistics-3'].enabled = false
crew_force.technologies['coal-liquefaction'].enabled = false
crew_force.technologies['coal-liquefaction'].enabled = true
crew_force.technologies['nuclear-fuel-reprocessing'].enabled = false
crew_force.technologies['railway'].enabled = false

View File

@ -199,7 +199,7 @@ function Public.update(player)
elseif flow2.selected_tab_index == 2 then
flow2.style.height = 320
elseif flow2.selected_tab_index == 3 then
flow2.style.height = 620
flow2.style.height = 650
elseif flow2.selected_tab_index == 4 then
flow2.style.height = 280
end

View File

@ -210,10 +210,10 @@ local function extra_player_damage(event)
if not event.cause.valid then return end
if not event.cause.name then return end
if not (event.cause.name == 'small-biter') or (event.cause.name == 'small-spitter') or (event.cause.name == 'medium-biter') or (event.cause.name == 'medium-spitter') or (event.cause.name == 'big-biter') or (event.cause.name == 'big-spitter') or (event.cause.name == 'behemoth-biter') or (event.cause.name == 'behemoth-spitter') then return end
-- if not (event.cause.name == 'small-biter') or (event.cause.name == 'small-spitter') or (event.cause.name == 'medium-biter') or (event.cause.name == 'medium-spitter') or (event.cause.name == 'big-biter') or (event.cause.name == 'big-spitter') or (event.cause.name == 'behemoth-biter') or (event.cause.name == 'behemoth-spitter') then return end
-- if string.sub(event.cause.force.name, 1, 5) ~= 'enemy' then return end --Enemy Forces
if string.sub(event.cause.force.name, 1, 5) ~= 'enemy' then return end --Enemy Forces
event.entity.health = event.entity.health - event.final_damage_amount * Balance.bonus_enemy_unit_damage_to_humans()
event.entity.health = event.entity.health - event.final_damage_amount * Balance.bonus_damage_to_humans()
local player_index = event.entity.player.index
if memory.classes_table and memory.classes_table[player_index] then
@ -248,7 +248,7 @@ local function samurai_damage_changes(event)
if memory.classes_table and memory.classes_table[player_index] and memory.classes_table[player_index] == Classes.enum.SAMURAI then
if event.damage_type.name == 'physical' and (not character.get_inventory(defines.inventory.character_guns)[character.selected_gun_index].valid_for_read) then
event.entity.health = event.entity.health - 10
event.entity.health = event.entity.health - 15
else
event.entity.health = event.entity.health + 0.8 * event.final_damage_amount
end
@ -438,8 +438,8 @@ local function event_on_player_mined_entity(event)
local give = {}
if memory.overworldx > 0 then
if Math.random(22) == 1 then
give[#give + 1] = {name = 'coin', count = 10}
if Math.random(6) == 1 then
give[#give + 1] = {name = 'coin', count = 4}
end
end
@ -466,9 +466,10 @@ local function event_on_player_mined_entity(event)
local give = {}
if memory.overworldx > 0 then
if Math.random(7) == 1 then
-- if Math.random(2) == 1 then
-- give[#give + 1] = {name = 'coin', count = 1}
-- end
give[#give + 1] = {name = 'coin', count = 1}
end
end
give[#give + 1] = {name = entity.name, count = 2}
@ -492,7 +493,7 @@ local function event_on_player_mined_entity(event)
if entity.name == 'rock-huge' then
c2[#c2 + 1] = {name = 'coin', count = 30, color = CoreData.colors.coin}
else
c2[#c2 + 1] = {name = 'coin', count = 15, color = CoreData.colors.coin}
c2[#c2 + 1] = {name = 'coin', count = 20, color = CoreData.colors.coin}
end
end
@ -504,8 +505,9 @@ local function event_on_player_mined_entity(event)
color = CoreData.colors.stone
end
local amount = Math.max(Math.min(available,Math.ceil(v * available/starting)),1) --minimum 1
available = available - amount/2 --a hack
local amount = Math.max(Math.min(available,Math.ceil(v * available/starting)),1)
--override, decided to remove this effect:
amount = v
c2[#c2 + 1] = {name = k, count = amount, color = color}
end
@ -548,7 +550,7 @@ local function base_kill_rewards(event)
coin_amount = 50
elseif entity.name == 'medium-worm-turret' then
iron_amount = 20
coin_amount = 100
coin_amount = 90
elseif entity.name == 'biter-spawner' or entity.name == 'spitter-spawner'
then
iron_amount = 25
@ -556,11 +558,11 @@ local function base_kill_rewards(event)
elseif entity.name == 'big-worm-turret'
then
iron_amount = 30
coin_amount = 200
coin_amount = 160
elseif entity.name == 'behemoth-worm-turret'
then
iron_amount = 50
coin_amount = 400
coin_amount = 350
end
end
@ -736,7 +738,7 @@ local function event_on_research_finished(event)
-- p_force.recipes['express-underground-belt'].enabled = false
p_force.recipes['pistol'].enabled = false
p_force.recipes['centrifuge'].enabled = false
p_force.recipes['flamethrower-turret'].enabled = false
p_force.recipes['flamethrower-turret'].enabled = true
p_force.recipes['locomotive'].enabled = false
p_force.recipes['car'].enabled = false
p_force.recipes['cargo-wagon'].enabled = false
@ -939,7 +941,7 @@ function Public.add_player_to_permission_group(player, group)
plebs_group.set_allows_action(defines.input_action.add_permission_group, false)
plebs_group.set_allows_action(defines.input_action.admin_action, false)
-- plebs_group.set_allows_action(defines.input_action.grab_blueprint_record, false)
plebs_group.set_allows_action(defines.input_action.grab_blueprint_record, false)
-- plebs_group.set_allows_action(defines.input_action.import_blueprint_string, false)
-- plebs_group.set_allows_action(defines.input_action.import_blueprint, false)
end
@ -969,7 +971,7 @@ function Public.add_player_to_permission_group(player, group)
not_trusted.set_allows_action(defines.input_action.set_trains_limit, false)
not_trusted.set_allows_action(defines.input_action.set_train_stopped, false)
-- not_trusted.set_allows_action(defines.input_action.grab_blueprint_record, false)
not_trusted.set_allows_action(defines.input_action.grab_blueprint_record, false)
-- not_trusted.set_allows_action(defines.input_action.import_blueprint_string, false)
-- not_trusted.set_allows_action(defines.input_action.import_blueprint, false)
end

View File

@ -16,15 +16,17 @@ function Public.buried_treasure_loot()
if rng <= 100 then
ret = {name = 'steel-plate', count = 150}
elseif rng <= 150 then
ret = {name = 'defender-capsule', count = 20}
elseif rng <= 170 then
ret = {name = 'flying-robot-frame', count = 30}
elseif rng <= 200 then
elseif rng <= 230 then
ret = {name = 'construction-robot', count = 15}
elseif rng <= 330 then
ret = {name = 'electronic-circuit', count = 150}
ret = {name = 'electronic-circuit', count = 200}
elseif rng <= 400 then
ret = {name = 'advanced-circuit', count = 40}
ret = {name = 'advanced-circuit', count = 38}
elseif rng <= 530 then
ret = {name = 'crude-oil-barrel', count = 10}
ret = {name = 'crude-oil-barrel', count = 15}
elseif rng <= 600 then
ret = {name = 'effectivity-module-3', count = 3}
elseif rng <= 730 then

View File

@ -207,7 +207,7 @@ local function crew_tick()
end
end
if memory.captain_accrued_time_data and memory.playerindex_captain then
if memory.captain_accrued_time_data and memory.playerindex_captain and memory.overworldx and memory.overworldx > 0 then --don't count time on first island
local player = game.players[memory.playerindex_captain]
if player and player.name then
if (not memory.captain_accrued_time_data[player.name]) then memory.captain_accrued_time_data[player.name] = 0 end

View File

@ -85,7 +85,7 @@ end
function Public.draw_noisy_ore_patch(surface, position, name, budget, radius_squared, density, forced, flat)
flat = flat or true
flat = flat or false
budget = budget or 999999999
forced = forced or false
local amountplaced = 0

View File

@ -98,9 +98,10 @@ function Public.generate_overworld_destination(p)
elseif macrop.x == 15 or macrop.x == 23 or (macrop.x > 25 and macrop.x % 10 == 0) then
type = Surfaces.enum.ISLAND
subtype = Surfaces.Island.enum.RADIOACTIVE
elseif macrop.x == 20 then --electric engines needed here
--electric engines needed at 20
elseif macrop.x == 22 then
type = Surfaces.enum.ISLAND
subtype = Surfaces.Island.enum.WALKWAYS
subtype = Surfaces.Island.enum.WALKWAYS --moved from 20 to 22, let's not force a no-fight island right after the merchant dock
elseif macrop.x == 24 then
type = Surfaces.enum.ISLAND
subtype = Surfaces.Island.enum.SWAMP
@ -125,33 +126,31 @@ function Public.generate_overworld_destination(p)
if type == Surfaces.enum.ISLAND then
local scope = Surfaces[Surfaces.enum.ISLAND][subtype]
--@FIXME: Common.activecrewcount() shouldn't be used here, it should be sensitive to the playercount when you arrive on the island
local playercount = Common.activecrewcount()
local static_params = Utils.deepcopy(scope.Data.static_params_default)
local cost_to_leave, scheduled_raft_raids, class_for_sale
local normal_costitems = {'small-lamp', 'engine-unit', 'advanced-circuit', 'electric-engine-unit'}
local base_cost_0 = {
['small-lamp'] = (macrop.x-3)*25,
['small-lamp'] = (macrop.x)*20,
}
local base_cost_1 = {
['small-lamp'] = (macrop.x-3)*25,
['small-lamp'] = (macrop.x)*20,
['engine-unit'] = (macrop.x-7)*15,
}
local base_cost_2 = {
['small-lamp'] = (macrop.x-3)*25,
['small-lamp'] = (macrop.x)*20,
['engine-unit'] = (macrop.x-7)*15,
['advanced-circuit'] = (macrop.x-10)*10,
}
local base_cost_3 = {
['small-lamp'] = (macrop.x-3)*25,
['small-lamp'] = (macrop.x)*20,
['engine-unit'] = (macrop.x-7)*15,
['advanced-circuit'] = (macrop.x-10)*10,
['electric-engine-unit'] = (macrop.x-16)*10,
}
local base_cost_4 = {
['small-lamp'] = (macrop.x-3)*25,
['small-lamp'] = (macrop.x)*20,
['engine-unit'] = (macrop.x-7)*15,
['advanced-circuit'] = (macrop.x-10)*10,
['electric-engine-unit'] = (macrop.x-16)*10,
@ -164,7 +163,7 @@ function Public.generate_overworld_destination(p)
cost_to_leave = base_cost_1
elseif macrop.x == 18 then --a super small amount of electric-engine-unit on a relatively early level so that they see they need lubricant
cost_to_leave = {
['small-lamp'] = (macrop.x-3)*25,
['small-lamp'] = (macrop.x)*20,
['engine-unit'] = (macrop.x-7)*15,
['electric-engine-unit'] = 2,
}
@ -185,40 +184,12 @@ function Public.generate_overworld_destination(p)
end
static_params.cost_to_leave = cost_to_leave
-- Multiplication by Balance.cost_to_leave_multiplier() happens later.
class_for_sale = Classes.Class_List[Math.random(#Classes.Class_List)]
static_params.class_for_sale = class_for_sale
local max_evo = 0.85
if Common.difficulty() < 1 then max_evo = 0.68 end
if p.x > 200 then
scheduled_raft_raids = {}
local times = {600, 360, 215, 210, 120, 30, 10, 5}
for i = 1, #times do
local t = times[i]
if Math.random(7) == 1 and #scheduled_raft_raids < 6 then
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.52}
end
end
elseif p.x == 200 then
local times
if playercount <= 2 then
times = {1, 5, 10, 15}
elseif playercount <= 7 then
times = {1, 5, 10, 15, 20}
elseif playercount <= 15 then
times = {1, 5, 10, 15, 20, 25}
else
times = {1, 5, 10, 15, 20, 25, 30, 35}
end
scheduled_raft_raids = {}
for _, t in pairs(times) do
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.62}
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
end
end
static_params.scheduled_raft_raids = scheduled_raft_raids
--scheduled raft raids moved to destination_on_arrival
local ores_multiplier = Balance.island_richness_avg_multiplier()
if macrop.x == 0 then ores_multiplier = 1 end
@ -459,34 +430,19 @@ function Public.check_for_destination_collisions()
if (relativex == 4 and relativey + destination_data.iconized_map_height/2 >= -3.5 and relativey - destination_data.iconized_map_height/2 <= 3.5) then
--or (relativey - destination_data.iconized_map.height/2 == 5 and (relativex >= -3.5 or relativex <= 4.5)) or (relativey + destination_data.iconized_map.height/2 == -4 and (relativex >= -3.5 or relativex <= 4.5))
Surfaces.clean_up(Common.current_destination())
Surfaces.create_surface(destination_data)
local index = destination_data.destination_index
if destination_data.type == Surfaces.enum.ISLAND then
Crowsnest.paint_around_destination(index, CoreData.overworld_loading_tile)
end
if memory.overworldx == 600 then
Parrot.parrot_radioactive_tip_1()
elseif memory.overworldx == 800 then
Parrot.parrot_800_tip()
end
Surfaces.clean_up(Common.current_destination())
memory.loadingticks = 0
memory.mapbeingloadeddestination_index = index
memory.currentdestination_index = index
memory.boat.state = Boats.enum_state.ATSEA_LOADING_MAP
local destination = Common.current_destination()
local name = destination.static_params.name and destination.static_params.name or 'NameNotFound'
local message = '[' .. memory.name .. '] Loading destination ' .. (memory.destinationsvisited_indices and (#memory.destinationsvisited_indices + 1) or 0) .. ', ' .. name .. '.'
Common.notify_game(message)
if memory.overworldx == 40*5 then Parrot.parrot_boats_warning() end
Surfaces.destination_on_collide(destination)
return true
end

View File

@ -559,6 +559,7 @@ return {
["orange-yellow"] = {r = 0.96, g = 0.74, b = 0.12},
["orchid"] = {r = 0.85, g = 0.44, b = 0.84},
["orchid pink"] = {r = 0.95, g = 0.74, b = 0.8},
["space"] = {r = 0.18, g = 0.22, b = 0.23},
["outer space"] = {r = 0.18, g = 0.22, b = 0.23},
["outrageous orange"] = {r = 1., g = 0.43, b = 0.29},
["oxblood"] = {r = 0.29, g = 0., b = 0.},

View File

@ -395,8 +395,8 @@ function Public.try_retreat_from_island() -- Assumes the cost can be paid
local captain_index = memory.playerindex_captain
local captain = game.players[captain_index]
if captain and Common.validate_player(captain) and destination.dynamic_data.timeratlandingtime and destination.dynamic_data.timer < destination.dynamic_data.timeratlandingtime + 30 then
Common.notify_player(captain, 'Can\'t depart in the first 30 seconds.')
if captain and Common.validate_player(captain) and destination.dynamic_data.timeratlandingtime and destination.dynamic_data.timer < destination.dynamic_data.timeratlandingtime + 10 then
Common.notify_player(captain, 'Can\'t depart in the first 10 seconds.')
else
local cost = destination.static_params.cost_to_leave
-- if cost and (not destination.dynamic_data.rocketlaunched) then

View File

@ -157,9 +157,9 @@ Public.deck_whitebelts_lrtp_order = {
{x = -52.5, y = 11.5, direction = defines.direction.south, type = 'output'},
{x = -51.5, y = 11.5, direction = defines.direction.south, type = 'output'},
{x = -50.5, y = 11.5, direction = defines.direction.south, type = 'output'},
{x = -17.5, y = 11.5, direction = defines.direction.north, type = 'output'},
{x = -16.5, y = 11.5, direction = defines.direction.north, type = 'output'},
{x = -15.5, y = 11.5, direction = defines.direction.north, type = 'output'},
{x = -17.5, y = 11.5, direction = defines.direction.south, type = 'output'},
{x = -16.5, y = 11.5, direction = defines.direction.south, type = 'output'},
{x = -15.5, y = 11.5, direction = defines.direction.south, type = 'output'},
}
Public.crewname_rendering_position = {x = -67, y = -18.5}

View File

@ -157,7 +157,7 @@ function Public.close_position_1(args, points_to_avoid)
if (not Utils.contains(CoreData.tiles_that_conflict_with_resource_layer, tile.name)) and (not Utils.contains(CoreData.edgemost_tile_names, tile.name)) then
local p3 = {x = p2.x + args.static_params.terraingen_coordinates_offset.x, y = p2.y + args.static_params.terraingen_coordinates_offset.y}
if IslandsCommon.island_farness_1(args)(p3) > 0.06 and IslandsCommon.island_farness_1(args)(p3) < 0.16 then
if IslandsCommon.island_farness_1(args)(p3) > 0.06 and IslandsCommon.island_farness_1(args)(p3) < 0.19 then
local allowed = true
for _, pa in pairs(points_to_avoid) do
if Math.distance({x = pa.x, y = pa.y}, p2) < pa.r then

View File

@ -273,7 +273,7 @@ local function radioactive_tick()
destination.dynamic_data.evolution_accrued_time = destination.dynamic_data.evolution_accrued_time + extra_evo
-- faster pollute:
-- local pollution = 1000 * Common.difficulty() * tickinterval / 60
local pollution = 10 * (6 * Common.difficulty() * (Common.overworldx()/40)^(16/10) * (Balance.onthefly_scaling_with_players_rule())^(1/2)) / 3600 * tickinterval * (1 + 0.0004 * (destination.dynamic_data.timer or 0))
local pollution = 4 * (6 * Common.difficulty() * (Common.overworldx()/40)^(16/10) * (Balance.onthefly_scaling_with_players_rule())^(1/2)) / 3600 * tickinterval * (1 + 0.001 * (destination.dynamic_data.timer or 0))
if not memory.floating_pollution then memory.floating_pollution = 0 end
memory.floating_pollution = memory.floating_pollution + pollution

View File

@ -24,9 +24,9 @@ Public.static_params_default = {
function Public.base_ores() --here, just for the gui:
return {
['copper-ore'] = 5,
['iron-ore'] = 5,
['stone'] = 7,
['copper-ore'] = 7,
['iron-ore'] = 7,
['stone'] = 9,
}
end

View File

@ -24,7 +24,7 @@ function Public.base_ores()
['copper-ore'] = 2.4,
['iron-ore'] = 5.6,
['coal'] = 2.1,
['stone'] = 0.6,
['stone'] = 0.9,
}
end

View File

@ -24,7 +24,7 @@ function Public.base_ores()
['copper-ore'] = 3.9,
['iron-ore'] = 3.9,
['coal'] = 2.1,
['stone'] = 1.7,
['stone'] = 2.2,
}
end

View File

@ -26,7 +26,7 @@ function Public.base_ores()
['iron-ore'] = 2.0,
['coal'] = 3.4,
['stone'] = 0.5,
['crude-oil'] = 0.7,
['crude-oil'] = 2.8,
}
end

View File

@ -128,6 +128,77 @@ function Public.on_surface_generation(destination)
end
function Public.destination_on_collide(destination)
local memory = Memory.get_crew_memory()
local name = destination.static_params.name and destination.static_params.name or 'NameNotFound'
local message = '[' .. memory.name .. '] Loading destination ' .. (memory.destinationsvisited_indices and (#memory.destinationsvisited_indices + 1) or 0) .. ', ' .. name .. '.'
Common.notify_game(message)
if destination.type ~= Public.enum.DOCK then
local index = destination.destination_index
Crowsnest.paint_around_destination(index, CoreData.overworld_loading_tile)
end
if destination and destination.static_params and destination.static_params.cost_to_leave then
local replace = {}
for item, count in pairs(destination.static_params.cost_to_leave) do
if item == 'uranium-235' then
replace[item] = count
else
replace[item] = Math.ceil(count * Public.cost_to_leave_multiplier())
end
end
destination.static_params.cost_to_leave = replace
end
if destination.type == Public.enum.ISLAND then
local index = destination.destination_index
Crowsnest.paint_around_destination(index, CoreData.overworld_loading_tile)
local scheduled_raft_raids
local playercount = Common.activecrewcount()
local max_evo = 0.85
if Common.difficulty() < 1 then max_evo = 0.68 end
if memory.overworldx > 200 then
scheduled_raft_raids = {}
local times = {600, 360, 215, 210, 120, 30, 10, 5}
for i = 1, #times do
local t = times[i]
if Math.random(7) == 1 and #scheduled_raft_raids < 6 then
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.52}
end
end
elseif memory.overworldx == 200 then
local times
if playercount <= 2 then
times = {1, 5, 10, 15}
elseif playercount <= 7 then
times = {1, 5, 10, 15, 20}
elseif playercount <= 15 then
times = {1, 5, 10, 15, 20, 25}
else
times = {1, 5, 10, 15, 20, 25, 30, 35}
end
scheduled_raft_raids = {}
for _, t in pairs(times) do
-- scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_bonus_evolution = 0.62}
scheduled_raft_raids[#scheduled_raft_raids + 1] = {timeinseconds = t, max_evo = max_evo}
end
end
destination.static_params.scheduled_raft_raids = scheduled_raft_raids
end
if memory.overworldx == 40*5 then Parrot.parrot_boats_warning() end
if memory.overworldx == 600 then
Parrot.parrot_radioactive_tip_1()
elseif memory.overworldx == 800 then
Parrot.parrot_800_tip()
end
end
function Public.destination_on_arrival(destination)
local memory = Memory.get_crew_memory()