1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-28 23:06:38 +02:00
This commit is contained in:
danielmartin0 2022-02-26 13:55:36 +00:00
parent 512481c758
commit 1f74257cf1
21 changed files with 117 additions and 158 deletions

View File

@ -13,10 +13,10 @@ softmod_info_new_players_1=For New Players
softmod_info_new_players_2=Mine coal and other resources and bring them to the ship to keep things going, or try asking the captain for more specific tasks.
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• Charging a silo launches a rocket. This causes pollution and evo, but each launch gives a reward of fuel and coins.\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• You can steer the boat from the crow's nest by placing 100 rail signals in one of the blue boxes.\n• Lab productivity increases with each league.\n• Passive pollution ramps up over time on each island.\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.\n• To launch a second parallel run, you need a fifth of the server's pirates to endorse it.
softmod_info_tips_2=• Resources granted to the ship appear in the captain's cabin.\n• Charging a silo launches a rocket. This causes pollution and evo, but each launch gives a reward of fuel and coins.\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• You can steer the boat from the crow's nest by placing 100 rail signals in one of the blue boxes.\n• Lab productivity increases with each league.\n• Passive pollution ramps up over time on each island.\n• The strength of attacks is proportional to the number of remaining nests. (Technically the time-based rate of evolution is proportional to nests too, but 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.\n• To launch a second parallel run, you need a fifth of the server's pirates to endorse it.
softmod_info_updates_1=Development
softmod_info_updates_2=Pirate Ship 1.0.3 is currently in testing! The gameplay is reworked to center around a fuel mechanic. This should make for a clear central objective. Please play and help us tune the gameplay :)
softmod_info_updates_2=Pirate Ship 1.0.3 is currently in testing! The gameplay is reworked to center around a fuel mechanic. This should make for a clear central objective. Please play and help us tune the gameplay :)\n\nRecent significant changes: Fuel mechanic replaces gold. Weakened chest+furnace resistance to biters. Additional silos that deconstrain power input. Some new classes.
softmod_info_credits_1=Credits
softmod_info_credits_2=Softmod designed and written by thesixthroc. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Most island structure blueprints contributed by Mattisso.\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John

View File

