Skip to content

Commit

Permalink
Merge pull request #479 from ComfyFactory/merge-comfySA
Browse files Browse the repository at this point in the history
Merge 2.0 changes
  • Loading branch information
Gerkiz authored Oct 22, 2024
2 parents aafa479 + b1d170e commit 2689768
Show file tree
Hide file tree
Showing 505 changed files with 52,883 additions and 47,968 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.git/
maps/biter_battles_v3/
todo/
.stylua.toml


#==Mac ignores==
Expand Down
33 changes: 29 additions & 4 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ globals = {
'is_loaded',
'is_loaded_bool',
'is_game_modded',
'has_space_age',
'require'
}
max_line_length = LINE_LENGTH
Expand Down Expand Up @@ -243,7 +244,8 @@ stds.factorio_control = {
'mod_name',
'get_event_order',
'generate_event_name',
'register_on_entity_destroyed'
'register_on_entity_destroyed',
'active_mods'
},
other_fields = false
},
Expand Down Expand Up @@ -387,7 +389,7 @@ stds.factorio_control = {
'json_to_table',
'kick_player',
'merge_forces',
'pollution_statistics',
'get_pollution_statistics',
'mute_player',
'play_sound',
'print',
Expand Down Expand Up @@ -449,13 +451,36 @@ stds.factorio_control = {
tile_prototypes = { read_only = true, other_fields = true },
virtual_signal_prototypes = { read_only = true, other_fields = true }
}
},
prototypes = {
other_fields = false,
read_only = false,
fields = {
style = { read_only = true, other_fields = true },
entity = { read_only = true, other_fields = true },
item = { read_only = true, other_fields = true },
fluid = { read_only = true, other_fields = true },
tile = { read_only = true, other_fields = true },
equipment = { read_only = true, other_fields = true },
damage = { read_only = true, other_fields = true },
virtual_signal = { read_only = true, other_fields = true },
equipment_grid = { read_only = true, other_fields = true },
recipe = { read_only = true, other_fields = true },
technology = { read_only = true, other_fields = true },
decorative = { read_only = true, other_fields = true },
particle = { read_only = true, other_fields = true },
autoplace_control = { read_only = true, other_fields = true },
quality = { read_only = true, other_fields = true },

}
}
},
globals = {
-- @global@: The global dictionary, useful for storing data persistent across a save-load cycle.
-- Writing access is given to the mod-id field (for mod-wise saved data).
-- (http://lua-api.factorio.com/latest/Global.html)
'global',
-- (http://lua-api.factorio.com/latest/storage.html)
'storage',
'helpers',
-- @MOD@: Keep it organized, use this variable for anything that "NEEDS" to be global for some reason.
'MOD'
}
Expand Down
17 changes: 10 additions & 7 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require 'utils.server'
require 'utils.server_commands'
require 'utils.command_handler'
require 'utils.utils'
require 'utils.math.math'
require 'utils.pause_game'
require 'utils.table'
require 'utils.whisper_notice'
Expand Down Expand Up @@ -100,7 +101,7 @@ require 'utils.remote_chunks'
--require 'maps.chronosphere.main'

--![[Adventure as a crew of pirates]]--
-- require 'maps.pirates.main'
--require 'maps.pirates.main'

--![[Launch rockets in increasingly harder getting worlds.]]--
--require 'maps.journey.main'
Expand Down Expand Up @@ -254,14 +255,16 @@ end

local function on_player_created(event)
local player = game.players[event.player_index]
player.gui.top.style = 'slot_table_spacing_horizontal_flow'
player.gui.left.style = 'slot_table_spacing_vertical_flow'
player.gui.top.style = 'packed_horizontal_flow'
player.gui.left.style = 'vertical_flow'
end

local Event = require 'utils.event'
Event.add(defines.events.on_player_created, on_player_created)

local loaded = _G.package.loaded
function require(path)
return loaded[path] or error('Can only require files at runtime that have been required in the control stage.', 2)
local level_path = '__level__/' .. path
level_path = string.gsub(level_path, "%.", "/") .. ".lua"
return loaded[level_path] or error('Can only require files at runtime that have been required in the control stage.', 2)
end

local Event = require 'utils.event'
Event.add(defines.events.on_player_created, on_player_created)
1 change: 1 addition & 0 deletions locale/en/mtn_fortress_v3.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ coins_left=Coins left: __1__
market_name=Market
search_text=Search:
quantity_text=Quantity:
quality_text=Quality:
limit_reached=Max limit reached!
chests_full=You can't purchase more chests.
chest_bought_info=__1__ __2__ has bought the chest limit upgrade for __3__ coins.
Expand Down
37 changes: 15 additions & 22 deletions locale/en/pirates.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ 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=• 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.\nWhen waiting for the captain's order to set sail, the free power supply is disabled.\n• Resources granted to the ship appear in the captain's cabin.\n• Useful commands: /classinfo {classname} command, /plank {player}, /officer {player}, /undock, /ccolor, /clear_north_tanks, /clear_south_tanks, /tax, /reset_password
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.\nMining 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.1–1.6.5 highlights
softmod_info_1_2=• Optional setting for new crews to disable blueprints.\n• Each island now has a grace period of 2 minutes before attacks.\nMachines now deactivate after several minutes spent waiting at sea.\nPrivate crews and captain-protected crews no longer revert to public crews when inactive. Runs now autodisband after 96 hours of inactivity.\nFurther slowing of gameplay for small crews.
softmod_info_1_1=v1.6.7
softmod_info_1_2=• Corner cases of offline inventory storage fixed for players handcrafting or wearing power armor.\nMarket weapon upgrades no longer affect weapon shooting speed.\nFixed revenge biters not spawning for ship slots 4–7.\n• Shotguns are now buffed as intended.\nLand mine technology disabled.
softmod_info_2_1=v1.6.0 highlights
softmod_info_2_2=• 7 simultaneous crews supported. Surface loading is paused if other crews are engaged in a fight at sea, or are loading themselves.\n• New runs begin on the top lane so that beginners are more likely to encounter docks.\n• Disconnecting players once again have their items temporarily saved. Items are returned to the crew if players don't reconnect quickly.\n• Players now die rather than being temporarily marooned if they miss the boat.\n• Melee classes can no longer hold weapons. New class added.\n• The pause at sea now occurs after the loading time for the next destination.\n• Balance tweaks:\n - Most maps now have some unkillable spawners.\n - Mining productivity increases naturally with leagues traveled.\n - Biter nighttime damage bonus nerfed.\n - Tweaks to radioactive islands.\n - Kovarex enrichment no longer researched at start of game.\n - Land mines only purchasable at docks, and drop your speed when placed.\n - Flamers nerf slightly increased.\n - 5% weapon and turret damage upgrade available at each island market.
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
softmod_info_3_2=• 7 simultaneous crews supported. Surface loading is paused if other crews are engaged in a fight at sea, or are loading themselves.\n• New runs begin on the top lane so that beginners are more likely to encounter docks.\n• Disconnecting players once again have their items temporarily saved. Items are returned to the crew if players don't reconnect quickly.\n• Players now die rather than being temporarily marooned if they miss the boat.\n• Melee classes can no longer hold weapons. New class added.\n• The pause at sea now occurs after the loading time for the next destination.

softmod_info_credits_1=Credits
softmod_info_credits_2=Designed/developed by thesixthroc. Updates from Piratux. Comfy codebase and help from Gerkiz, Hanakocz and Mew @ Comfy Industries (https://getcomfy.eu). Island structure blueprints contributed by Mattisso.\n\nCome chat with us: https://getcomfy.eu/discord\n\n"Those white gloves. I'll never forget them 'till the day I die." - Dr. John
Expand Down Expand Up @@ -355,10 +358,6 @@ choose_chat_color=__1__ chose the color __2__
randomize_chat_color=__1__'s color randomized to __2__
crew_to_spectator=__1__ left the crew to become a spectator.
lobby_to_spectator=__1__ joined as a spectator.
lobby_to_spectator_2=__1__ left the lobby to spectate __2__.
spectator_to_lobby=__1__ stopped spectating and returned to the lobby.
lobby_to_crew=__1__ joined the crew.
lobby_to_crew_2=__1__ left the lobby to join __2__.
crew_leave=__1__ left the crew.
Expand Down Expand Up @@ -438,16 +437,12 @@ fuel_tooltip=Stored fuel: __1__.\n\nTo store more, send coal to the captain's ca
gui_crew_window_buttons_quit_crew=Quit Crew
gui_crew_window_buttons_quit_crew_tooltip=Return to the lobby.
gui_crew_window_buttons_quit_spectators=Return to Lobby
gui_crew_window_buttons_join_crew=Join Crew
gui_crew_window_buttons_join_spectators=Spectate
gui_crew_window_buttons_join_spectators_tooltip=You won't be able to rejoin the crew for a short while after you do this.
gui_crew_window_crewmembers=Crew Members
# gui_crew_window_crewmembers_give_up_class=Give Up Class
# gui_crew_window_crewmembers_give_up_class_tooltip=Give Up Class
gui_crew_window_crewmembers_resign_as_officer=Resign as Officer
gui_crew_window_crewmembers_resign_as_officer_tooltip=Give up the officer role.
gui_crew_window_spectators=Spectators
gui_crew_window_vote_for_difficulty=Vote for Difficulty
# gui_crew_window_spare_classes=Spare Classes
# gui_crew_window_assign_class_button=Give class: __1__
Expand All @@ -463,7 +458,7 @@ gui_crew_window_captains_actions_renounce_title=Renounce Captainhood
gui_crew_window_captains_actions_renounce_title_tooltip=You will no longer be captain, and the role will be passed around until a crewmember takes it.
gui_crew_window_captains_actions_pass_title=Pass Captain To
gui_crew_window_captains_actions_pass_title_tooltip=Make the selected crewmember into the Captain.
gui_crew_window_captains_actions_plank=Plank (Make Spectator)
gui_crew_window_captains_actions_plank=Plank (Send to Lobby)
gui_crew_window_captains_actions_plank_tooltip=The player will be returned to the lobby and can't join your crew for a while. (or use /plank {player})
gui_crew_window_captains_actions_make_officer=Make Officer
gui_crew_window_captains_actions_make_officer_tooltip=Make this player an Officer. (or use /officer {player})
Expand Down Expand Up @@ -520,7 +515,6 @@ gui_progress_time_of_day=Time of day: __1__
gui_runs_play=Crews
gui_runs_ongoing_runs=Ongoing Crews
gui_runs_ongoing_runs_helpful_tip=To join a crew, first select it in the table below.
gui_runs_ongoing_runs_spectate=Spectate
gui_runs_ongoing_runs_join_crew=Join Crew
gui_runs_ongoing_runs_return_to_lobby=Return to Lobby
gui_runs_ongoing_runs_hop_on_board=Hop on board.
Expand All @@ -531,7 +525,7 @@ gui_runs_proposal_maker_run_name_2=Name
gui_runs_proposal_maker_capacity=Capacity
gui_runs_proposal_maker_propose=Propose
gui_runs_proposal_maker_no_limit=No limit
gui_runs_proposal_maker_blueprints_disabled=Blueprints disabled
gui_runs_proposal_maker_blueprints_disabled=Disable BP Imports
gui_runs_proposal_maker_protected=Captain-protected
gui_runs_proposal_maker_protected_tooltip=Captain-protected crew. If the captain leaves or becomes afk, and there are no officers, the captain role stays vacant.
gui_runs_proposal_maker_private=Private
Expand Down Expand Up @@ -570,9 +564,10 @@ gui_minimap_main_tooltip=View the outside world.
gui_etaframe_board_warning=RETURN TO SHIP
gui_etaframe_board_warning_tooltip=Probably time to board...
gui_etaframe_autoundock=Auto-undock:
gui_etaframe_loading_for=Loading for
gui_etaframe_loading=Loading
gui_etaframe_defeat_krakens=Defeat the krakens!
gui_etaframe_atsea_waiting=Captain — Click here to Proceed
gui_etaframe_atsea_waiting=Captain — Click here to
gui_etaframe_atsea_waiting_are_you_sure=Proceed — Are you sure?
gui_etaframe_atsea_victorious=Captain — Click here to Proceed
gui_etaframe_undock=Undock:
gui_etaframe_anytime=Anytime
Expand Down Expand Up @@ -629,16 +624,14 @@ cmd_explain_classinfo={class name} returns the definition of the named class.
# cmd_explain_classinfofull={class name} returns detailed definition of the named class.
cmd_explain_ccolor=is an extension to the built-in /color command, with more colors.
cmd_explain_fixpower=attempts to reconnect power poles between deck and holds
cmd_explain_plank={player} is a captain command to remove a player by making them a spectator.
cmd_explain_plank={player} is a captain command to remove a player from the crew and send them to the lobby.
cmd_explain_officer={player} is a captain command to make a player into an officer, or remove them as one.
cmd_explain_undock=is a captain command to undock the ship.
cmd_explain_tax=is a captain command to take a quarter of all coins, plus other game-critical items from the crew, into your inventory.
cmd_explain_clear_north_tanks=Clear ship's north fluid storage tanks on deck and all holds.
cmd_explain_clear_south_tanks=Clear ship's south fluid storage tanks on deck and all holds.
cmd_explain_dev=is a dev command.

gui_crew_window_spectator_controls=Spectator Controls
gui_crew_window_spectator_goto_surface=Go to Surface
cmd_explain_set_private_run_password={password} is a command for the creator of the crew to change an existing password for the crew.

market_description_purchase_attack_upgrade=__1__% damage upgrade to all weapons and turrets.
market_event_attack_upgrade_purchased=__1__ bought a __2__% damage upgrade to all weapons and turrets.
1 change: 0 additions & 1 deletion locale/en/rpg.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mana_casting_too_fast=There was a lot more to magic, as __1__ quickly found out,
low_level=You lack the level to cast this spell.
not_inside_pos=You wave your wand but realize that it´s out of reach.
no_mana=You don´t have enough mana to cast this spell.
suicidal_comfylatron=You wave your wand and __1__ is on the run!
detonate_chest=You wave your wand and chesty makes big BOOM!
detonate_chest_failed=You wave your wand but no not enough explosives were found inside the chest!
repair_aoe=You wave your wand and repaired __1__ entities!
Expand Down
1 change: 0 additions & 1 deletion locale/ru/rpg.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mana_casting_too_fast=Как быстро выяснил __1__, в магии б
low_level=Вам не хватает уровня для произнесения этого заклинания.
not_inside_pos=Вы машете палочкой, но понимаете, что это вне досягаемости.
no_mana=У вас недостаточно маны для сотворения этого заклинания.
suicidal_comfylatron=Вы машете палочкой, и __1__ в бегах!
detonate_chest=Вы взмахиваете палочкой, и сундук делает большой БУМ!
detonate_chest_failed=Вы взмахиваете палочкой, но внутри сундука не было обнаружено достаточно взрывчатки!
repair_aoe=Вы взмахнули палочкой и починили __1__ сущностей!
Expand Down
1 change: 0 additions & 1 deletion locale/zh-CN/rpg.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mana_casting_too_fast= __1__ 魔法还有很多, 像 __2__ 迅速创建出, 然
low_level=等级不够.
not_inside_pos=你挥动你的魔杖, 但意识到它不能达到.
no_mana=你没有足够的魔力.
suicidal_comfylatron=您挥舞着魔杖,__1__在运行!
warped_ok=回城给自己造成了一些伤害.
object_spawned= 正在施法!.\n 你挥动你的魔杖和 __1__ 出现.
out_of_reach=无法在给指定位置创建物体.
Expand Down
16 changes: 8 additions & 8 deletions maps/anarchy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ local map_functions = require 'utils.tools.map_functions'

local function on_player_joined_game(event)
local player = game.players[event.player_index]
if not global.map_init_done then
if not storage.map_init_done then
game.map_settings.enemy_expansion.enabled = false
game.map_settings.enemy_evolution.time_factor = 0
game.map_settings.enemy_evolution.pollution_factor = 0
--game.map_settings.pollution.enabled = false
global.map_init_done = true
storage.map_init_done = true
end

if player.online_time == 0 then
player.insert {name = 'iron-plate', count = 32}
player.insert { name = 'iron-plate', count = 32 }
end
end

Expand All @@ -36,7 +36,7 @@ local function on_chunk_generated(event)
]]
for x = 0, 31, 1 do
for y = 0, 31, 1 do
local pos = {x = left_top.x + x, y = left_top.y + y}
local pos = { x = left_top.x + x, y = left_top.y + y }
if math_random(1, 60000) == 1 then
map_functions.draw_entity_circle(pos, 'stone', surface, 6, true, 1000000)
map_functions.draw_entity_circle(pos, 'coal', surface, 12, true, 1000000)
Expand All @@ -63,10 +63,10 @@ local function on_chunk_generated(event)
surface.create_entity(entity)
end
]]
if not global.spawn_generated and left_top.x <= -96 then
map_functions.draw_noise_tile_circle({x = 0, y = 0}, 'stone-path', surface, 21)
map_functions.draw_noise_tile_circle({x = 0, y = 0}, 'concrete', surface, 7)
global.spawn_generated = true
if not storage.spawn_generated and left_top.x <= -96 then
map_functions.draw_noise_tile_circle({ x = 0, y = 0 }, 'stone-path', surface, 21)
map_functions.draw_noise_tile_circle({ x = 0, y = 0 }, 'concrete', surface, 7)
storage.spawn_generated = true
end
end

Expand Down
Loading

0 comments on commit 2689768

Please sign in to comment.