1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-17 20:58:13 +02:00
This commit is contained in:
danielmartin0 2022-03-14 21:38:44 +00:00
parent 4d2e6fd7da
commit 81db6a80bc
16 changed files with 54 additions and 40 deletions

View File

@ -40,9 +40,9 @@ auto_undock_tooltip=The maximum time to stay at this location.\n\nOnce this time
atsea_loading_tooltip=The next destination is loading.
leave_anytime_tooltip=The captain chooses when to undock the ship.\n\nThey can undock by pressing this button.
resources_needed_tooltip_1=At the next destination, resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero.
resources_needed_tooltip_2=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nCost on arrival: __1__\n\nLeaving now will spend: __2__
resources_needed_tooltip_2=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nCost on arrival: __1__\nLeaving now will spend: __2__
resources_needed_tooltip_3=The captain can undock by clicking this button, but only if enough resources are stored in the captain's cabin.
resources_needed_tooltip_1_rocketvariant=At the next destination, these resources will be needed in order to undock early.\n\nFewer resources will be needed the longer you stay, eventually dropping to zero..\n\nThe silo represents a rocket launch.
resources_needed_tooltip_2_rocketvariant=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nThe silo represents a rocket launch.\n\nnCost on arrival: __1__\n\nLeaving now will spend: __2__
resources_needed_tooltip_2_rocketvariant=The captain can undock early by clicking this button, but only if enough resources have been stored in the captain's cabin.\n\nThe silo represents a rocket launch.\n\nnCost on arrival: __1__\nLeaving now will spend: __2__
resources_needed_tooltip_3_rocketvariant=The captain can undock by clicking this button, but only if enough resources are stored in the captain's cabin.\n\nThe silo represents a rocket launch.
fuel_tooltip=__1__ stored fuel.\n\nTo store more, send it to the captain's cabin. If the ship runs out of fuel, the crew loses.\n\n*Click* to open the Captain's Store, which only the captain and their officers are authorised to use.

View File

