1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-28 03:57:22 +02:00

Merge branch 'develop' of https://github.com/Gerkiz/ComfySA into develop

This commit is contained in:
hanakocz 2024-10-10 23:12:38 +02:00
commit 26e4b8c6ea
9 changed files with 39 additions and 41 deletions

View File

@ -15,10 +15,10 @@ softmod_info_new_players_2=Mine coal and other resources and bring them to the s
softmod_info_tips_1=Features of the game that are hard to work out alone
softmod_info_tips_2=• The captain (or officers) can steer the boat from the crow's nest by placing 50 rail signals in one of the blue boxes.\n• The quantity on an island is independent of the order in which you break rocks.\n• Passive pollution ramps up over time on each island.\n• Items dropped on the deck are transferred to the cabin when the boat moves for performance reasons.\n• Mining productivity increases naturally with leagues traveled.\nOn multiplayer, crews that are inactive for 96 hours are auto-disbanded.\n• Useful commands: /classinfo {classname} command, /plank {player}, /officer {player}, /undock, /ccolor, /clear_north_tanks, /clear_south_tanks, /tax, /reset_password
softmod_info_1_1=v1.6.6: Bugfixes
softmod_info_1_2=Fixed case in which players leaving the crew would not have their items sent to the offline inventory.\n• Increased the size of offline inventory to prevent overflow.\n• Fixed longstanding issue in which the ship does not proceed after a fight at sea.\n• Fixed a crash when multiple crews are loading, one of which is in the lobby.
softmod_info_1_1=v1.6.7: Bugfixes
softmod_info_1_2=Recovery of offline inventories no longer loses items if the player's inventory has an expanded size.\n• Market weapon upgrades no longer affect weapon shooting speed.\n• Shotguns are now buffed as intended.
softmod_info_2_1=v1.6.1–1.6.5 highlights
softmod_info_2_1=v1.6.1–1.6.6 highlights
softmod_info_2_2=• Optional setting for new crews to disable blueprints.\n• Each island now has a grace period of 2 minutes before attacks.\n• Machines now deactivate after several minutes spent waiting at sea.\n• Private crews and captain-protected crews no longer revert to public crews when inactive. Runs now autodisband after 96 hours of inactivity.\n• Further slowing of gameplay for small crews.
softmod_info_3_1=v1.6.0 highlights

View File

@ -700,9 +700,9 @@ function Public.player_ammo_damage_modifiers() -- modifiers are fractional. bull
['flamethrower'] = -0.5,
['grenade'] = -0.05,
['landmine'] = 0,
['melee'] = 0, -- doesn't do anything apparently
['melee'] = 0, -- only affects alien melee
['rocket'] = 0,
['shotgun-shell'] = 0,
['shotgun-shell'] = 2,
}
return data
end
@ -728,7 +728,7 @@ function Public.player_gun_speed_modifiers()
['flamethrower'] = 0,
['grenade'] = -0.25,
['landmine'] = 0,
['melee'] = 0, -- doesn't do anything apparently
['melee'] = 0, -- only affects alien melee
['rocket'] = 0,
['shotgun-shell'] = 0,
}

View File

@ -652,9 +652,10 @@ if _DEBUG then
local proposal = {
capacity_option = 3,
difficulty_option = 4,
-- mode_option = 'left',
name = 'AdminRun',
created_by_player = cmd.player_index,
run_is_protected = false,
run_is_private = false,
}
Crew.initialise_crew(proposal, player.position)

View File

@ -1,16 +1,16 @@
-- This file is part of thesixthroc's Pirate Ship softmod, licensed under GPLv3 and stored at https://github.com/ComfyFactory/ComfyFactorio and https://github.com/danielmartin0/ComfyFactorio-Pirates.
local Math = require 'maps.pirates.math'
local Raffle = require 'utils.math.raffle'
local Server = require 'utils.server'
local Utils = require 'maps.pirates.utils_local'
local CoreData = require 'maps.pirates.coredata'
local Memory = require 'maps.pirates.memory'
local _inspect = require 'utils.inspect'.inspect
local Math = require('maps.pirates.math')
local Raffle = require('utils.math.raffle')
local Server = require('utils.server')
local Utils = require('maps.pirates.utils_local')
local CoreData = require('maps.pirates.coredata')
local Memory = require('maps.pirates.memory')
local _inspect = require('utils.inspect').inspect
-- local IslandEnum = require 'maps.pirates.surfaces.islands.island_enum'
local LootRaffle = require 'utils.functions.loot_raffle'
local LootRaffle = require('utils.functions.loot_raffle')
-- local simplex_noise = require 'utils.math.simplex_noise'.d2
-- local perlin_noise = require 'utils.math.perlin_noise'
-- local Force_health_booster = require 'modules.force_health_booster'
@ -1585,7 +1585,7 @@ function Public.give_back_items_to_temporarily_logged_off_player(player)
local temp_inv = memory.temporarily_logged_off_characters_items[player.index]
for i = 1, #temp_inv, 1 do
for i = #temp_inv, 1, -1 do -- descending order to make sure the inventory is large enough
if temp_inv and temp_inv[i].valid and temp_inv[i].valid_for_read then
player.insert(temp_inv[i])
end

