mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Add Missing Command Locales (#331)
* Update lawnmower.lua * Update bonus.lua * Update greetings.lua * Update personal-logistic.lua * Update quickbar.lua * Update personal_logistic.lua * Update tag.lua * Update commands.cfg * Update commands.cfg * Update commands.cfg
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
-- @config Personal Logistic
|
||||
|
||||
return {
|
||||
start = 0,
|
||||
production_required = {
|
||||
['belt'] = 100,
|
||||
['power'] = 20,
|
||||
|
||||
@@ -14,6 +14,7 @@ revert=You cannot edit admin markers.
|
||||
description=Artillery Target Remote
|
||||
|
||||
[expcom-bonus]
|
||||
description=Changes the amount of bonus you receive
|
||||
set=Your bonus has been set to __1__.
|
||||
perm=You dont have enough permission to set more than __1__.
|
||||
|
||||
@@ -96,10 +97,17 @@ remove=__1__ was unjailed by __2__.
|
||||
already-jailed=__1__ is already in jail.
|
||||
not-jailed=__1__ is not currently in jail.
|
||||
|
||||
[expcom-join-message]
|
||||
description-msg=Sets your custom join message
|
||||
description-clr=Clear your join message
|
||||
|
||||
[expcom-kill]
|
||||
description=Kills yourself or another player.
|
||||
already-dead=You are already dead.
|
||||
|
||||
[expcom-lawnmower]
|
||||
description=Clean up biter corpse, decoratives and nuclear hole
|
||||
|
||||
[expcom-lastlocation]
|
||||
description=Sends you the last location of a player
|
||||
response=Last location of __1__ was [gps=__2__,__3__]
|
||||
@@ -107,6 +115,9 @@ response=Last location of __1__ was [gps=__2__,__3__]
|
||||
[expcom-me]
|
||||
description=Sends an action message in the chat
|
||||
|
||||
[expcom-personal-logistics]
|
||||
description=Set Personal Logistic (-1 to cancel all) (Select spidertron to edit spidertron)
|
||||
|
||||
[expcom-pol]
|
||||
description-clr=Clear pollution
|
||||
description-off=Disable pollution
|
||||
@@ -125,6 +136,9 @@ protected-area=This area is now protected.
|
||||
unprotected-area=This area is now unprotected.
|
||||
repeat-offence=__1__ has removed __2__ at [gps=__3__,__4__]
|
||||
|
||||
[expcom-quickbar]
|
||||
description=Saves your quickbar preset items to file
|
||||
|
||||
[expcom-rainbow]
|
||||
description=Sends an rainbow message in the chat
|
||||
|
||||
@@ -198,6 +212,10 @@ result=__1__ set the game speed to __2__
|
||||
description-ci=Clear Item On Ground
|
||||
description-cb=Clear Blueprint
|
||||
|
||||
[expcom-tag]
|
||||
description=Sets your player tag.
|
||||
description-clear=Clears your tag. Or another player if you are admin.
|
||||
|
||||
[expcom-tp]
|
||||
description-tp=Teleports a player to another player.
|
||||
description-bring=Teleports a player to you.
|
||||
|
||||
@@ -14,6 +14,7 @@ revert=你沒辦法修改管理員地圖標記。
|
||||
description=火炮遙控
|
||||
|
||||
[expcom-bonus]
|
||||
description=更改你的 bonus 比例
|
||||
set=你的 bonus 已經設定為 __1__。
|
||||
perm=你沒有足夠的權限設定多過 __1__的數值。
|
||||
|
||||
@@ -96,10 +97,17 @@ remove=__1__ 已被 __2__ 取消送監。
|
||||
already-jailed=__1__ 已被禁止行動。
|
||||
not-jailed=__1__ 目前沒有被禁止行動。
|
||||
|
||||
[expcom-join-message]
|
||||
description-msg=設定你的加入訊息
|
||||
description-clr=清除你的加入訊息
|
||||
|
||||
[expcom-kill]
|
||||
description=弄死你自己或其他用戶。
|
||||
already-dead=你已經死了。
|
||||
|
||||
[expcom-lawnmower]
|
||||
description=清理屍體、裝飾和核洞
|
||||
|
||||
[expcom-lastlocation]
|
||||
description=取得其他用戶的最後出現地點
|
||||
response=__1__ 最後出現在 [gps=__2__,__3__]
|
||||
@@ -107,6 +115,9 @@ response=__1__ 最後出現在 [gps=__2__,__3__]
|
||||
[expcom-me]
|
||||
description=在聊天中發送操作訊息
|
||||
|
||||
[expcom-personal-logistics]
|
||||
description=設定個人物流(-1取消全部)(選擇蜘蛛以設定蜘蛛)
|
||||
|
||||
[expcom-pol]
|
||||
description-clr=清除污染
|
||||
description-off=停用污染
|
||||
@@ -125,6 +136,9 @@ protected-area=本地區現已受保護。
|
||||
unprotected-area=本地區現不受保護。
|
||||
repeat-offence=__1__ 在 [gps=__3__,__4__] 拆除了 __2__
|
||||
|
||||
[expcom-quickbar]
|
||||
description=將快速欄預設項目儲存到文件
|
||||
|
||||
[expcom-rainbow]
|
||||
description=在聊天中發送多色訊息
|
||||
|
||||
@@ -198,6 +212,10 @@ result=__1__ 把遊戲速度改成 __2__ 。
|
||||
description-ci=清除地面上的物品
|
||||
description-cb=清除藍圖
|
||||
|
||||
[expcom-tag]
|
||||
description=設定你的玩家標籤。
|
||||
description-clear=清除你的標籤。如果你是管理員,也可以清除其他玩家。
|
||||
|
||||
[expcom-tp]
|
||||
description-tp=將一名玩家傳送到另一名玩家。
|
||||
description-bring=將一名玩家傳送到你身邊。
|
||||
|
||||
@@ -14,6 +14,7 @@ revert=你沒辦法修改管理員地圖標記。
|
||||
description=火炮遙控
|
||||
|
||||
[expcom-bonus]
|
||||
description=更改你的 bonus 比例
|
||||
set=你的 bonus 已經設定為 __1__。
|
||||
perm=你沒有足夠的權限設定多過 __1__的數值。
|
||||
|
||||
@@ -96,10 +97,17 @@ remove=__1__ 已被 __2__ 取消送監。
|
||||
already-jailed=__1__ 已被禁止行動。
|
||||
not-jailed=__1__ 目前沒有被禁止行動。
|
||||
|
||||
[expcom-join-message]
|
||||
description-msg=設定你的加入訊息
|
||||
description-clr=清除你的加入訊息
|
||||
|
||||
[expcom-kill]
|
||||
description=弄死你自己或其他用戶。
|
||||
already-dead=你已經死了。
|
||||
|
||||
[expcom-lawnmower]
|
||||
description=清理屍體、裝飾和核洞
|
||||
|
||||
[expcom-lastlocation]
|
||||
description=取得其他用戶的最後出現地點
|
||||
response=__1__ 最後出現在 [gps=__2__,__3__]
|
||||
@@ -107,6 +115,9 @@ response=__1__ 最後出現在 [gps=__2__,__3__]
|
||||
[expcom-me]
|
||||
description=在聊天中發送操作訊息
|
||||
|
||||
[expcom-personal-logistics]
|
||||
description=設定個人物流(-1取消全部)(選擇蜘蛛以設定蜘蛛)
|
||||
|
||||
[expcom-pol]
|
||||
description-clr=清除污染
|
||||
description-off=停用污染
|
||||
@@ -125,6 +136,9 @@ protected-area=本地區現已受保護。
|
||||
unprotected-area=本地區現不受保護。
|
||||
repeat-offence=__1__ 在 [gps=__3__,__4__] 拆除了 __2__
|
||||
|
||||
[expcom-quickbar]
|
||||
description=將快速欄預設項目儲存到文件
|
||||
|
||||
[expcom-rainbow]
|
||||
description=在聊天中發送多色訊息
|
||||
|
||||
@@ -198,6 +212,10 @@ result=__1__ 把遊戲速度改成 __2__ 。
|
||||
description-ci=清除地面上的物品
|
||||
description-cb=清除藍圖
|
||||
|
||||
[expcom-tag]
|
||||
description=設定你的玩家標籤。
|
||||
description-clear=清除你的標籤。如果你是管理員,也可以清除其他玩家。
|
||||
|
||||
[expcom-tp]
|
||||
description-tp=將一名玩家傳送到另一名玩家。
|
||||
description-bring=將一名玩家傳送到你身邊。
|
||||
|
||||
@@ -8,7 +8,7 @@ local Event = require 'utils.event' --- @dep utils.event
|
||||
local config = require 'config.lawnmower' --- @dep config.lawnmower
|
||||
require 'config.expcore.command_general_parse'
|
||||
|
||||
Commands.new_command('lawnmower', 'Clean up biter corpse, decoratives and nuclear hole')
|
||||
Commands.new_command('lawnmower', {'expcom-lawnmower.description'}, 'Clean up biter corpse, decoratives and nuclear hole')
|
||||
:add_param('range', false, 'integer-range', 1, 200)
|
||||
:register(function(player, range)
|
||||
local tile_to_do = {}
|
||||
|
||||
@@ -49,7 +49,7 @@ end)
|
||||
--- Changes the amount of bonus you receive
|
||||
-- @command bonus
|
||||
-- @tparam number amount range 0-10 the increase for your bonus
|
||||
Commands.new_command('bonus', 'Changes the amount of bonus you receive')
|
||||
Commands.new_command('bonus', {'expcom-bonus.description'}, 'Changes the amount of bonus you receive')
|
||||
:add_param('amount', 'integer-range', 0, 10)
|
||||
:register(function(player, amount)
|
||||
if not Roles.player_allowed(player, 'command/bonus') then
|
||||
|
||||
@@ -26,7 +26,7 @@ end)
|
||||
--- Set your custom join message
|
||||
-- @command join-message
|
||||
-- @tparam string message The custom join message that will be used
|
||||
Commands.new_command('join-message', 'Sets your custom join message')
|
||||
Commands.new_command('join-message', {'expcom-join-message.description-msg'}, 'Sets your custom join message')
|
||||
:add_param('message', false, 'string-max-length', 255)
|
||||
:enable_auto_concat()
|
||||
:register(function(player, message)
|
||||
@@ -35,9 +35,9 @@ Commands.new_command('join-message', 'Sets your custom join message')
|
||||
return {'join-message.message-set'}
|
||||
end)
|
||||
|
||||
Commands.new_command('join-message-clear', 'Clear your join message')
|
||||
Commands.new_command('join-message-clear', {'expcom-join-message.description-clr'}, 'Clear your join message')
|
||||
:register(function(player)
|
||||
if not player then return end
|
||||
CustomMessages:remove(player)
|
||||
return {'join-message.message-cleared'}
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local config = require 'config.personal_logistic' --- @dep config.personal-logistic
|
||||
|
||||
local function pl(type, target, amount)
|
||||
local pl = {}
|
||||
|
||||
function pl.pl(type, target, amount)
|
||||
local c
|
||||
local s
|
||||
|
||||
@@ -18,7 +20,7 @@ local function pl(type, target, amount)
|
||||
end
|
||||
|
||||
for _, v in pairs(config.request) do
|
||||
c(config.start + v.key)
|
||||
c(v.key)
|
||||
end
|
||||
|
||||
if (amount < 0) then
|
||||
@@ -31,13 +33,13 @@ local function pl(type, target, amount)
|
||||
local v_min = math.ceil(v.min * amount)
|
||||
local v_max = math.ceil(v.max * amount)
|
||||
|
||||
if v.stack ~= nil and v.stack ~= 1 and v.type ~= 'weapon' then
|
||||
if v.stack and v.stack ~= 1 and v.type ~= 'weapon' then
|
||||
v_min = math.floor(v_min / v.stack) * v.stack
|
||||
v_max = math.ceil(v_max / v.stack) * v.stack
|
||||
end
|
||||
|
||||
if v.upgrade_of == nil then
|
||||
if v.type ~= nil then
|
||||
if v.type then
|
||||
if stats.get_input_count(k) < config.production_required[v.type] then
|
||||
if v_min > 0 then
|
||||
if v_min == v_max then
|
||||
@@ -50,40 +52,40 @@ local function pl(type, target, amount)
|
||||
end
|
||||
end
|
||||
|
||||
s(config.start + v.key, {name=k, min=v_min, max=v_max})
|
||||
s(v.key, {name=k, min=v_min, max=v_max})
|
||||
|
||||
else
|
||||
if v.type ~= nil then
|
||||
if v.type then
|
||||
if stats.get_input_count(k) >= config.production_required[v.type] then
|
||||
s(config.start + v.key, {name=k, min=v_min, max=v_max})
|
||||
s(v.key, {name=k, min=v_min, max=v_max})
|
||||
local vuo = v.upgrade_of
|
||||
|
||||
while (vuo ~= nil) do
|
||||
s(config.start + config.request[vuo].key, {name=vuo, min=0, max=0})
|
||||
while vuo do
|
||||
s(config.request[vuo].key, {name=vuo, min=0, max=0})
|
||||
vuo = config.request[vuo].upgrade_of
|
||||
end
|
||||
|
||||
else
|
||||
s(config.start + v.key, {name=k, min=0, max=v_max})
|
||||
s(v.key, {name=k, min=0, max=v_max})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Commands.new_command('personal-logistic', 'Set Personal Logistic (-1 to cancel all) (Select spidertron to edit spidertron)')
|
||||
Commands.new_command('personal-logistic', {'expcom-personal-logistics'}, 'Set Personal Logistic (-1 to cancel all) (Select spidertron to edit spidertron)')
|
||||
:add_param('amount', 'integer-range', -1, 10)
|
||||
:add_alias('pl')
|
||||
:register(function(player, amount)
|
||||
if player.force.technologies['logistic-robotics'].researched then
|
||||
if player.selected ~= nil then
|
||||
if player.selected then
|
||||
if player.selected.name == 'spidertron' then
|
||||
pl('s', player.selected, amount / 10)
|
||||
pl.pl('s', player.selected, amount / 10)
|
||||
return Commands.success
|
||||
end
|
||||
|
||||
else
|
||||
pl('p', player, amount / 10)
|
||||
pl.pl('p', player, amount / 10)
|
||||
return Commands.success
|
||||
end
|
||||
|
||||
@@ -91,3 +93,5 @@ Commands.new_command('personal-logistic', 'Set Personal Logistic (-1 to cancel a
|
||||
player.print('Personal Logistic not researched')
|
||||
end
|
||||
end)
|
||||
|
||||
return pl
|
||||
|
||||
@@ -41,7 +41,7 @@ local ignoredItems = {
|
||||
|
||||
--- Saves your quickbar preset to the script-output folder
|
||||
-- @command save-quickbar
|
||||
Commands.new_command('save-quickbar', 'Saves your Quickbar preset items to file')
|
||||
Commands.new_command('save-quickbar', {'expcom-quickbar.description'}, 'Saves your quickbar preset items to file')
|
||||
:add_alias('save-toolbar')
|
||||
:register(function(player)
|
||||
local filters = {}
|
||||
@@ -64,4 +64,4 @@ Commands.new_command('save-quickbar', 'Saves your Quickbar preset items to file'
|
||||
end
|
||||
|
||||
return {'quickbar.saved'}
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -49,7 +49,7 @@ end)
|
||||
--- Sets your player tag.
|
||||
-- @command tag
|
||||
-- @tparam string tag the tag that will be after the name, there is a max length
|
||||
Commands.new_command('tag', 'Sets your player tag.')
|
||||
Commands.new_command('tag', {'expcom-tag.description'}, 'Sets your player tag.')
|
||||
:add_param('tag', false, 'string-max-length', 20)
|
||||
:enable_auto_concat()
|
||||
:register(function(player, tag)
|
||||
@@ -69,7 +69,7 @@ end)
|
||||
--- Clears your tag. Or another player if you are admin.
|
||||
-- @command tag-clear
|
||||
-- @tparam[opt=self] LuaPlayer player the player to remove the tag from, nil will apply to self
|
||||
Commands.new_command('tag-clear', 'Clears your tag. Or another player if you are admin.')
|
||||
Commands.new_command('tag-clear', {'expcom-tag.description-clear'}, 'Clears your tag. Or another player if you are admin.')
|
||||
:add_param('player', true, 'player-role')
|
||||
:set_defaults{player=function(player)
|
||||
return player -- default is the user using the command
|
||||
@@ -78,11 +78,13 @@ end}
|
||||
if action_player.index == player.index then
|
||||
-- no player given so removes your tag
|
||||
PlayerTags:remove(action_player)
|
||||
|
||||
elseif Roles.player_allowed(player, 'command/clear-tag/always') then
|
||||
-- player given and user is admin so clears that player's tag
|
||||
PlayerTags:remove(action_player)
|
||||
|
||||
else
|
||||
-- user is not admin and tried to clear another users tag
|
||||
return Commands.error{'expcore-commands.unauthorized'}
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user