mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2024-12-26 22:56:43 +02:00
added miner tag, fixed wrong text position
This commit is contained in:
parent
5d46444d69
commit
1e120eed52
@ -225,18 +225,18 @@ function Public.share_chat(event)
|
||||
local color = player.chat_color
|
||||
|
||||
if player.force.name == "north" then
|
||||
game.forces.spectator.print(player.name .. " (north): ".. event.message .. tag, color)
|
||||
game.forces.spectator.print(player.name .. tag .. " (north): ".. event.message, color)
|
||||
end
|
||||
if player.force.name == "south" then
|
||||
game.forces.spectator.print(player.name .. " (south): ".. event.message .. tag, color)
|
||||
game.forces.spectator.print(player.name .. tag .. " (south): ".. event.message, color)
|
||||
end
|
||||
|
||||
if global.tournament_mode then return end
|
||||
|
||||
if player.force.name == "player" then
|
||||
game.forces.north.print(player.name .. " (spawn): ".. event.message .. tag, color)
|
||||
game.forces.south.print(player.name .. " (spawn): ".. event.message .. tag, color)
|
||||
game.forces.spectator.print(player.name .. " (spawn): ".. event.message .. tag, color)
|
||||
game.forces.north.print(player.name .. tag .. " (spawn): ".. event.message, color)
|
||||
game.forces.south.print(player.name .. tag .. " (spawn): ".. event.message, color)
|
||||
game.forces.spectator.print(player.name .. tag .. " (spawn): ".. event.message, color)
|
||||
end
|
||||
if player.force.name == "spectator" then
|
||||
|
||||
@ -244,8 +244,8 @@ function Public.share_chat(event)
|
||||
local a, b = string_find(event.message, "gps=", 1, false)
|
||||
if a then return end
|
||||
|
||||
game.forces.north.print(player.name .. " (spectator): ".. event.message .. tag, color)
|
||||
game.forces.south.print(player.name .. " (spectator): ".. event.message .. tag, color)
|
||||
game.forces.north.print(player.name .. tag .. " (spectator): ".. event.message, color)
|
||||
game.forces.south.print(player.name .. tag .. " (spectator): ".. event.message, color)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -31,6 +31,7 @@ function Public.initial_setup()
|
||||
defines.input_action.activate_copy,
|
||||
defines.input_action.activate_cut,
|
||||
defines.input_action.activate_paste,
|
||||
defines.input_action.change_active_quick_bar,
|
||||
defines.input_action.clean_cursor_stack,
|
||||
defines.input_action.edit_permission_group,
|
||||
defines.input_action.gui_click,
|
||||
@ -44,14 +45,14 @@ function Public.initial_setup()
|
||||
defines.input_action.gui_value_changed,
|
||||
defines.input_action.open_character_gui,
|
||||
defines.input_action.open_kills_gui,
|
||||
defines.input_action.quick_bar_set_selected_page,
|
||||
defines.input_action.quick_bar_set_slot,
|
||||
defines.input_action.rotate_entity,
|
||||
defines.input_action.set_filter,
|
||||
defines.input_action.set_player_color,
|
||||
defines.input_action.start_walking,
|
||||
defines.input_action.toggle_show_entity_info,
|
||||
defines.input_action.write_to_console,
|
||||
defines.input_action.change_active_quick_bar,
|
||||
defines.input_action.quick_bar_set_selected_page,
|
||||
defines.input_action.quick_bar_set_slot,
|
||||
defines.input_action.set_filter
|
||||
}
|
||||
for _, d in pairs(defs) do p.set_allows_action(d, true) end
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
local Event = require 'utils.event'
|
||||
|
||||
local icons = {
|
||||
local icons = {
|
||||
{"[img=item/electric-mining-drill]", "item/electric-mining-drill", "Miner"},
|
||||
{"[img=item/stone-furnace]", "item/stone-furnace", "Smeltery"},
|
||||
{"[img=item/big-electric-pole]", "item/big-electric-pole", "Power"},
|
||||
{"[img=item/assembling-machine-1]", "item/assembling-machine-1", "Production"},
|
||||
@ -52,7 +53,7 @@ local function draw_screen_gui(player)
|
||||
local frame = player.gui.screen.add({
|
||||
type = "frame",
|
||||
name = "simple_tag_frame",
|
||||
caption = "Pick your duty:",
|
||||
direction = "vertical",
|
||||
})
|
||||
frame.location = {x = get_x_offset(player), y = 39}
|
||||
frame.style.padding = -1
|
||||
|
Loading…
Reference in New Issue
Block a user