@ -31,10 +31,10 @@ local side_attack_target_names = {
'character',
'pumpjack',
'radar',
'burner-mining-drill',
'electric-mining-drill',
'assembling-machine-1',
'solar-panel',
'nuclear-reactor',
'boiler',
'oil-refinery',
'centrifuge',
}
@ -423,9 +423,9 @@ function Public.try_spawner_spend_fraction_of_available_pollution_on_biters(spaw
base_pollution_cost_multiplier = base_pollution_cost_multiplier * 0.9 --biters 10% more aggressive
end
if destination.subtype and destination.subtype == IslandsCommon.enum.MAZE then
base_pollution_cost_multiplier = base_pollution_cost_multiplier * 1.25 --biters 25% less aggressive
end
-- if destination.subtype and destination.subtype == IslandsCommon.enum.MAZE then
-- base_pollution_cost_multiplier = base_pollution_cost_multiplier * 1.2 --biters 20% less aggressive
-- end
if budget >= minimum_avg_units * Common.averageUnitPollutionCost(evolution) * base_pollution_cost_multiplier then

View File

@ -41,7 +41,7 @@ Public.loading_interval = 5
Public.minimum_ore_placed_per_tile = 10
Public.maze_minimap_jam_start_league = 920
Public.maze_minimap_jam_league = 960
Public.ban_from_rejoining_crew_ticks = 45 * 60 --to prevent observing map and rejoining

View File

@ -509,7 +509,7 @@ function Public.update_gui(player)
flow1 = pirates_flow.crew_piratebutton_frame.crew_piratebutton
if memory.id and memory.id ~= 0 then
flow1.tooltip = 'Your Crew\n\nPerform crew actions.'
flow1.tooltip = 'Your Crew\n\nPerform crew actions, such as selecting a class if any are available.'
flow1.mouse_button_filter = {'left','right'}
else
flow1.tooltip = 'Your Crew\n\nYou\'re a free agent, so there\'s nothing to do here.'
@ -1057,13 +1057,15 @@ function Public.update_gui(player)
flow1 = pirates_flow.covering_line_frame
if flow1 then
if not eta_bool and not retreating_bool and not quest_bool and not silo_bool and not atsea_loading_bool and not leave_anytime_bool and not cost_bool and not approaching_dock_bool and not leaving_dock_bool then
-- if not eta_bool and not retreating_bool and not quest_bool and not silo_bool and not atsea_loading_bool and not leave_anytime_bool and not cost_bool and not approaching_dock_bool and not leaving_dock_bool then
if not eta_bool and not retreating_bool and not quest_bool and not silo_bool and not atsea_loading_bool and not leave_anytime_bool and not cost_bool and not approaching_dock_bool and not leaving_dock_bool and not atsea_sailing_bool then
flow1.visible = true
else
flow1.visible = false
end
end
flow1 = pirates_flow.minimap_piratebutton_frame
if flow1 then

View File

@ -207,11 +207,13 @@ local function damage_to_krakens(event)
local damage = event.final_damage_amount
local adjusted_damage = damage
if event.damage_type.name and (event.damage_type.name == 'explosion' or event.damage_type.name == 'poison') then
if event.damage_type.name and event.damage_type.name == 'poison' then
-- if event.cause.name == 'artillery-turret' then
adjusted_damage = adjusted_damage / 2.5
adjusted_damage = adjusted_damage / 1.25
elseif event.damage_type.name and (event.damage_type.name == 'explosion') then
adjusted_damage = adjusted_damage / 1.5
elseif event.damage_type.name and (event.damage_type.name == 'fire') then
adjusted_damage = adjusted_damage / 1.1
adjusted_damage = adjusted_damage / 1.25
end
-- and additionally:
if event.cause.name == 'artillery-turret' then
@ -219,7 +221,7 @@ local function damage_to_krakens(event)
end
if event.damage_type.name and (event.damage_type.name == 'laser') then
adjusted_damage = adjusted_damage / 10 --laser turrets are in range
adjusted_damage = adjusted_damage / 8 --laser turrets are in range
end
local healthbar = memory.healthbars[unit_number]

View File

@ -222,14 +222,14 @@ function Public.generate_overworld_destination(p)
['electronic-circuit'] = Math.ceil(((macrop.x-2)^(2/3))*80),
-- ['engine-unit'] = Math.ceil(((macrop.x-7)^(2/3))*12),
['advanced-circuit'] = Math.ceil(((macrop.x-14)^(2/3))*12),
['flying-robot-frame'] = Math.ceil(((macrop.x-18)^(2/3))*5),
['flying-robot-frame'] = Math.ceil(((macrop.x-18)^(2/3))*10),
['launch_rocket'] = true,
}
local base_cost_4 = {
['electronic-circuit'] = Math.ceil(((macrop.x-2)^(2/3))*80),
-- ['engine-unit'] = Math.ceil(((macrop.x-7)^(2/3))*12),
['advanced-circuit'] = Math.ceil(((macrop.x-14)^(2/3))*12),
['flying-robot-frame'] = Math.ceil(((macrop.x-18)^(2/3))*5),
['flying-robot-frame'] = Math.ceil(((macrop.x-18)^(2/3))*10),
}
if macrop.x == 0 then
-- if _DEBUG then
@ -260,7 +260,7 @@ function Public.generate_overworld_destination(p)
else
base_cost_to_undock = nil
end
elseif macrop.x <= 22 then
elseif macrop.x <= 23 then
base_cost_to_undock = base_cost_2c
elseif macrop.x <= 24 then
base_cost_to_undock = base_cost_3
@ -275,7 +275,7 @@ function Public.generate_overworld_destination(p)
-- override:
if subtype == Surfaces.Island.enum.RADIOACTIVE then
base_cost_to_undock = {
['uranium-235'] = Math.ceil(Math.ceil(80 + (macrop.x))),
['uranium-235'] = Math.ceil(Math.ceil(80 + (macrop.x - 1))),
-- ['uranium-235'] = Math.ceil(Math.ceil(80 + (macrop.x)/2)), --tried adding beacons instead of this
}
end
@ -460,9 +460,9 @@ function Public.generate_overworld_destination(p)
kraken_count = 1
end
-- if _DEBUG then
-- kraken_count = 1
-- end
if _DEBUG then
kraken_count = 1
end
if position_candidates then
local positions_placed = {}

