1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-11-23 22:22:34 +02:00

Fix RPG stats command to be more available

This commit is contained in:
Gerkiz
2025-09-24 22:56:25 +02:00
parent de4fdb66b6
commit 56c27bf138

View File

@@ -10,48 +10,13 @@ local validate_args = function (data)
local target = data.target
local rpg_t = Public.get_value_from_player(target.index)
if not target then
if not target or not target.valid then
Utils.print_to(player, 'Invalid target.')
return false
end
if not target.valid then
return false
end
if not target.character then
return false
end
if not target.connected then
return false
end
if not game.players[target.index] then
return false
end
if not player then
return false
end
if not player.valid then
return false
end
if not player.character then
return false
end
if not player.connected then
return false
end
if not game.players[player.index] then
return false
end
if not target or not game.players[target.index] then
Utils.print_to(player, 'Invalid name.')
if not player or not player.valid then
Utils.print_to(player, 'Invalid player.')
return false
end