1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00

tag_group: deafult - > default, remove ipairs

This commit is contained in:
plague006 2019-02-03 00:05:38 -05:00 committed by Matthew Heguy
parent 041f46843d
commit c9404d8222

View File

@ -5,10 +5,9 @@ local Rank = require 'features.rank_system'
local Game = require 'utils.game'
local Command = require 'utils.command'
local Ranks = require 'resources.ranks'
local deafult_verb = 'expanded'
local tag_groups = require 'resources.tag_groups'
local default_verb = 'expanded'
local player_tags = {}
local no_notify_players = {}
@ -22,7 +21,9 @@ Global.register(
)
local function notify_players(message)
for _, p in ipairs(game.connected_players) do
local players = game.connected_players
for i=1, #players do
local p = players[i]
if p.valid and not no_notify_players[p.index] then
p.print(message)
end
@ -70,7 +71,7 @@ local function change_player_tag(player, tag_name, silent)
player.tag = tag
local verb = tag_data.verb or deafult_verb
local verb = tag_data.verb or default_verb
if not silent then
notify_players(tag .. ' squad has `' .. verb .. '` with ' .. player.name)
@ -590,7 +591,7 @@ Gui.on_click(
local verb = data.verb.text
if verb == '' then
verb = deafult_verb
verb = default_verb
end
Gui.remove_data_recursively(frame)