View File

@ -6,7 +6,7 @@ local _inspect = require('utils.inspect').inspect
local Public = {}
Public.scenario_id_name = 'pirates'
Public.version_string = '1.6.6' --major.minor.patch versioning, to match factorio mod portal
Public.version_string = '1.6.7' --major.minor.patch versioning, to match factorio mod portal
Public.rocket_silo_death_causes_loss = false

View File

@ -306,30 +306,28 @@ function Public.join_crew(player, rejoin)
surface
)
local rejoin_data = memory.temporarily_logged_off_player_data[player.index]
if rejoin then
if memory.temporarily_logged_off_player_data[player.index] then
local rejoin_data = memory.temporarily_logged_off_player_data[player.index]
local rejoin_surface = game.surfaces[rejoin_data.surface_name]
local rejoin_surface = game.surfaces[rejoin_data.surface_name]
-- If surface where player left the game still exists, place him there.
if rejoin_surface and rejoin_surface.valid then
-- Edge case: if player left the game while he was on the boat, it could be that boat position
-- changed when he left the game vs when he came back.
if not (rejoin_data.on_boat and rejoin_data.on_island) then
player.character.teleport(
rejoin_surface.find_non_colliding_position('character', rejoin_data.position, 32, 0.5)
or memory.spawnpoint,
rejoin_surface
)
end
if rejoin_surface and rejoin_surface.valid then
-- Edge case: if player left the game while he was on the boat, it could be that boat position
-- changed when he left the game vs when he came back.
if not (rejoin_data.on_boat and rejoin_data.on_island) then
player.character.teleport(
rejoin_surface.find_non_colliding_position('character', rejoin_data.position, 32, 0.5)
or memory.spawnpoint,
rejoin_surface
)
end
Common.give_back_items_to_temporarily_logged_off_player(player)
memory.temporarily_logged_off_player_data[player.index] = nil
end
end
Common.give_back_items_to_temporarily_logged_off_player(player)
memory.temporarily_logged_off_player_data[player.index] = nil
Common.notify_force(player.force, { 'pirates.lobby_to_crew', player.name })
-- Server.to_discord_embed_raw(CoreData.comfy_emojis.yum1 .. '[' .. memory.name .. '] ' .. message)
@ -418,9 +416,10 @@ function Public.leave_crew(player, to_lobby, quiet)
tick = game.tick,
}
-- This is preferred to leaving a corpse, because it's less burden on other players. (It may also be slightly preferred to sending the items to the crew immediately!
Common.temporarily_store_logged_off_character_items(player)
char.die(memory.force_name)
char.destroy()
-- else
-- if not quiet then

View File

@ -165,7 +165,7 @@ function Public.create_cabin_surface()
local height = Public.Data.height
local map_gen_settings = Common.default_map_gen_settings(width, height)
map_gen_settings.autoplace_settings.decorative.treat_missing_as_default = false
map_gen_settings.autoplace_settings.decorative = { treat_missing_as_default = false }
local cabinname = Public.get_cabin_surface_name()
@ -174,8 +174,6 @@ function Public.create_cabin_surface()
surface.daytime = 0.3
surface.show_clouds = false
-- more here
Common.ensure_chunks_at(surface, { x = 0, y = 0 }, 3)
boat.cabin_whitebelts = {}

View File

@ -119,7 +119,7 @@ function Public.create_hold_surface(nth)
local height = Public.Data.height
local map_gen_settings = Common.default_map_gen_settings(width, height)
map_gen_settings.autoplace_settings.decorative.treat_missing_as_default = false
map_gen_settings.autoplace_settings.decorative = { treat_missing_as_default = false }
local holdname = Public.get_hold_surface_name(nth)

View File

@ -32,7 +32,7 @@ function Public.ensure_sea_surface()
local height = Public.Data.height
local map_gen_settings = Common.default_map_gen_settings(width, height)
map_gen_settings.autoplace_settings.decorative.treat_missing_as_default = false
map_gen_settings.autoplace_settings.decorative = { treat_missing_as_default = false }
local surface = game.create_surface(seaname, map_gen_settings)
surface.freeze_daytime = true