Factorio: Added ability to chat from within the game. (#1068)

* Factorio: Added ability to chat from within the game.
This also allows using commands such as !hint from within the game.

* Factorio: Only prepend player names to chat in multiplayer.

* Factorio: Mirror chat sent from the FactorioClient UI to the Factorio server.

* Factorio: Remove local coordinates from outgoing chat.

* Factorio: Added setting to disable bridging chat out.
Added client command to toggle this setting at run-time.

* Factorio: Added in-game command to toggle chat bridging setting at run-time.

* .

* Factorio: Document toggle for chat bridging feature.

* (Removed superfluous type annotations.)

* (Removed hard to read regex.)

* Docs/Factorio: Fix display of multiline code snippets.
This commit is contained in:
recklesscoder
2022-10-28 00:45:26 +02:00
committed by GitHub
parent 924f484be0
commit cfff12d8d7
5 changed files with 76 additions and 13 deletions

View File

@@ -157,6 +157,7 @@ function on_player_created(event)
{%- if silo == 2 %}
check_spawn_silo(game.players[event.player_index].force)
{%- endif %}
dumpInfo(player.force)
end
script.on_event(defines.events.on_player_created, on_player_created)
@@ -491,6 +492,7 @@ commands.add_command("ap-sync", "Used by the Archipelago client to get progress
["death_link"] = DEATH_LINK,
["energy"] = chain_lookup(forcedata, "energy"),
["energy_bridges"] = chain_lookup(forcedata, "energy_bridges"),
["multiplayer"] = #game.players > 1,
}
for tech_name, tech in pairs(force.technologies) do
@@ -600,5 +602,9 @@ commands.add_command("toggle-ap-send-filter", "Toggle filtering of item sends th
log("Player command toggle-ap-send-filter") -- notifies client
end)
commands.add_command("toggle-ap-chat", "Toggle sending of chat messages from players on the Factorio server to Archipelago.", function(call)
log("Player command toggle-ap-chat") -- notifies client
end)
-- data
progressive_technologies = {{ dict_to_lua(progressive_technology_table) }}