@ -129,8 +129,8 @@ end
function Public.try_main_attack()
local wave_size_multiplier = 1
if Math.random(2) == 2 then return end --variance in attack sizes
if Math.random(9) == 1 then wave_size_multiplier = 2 return end --variance in attack sizes
if Math.random(50) == 1 then wave_size_multiplier = 3 return end --variance in attack sizes
if Math.random(10) == 1 then wave_size_multiplier = 2 end --variance in attack sizes
if Math.random(45) == 1 then wave_size_multiplier = 3.2 end --variance in attack sizes
local memory = Memory.get_crew_memory()
local surface = game.surfaces[Common.current_destination().surface_name]
@ -150,8 +150,8 @@ end
function Public.try_secondary_attack()
local wave_size_multiplier = 1
if Math.random(2) == 2 then return end --variance in attack sizes
if Math.random(9) == 1 then wave_size_multiplier = 2 return end --variance in attack sizes
if Math.random(50) == 1 then wave_size_multiplier = 3 return end --variance in attack sizes
if Math.random(10) == 1 then wave_size_multiplier = 2 end --variance in attack sizes
if Math.random(45) == 1 then wave_size_multiplier = 3.2 end --variance in attack sizes
local memory = Memory.get_crew_memory()
local surface = game.surfaces[Common.current_destination().surface_name]
@ -178,8 +178,8 @@ end
function Public.try_rogue_attack()
local wave_size_multiplier = 1
if Math.random(2) == 2 then return end --variance in attack sizes
if Math.random(9) == 1 then wave_size_multiplier = 2 return end --variance in attack sizes
if Math.random(50) == 1 then wave_size_multiplier = 3 return end --variance in attack sizes
if Math.random(10) == 1 then wave_size_multiplier = 2 end --variance in attack sizes
if Math.random(45) == 1 then wave_size_multiplier = 3.2 end --variance in attack sizes
local memory = Memory.get_crew_memory()
local surface = game.surfaces[Common.current_destination().surface_name]
@ -407,7 +407,7 @@ function Public.try_spawner_spend_fraction_of_available_pollution_on_biters(spaw
temp_floating_pollution = temp_floating_pollution - unittype_pollutioncost
budget = budget - unittype_pollutioncost
-- flow statistics should count the number of biters generated, without factors for extra expenditure:
-- flow statistics should reflect the number of biters generated, without factors for extra expenditure:
game.pollution_statistics.on_flow(name2, - CoreData.biterPollutionValues[name2] * Balance.scripted_biters_pollution_cost_multiplier())
return biter.unit_number

View File

@ -71,14 +71,14 @@ end
function Public.silo_total_pollution()
return (
260 * (Common.difficulty()^(1.2)) * Public.onthefly_scaling_with_players_rule()^(4/5) * (1.25 + 0.75 * (Common.overworldx()/40)^(1.6))
280 * (Common.difficulty()^(1.2)) * Public.onthefly_scaling_with_players_rule()^(4/5) * (1.25 + 0.75 * (Common.overworldx()/40)^(1.6))
)
end
function Public.max_time_on_island_formula()
return 60 * (
(33 + 2 * (Common.overworldx()/40)^(1/3))
(32 + 2 * (Common.overworldx()/40)^(1/3))
) / Public.onthefly_scaling_with_players_rule()^(2/3) / Math.sloped(Common.difficulty(), 1/4)
end
@ -100,13 +100,13 @@ function Public.fuel_depletion_rate_static()
local T = Public.expected_time_on_island() --always >0
return - 1200 * (Common.overworldx()/40)^(1/2) / T * Public.onthefly_scaling_with_players_rule()^(1/3) --the extra player dependency accounts for the fact that even in compressed time, more players get more resources...
return - 1750 * (Common.overworldx()/40)^(8/10) * Public.onthefly_scaling_with_players_rule()^(1/2) * Math.sloped(Common.difficulty(), 2/3) / T --the extra player dependency accounts for the fact that even in compressed time, more players get more resources...
end
function Public.fuel_depletion_rate_sailing()
if (not Common.overworldx()) then return 0 end
return - 10 * (1 + (Common.overworldx()/40)^(4/5))
return - 10 * (1 + 0.5 * (Common.overworldx()/40)^(7/10))
end
function Public.boat_passive_pollution_per_minute(time)
@ -131,7 +131,7 @@ end
function Public.base_evolution()
local evo = (0.019 * (Common.overworldx()/40)) * Math.sloped(Common.difficulty(), 1/5)
local evo = (0.0201 * (Common.overworldx()/40)) * Math.sloped(Common.difficulty(), 1/5)
if Common.overworldx()/40 == 0 then evo = 0 end
return evo
end
@ -183,24 +183,26 @@ function Public.evolution_per_biter_base_kill()
end
function Public.evolution_per_full_silo_charge()
return 0.09
return 0.08
end
function Public.bonus_damage_to_humans()
local ret = 0.25
local ret = 0.15
local diff = Common.difficulty()
if diff <= 0.5 then ret = 0.2 end
if diff >= 1.5 then ret = 0.3 end
if diff >= 3 then ret = 0.4 end
if diff <= 0.7 then ret = 0.1 end
if diff >= 1.3 then ret = 0.2 end
if diff >= 2.5 then ret = 0.3 end
return ret
end
function Public.periodic_free_resources_per_x(x)
return {
{name = 'iron-plate', count = Math.ceil(5 * (Common.overworldx()/40)^(2/3))},
{name = 'copper-plate', count = Math.ceil(1 * (Common.overworldx()/40)^(2/3))},
}
-- return {
-- {name = 'iron-plate', count = Math.ceil(5 * (Common.overworldx()/40)^(2/3))},
-- {name = 'copper-plate', count = Math.ceil(1 * (Common.overworldx()/40)^(2/3))},
-- }
end
function Public.periodic_free_resources_per_destination_5_seconds(x)
@ -235,7 +237,7 @@ function Public.quest_reward_multiplier()
end
function Public.island_richness_avg_multiplier()
return (1.0 + 0.08 * Common.overworldx()/40)
return (0.8 + 0.07 * Common.overworldx()/40)
end
function Public.resource_quest_multiplier()

View File

@ -67,6 +67,7 @@ function(cmd)
else
local color = PlayerColors.names[Math.random(#PlayerColors.names)]
local rgb = PlayerColors.colors[color]
if not rgb then return end
player.color = rgb
player.chat_color = rgb
game.print(player.name .. '\'s color was randomized to ' .. color .. ' (via /ccolor).', rgb)

View File

@ -850,6 +850,8 @@ end
function Public.init_game_settings(technology_price_multiplier)
--== Tuned for Pirate Ship ==--
global.friendly_fire_history = {}
global.landfill_history = {}
@ -861,7 +863,6 @@ function Public.init_game_settings(technology_price_multiplier)
game.map_settings.enemy_evolution.time_factor = 0
game.map_settings.enemy_evolution.destroy_factor = 0
game.map_settings.max_expansion_distance = 4
game.map_settings.unit_group.min_group_gathering_time = 60 * 5
game.map_settings.unit_group.max_group_gathering_time = 60 * 210
game.map_settings.unit_group.max_wait_time_for_late_members = 60 * 15
@ -871,7 +872,7 @@ function Public.init_game_settings(technology_price_multiplier)
-- (0,2) for a symmetric search:
game.map_settings.path_finder.goal_pressure_ratio = -0.1 --small pressure for stupid paths
game.map_settings.path_finder.fwd2bwd_ratio = 2
game.map_settings.path_finder.fwd2bwd_ratio = 2 -- on experiments I found that only this value was symmetric...
game.map_settings.max_failed_behavior_count = 2
game.map_settings.path_finder.max_work_done_per_tick = 20000
game.map_settings.path_finder.short_cache_min_algo_steps_to_cache = 100
@ -879,11 +880,14 @@ function Public.init_game_settings(technology_price_multiplier)
game.map_settings.enemy_expansion.enabled = true
-- game.map_settings.enemy_expansion.max_expansion_cooldown = 3600
-- game.map_settings.enemy_expansion.min_expansion_cooldown = 3600
-- game.map_settings.enemy_expansion.settler_group_max_size = 8
-- game.map_settings.enemy_expansion.settler_group_min_size = 16
-- game.map_settings.enemy_expansion.max_expansion_distance = 9
-- faster expansion:
game.map_settings.enemy_expansion.min_expansion_cooldown = 1.2 * 3600
game.map_settings.enemy_expansion.max_expansion_cooldown = 20 * 3600
game.map_settings.enemy_expansion.settler_group_max_size = 24
game.map_settings.enemy_expansion.settler_group_min_size = 6
-- maybe should be 3.5 if possible:
game.map_settings.enemy_expansion.max_expansion_distance = 4
-- could turn off default AI attacks:
game.map_settings.pollution.enemy_attack_pollution_consumption_modifier = 1
--

View File

@ -5,8 +5,8 @@ local inspect = require 'utils.inspect'.inspect
local Public = {}
Public.scenario_id_name = 'pirates'
Public.version_string = '1.0.3.2'
Public.version_float = 1.032
Public.version_string = '1.0.3.5'
Public.version_float = 1.035
Public.victory_x = 1000
@ -96,9 +96,9 @@ Public.capacity_options = {
-- {value = 64, icon = 'item/storage-tank', text = '64'},
}
Public.difficulty_options = {
{value = 0.5, icon = 'item/firearm-magazine', text = 'Easy', associated_color = {50, 255, 50}},
{value = 0.6, icon = 'item/firearm-magazine', text = 'Easy', associated_color = {50, 255, 50}},
{value = 1, icon = 'item/piercing-rounds-magazine', text = 'Normal', associated_color = {255, 255, 50}},
{value = 1.5, icon = 'item/uranium-rounds-magazine', text = 'Hard', associated_color = {255, 50, 50}},
{value = 1.4, icon = 'item/uranium-rounds-magazine', text = 'Hard', associated_color = {255, 50, 50}},
{value = 3, icon = 'item/atomic-bomb', text = 'Nightmare', associated_color = {50, 10, 10}},
}
-- Public.mode_options = {

View File

@ -100,8 +100,8 @@ function Public.try_lose(reason)
local playtimetext = Utils.time_longform((memory.age or 0)/60)
Server.to_discord_embed_raw(CoreData.comfy_emojis.trashbin .. '[' .. memory.name .. '] Game over — ' .. reason ..'. Playtime: ' .. playtimetext .. '.')
Common.notify_game('[' .. memory.name .. '] Game over — ' .. reason ..'. Playtime: [font=default-large-semibold]' .. playtimetext .. '[/font].', CoreData.colors.notify_gameover)
Server.to_discord_embed_raw(CoreData.comfy_emojis.trashbin .. '[' .. memory.name .. '] Game over — ' .. reason ..'. Playtime: ' .. playtimetext .. ' since 1st island.')
Common.notify_game('[' .. memory.name .. '] Game over — ' .. reason ..'. Playtime: [font=default-large-semibold]' .. playtimetext .. ' since 1st island[/font].', CoreData.colors.notify_gameover)
local force = game.forces[memory.force_name]
if not (force and force.valid) then return end
@ -705,6 +705,10 @@ function Public.reset_crew_and_enemy_force(id)
crew_force.technologies['inserter-capacity-bonus-1'].researched = true
crew_force.technologies['inserter-capacity-bonus-2'].researched = true
--@TRYING this out:
crew_force.technologies['coal-liquefaction'].enabled = true
crew_force.technologies['coal-liquefaction'].researched = true
crew_force.technologies['automobilism'].enabled = false
-- note: some of these are overwritten after tech researched!!!!!!! like pistol
@ -772,7 +776,7 @@ function Public.reset_crew_and_enemy_force(id)
crew_force.technologies['concrete'].enabled = false
crew_force.technologies['nuclear-power'].enabled = false
crew_force.technologies['effect-transmission'].enabled = false
crew_force.technologies['effect-transmission'].enabled = true
crew_force.technologies['gate'].enabled = false
@ -784,7 +788,7 @@ function Public.reset_crew_and_enemy_force(id)
crew_force.technologies['effectivity-module'].enabled = false
crew_force.technologies['effectivity-module-2'].enabled = false
crew_force.technologies['effectivity-module-3'].enabled = false
crew_force.technologies['automation-3'].enabled = false
crew_force.technologies['automation-3'].enabled = true
crew_force.technologies['rocket-control-unit'].enabled = false
crew_force.technologies['rocket-silo'].enabled = false
crew_force.technologies['space-science-pack'].enabled = false
@ -794,8 +798,7 @@ function Public.reset_crew_and_enemy_force(id)
crew_force.technologies['physical-projectile-damage-7'].enabled = false
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 = true
crew_force.technologies['logistics-3'].enabled = true
crew_force.technologies['nuclear-fuel-reprocessing'].enabled = false
crew_force.technologies['railway'].enabled = false

View File

@ -418,7 +418,7 @@ function Public.update(player)
end
if flow.captain.body.capn_undock_normal.visible then
flow.captain.body.capn_undock_normal.enabled = (memory.boat.state == Boats.enum_state.LANDED) and Common.query_sufficient_resources_to_leave()
flow.captain.body.capn_undock_normal.enabled = ((memory.boat.state == Boats.enum_state.LANDED) and Common.query_sufficient_resources_to_leave()) or (memory.boat.state == Boats.enum_state.DOCKED)
end
end

View File

@ -594,7 +594,7 @@ function Public.update_gui(player)
if flow1.visible then
if (not memory.undock_shortcut_are_you_sure_data) then memory.undock_shortcut_are_you_sure_data = {} end
if memory.undock_shortcut_are_you_sure_data[player.index] and memory.undock_shortcut_are_you_sure_data[player.index] > game.tick - 60 * 4 then
if memory.undock_shortcut_are_you_sure_data[player.index] and memory.undock_shortcut_are_you_sure_data[player.index] > game.tick - 60 * 4.5 then
flow1.caption = 'Are you sure?'
else
flow1.caption = 'Undock'

View File

@ -442,7 +442,7 @@ local function event_on_player_mined_entity(event)
local give = {}
if memory.overworldx >= 0 then
if Math.random(6) == 1 then
if Math.random(8) == 1 then
give[#give + 1] = {name = 'coin', count = 5}
end
end
@ -459,7 +459,7 @@ local function event_on_player_mined_entity(event)
elseif entity.type == 'fish' then
if not event.buffer then return end
local amount = 3
local amount = 4
Common.give(player, {{name = 'raw-fish', count = amount}}, entity.position)
event.buffer.clear()
@ -469,30 +469,20 @@ local function event_on_player_mined_entity(event)
local give = {}
if memory.classes_table and memory.classes_table[event.player_index] then
local class = memory.classes_table[event.player_index]
if class == Classes.enum.PROSPECTOR then
if memory.overworldx > 0 then
give[#give + 1] = {name = 'coin', count = 5}
end
if memory.overworldx > 0 then
if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.PROSPECTOR then
give[#give + 1] = {name = 'coin', count = 5}
give[#give + 1] = {name = entity.name, count = 5}
else
if memory.overworldx > 0 then
give[#give + 1] = {name = 'coin', count = 1}
give[#give + 1] = {name = 'coin', count = 1}
end
give[#give + 1] = {name = entity.name, count = 2}
end
else
give[#give + 1] = {name = entity.name, count = 2}
end
if memory.overworldx > 0 then
-- if Math.random(2) == 1 then
-- give[#give + 1] = {name = 'coin', count = 1}
-- end
give[#give + 1] = {name = 'coin', count = 1}
end
give[#give + 1] = {name = entity.name, count = 2}
Common.give(player, give, entity.position)
event.buffer.clear()
@ -813,6 +803,11 @@ local function event_on_player_joined_game(event)
Crew.join_crew(player, ages[1].id)
end
--check if they are the only crew member, and make them the captain if so:
if #Common.crew_get_crew_members() == 1 then
Public.assign_captain_based_on_priorities()
end
if not _DEBUG then
Gui.info.toggle_window(player)
end

View File

@ -345,7 +345,7 @@ function Public.chest_loot(number_of_items, game_completion_progress)
elseif platesrng <= 4 then
ret[#ret + 1] = {name = 'copper-plate', count = 120}
else
ret[#ret + 1] = {name = 'steel-plate', count = 40}
ret[#ret + 1] = {name = 'steel-plate', count = 20}
end
return ret

View File

@ -102,6 +102,8 @@ function Public.generate_overworld_destination(p)
type = Surfaces.enum.ISLAND
subtype = Surfaces.Island.enum.RADIOACTIVE
--electric engines needed at 20
elseif macrop.x == 21 then
type = nil
elseif macrop.x == 22 then
type = Surfaces.enum.ISLAND
subtype = Surfaces.Island.enum.WALKWAYS --moved from 20 to 22, let's not force a no-fight island right after the merchant dock
@ -136,7 +138,7 @@ function Public.generate_overworld_destination(p)
-- temporarily placed this back here, as moving it to shorehit broke things:
local playercount = Common.activecrewcount()
local max_evo = 0.85
if Common.difficulty() < 1 then max_evo = 0.68 end
if Common.difficulty() < 1 then max_evo = 0.72 end
if macrop.x > 4 then
scheduled_raft_raids = {}
local times = {600, 360, 215, 210, 120, 30, 10, 5}

File diff suppressed because one or more lines are too long

View File

@ -37,8 +37,10 @@ function Public.fuel_depletion_rate()
local memory = Memory.get_crew_memory()
local state = memory.boat.state
if state == Boats.enum_state.ATSEA_SAILING or state == Boats.enum_state.RETREATING or state == Boats.enum_state.APPROACHING or state == Boats.enum_state.LEAVING_DOCK then
if state == Boats.enum_state.ATSEA_SAILING or state == Boats.enum_state.APPROACHING or state == Boats.enum_state.LEAVING_DOCK then
return Balance.fuel_depletion_rate_sailing()
elseif state == Boats.enum_state.RETREATING then
return Balance.fuel_depletion_rate_sailing() / 10
elseif state == Boats.enum_state.LANDED then
return Balance.fuel_depletion_rate_static()
else
@ -458,7 +460,7 @@ function Public.retreat_from_island()
if boat.state and boat.state == Boats.enum_state.RETREATING then return end
boat.state = Boats.enum_state.RETREATING
boat.speed = 1
boat.speed = 1.2
Boats.place_boat(boat, CoreData.moving_boat_floor, false, false)

View File

@ -47,9 +47,9 @@ Public.explanation = {
[enum.FISHERMAN] = 'They fish at greater distance.',
[enum.SCOUT] = 'They are faster, but frail and deal much less damage.',
[enum.SAMURAI] = 'They are tough, and when they have no weapon equipped they fight well by melee, but poorly otherwise.',
[enum.MERCHANT] = 'They generate 40 coins per league, but they are frail.',
[enum.MERCHANT] = 'They generate 40 coins per league, but are frail.',
[enum.SHORESMAN] = 'They move slightly faster and generate iron ore for the ship whilst offboard, but move slower onboard.',
[enum.BOATSWAIN] = 'They move faster and generate lots of ore for the ship whilst onboard below deck, but move slower offboard.',
[enum.BOATSWAIN] = 'They move faster and generate lots of ore for the ship whilst below deck, but move slower offboard.',
[enum.PROSPECTOR] = 'They find more resources when handmining ore.',
}

View File

@ -24,7 +24,7 @@ function Public.tag_text(player)
tags[#tags + 1] = "Cap'n"
elseif player.controller_type == defines.controllers.spectator then
tags[#tags + 1] = 'Spectating'
elseif memory.officers_table and memory.classes_table[player.index] then
elseif memory.officers_table and memory.officers_table[player.index] then
tags[#tags + 1] = "Officer"
end
@ -76,7 +76,6 @@ end
function Public.player_left_so_redestribute_roles(player)
local memory = Memory.get_crew_memory()
-- we can assume #Common.crew_get_crew_members() > 0
if player and player.index and player.index == memory.playerindex_captain then
Public.assign_captain_based_on_priorities()
@ -252,6 +251,8 @@ function Public.assign_captain_based_on_priorities(excluded_player_index)
Common.notify_force_light(force, message .. ' If yes say /ok')
-- Server.to_discord_embed_raw('[' .. memory.name .. ']' .. CoreData.comfy_emojis.spurdo .. ' ' .. message)
memory.captain_acceptance_timer = 72 --tuned
else
memory.captain_acceptance_timer = nil
end
end
@ -270,16 +271,16 @@ function Public.captain_requisition_coins(captain_index)
local captain_inv = captain.get_inventory(defines.inventory.character_main)
for _, player_index in pairs(crew_members) do
if player_index == captain_index then return end
local player = game.players[player_index]
if player then
local inv = player.get_inventory(defines.inventory.character_main)
if not inv then return end
local coin_amount = inv.get_item_count('coin')
if coin_amount and coin_amount > 0 then
inv.remove{name='coin', count=coin_amount}
captain_inv.insert{name='coin', count=coin_amount}
if player_index ~= captain_index then
local player = game.players[player_index]
if player then
local inv = player.get_inventory(defines.inventory.character_main)
if not inv then return end
local coin_amount = inv.get_item_count('coin')
if coin_amount and coin_amount > 0 then
inv.remove{name='coin', count=coin_amount}
captain_inv.insert{name='coin', count=coin_amount}
end
end
end
end

View File

@ -31,7 +31,7 @@ Public.offers_loaders = {
Public.offers_default = {
{price = {{'coin', 1000}}, offer = {type = 'give-item', item = 'copper-plate', count = 250}},
{price = {{'coin', 1000}}, offer = {type = 'give-item', item = 'iron-plate', count = 250}},
{price = {{'coin', 1000}}, offer = {type = 'give-item', item = 'crude-oil-barrel', count = 10}},
{price = {{'coin', 1000}}, offer = {type = 'give-item', item = 'crude-oil-barrel', count = 7}},
}
Public.offers_rockets = {

View File

@ -56,40 +56,40 @@ Public.main_shop_data_1 = {
[Upgrades.enum.MORE_POWER] = {
tooltip = 'Upgrade the ship\'s power.',
what_you_get_sprite_buttons = {['utility/status_working'] = false},
base_cost = {coins = 5000, fuel = 1000},
base_cost = {coins = 5000, fuel = 700},
},
[Upgrades.enum.EXTRA_HOLD] = {
tooltip = 'Upgrade the ship\'s hold.',
what_you_get_sprite_buttons = {['item/steel-chest'] = false},
base_cost = {coins = 10000, fuel = 2000},
base_cost = {coins = 10000, fuel = 2500},
},
[Upgrades.enum.ROCKETS_FOR_SALE] = {
tooltip = 'Unlock rockets for sale at covered-up markets.',
what_you_get_sprite_buttons = {['item/rocket-launcher'] = false},
base_cost = {coins = 10000, fuel = 2000},
base_cost = {coins = 10000, fuel = 3000},
},
[Upgrades.enum.UNLOCK_MERCHANTS] = {
tooltip = 'Unlock merchant ships.',
what_you_get_sprite_buttons = {['entity/market'] = false},
base_cost = {coins = 10000, fuel = 2500},
base_cost = {coins = 10000, fuel = 4000},
},
}
Public.main_shop_data_2 = {
rail_signal = {
tooltip = "100 signals, used to steer the boat once space in the Crow's Nest View.",
tooltip = "100 signals, used to steer the boat one space in the Crow's Nest View.",
what_you_get_sprite_buttons = {['item/rail-signal'] = 100},
base_cost = {coins = 500},
base_cost = {coins = 600},
},
artillery_shell = {
tooltip = '10 cannon shells.',
what_you_get_sprite_buttons = {['item/artillery-shell'] = 10},
base_cost = {coins = 1500, fuel = 500},
base_cost = {coins = 2000, fuel = 300},
},
artillery_remote = {
tooltip = 'An artillery targeting remote.',
what_you_get_sprite_buttons = {['item/artillery-targeting-remote'] = 1},
base_cost = {coins = 15000, fuel = 2000},
base_cost = {coins = 12000, fuel = 2500},
},
-- extra_time = {
-- tooltip = 'Relax at sea for an extra minute for 50 stored fuel. (Increases the next destination\'s loading time.)',
@ -104,7 +104,7 @@ Public.main_shop_data_2 = {
uranium_ore = {
tooltip = '10 green rocks of unknown origin.',
what_you_get_sprite_buttons = {['item/uranium-238'] = 10},
base_cost = {coins = 200, fuel = 800},
base_cost = {coins = 1000, fuel = 800},
},
}
@ -351,6 +351,16 @@ function Public.event_on_market_item_purchased(event)
market.remove_market_item(offer_index)
else
if (price and price[1]) then
-- if (price and price[1] and price[1].name and ((price[1].name ~= 'coin' and price[1].name ~= 'pistol') or price[2])) then
if price[2] then
local fish = price[2].name
if fish == 'raw-fish' then fish = 'fish' end
Common.notify_force_light(player.force, player.name .. ' is trading away ' .. price[1].amount .. ' ' .. price[1].name .. ' and ' .. fish .. ' for ' .. this_offer.offer.count .. ' ' .. this_offer.offer.item .. '...')
else
Common.notify_force_light(player.force, player.name .. ' is trading away ' .. price[1].amount .. ' ' .. price[1].name .. ' for ' .. this_offer.offer.count .. ' ' .. this_offer.offer.item .. '...')
end
end
if (price and price[1] and price[1].name and (price[1].name == 'pistol')) then
if not inv then return end
local flying_text_color = {r = 255, g = 255, b = 255}
@ -373,16 +383,6 @@ function Public.event_on_market_item_purchased(event)
market.add_market_item(offer)
end
end
if (price and price[1]) then
-- if (price and price[1] and price[1].name and ((price[1].name ~= 'coin' and price[1].name ~= 'pistol') or price[2])) then
if price[2] then
local fish = price[2].name
if fish == 'raw-fish' then fish = 'fish' end
Common.notify_force_light(player.force, player.name .. ' is trading away ' .. price[1].amount .. ' ' .. price[1].name .. ' and ' .. fish .. ' to get ' .. this_offer.offer.item .. '...')
else
Common.notify_force_light(player.force, player.name .. ' is trading away ' .. price[1].amount .. ' ' .. price[1].name .. ' to get ' .. this_offer.offer.item .. '...')
end
end
end
end

View File

@ -28,8 +28,8 @@ function Public.place_water_tile(args)
then
args.tiles[#args.tiles + 1] = {name = 'deepwater', position = args.p}
local fishrng = Math.random(400)
if fishrng == 400 then
local fishrng = Math.random(350)
if fishrng == 350 then
args.entities[#args.entities + 1] = {name = 'fish', position = args.p}
end
return true
@ -41,8 +41,8 @@ function Public.place_water_tile(args)
if height_noise < 0 then
args.tiles[#args.tiles + 1] = {name = 'water', position = args.p}
local fishrng = Math.random(400)
if fishrng == 400 then
local fishrng = Math.random(350)
if fishrng == 350 then
args.entities[#args.entities + 1] = {name = 'fish', position = args.p}
end
return true

View File

@ -55,7 +55,7 @@ function Public.terrain(args)
args.tiles[#args.tiles + 1] = {name = 'dirt-1', position = args.p}
else
if noises.mood(p) > 0.66 then
args.tiles[#args.tiles + 1] = {name = 'water-shallow', position = args.p}
args.tiles[#args.tiles + 1] = {name = 'water', position = args.p}
else
args.tiles[#args.tiles + 1] = {name = 'sand-3', position = args.p}
end
@ -100,7 +100,7 @@ function Public.terrain(args)
end
if noises.height(p) > 0.18 and noises.mood(p) > 0.2 then
if noises.forest_abs(p) < 0.2 and noises.rock_abs(p) > 1.5 then
if noises.forest_abs(p) < 0.2 and noises.rock_abs(p) > 1.8 then
args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 10}
end
end

View File

@ -73,7 +73,7 @@ function Public.terrain(args)
end
if noises.height(p) > 0.12 and noises.walkways(p) < 0.1 and noises.rock_abs(p) < 0.07 then
args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 20}
args.entities[#args.entities + 1] = {name = 'coal', position = args.p, amount = 14}
end
else