1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-01 13:08:05 +02:00
This commit is contained in:
danielmartin0 2022-03-06 01:05:26 +00:00
parent 9859d0d9d8
commit 561672881c
11 changed files with 68 additions and 19 deletions

View File

@ -1,6 +1,6 @@
require 'utils.data_stages'
_LIFECYCLE = _STAGE.control -- Control stage
_DEBUG = false
_DEBUG = true
_DUMP_ENV = false

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 gives a reward of fuel and coins.\n• Charging a silo drains power from everything else on its network.\n• The quantity of ore available on an island is independent of the order in which you break rocks.\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• To launch a second parallel run, you need a fifth of the server's pirates to endorse it.\n• Help commands: /class, /inventory
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 gives a reward of fuel and coins.\n• Charging a silo drains power from everything else on its network.\n• The quantity of ore available on an island is independent of the order in which you break rocks.\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• Useful commands: /class, /ccolor, /inventory, /shout
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. \n\nRecent significant changes: Fuel mechanic replaces gold. Silo death is no longer a lose condition. Game made much easier for small crews. New island type. New classes.
softmod_info_updates_2=Pirate Ship 1.0.4 is currently stable. Recent significant changes: Fuel mechanic replaces gold. Silo death is no longer a lose condition. Game made much easier for small crews. New island type. New system of class availabilities.
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\nContact us via Discord, at https://getcomfy.eu.\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John

View File

@ -349,7 +349,7 @@ function Public.spawn_group_of_scripted_biters(fraction_of_floating_pollution, m
local new_units = Public.try_spawner_spend_fraction_of_available_pollution_on_biters(spawner.position, fraction_of_floating_pollution, minimum_avg_units, maximum_units, 1/wave_size_multiplier)
if (new_units and nearby_units_to_bring and (#new_units + #nearby_units_to_bring) == 0) then log('no units found') return end
if (new_units and nearby_units_to_bring and (#new_units + #nearby_units_to_bring) == 0) then return end
local position = surface.find_non_colliding_position('rocket-silo', spawner.position, 256, 2) or spawner.position

View File

@ -10,7 +10,8 @@ local Force_health_booster = require 'modules.force_health_booster'
local Public = {}
Public.active_crews_cap = 2
Public.active_crews_cap = 1
-- Public.active_crews_cap = 2
Public.minimum_capacity_slider_value = 1
Public.boat_steps_at_a_time = 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.4.2'
Public.version_float = 1.042
Public.version_string = '1.0.4.3'
Public.version_float = 1.043
Public.blueprint_library_allowed = false
Public.blueprint_importing_allowed = true

View File

@ -200,9 +200,9 @@ function Public.update(player)
if flow2.selected_tab_index == 1 then
flow2.style.height = 400
elseif flow2.selected_tab_index == 2 then
flow2.style.height = 400
flow2.style.height = 380
elseif flow2.selected_tab_index == 3 then
flow2.style.height = 590
flow2.style.height = 550
elseif flow2.selected_tab_index == 4 then
flow2.style.height = 330
end

View File

@ -608,7 +608,11 @@ local function event_on_player_mined_entity(event)
if memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.MASTER_ANGLER then
Common.give(player, {{name = 'raw-fish', count = 5}, {name = 'coin', count = 10}}, entity.position)
Common.give(player, {{name = 'raw-fish', count = 5}, {name = 'coin', count = 8}}, entity.position)
elseif memory.classes_table and memory.classes_table[event.player_index] and memory.classes_table[event.player_index] == Classes.enum.SEA_DREDGER then
local to_give = {{name = 'raw-fish', count = 5}, {name = 'coin', count = 12}}
to_give[#to_give + 1] = Loot.dredger_loot()[1]
Common.give(player, to_give, entity.position)
else
Common.give(player, {{name = 'raw-fish', count = 3}}, entity.position)
end

View File

@ -318,7 +318,7 @@ Public.maze_lab_loot_data_raw = {
}
function Public.maze_lab_loot()
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_lab_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (10/100 + Common.game_completion_progress()))))
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_lab_loot_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (Common.game_completion_progress()))))
end
Public.maze_treasure_data_raw = {
@ -383,8 +383,50 @@ function Public.maze_treasure_loot()
if Math.random(5) == 1 then
return {Public.random_plates(8)}
else
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_treasure_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (70/100 + Common.game_completion_progress()))))
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.maze_treasure_data_raw), 1, Math.max(0,Math.min(1, Math.sloped(Common.difficulty(),1/2) * (Common.game_completion_progress()))))
end
end
Public.dredger_loot_raw = {
{20, 0, 1, false, 'iron-plate', 1, 1},
{20, 0, 1, false, 'copper-plate', 1, 1},
{20, 0, 1, false, 'coal', 1, 1},
{2, 0, 1, false, 'small-electric-pole', 1, 1},
{1, 0, 1, false, 'medium-electric-pole', 1, 1},
{0.1, 0, 1, false, 'big-electric-pole', 1, 1},
{0.2, 0, 1, false, 'slowdown-capsule', 1, 1},
{0.2, 0, 1, false, 'destroyer-capsule', 1, 1},
{0.2, 0, 1, false, 'defender-capsule', 1, 1},
{0.2, 0, 1, false, 'distractor-capsule', 1, 1},
{10, 0, 1, false, 'automation-science-pack', 1, 1},
{10, 0, 1, false, 'logistic-science-pack', 1, 1},
{4, 0, 1, false, 'military-science-pack', 1, 1},
{4, 0, 1, false, 'chemical-science-pack', 1, 1},
{4, 0, 1, false, 'production-science-pack', 1, 1},
{0.0001, 0, 0.8, false, 'modular-armor', 1, 1},
{0.0001, 0, 2, true, 'power-armor', 1, 1},
{0.00008, 0, 2, true, "power-armor-mk2", 1, 1},
{0.002, -1, 1, true, 'solar-panel-equipment', 1, 1},
{0.002, -1, 1, true, 'battery-equipment', 1, 1},
{0.001, 0, 2, true, 'battery-mk2-equipment', 1, 1},
{0.002, -1, 1, true, 'energy-shield-equipment', 1, 1},
{0.001, 0, 2, true, 'energy-shield-mk2-equipment', 1, 1},
{0.001, -1, 1, true, 'personal-roboport-equipment', 1, 1},
{0.005, 0, 2, true, 'personal-roboport-mk2-equipment', 1, 1},
{0.005, 0, 0.8, false, 'night-vision-equipment', 1, 1},
{0.001, 0, 1, false, 'personal-laser-defense-equipment', 1, 1},
{0.005, 0, 1, false, 'fusion-reactor-equipment', 1, 1},
{0.002, 0, 1, false, 'exoskeleton-equipment', 1, 1},
{0.005, 0, 1, false, 'personal-laser-defense', 1, 1},
}
function Public.dredger_loot()
return Common.raffle_from_processed_loot_data(Common.processed_loot_data(Public.dredger_loot_raw), 1, Math.max(0,Math.min(1, Common.game_completion_progress())))
end
return Public