View File

@ -343,7 +343,7 @@ function Public.check_for_end_of_boat_movement(boat)
elseif boat.spawner and boat.spawner.valid and boat.spawner.destructible then
-- This code seems to make the spawner destructible a little earlier than when it hits the shore
local boat2 = Utils.deepcopy(boat)
boat2.position = {x = boat.position.x + 5, y = boat.position.y}
boat2.position = {x = boat.position.x + 6, y = boat.position.y}
if Boats.collision_infront(boat2) then
boat.spawner.destructible = false
end

View File

@ -255,7 +255,14 @@ function Public.try_resolve_quest()
local inserted = inventory.insert{name = name, count = count}
if inserted < count then
Common.notify_force(force,'There wasn\'t space in the cabin for all of your reward.')
local chest2 = boat.backup_output_chest
if chest2 and chest2.valid then
local inventory2 = chest2.get_inventory(defines.inventory.chest)
local inserted2 = inventory2.insert{name = name, count = count - inserted}
if (inserted + inserted2) < count then
Common.notify_force(force,'Sadly, there wasn\'t space in the cabin for all of your reward.')
end
end
end
end
end

View File

@ -438,6 +438,7 @@ function Public.captain_requisition(captain_index)
local str = 'The captain requisitioned '
for i = 1, #items_to_req do
local item = items_to_req[i]
local count = item_count_table[item]
if i > 1 then
if i == #items_to_req then
str = str .. ' and '
@ -448,16 +449,16 @@ function Public.captain_requisition(captain_index)
local display_name = item .. 's'
if display_name == 'coins' then display_name = 'doubloons' end
if display_name == 'uranium-235s' then display_name = 'uranium-235' end
if item_count_table[i] >= 1000 then
str = str .. Utils.bignumber_abbrevform2(item_count_table[i]) .. ' ' .. display_name
if count >= 1000 then
str = str .. Utils.bignumber_abbrevform2(count) .. ' ' .. display_name
else
str = str .. item_count_table[i] .. ' ' .. display_name
str = str .. count .. ' ' .. display_name
end
end
str = str .. '.'
Common.notify_force(memory.force, str)
else
Common.notify_player_error(captain, 'Item requisition error: Nothing to take.')
Common.notify_player_error(captain, 'No important items found in crewmates\' inventories.')
end
end
end

View File

@ -62,6 +62,7 @@ Public.market_sales = {
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'slowdown-capsule', count = 20}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'coin', count = 4000}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'roboport', count = 1}},
{price = {{'coin', 2000}}, offer = {type = 'give-item', item = 'construction-robot', count = 10}},
}

View File

