mirror of
https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn.git
synced 2024-12-12 10:13:58 +02:00
Fix infinite tech notifications.
This commit is contained in:
parent
ecdda29839
commit
fb52af346f
@ -1,4 +1,9 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.1.17
|
||||
Date: ????
|
||||
Bugfixes:
|
||||
- Fix incorrect names printed for infinite technology research.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.1.16
|
||||
Date: 2024-12-03
|
||||
Bugfixes:
|
||||
|
19
control.lua
19
control.lua
@ -148,9 +148,22 @@ script.on_event(defines.events.on_player_driving_changed_state, function (event)
|
||||
end)
|
||||
|
||||
script.on_event(defines.events.on_research_finished, function(event)
|
||||
if (storage.ocfg.gameplay.enable_shared_team_chat) then
|
||||
local research = event.research
|
||||
SendBroadcastMsg({"oarc-research-finished", research.force.name, research.name}, { color = research.force.color, sound = defines.print_sound.never })
|
||||
local research = event.research
|
||||
|
||||
-- Duplicates the research finished message for all forces if shared team chat is enabled.
|
||||
-- The force that did the research always gets a sound notification even if the technology_notifications_enabled is false.
|
||||
for _,force in pairs(game.forces) do
|
||||
if (force == research.force) or (storage.ocfg.gameplay.enable_shared_team_chat) then
|
||||
if (prototypes.technology[research.name].max_level ~= 4294967295) then
|
||||
CompatSend(force,
|
||||
{"oarc-research-finished", research.force.name, research.name},
|
||||
{ color = research.force.color, sound = defines.print_sound.never })
|
||||
else
|
||||
CompatSend(force,
|
||||
{"oarc-research-finished-infinite", research.force.name, research.name, research.localised_name, research.level},
|
||||
{ color = research.force.color, sound = defines.print_sound.never })
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "oarc-mod",
|
||||
"version": "2.1.16",
|
||||
"version": "2.1.17",
|
||||
"factorio_version": "2.0",
|
||||
"title": "Oarc Multiplayer Spawn",
|
||||
"author": "Oarcinae",
|
||||
|
@ -397,7 +397,8 @@ oarc-spawn-distance-invalid-msg=Invalid setting! Near spawn min distance is grea
|
||||
oarc-world-eater-invalid-msg=Invalid setting! World eater is enabled but regrowth is not! Disabling world eater.
|
||||
oarc-default-surface-invalid-msg=Invalid setting! Default surface does not exist! Setting to __PLANET__nauvis__.
|
||||
|
||||
oarc-research-finished=Team __1__ has finished researching [technology=__2__]!
|
||||
oarc-research-finished=Team __1__ researched [technology=__2__]!
|
||||
oarc-research-finished-infinite=Team __1__ researched [img=technology.__2__] [color=green][Technology: __3__ __4__][/color]!
|
||||
|
||||
oarc-command-dude-wheres-my-cargo-pod=This will attempt to teleport any cargo-pods from the map center to you if they are on the same force as you. This is meant to be a temporary workaround until I find a way to send cargo pods directly to a new spawn.
|
||||
oarc-command-reroll-spawn=This will reroll your spawn (on whichever surface you are currently on). This is useful if you are stuck in a bad spot or want to try a different location. [color=red]Spam this at your own peril![/color]
|
||||
|
Loading…
Reference in New Issue
Block a user