View File

@ -167,7 +167,6 @@ local place_dock_jetty_and_boats = Token.register(
function Public.progress_to_destination(destination_index)
local memory = Memory.get_crew_memory()
local global_memory = Memory.get_global_memory()
if memory.game_lost then return end
local boat = memory.boat

View File

@ -25,6 +25,7 @@ local enum = {
RONIN_SENSEI = 13,
IRON_LEG = 14,
QUARTERMASTER = 15,
DREDGER = 16,
}
Public.enum = enum
@ -44,6 +45,7 @@ Public.Class_List = {
enum.RONIN_SENSEI,
enum.IRON_LEG,
enum.QUARTERMASTER,
enum.DREDGER,
}
Public.display_form = {
@ -62,6 +64,7 @@ Public.display_form = {
[enum.RONIN_SENSEI] = 'Ronin',
[enum.IRON_LEG] = 'Iron Leg',
[enum.QUARTERMASTER] = 'Quartermaster',
[enum.DREDGER] = 'Dredger',
}
Public.explanation = {
[enum.DECKHAND] = 'They move faster and generate ore for the captain\'s cabin whilst onboard above deck, but move slower offboard.',
@ -79,6 +82,7 @@ Public.explanation = {
[enum.RONIN_SENSEI] = 'They are very tough, and *with no weapon equipped* fight well by melee.',
[enum.IRON_LEG] = 'They are resistant to damage when carrying 2500 iron ore.',
[enum.QUARTERMASTER] = 'Nearby crew generate a little ore for the captain\'s cabin, and have extra physical attack.',
[enum.DREDGER] = 'They fish at a distance and find surprising items.',
}
Public.class_unlocks = {
@ -86,6 +90,7 @@ Public.class_unlocks = {
[enum.LUMBERJACK] = {enum.WOOD_LORD},
[enum.PROSPECTOR] = {enum.CHIEF_EXCAVATOR},
[enum.SAMURAI] = {enum.RONIN_SENSEI},
[enum.MASTER_ANGLER] = {enum.DREDGER},
}
Public.class_purchase_requirement = {
@ -93,6 +98,7 @@ Public.class_purchase_requirement = {
[enum.WOOD_LORD] = enum.LUMBERJACK,
[enum.CHIEF_EXCAVATOR] = enum.PROSPECTOR,
[enum.RONIN_SENSEI] = enum.SAMURAI,
[enum.DREDGER] = enum.MASTER_ANGLER,
}
function Public.initial_class_pool()
@ -102,17 +108,14 @@ function Public.initial_class_pool()
-- }
-- end
return {
enum.DECKHAND,
enum.DECKHAND,
enum.FISHERMAN,
enum.SCOUT,
enum.SCOUT,
enum.SAMURAI,
enum.MERCHANT,
enum.SHORESMAN,
enum.SHORESMAN,
enum.BOATSWAIN,
enum.BOATSWAIN,
enum.PROSPECTOR,
enum.LUMBERJACK,
enum.IRON_LEG,

View File

@ -85,9 +85,9 @@ function Public.update_character_properties(tickinterval)
if memory.classes_table[player_index] == Classes.enum.FISHERMAN then
max_reach_bonus = Math.max(max_reach_bonus, 10)
character.character_resource_reach_distance_bonus = 10
elseif memory.classes_table[player_index] == Classes.enum.MASTER_ANGLER then
max_reach_bonus = Math.max(max_reach_bonus, 14)
character.character_resource_reach_distance_bonus = 18
elseif memory.classes_table[player_index] == Classes.enum.MASTER_ANGLER or memory.classes_table[player_index] == Classes.enum.SEA_DREDGER then
max_reach_bonus = Math.max(max_reach_bonus, 16)
character.character_resource_reach_distance_bonus = 16
else
character.character_resource_reach_distance_bonus = 0
end