@ -22,7 +22,7 @@ function Public.generate_merchant_trades(market)
if game_completion_progress <= 1 then
market.add_market_item{price = {{'coin', 8000}, {'raw-fish', 100}}, offer = {type = 'give-item', item = 'modular-armor', count = 1}}
market.add_market_item{price = {{'coin', 5000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'battery-equipment', count = 1}}
market.add_market_item{price = {{'coin', 400}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'solar-panel-equipment', count = 1}}
market.add_market_item{price = {{'coin', 2000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'solar-panel-equipment', count = 5}}
market.add_market_item{price = {{'coin', 1000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'night-vision-equipment', count = 1}}
market.add_market_item{price = {{'coin', 2000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'energy-shield-equipment', count = 1}}
market.add_market_item{price = {{'coin', 1000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'personal-roboport-equipment', count = 1}}
@ -33,7 +33,7 @@ function Public.generate_merchant_trades(market)
market.add_market_item{price = {{'coin', 2000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'energy-shield-equipment', count = 1}}
market.add_market_item{price = {{'coin', 1000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'personal-roboport-equipment', count = 1}}
market.add_market_item{price = {{'coin', 8000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'battery-mk2-equipment', count = 1}}
market.add_market_item{price = {{'coin', 400}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'solar-panel-equipment', count = 1}}
market.add_market_item{price = {{'coin', 2000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'solar-panel-equipment', count = 5}}
market.add_market_item{price = {{'coin', 6000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'fusion-reactor-equipment', count = 1}}
market.add_market_item{price = {{'coin', 1000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'night-vision-equipment', count = 1}}
market.add_market_item{price = {{'coin', 5000}, {'raw-fish', 10}}, offer = {type = 'give-item', item = 'energy-shield-mk2-equipment', count = 1}}

View File

@ -283,8 +283,9 @@ local function radioactive_tick()
-- faster pollute:
local pollution = 0
if destination.dynamic_data.timer > 15 then
pollution = 4.7 * (6 * Common.difficulty()^(1.1) * (memory.overworldx/40)^(14/10) * (Balance.crew_scale())^(0.6)) / 3600 * tickinterval * (1 + (Common.difficulty()-1)*0.2 + 0.001 * (destination.dynamic_data.timer or 0))
local timer = destination.dynamic_data.timer
if timer and timer > 15 then
pollution = 4.7 * (6 * Common.difficulty()^(1.1) * (memory.overworldx/40)^(14/10) * (Balance.crew_scale())^(0.6)) / 3600 * tickinterval * (1 + (Common.difficulty()-1)*0.2 + 0.001 * timer)
end
if pollution > 0 then

View File

@ -22,9 +22,9 @@ Public.static_params_default = {
function Public.base_ores()
return {
['copper-ore'] = 1.8,
['iron-ore'] = 3.8,
['coal'] = 5.5,
['copper-ore'] = 2.9,
['iron-ore'] = 3.6,
['coal'] = 4.8,
['stone'] = 0.5,
['crude-oil'] = 50,
}
@ -79,7 +79,7 @@ Public.noiseparams = {
type = 'simplex_2d',
normalised = true,
params = {
{wavelength = 60, amplitude = 1},
{wavelength = 48, amplitude = 1},
},
},
}

View File

@ -53,9 +53,9 @@ function Public.terrain(args)
-- elseif noises.height(p) < 0.07 then
-- args.tiles[#args.tiles + 1] = {name = 'grass-4', position = args.p}
else
if noises.terrain(p) < 0.5 then
if noises.terrain(p) < 0.44 then
args.tiles[#args.tiles + 1] = {name = 'grass-1', position = args.p}
elseif noises.terrain(p) < 0.65 then
elseif noises.terrain(p) < 0.59 then
args.tiles[#args.tiles + 1] = {name = 'grass-2', position = args.p}
else
args.tiles[#args.tiles + 1] = {name = 'water-mud', position = args.p}

View File

@ -394,7 +394,7 @@ function Public.destination_on_crewboat_hits_shore(destination)
end
Parrot.parrot_radioactive_tip_2()
elseif destination.subtype == Islands.enum.MAZE and memory.overworldx >= Common.maze_minimap_jam_start_league then
elseif destination.subtype == Islands.enum.MAZE and memory.overworldx == Common.maze_minimap_jam_league then
Parrot.parrot_maze_tip_1()
end

View File

@ -1166,7 +1166,7 @@ function Public.silo_update(tickinterval)
if memory.overworldx >= 500 and dynamic_data.rocketsiloenergyconsumed >= 0.25 * dynamic_data.rocketsiloenergyneeded and (not dynamic_data.parrot_silo_warned) then
dynamic_data.parrot_silo_warned = true
Common.parrot_speak(memory.force, 'The silo is attracting biters!')
Common.parrot_speak(memory.force, 'Just a warning... the silo is attracting biters...')
elseif dynamic_data.rocketsiloenergyconsumed >= dynamic_data.rocketsiloenergyneeded and (not (silo.rocket_parts == 100)) and (dynamic_data.silocharged == false) and (not memory.game_lost) then
-- silo.energy = 0
silo.rocket_parts = 100
@ -1239,7 +1239,7 @@ end
function Public.minimap_jam(tickinterval)
local memory = Memory.get_crew_memory()
if memory.overworldx >= Common.maze_minimap_jam_start_league and memory.boat and memory.boat.state == Boats.enum_state.LANDED then
if memory.overworldx == Common.maze_minimap_jam_league and memory.boat and memory.boat.state == Boats.enum_state.LANDED then
local destination = Common.current_destination()
if destination.type == Surfaces.enum.ISLAND and destination.subtype == Surfaces.Island.enum.MAZE then
if not destination.surface_name then return end