From 90faf2ff93e9199f5b7ba9e69847e8fe7bb2b818 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 10 Sep 2024 19:07:02 +0900 Subject: [PATCH] Add Command Description Locale (#323) * Update admin-chat.lua * Update admin-markers.lua * Update artillery.lua * Update bot-queue.lua * Update cheat-mode.lua * Update clear-inventory.lua * Update connect.lua * Update debug.lua * Update enemy.lua * Update find.lua * Update friendly-fire.lua * Update help.lua * Update home.lua * Update interface.lua * Update jail.lua * Update kill.lua * Update last-location.lua * Update me.lua * Update pollution.lua * Update protection.lua * Update rainbow.lua * Update ratio.lua * Update repair.lua * Update reports.lua * Update research.lua * Update roles.lua * Update roles.lua * Update search.lua * Update spawn.lua * Update spectate.lua * Update speed.lua * Update surface-clearing.lua * Update teleport.lua * Update train.lua * Update vlayer.lua * Update warnings.lua * Update waterfill.lua * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update commands.cfg * Update commands.cfg * Update commands.cfg * Update connect.lua * Update cheat-mode.lua * Update commands.cfg * Update commands.cfg * Update commands.cfg * Update commands.cfg * Update commands.cfg * Update commands.cfg * Update admin-chat.lua * Update admin-markers.lua * Update vlayer.lua * Update artillery.lua * Update bot-queue.lua * Update cheat-mode.lua * Update clear-inventory.lua * Update connect.lua * Update debug.lua * Update enemy.lua * Update find.lua * Update friendly-fire.lua * Update help.lua * Update home.lua * Update interface.lua * Update jail.lua * Update kill.lua * Update last-location.lua * Update me.lua * Update pollution.lua * Update protection.lua * Update rainbow.lua * Update ratio.lua * Update repair.lua * Update reports.lua * Update research.lua * Update roles.lua * Update search.lua * Update spawn.lua * Update spectate.lua * Update speed.lua * Update surface-clearing.lua * Update teleport.lua * Update train.lua * Update warnings.lua * Update waterfill.lua * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update commands.cfg * Update commands.cfg * Update addons.cfg * Update addons.cfg * Update data.cfg * Update data.cfg * Update gui.cfg * Update gui.cfg * Update data.cfg * Update data.cfg * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update gui.cfg * Update commands.lua * Update admin-chat.lua * Update admin-markers.lua * Update artillery.lua * Update bot-queue.lua * Update cheat-mode.lua * Update clear-inventory.lua * Update connect.lua * Update debug.lua * Update enemy.lua * Update find.lua * Update help.lua * Update interface.lua * Update home.lua * Update jail.lua * Update kill.lua * Update last-location.lua * Update me.lua * Update pollution.lua * Update protection.lua * Update rainbow.lua * Update ratio.lua * Update repair.lua * Update reports.lua * Update research.lua * Update roles.lua * Update search.lua * Update spawn.lua * Update spectate.lua * Update speed.lua * Update surface-clearing.lua * Update teleport.lua * Update train.lua * Update vlayer.lua * Update warnings.lua * Update waterfill.lua * Update commands.cfg * Update commands.cfg * Update enemy.lua * Update friendly-fire.lua * Update roles.lua * Update spectate.lua * Update spectate.lua --- expcore/commands.lua | 21 +- locale/en/commands.cfg | 284 ++++++++++++++++---------- locale/en/gui.cfg | 3 + locale/zh-CN/addons.cfg | 2 +- locale/zh-CN/commands.cfg | 280 ++++++++++++++++--------- locale/zh-CN/data.cfg | 52 ++--- locale/zh-CN/gui.cfg | 43 ++-- locale/zh-TW/addons.cfg | 2 +- locale/zh-TW/commands.cfg | 280 ++++++++++++++++--------- locale/zh-TW/data.cfg | 52 ++--- locale/zh-TW/gui.cfg | 43 ++-- modules/commands/admin-chat.lua | 5 +- modules/commands/admin-markers.lua | 4 +- modules/commands/artillery.lua | 2 +- modules/commands/bot-queue.lua | 4 +- modules/commands/cheat-mode.lua | 6 +- modules/commands/clear-inventory.lua | 2 +- modules/commands/connect.lua | 8 +- modules/commands/debug.lua | 4 +- modules/commands/enemy.lua | 5 +- modules/commands/find.lua | 4 +- modules/commands/friendly-fire.lua | 2 +- modules/commands/help.lua | 16 +- modules/commands/home.lua | 10 +- modules/commands/interface.lua | 4 +- modules/commands/jail.lua | 4 +- modules/commands/kill.lua | 6 +- modules/commands/last-location.lua | 2 +- modules/commands/me.lua | 4 +- modules/commands/pollution.lua | 4 +- modules/commands/protection.lua | 6 +- modules/commands/rainbow.lua | 4 +- modules/commands/ratio.lua | 116 ++++++----- modules/commands/repair.lua | 4 +- modules/commands/reports.lua | 8 +- modules/commands/research.lua | 2 +- modules/commands/roles.lua | 17 +- modules/commands/search.lua | 10 +- modules/commands/spawn.lua | 7 +- modules/commands/spectate.lua | 8 +- modules/commands/speed.lua | 2 +- modules/commands/surface-clearing.lua | 6 +- modules/commands/teleport.lua | 6 +- modules/commands/train.lua | 2 +- modules/commands/vlayer.lua | 6 +- modules/commands/warnings.lua | 8 +- modules/commands/waterfill.lua | 13 +- 47 files changed, 848 insertions(+), 535 deletions(-) diff --git a/expcore/commands.lua b/expcore/commands.lua index 18cbf289..001fc855 100644 --- a/expcore/commands.lua +++ b/expcore/commands.lua @@ -393,13 +393,19 @@ local commands = Commands.get() ]] function Commands.get(player) player = Game.get_player_from_any(player) - if not player then return Commands.commands end + + if not player then + return Commands.commands + end + local allowed = {} + for name, command_data in pairs(Commands.commands) do if Commands.authorize(player, name) then allowed[name] = command_data end end + return allowed end @@ -419,14 +425,17 @@ function Commands.search(keyword, player) local custom_commands = Commands.get(player) local matches = {} keyword = keyword:lower() + -- Loops over custom commands for name, command_data in pairs(custom_commands) do -- combines name help and aliases into one message to be searched - local search = string.format('%s %s %s', name, command_data.help, table.concat(command_data.aliases, ' ')) + local search = string.format('%s %s %s %s', name, command_data.help, command_data.searchable_description, table.concat(command_data.aliases, ' ')) + if search:lower():match(keyword) then matches[name] = command_data end end + -- Loops over the names of game commands for name, description in pairs(commands.game_commands) do if name:lower():match(keyword) then @@ -439,6 +448,7 @@ function Commands.search(keyword, player) } end end + return matches end @@ -455,10 +465,11 @@ end Commands.new_command('repeat-name', 'Will repeat you name a number of times in chat.') ]] -function Commands.new_command(name, help) +function Commands.new_command(name, help, descr) local command = setmetatable({ name = name, help = help, + searchable_description = descr or '', callback = function() Commands.internal_error(false, name, 'No callback registered') end, auto_concat = false, min_param_count = 0, @@ -469,7 +480,9 @@ function Commands.new_command(name, help) }, { __index = Commands._prototype }) + Commands.commands[name] = command + return command end @@ -867,4 +880,4 @@ function Commands.run_command(command_event) command_log(player, command_data, 'Success', raw_params, raw_input) end -return Commands \ No newline at end of file +return Commands diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg index 7afa66c5..2dd3d2be 100644 --- a/locale/en/commands.cfg +++ b/locale/en/commands.cfg @@ -1,33 +1,150 @@ -[expcom-kill] -already-dead=You are already dead. - [expcom-admin-chat] +description=Sends a message in chat that only admins can see. format=[Admin Chat] __1__: __2__ -[expcom-tp] -no-position-found=No position to teleport to was found, please try again later. -to-self=Player can not be teleported to themselves. +[expcom-admin-marker] +description=Toggles admin marker mode, new markers can only be edited by admins +exit=You have left admin marker mode, all new markers will not be protected. +enter=You have entered admin marker mode, all new markers will be protected. +place=You have placed an admin marker. +edit=You have edited an admin marker. +revert=You cannot edit admin markers. + +[expcom-artillery] +description=Artillery Target Remote + +[expcom-bonus] +set=Your bonus has been set to __1__. +perm=You dont have enough permission to set more than __1__. + +[expcom-bot-queue] +description-get=Get bot queue +description-set=Set bot queue +result=__1__ set the bot queue to __2__ successful attempts and __3__ failed attempts + +[expcom-cheat] +description-cheat=Toggles cheat mode for your player, or another player. +description-res=Set all research for your force. +description-day=Toggles always day in surface. +res=__1__ has enabled all technologies +day=__1__ set always day to __2__ [expcom-chelp] +description=Searches for a keyword in all commands you are allowed to use. title=Help results for "__1__": footer=[__1__ results found: page __2__ of __3__] format=/__1__ __2__ - __3__ __4__ alias=Alias: __1__ out-of-range=__1__ is an invalid page number. -[expcom-roles] -higher-role=The role you tried to assign is higher than your highest. -list=All roles are: __1__ -list-player=__1__ has: __2__ -list-element=__1__, __2__ +[expcom-clr-inv] +description=Clears a players inventory + +[expcom-connect] +description=Connect to another server +description-player=Send a player to a different server +description-all=Connect all players to another server +too-many-matching=Multiple server were found with the given name: __1__ +wrong-version=Servers were found but are on a different version: __1__ +same-server=You are already connected to the server: __1__ +offline=You cannot connect as the server is currently offline: __1__ +none-matching=No servers were found with that name, if you used an address please append true to the end of your command. + +[expcom-debug] +description=Opens the debug pannel for viewing tables. + +[expcom-enemy] +description-kill=Kill all biters only +description-remove=Remove biters and prevent generation + +[expcom-ff] +description=Toggle friendly fire +ff=__1__ set friendly fire to __2__ + +[expcom-find] +description=Find a player on your map. + +[expcom-home] +description-home=Teleports you to your home location +description-home-set=Sets your home location to your current position +description-home-get=Returns your current home location +description-return=Teleports you to previous location +no-home=You have no home set. +no-return=You can't return when home has not yet been used. +home-set=Your home point has been set to x: __1__ y: __2__ +return-set=Your return point has been set to x: __1__ y: __2__ +home-get=Your home point is at x: __1__ y: __2__ + +[expcom-interface] +description=Sends an invocation to be ran and returns the result. + +[expcom-inv-search] +description-ia=Display players sorted by the quantity of an item held +description-ir=Display players who hold an item sorted by join time +description-i=Display players sorted by the quantity of an item held and playtime +description-io=Display online players sorted by the quantity of an item held and playtime +reject-item=No item was found with internal name __1__; try using rich text selection. +results-heading=Players found with [item=__1__]: +results-item=__1__) __2__ has __3__ items. (__4__) +results-none=No players have [item=__1__] [expcom-jail] +description-jail=Puts a player into jail and removes all other roles. +description-unjail=Removes a player from jail. give=__1__ was jailed by __2__. Reason: __3__ remove=__1__ was unjailed by __2__. already-jailed=__1__ is already in jail. not-jailed=__1__ is not currently in jail. +[expcom-kill] +description=Kills yourself or another player. +already-dead=You are already dead. + +[expcom-lastlocation] +description=Sends you the last location of a player +response=Last location of __1__ was [gps=__2__,__3__] + +[expcom-me] +description=Sends an action message in the chat + +[expcom-pol] +description-clr=Clear pollution +description-off=Disable pollution +clr=__1__ cleared the pollution. +off=__1__ disabled the pollution. + +[expcom-protection] +description-pe=Toggles entity protection selection, hold shift to remove protection +description-pa=Toggles area protection selection, hold shift to remove protection +entered-entity-selection=Entered entity selection, select entites to protect, hold shift to remove protection. +entered-area-selection=Entered area selection, select areas to protect, hold shift to remove protection. +protected-entities=__1__ entities have been protected. +unprotected-entities=__1__ entities have been unprotected. +already-protected=This area is already protected. +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-rainbow] +description=Sends an rainbow message in the chat + +[expcom-ratio] +description=This command will give the input and output ratios of the selected machine. Use the parameter for calculating the machines needed for that amount of items per second. +notSelecting=Please select an entity with a recipe. +item-in=You need __1__ per second of [item=__2__]. +fluid-in=You need __1__ per second of [fluid=__2__]. +item-out=This will result in: __1__ [item=__2__] per second. +fluid-out=This will result in: __1__ [fluid=__2__] per second. +machines=And you will need __1__ machines (with the same speed as this one) for this. + +[expcom-repair] +description=Repairs entities on your force around you +result=__1__ entites were revived and __2__ were healed to max health. + [expcom-report] +description-report=Reports a player and notifies moderators +description-get-reports=Gets a list of all reports that a player has on them. If no player then lists all players and the number of reports on them. +description-clear-reports=Clears all reports from a player or just the report from one player. player-immune=This player can not be reported. self-report=You cannot report yourself. non-admin=__1__ was reported for __2__. @@ -39,99 +156,8 @@ player-report-title=__1__ has the following reports against them: list=__1__: __2__ removed=__1__ has one or more reports removed by __2__. -[expcom-warnings] -received=__1__ received a warning from __2__ for __3__. -player=__1__ has __2__ warnings and __3__/__4__ script warnings. -player-detail=__1__ gave warning for: __2__ -list-title=The following players have this many warnings (and this many script warnings): -list=__1__: __2__ (__3__/__4__) -cleared=__1__ had all their warnings cleared by __2__. - -[expcom-spawn] -unavailable=They was a problem getting you to spawn, please try again later. - -[expcom-repair] -result=__1__ entites were revived and __2__ were healed to max health. - -[expcom-bonus] -set=Your bonus has been set to __1__. -perm=You dont have enough permission to set more than __1__. - -[expcom-ratio] -notSelecting=Please select an entity with a recipe. -item-in=You need __1__ per second of [item=__2__]. -fluid-in=You need __1__ per second of [fluid=__2__]. -item-out=This will result in: __1__ [item=__2__] per second. -fluid-out=This will result in: __1__ [fluid=__2__] per second. -machines=And you will need __1__ machines (with the same speed as this one) for this. - -[expcom-home] -no-home=You have no home set. -no-return=You can't return when home has not yet been used. -home-set=Your home point has been set to x: __1__ y: __2__ -return-set=Your return point has been set to x: __1__ y: __2__ -home-get=Your home point is at x: __1__ y: __2__ - -[expcom-server-ups] -no-ext=No external source was found, cannot display server ups. - -[expcom-connect] -too-many-matching=Multiple server were found with the given name: __1__ -wrong-version=Servers were found but are on a different version: __1__ -same-server=You are already connected to the server: __1__ -offline=You cannot connect as the server is currently offline: __1__ -none-matching=No servers were found with that name, if you used an address please append true to the end of your command. - -[expcom-lastlocation] -response=Last location of __1__ was [gps=__2__,__3__] - -[expcom-protection] -entered-entity-selection=Entered entity selection, select entites to protect, hold shift to remove protection. -entered-area-selection=Entered area selection, select areas to protect, hold shift to remove protection. -protected-entities=__1__ entities have been protected. -unprotected-entities=__1__ entities have been unprotected. -already-protected=This area is already protected. -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-spectate] -follow-self=You can not follow yourself - -[expcom-admin-marker] -exit=You have left admin marker mode, all new markers will not be protected. -enter=You have entered admin marker mode, all new markers will be protected. -place=You have placed an admin marker. -edit=You have edited an admin marker. -revert=You cannot edit admin markers. - -[expcom-inv-search] -reject-item=No item was found with internal name __1__; try using rich text selection. -results-heading=Players found with [item=__1__]: -results-item=__1__) __2__ has __3__ items. (__4__) -results-none=No players have [item=__1__] - -[expcom-speed] -result=__1__ set the game speed to __2__ - -[expcom-bot-queue] -result=__1__ set the bot queue to __2__ successful attempts and __3__ failed attempts - -[expcom-pol] -clr=__1__ cleared the pollution. -off=__1__ disabled the pollution. - -[expcom-train] -manual-result=__1__ put __2__ trains into automatic mode - -[expcom-cheat] -res=__1__ has enabled all technologies -day=__1__ set always day to __2__ - -[expcom-ff] -ff=__1__ set friendly fire to __2__ - [expcom-res] +description-ares=Automatically queue up research res=__1__ set auto research to __2__ msg=[color=255, 255, 255] Research completed at __1__ - [technology=__2__][/color] inf=[color=255, 255, 255] Research completed at __1__ - [technology=__2__] - __3__[/color] @@ -143,7 +169,59 @@ attempt=Attempt difference=Diff main-tooltip=Research GUI +[expcom-roles] +description-assign-role=Assigns a role to a player +description-unassign-role=Unassigns a role from a player +description-list-roles=Lists all roles in they correct order +higher-role=The role you tried to assign is higher than your highest. +list=All roles are: __1__ +list-player=__1__ has: __2__ +list-element=__1__, __2__ + +[expcom-server-ups] +no-ext=No external source was found, cannot display server ups. + +[expcom-spawn] +description=Teleport to spawn +unavailable=They was a problem getting you to spawn, please try again later. + +[expcom-spectate] +description-spectate=Toggles spectator mode +description-follow=Start following a player in spectator +follow-self=You can not follow yourself + +[expcom-speed] +description=Set game speed +result=__1__ set the game speed to __2__ + +[expcom-surface-clearing] +description-ci=Clear Item On Ground +description-cb=Clear Blueprint + +[expcom-tp] +description-tp=Teleports a player to another player. +description-bring=Teleports a player to you. +description-goto=Teleports you to a player. +no-position-found=No position to teleport to was found, please try again later. +to-self=Player can not be teleported to themselves. + +[expcom-train] +description=Set All Trains to Automatic +manual-result=__1__ put __2__ trains into automatic mode + +[expcom-warnings] +description-give=Gives a warning to a player; may lead to automatic script action. +description-get=Gets the number of warnings a player has. If no player then lists all players and the number of warnings they have. +description-clear=Clears all warnings (and script warnings) from a player +received=__1__ received a warning from __2__ for __3__. +player=__1__ has __2__ warnings and __3__/__4__ script warnings. +player-detail=__1__ gave warning for: __2__ +list-title=The following players have this many warnings (and this many script warnings): +list=__1__: __2__ (__3__/__4__) +cleared=__1__ had all their warnings cleared by __2__. + [expcom-waterfill] +description=Change tile to water waterfill-distance=Too close to designated location waterfill-cliff=Not enough cliff explosive to create water entered-area-selection=Entered area selection, select areas to convert. diff --git a/locale/en/gui.cfg b/locale/en/gui.cfg index 95aa3640..77ea9fdc 100644 --- a/locale/en/gui.cfg +++ b/locale/en/gui.cfg @@ -252,6 +252,9 @@ display-ffrlm-tooltip=Force following robots lifetime modifier [vlayer] main-tooltip=Vlayer GUI +description-pbr=Recharge Player Battery upto a portion with vlayer +description-vi=Vlayer Info +pbr-not-running=vlayer need to be running display-item-solar=[img=entity/solar-panel] Solar Panel display-item-accumulator=[img=entity/accumulator] Accumulator display-current-production=[virtual-signal=signal-P] Current Production diff --git a/locale/zh-CN/addons.cfg b/locale/zh-CN/addons.cfg index ff999b8a..04517f0b 100644 --- a/locale/zh-CN/addons.cfg +++ b/locale/zh-CN/addons.cfg @@ -25,7 +25,7 @@ custom-commands=這裹使用了自制指令,如 /tag 和 /me。可使用 /chel read-readme=確保你已閱讀相關資訊。按左上 i 圖標可再次查看。 softmod=這裹用了自設情境,是一種軟裝模組。 redmew= -lhd=列車必須是左則通行。這是本伺服器長久以來的規則。 +lhd=列車必須是左則通行。這是本服務器長久以來的規則。 [warnings] received=你已被 __1__ 警告了,現在共有 __2__ 個警告。 __3__ diff --git a/locale/zh-CN/commands.cfg b/locale/zh-CN/commands.cfg index 9655c7d9..05e426c5 100644 --- a/locale/zh-CN/commands.cfg +++ b/locale/zh-CN/commands.cfg @@ -1,33 +1,150 @@ -[expcom-kill] -already-dead=你已經死了。 - [expcom-admin-chat] +description=一個只有管理員能看到的對話。 format=[管理員對話] __1__: __2__ -[expcom-tp] -no-position-found=沒找到空間進行傳送。 -to-self=沒辦法傳送到自己。 +[expcom-admin-marker] +description=切換管理員標記模式,新標記只能由管理員編輯 +exit=你已離開管理員地圖標記模式,所有新地圖標記將不受保護。 +enter=你已進入管理員地圖標記模式,所有新地圖標記將受保護。 +place=你放了一個管理員地圖標記。 +edit=你修改了一個管理員地圖標記。 +revert=你沒辦法修改管理員地圖標記。 + +[expcom-artillery] +description=火炮遙控 + +[expcom-bonus] +set=你的 bonus 已經設定為 __1__。 +perm=你沒有足夠的權限設定多過 __1__的數值。 + +[expcom-bot-queue] +description-get=取得建設隊列 +description-set=設定建設隊列 +result=__1__ 把建設隊列改成 __2__ 個成功嘗試,和 __3__ 個嘗試。 + +[expcom-cheat] +description-cheat=為你或其他玩家切換作弊模式。 +description-res=啟用所有科技 +description-day=啟用永久白天 +res=__1__ 啟用了所有科技。 +day=__1__ 把永久白天設置為 __2__ 。 [expcom-chelp] +description=搜尋可用指令的關鍵字。 title=幫助 "__1__": footer=[__1__ 結果: 頁 __2__ / __3__] format=/__1__ __2__ - __3__ __4__ alias=別名: __1__ out-of-range=找不到 __1__ 頁. -[expcom-roles] -higher-role=你所安排的身份組比你目前的還要高。 -list=所有身份組: __1__ -list-player=__1__ 有: __2__ -list-element=__1__, __2__ +[expcom-clr-inv] +description=清除用戶物品 + +[expcom-connect] +description=連接到另一服務器 +description-player=讓其他用戶連接到另一服務器 +description-all=將所有玩家連接到另一台服務器 +too-many-matching=該服務器名稱有多過一個結果: __1__ +wrong-version=該服務器版本不同: __1__ +same-server=你已連接該服務器: __1__ +offline=該服務器不在線: __1__ +none-matching=沒找到服務器。 + +[expcom-debug] +description=打開偵錯介面 + +[expcom-enemy] +description-kill=僅移除蟲子 +description-remove=移除蟲子及停止產生 + +[expcom-ff] +description=啟用友方傷害 +ff=__1__ 把友方傷害設置為 __2__ 。 + +[expcom-find] +description=在地圖上查找用戶 + +[expcom-home] +description-home=傳送回家 +description-home-set=設定目前位置為家 +description-home-get=取得家的位置 +description-return=傳送回上一個位置 +no-home=你還沒設回程傳送點。 +no-return=你還沒使用過回程。 +home-set=你的回程傳送點為 x: __1__ y: __2__ +return-set=你的去程傳送點為 x: __1__ y: __2__ +home-get=你的回程傳送點在 x: __1__ y: __2__ + +[expcom-interface] +description=利用後台運行代碼 + +[expcom-inv-search] +description-ia=顯示按持有物品數量排序的玩家 +description-ir=顯示持有物品的玩家,按加入時間排序 +description-i=顯示按持有物品數量和遊戲時間排序的玩家 +description-io=顯示線上玩家,按持有物品數量和遊戲時間排序 +reject-item=沒找到 __1__; 可試用富文本。 +results-heading=以下用戶有 [item=__1__]: +results-item=__1__) __2__ 有 __3__ 個。 (__4__) +results-none=沒用戶有 [item=__1__] [expcom-jail] +description-jail=把用戶送監而禁止其行動。 +description-unjail=取消把用戶送監 give=__1__ 已被 __2__ ,因 __3__ 而被禁止行動。 remove=__1__ 已被 __2__。 already-jailed=__1__ 已被禁止行動。 not-jailed=__1__ 目前沒有被禁止行動。 +[expcom-kill] +description=弄死你自己或其他用戶。 +already-dead=你已經死了。 + +[expcom-lastlocation] +description=取得其他用戶的最後出現地點 +response=__1__ 最後出現在 [gps=__2__,__3__] + +[expcom-me] +description=在聊天中發送操作訊息 + +[expcom-pol] +description-clr=清除污染 +description-off=停用污染 +clr=__1__ 清除了污染。 +off=__1__ 停用了污染。 + +[expcom-protection] +description-pe=啟用建築保護,按著shift來取消 +description-pa=啟用地區保護,按著shift來取消 +entered-entity-selection=建築保護,選擇一個建築來保護,按住 shift 來選擇則可取消。 +entered-area-selection=地區保護,選擇一個地區來保護,按住 shift 來選擇則可取消。 +protected-entities=__1__ 個建築現已受保護。 +unprotected-entities=__1__ 個建築現不受保護。 +already-protected=本地區已受保護。 +protected-area=本地區現已受保護。 +unprotected-area=本地區現不受保護。 +repeat-offence=__1__ 在 [gps=__3__,__4__] 拆除了 __2__ + +[expcom-rainbow] +description=在聊天中發送多色訊息 + +[expcom-ratio] +description=此指令將給出所選機器的輸入和輸出比率。使用此參數來計算每秒處理該數量的物品所需的機器。 +notSelecting=還沒選擇項目。 +item-in=你每秒需要 __1__ 來做 [item=__2__]. +fluid-in=你每秒需要 __1__ 來做 [fluid=__2__]. +item-out=結果: __1__ [item=__2__] 每秒. +fluid-out=結果: __1__ [fluid=__2__] 每秒. +machines=你需要 __1__ 部同樣的機器. + +[expcom-repair] +description=維修周邊的建築 +result=一共把 __1__ 個建築恢復,和回滿 __2__ 個建築耐久。 + [expcom-report] +description-report=檢舉玩家並通知管理員。 +description-get-reports=取得玩家的報告清單。如果沒有設定玩家,則列出所有玩家以及有關他們的報告數量。 +description-clear-reports=清除一名玩家的所有報告或僅清除一名玩家的報告。 player-immune=該用戶不能被舉報。 self-report=你不能舉報你自己。 non-admin=__1__ 因 __2__ 而被舉報。 @@ -39,95 +156,8 @@ player-report-title=__1__ 有以下舉報: list=__1__: __2__ removed=__1__ 的舉報已被清除。 -[expcom-warnings] -received=__1__ 被 __2__ ,因 __3__ 而發出了一個警告。 -player=__1__ 有 __2__ 個警告和 __3__/__4__ 自動警告。 -player-detail=__1__ 因 __2__ 而被警告 -list-title=該用戶警告如下: -list=__1__: __2__ (__3__/__4__) -cleared=__1__ 的警告己被 __2__ 清除。 - -[expcom-spawn] -unavailable=現在沒辦法傳送到出生點。 - -[expcom-repair] -result=一共把 __1__ 個建築恢復,和回滿 __2__ 個建築耐久。 - -[expcom-ratio] -notSelecting=還沒選擇項目。 -item-in=你每秒需要 __1__ 來做 [item=__2__]. -fluid-in=你每秒需要 __1__ 來做 [fluid=__2__]. -item-out=結果: __1__ [item=__2__] 每秒. -fluid-out=結果: __1__ [fluid=__2__] 每秒. -machines=你需要 __1__ 部同樣的機器. - -[expcom-home] -no-home=你還沒設回程傳送點。 -no-return=你還沒使用過回程。 -home-set=你的回程傳送點為 x: __1__ y: __2__ -return-set=你的去程傳送點為 x: __1__ y: __2__ -home-get=你的回程傳送點在 x: __1__ y: __2__ - -[expcom-server-ups] -no-ext=沒找到外置數據,沒法顯示。 - -[expcom-connect] -too-many-matching=該伺服器名稱有多過一個結果: __1__ -wrong-version=該伺服器版本不同: __1__ -same-server=你已連接該伺服器: __1__ -offline=該伺服器不在線: __1__ -none-matching=沒找到伺服器。 - -[expcom-lastlocation] -response=__1__ 最後出現在 [gps=__2__,__3__] - -[expcom-protection] -entered-entity-selection=建築保護,選擇一個建築來保護,按住 shift 來選擇則可取消。 -entered-area-selection=地區保護,選擇一個地區來保護,按住 shift 來選擇則可取消。 -protected-entities=__1__ 個建築現已受保護。 -unprotected-entities=__1__ 個建築現不受保護。 -already-protected=本地區已受保護。 -protected-area=本地區現已受保護。 -unprotected-area=本地區現不受保護。 -repeat-offence=__1__ 在 [gps=__3__,__4__] 拆除了 __2__ - -[expcom-spectate] -follow-self=你不能追蹤自己。 - -[expcom-admin-marker] -exit=你已離開管理員地圖標記模式,所有新地圖標記將不受保護。 -enter=你已進入管理員地圖標記模式,所有新地圖標記將受保護。 -place=你放了一個管理員地圖標記。 -edit=你修改了一個管理員地圖標記。 -revert=你沒辦法修改管理員地圖標記。 - -[expcom-inv-search] -reject-item=沒找到 __1__; 可試用富文本。 -results-heading=以下用戶有 [item=__1__]: -results-item=__1__) __2__ 有 __3__ 個。 (__4__) -results-none=沒用戶有 [item=__1__] - -[expcom-speed] -result=__1__ 把遊戲速度改成 __2__ 。 - -[expcom-bot-queue] -result=__1__ 把建設隊列改成 __2__ 成功嘗試,和 __3__ 嘗試。 - -[expcom-pol] -clr=__1__ 清除了污染。 -off=__1__ 停用了污染。 - -[expcom-train] -manual-result=__1__ 把 __2__ 個火車設置為自動模式。 - -[expcom-cheat] -res=__1__ 啟用了所有科技。 -day=__1__ 把永久白天設置為 __2__ 。 - -[expcom-ff] -ff=__1__ 把友方傷害設置為 __2__ 。 - [expcom-res] +description-ares=啟用自動研究 res=__1__ 把自動研究設置為 __2__ 。 msg=[color=255, 255, 255] 研究完成在 __1__ - [technology=__2__][/color] inf=[color=255, 255, 255] 研究完成在 __1__ - [technology=__2__] - __3__[/color] @@ -139,7 +169,59 @@ attempt=用時 difference=差距 main-tooltip=研究介面 +[expcom-roles] +description-assign-role=為用戶指配用戶組 +description-unassign-role=為用戶取消指配用戶組 +description-list-roles=顯示所有用戶組 +higher-role=你所安排的身份組比你目前的還要高。 +list=所有身份組: __1__ +list-player=__1__ 有: __2__ +list-element=__1__, __2__ + +[expcom-server-ups] +no-ext=沒找到外置數據,沒法顯示。 + +[expcom-spawn] +description=傳送到出生點 +unavailable=現在沒辦法傳送到出生點。 + +[expcom-spectate] +description-spectate=切換旁觀者模式 +description-follow=開始在旁觀者模式中關注玩家 +follow-self=你不能追蹤自己。 + +[expcom-speed] +description=設定遊戲速度 +result=__1__ 把遊戲速度改成 __2__ 。 + +[expcom-surface-clearing] +description-ci=清除地面上的物品 +description-cb=清除藍圖 + +[expcom-tp] +description-tp=將一名玩家傳送到另一名玩家。 +description-bring=將一名玩家傳送到你身邊。 +description-goto=將你傳送到玩家身邊。 +no-position-found=沒找到空間進行傳送。 +to-self=沒辦法傳送到自己。 + +[expcom-train] +description=把火車設置為自動模式 +manual-result=__1__ 把 __2__ 個火車設置為自動模式。 + +[expcom-warnings] +description-give=向玩家發出警告;可能會導致自動腳本操作。 +description-get=取得玩家收到的警告次數。如果沒有玩家,則列出所有玩家以及他們受到警告的次數。 +description-clear=清除玩家的所有警告(和腳本警告) +received=__1__ 被 __2__ ,因 __3__ 而發出了一個警告。 +player=__1__ 有 __2__ 個警告和 __3__/__4__ 自動警告。 +player-detail=__1__ 因 __2__ 而被警告 +list-title=該用戶警告如下: +list=__1__: __2__ (__3__/__4__) +cleared=__1__ 的警告己被 __2__ 清除。 + [expcom-waterfill] +description=把地換為水 waterfill-distance=位置太近。 waterfill-cliff=沒有足夠的懸崖炸藥。 entered-area-selection=已進入選取模式,選定區域進行轉換。 diff --git a/locale/zh-CN/data.cfg b/locale/zh-CN/data.cfg index 765c1707..26d83a56 100644 --- a/locale/zh-CN/data.cfg +++ b/locale/zh-CN/data.cfg @@ -1,5 +1,5 @@ [join-message] -greet=[color=0,1,0] 歡迎來到 EXP 的伺服器! 若果你喜歡本伺服器可加入 DISCORD: __1__ [/color] +greet=[color=0,1,0] 歡迎來到 EXP 的服務器! 若果你喜歡本服務器可加入 DISCORD: __1__ [/color] message-set=你的加入信息已更新。 message-cleared=你的加入信息已清除。 @@ -24,8 +24,8 @@ QuickbarFilters-value-tooltip=使用 /save-quickbar 來更換快捷欄的選項 UsesAlt=細節模式 UsesAlt-tooltip=你加入時是否使用細節模式 UsesAlt-value-tooltip=按下 __CONTROL__show-info__ 來更改 -UsesServerUps=伺服器更新數 (SUPS) -UsesServerUps-tooltip=現在是否顯示伺服器更新數 (SUPS) +UsesServerUps=服務器更新數 (SUPS) +UsesServerUps-tooltip=現在是否顯示服務器更新數 (SUPS) UsesServerUps-value-tooltip=使用 /server-ups 來更換顯示 Tag=你的人物標籤 Tag-tooltip=你的人物標籤 @@ -40,53 +40,53 @@ HasEnabledDecon=快速拆除樹木 [exp-statistics] MapsPlayed=地圖遊玩次數 -MapsPlayed-tooltip=你在本伺服器遊玩過的地圖數 +MapsPlayed-tooltip=你在本服務器遊玩過的地圖數 JoinCount=登入次數 -JoinCount-tooltip=你在本伺服器遊玩的次數 +JoinCount-tooltip=你在本服務器遊玩的次數 Playtime=遊玩時間 -Playtime-tooltip=你在本伺服器遊玩的時間 +Playtime-tooltip=你在本服務器遊玩的時間 AfkTime=掛機時間 -AfkTime-tooltip=你在本伺服器掛機的時間 +AfkTime-tooltip=你在本服務器掛機的時間 ChatMessages=傳送信息次數 -ChatMessages-tooltip=你在本伺服器發送信息的次數 +ChatMessages-tooltip=你在本服務器發送信息的次數 CommandsUsed=使用指令次數 -CommandsUsed-tooltip=你在本伺服器使用指令的次數 +CommandsUsed-tooltip=你在本服務器使用指令的次數 RocketsLaunched=火箭發射次數 -RocketsLaunched-tooltip=你在本伺服器在線時所發射過火箭的次數 +RocketsLaunched-tooltip=你在本服務器在線時所發射過火箭的次數 ResearchCompleted=研究次數 -ResearchCompleted-tooltip=你在本伺服器在線時完成研究的次數 +ResearchCompleted-tooltip=你在本服務器在線時完成研究的次數 MachinesBuilt=機器建造次數 -MachinesBuilt-tooltip=你在本伺服器建造過機器的次數 +MachinesBuilt-tooltip=你在本服務器建造過機器的次數 MachinesRemoved=機器拆除次數 -MachinesRemoved-tooltip=你在本伺服器拆除過機器的次數 +MachinesRemoved-tooltip=你在本服務器拆除過機器的次數 TilesBuilt=地磚建造次數 -TilesBuilt-tooltip=你在本伺服器建造過地磚的次數 +TilesBuilt-tooltip=你在本服務器建造過地磚的次數 TilesRemoved=地磚拆除次數 -TilesRemoved-tooltip=你在本伺服器拆除過地磚的次數 +TilesRemoved-tooltip=你在本服務器拆除過地磚的次數 TreesDestroyed=樹木拆除次數 -TreesDestroyed-tooltip=你在本伺服器拆除過樹木的次數 +TreesDestroyed-tooltip=你在本服務器拆除過樹木的次數 OreMined=挖礦次數 -OreMined-tooltip=你在本伺服器挖掘礦的次數 +OreMined-tooltip=你在本服務器挖掘礦的次數 ItemsCrafted=物品合成數 -ItemsCrafted-tooltip=你在本伺服器合成過物品的次數 +ItemsCrafted-tooltip=你在本服務器合成過物品的次數 ItemsPickedUp=物品拾起數 -ItemsPickedUp-tooltip=你在本伺服器起過物品的次數 +ItemsPickedUp-tooltip=你在本服務器起過物品的次數 Kills=撃殺數 -Kills-tooltip=你在本伺服器殺過的敵人數量 +Kills-tooltip=你在本服務器殺過的敵人數量 Deaths=死亡次數 -Deaths-tooltip=你在本伺服器死過的數量 +Deaths-tooltip=你在本服務器死過的數量 DamageDealt=傷害量 DamageDealt-tooltip=你在本伺服器對敵人所造成的傷害量 DistanceTravelled=移動距離 -DistanceTravelled-tooltip=你在本伺服器的總移動距離 +DistanceTravelled-tooltip=你在本服務器的總移動距離 CapsulesUsed=膠囊使用次數 -CapsulesUsed-tooltip=你在本伺服器使用過膠囊的次數 +CapsulesUsed-tooltip=你在本服務器使用過膠囊的次數 EntityRepaired=機器維修次數 -EntityRepaired-tooltip=你在本伺服器維修過機器的次數 +EntityRepaired-tooltip=你在本服務器維修過機器的次數 DeconstructionPlannerUsed=拆除規劃器使用次數 -DeconstructionPlannerUsed-tooltip=你在本伺服器使用過拆除規劃器的次數 +DeconstructionPlannerUsed-tooltip=你在本服務器使用過拆除規劃器的次數 MapTagsMade=地圖標籤數量 -MapTagsMade-tooltip=你在本伺服器放過的地圖標籤數量 +MapTagsMade-tooltip=你在本服務器放過的地圖標籤數量 DamageDeathRatio=傷害死亡比 DamageDeathRatio-tooltip=傷害除以死亡 KillDeathRatio=撃殺死亡比 diff --git a/locale/zh-CN/gui.cfg b/locale/zh-CN/gui.cfg index 8d231e96..16421849 100644 --- a/locale/zh-CN/gui.cfg +++ b/locale/zh-CN/gui.cfg @@ -134,12 +134,12 @@ goto-edit=修改傳送陣圖案 main-tooltip=資訊 welcome-tab=歡迎 welcome-tooltip=歡迎來到 Explosive Gaming -welcome-general=歡迎來到 Explosive Gaming; 你在這裏的時候要遵守規。 你可以在左上方的介面找到更多資訊。 地圖時間 __2__。\n下次地圖重設: __1__ +welcome-general=歡迎來到 Explosive Gaming; 你在這裏的時候要遵守規則。 你可以在左上方的介面找到更多資訊。 地圖時間 __2__。\n下次地圖重設: __1__ welcome-roles=我們有自訂的身份組來保護其他用戶。 所以你有機會不能使用拆除規劃器或掉東西。 身份組給予你各種權限\n你有以下身份組: __1__ welcome-chat=你可以使用 「重音符/抑音符」 鍵 (ESC 鍵 下方) - 你也可以在選項中修改按鍵。\n你目前設定為 「__CONTROL__toggle-console__」 rules-tab=規則 -rules-tooltip=伺服器規則 -rules-general=你在本伺服器遊玩即等同同意以下規則。管理員有機會就相關事項提問。你可能會因為違反規則而被封禁,你可以在 Discord 中提出反對。 +rules-tooltip=服務器規則 +rules-general=你在本服務器遊玩即等同同意以下規則。管理員有機會就相關事項提問。你可能會因為違反規則而被封禁,你可以在 Discord 中提出反對。 rules-1=開掛或濫用漏洞將不會被容忍。 rules-2=當你找到漏洞可以通知職員。 rules-3=請在聊天室中尊重其他人。 @@ -154,41 +154,45 @@ rules-11=請不要用迴旋處。 火車站尾返程則是例外。 rules-12=請跟其他人使用相同的火車組成。常用的有 1-2-1,2-4-2,或 3-8-3,即1個動車組拖2個貨車組再拖不同方向的1個動車組。 rules-13=火車必須是左上右下 (LHD)。 rules-14=禁止要求身份組,發廣告,發惡意連結。 -rules-15=使用常識, 舉報違規人員,管理員只有最終決定權。 +rules-15=使用常識, 舉報違規人員,管理員有最終決定權。 commands-tab=指令 commands-tooltip=你可用的指令 commands-general=這裏有自訂的指令。你可以在下邊找到你可用的指令及其功能介紹。你可以用 /search-help 來取得更多資訊。 +servers-tab=服務器 +servers-tooltip=到其他服務器及網站的連結 +servers-general=這是其中一個服務器。你可以在下方找到其他同樣是由我們運行的伺服器資料。 +servers-factorio=異星工廠服務器 servers-tab=伺服器 servers-tooltip=到其他伺服器及網站的連結 servers-general=這是其中一個伺服器。你可以在下方找到其他同樣是由我們運行的伺服器資料。 servers-factorio=異星工廠伺服器 servers-1=S1 公共 -servers-d1=這個伺服器每兩日重設。 +servers-d1=這個服務器每兩日重設。 servers-2=S2 - -servers-d2=這個伺服器沒在營運。 +servers-d2=這個服務器沒在營運。 servers-3=S3 周 -servers-d3=這個伺服器每週重設。 +servers-d3=這個服務器每週重設。 servers-4=S4 月 -servers-d4=這個伺服器每月重設。 +servers-d4=這個服務器每月重設。 servers-5=S5 模組 -servers-d5=這個伺服器運行模組,可在 Discord 中得到更多資訊。 +servers-d5=這個服務器運行模組,可在 Discord 中得到更多資訊。 servers-6=S6 Donator -servers-d6=這個伺服器為支持者運行,可在 Discord 中得到更多資訊。 +servers-d6=這個服務器為支持者運行,可在 Discord 中得到更多資訊。 servers-7=S7 項目 -servers-d7=這個伺服器只在有項目期間運行。 +servers-d7=這個服務器只在有項目期間運行。 servers-8=S8 T̷-̶s̶-̴:̷ servers-d8=N̵o̴ ̶o̷-̶e̵ ̴k̸n̷-̶w̵s̸ ̴w̷h̷a̶-̶ ̷h̴a̴p̷p̴e̷n̷s̸ ̷o̶n̴ ̷t̶h̴-̶s̶ ̷s̷e̶r̸v̸e̴r̷,̶ ̸i̸t̴ ̷m̶-̸g̴h̶t̷ ̸n̸-̶t̵ ̷e̴v̸e̸n̶t̷ ̵-̷x̴i̵s̶t̸。̸ -servers-connect-Offline=該伺服器目前沒有在運行 +servers-connect-Offline=該服務器目前沒有在運行 servers-connect-Current=你目前所在的伺服器 -servers-connect-Version=該伺服器運行不同的遊戲版本: __1__ -servers-connect-Password=該伺服器需要密碼 -servers-connect-Modded=該伺服器需要下載模組 -servers-connect-Online=該伺服器在線 +servers-connect-Version=該服務器運行不同的遊戲版本: __1__ +servers-connect-Password=該服務器需要密碼 +servers-connect-Modded=該服務器需要下載模組 +servers-connect-Online=該服務器在線 servers-external=外部連結 servers-open-in-browser=可在你的瀏覽器中打開 backers-tab=支持者 backers-tooltip=支持者 -backers-general=他們為伺服器運行提供了不少幫助。 +backers-general=他們為服務器運行提供了不少幫助。 backers-management=系統管理員 backers-board=議員 backers-staff=職員 @@ -215,7 +219,7 @@ control-pts-a=可用分數 control-pts-n=必要分數 control-pts-r=餘下分數 control-reset=重置 -control-apply=套用 +control-apply=應用 control-pts-exceed=分數超出可用上限 display-cmms=挖掘速度 display-cmms-tooltip=個人挖掘速度 @@ -252,6 +256,9 @@ display-ffrlm-tooltip=勢力戰鬥機械人生命時間 [vlayer] main-tooltip=Vlayer 介面 +description-pbr=使用 Vlayer 為玩家電池充電 +description-vi=Vlayer 資訊 +pbr-not-running=vlayer 沒有運行 display-item-solar=[img=entity/solar-panel] 太陽能板 display-item-accumulator=[img=entity/accumulator] 蓄電池 display-current-production=[virtual-signal=signal-P] 現時產能 diff --git a/locale/zh-TW/addons.cfg b/locale/zh-TW/addons.cfg index ff999b8a..04517f0b 100644 --- a/locale/zh-TW/addons.cfg +++ b/locale/zh-TW/addons.cfg @@ -25,7 +25,7 @@ custom-commands=這裹使用了自制指令,如 /tag 和 /me。可使用 /chel read-readme=確保你已閱讀相關資訊。按左上 i 圖標可再次查看。 softmod=這裹用了自設情境,是一種軟裝模組。 redmew= -lhd=列車必須是左則通行。這是本伺服器長久以來的規則。 +lhd=列車必須是左則通行。這是本服務器長久以來的規則。 [warnings] received=你已被 __1__ 警告了,現在共有 __2__ 個警告。 __3__ diff --git a/locale/zh-TW/commands.cfg b/locale/zh-TW/commands.cfg index 9655c7d9..05e426c5 100644 --- a/locale/zh-TW/commands.cfg +++ b/locale/zh-TW/commands.cfg @@ -1,33 +1,150 @@ -[expcom-kill] -already-dead=你已經死了。 - [expcom-admin-chat] +description=一個只有管理員能看到的對話。 format=[管理員對話] __1__: __2__ -[expcom-tp] -no-position-found=沒找到空間進行傳送。 -to-self=沒辦法傳送到自己。 +[expcom-admin-marker] +description=切換管理員標記模式,新標記只能由管理員編輯 +exit=你已離開管理員地圖標記模式,所有新地圖標記將不受保護。 +enter=你已進入管理員地圖標記模式,所有新地圖標記將受保護。 +place=你放了一個管理員地圖標記。 +edit=你修改了一個管理員地圖標記。 +revert=你沒辦法修改管理員地圖標記。 + +[expcom-artillery] +description=火炮遙控 + +[expcom-bonus] +set=你的 bonus 已經設定為 __1__。 +perm=你沒有足夠的權限設定多過 __1__的數值。 + +[expcom-bot-queue] +description-get=取得建設隊列 +description-set=設定建設隊列 +result=__1__ 把建設隊列改成 __2__ 個成功嘗試,和 __3__ 個嘗試。 + +[expcom-cheat] +description-cheat=為你或其他玩家切換作弊模式。 +description-res=啟用所有科技 +description-day=啟用永久白天 +res=__1__ 啟用了所有科技。 +day=__1__ 把永久白天設置為 __2__ 。 [expcom-chelp] +description=搜尋可用指令的關鍵字。 title=幫助 "__1__": footer=[__1__ 結果: 頁 __2__ / __3__] format=/__1__ __2__ - __3__ __4__ alias=別名: __1__ out-of-range=找不到 __1__ 頁. -[expcom-roles] -higher-role=你所安排的身份組比你目前的還要高。 -list=所有身份組: __1__ -list-player=__1__ 有: __2__ -list-element=__1__, __2__ +[expcom-clr-inv] +description=清除用戶物品 + +[expcom-connect] +description=連接到另一服務器 +description-player=讓其他用戶連接到另一服務器 +description-all=將所有玩家連接到另一台服務器 +too-many-matching=該服務器名稱有多過一個結果: __1__ +wrong-version=該服務器版本不同: __1__ +same-server=你已連接該服務器: __1__ +offline=該服務器不在線: __1__ +none-matching=沒找到服務器。 + +[expcom-debug] +description=打開偵錯介面 + +[expcom-enemy] +description-kill=僅移除蟲子 +description-remove=移除蟲子及停止產生 + +[expcom-ff] +description=啟用友方傷害 +ff=__1__ 把友方傷害設置為 __2__ 。 + +[expcom-find] +description=在地圖上查找用戶 + +[expcom-home] +description-home=傳送回家 +description-home-set=設定目前位置為家 +description-home-get=取得家的位置 +description-return=傳送回上一個位置 +no-home=你還沒設回程傳送點。 +no-return=你還沒使用過回程。 +home-set=你的回程傳送點為 x: __1__ y: __2__ +return-set=你的去程傳送點為 x: __1__ y: __2__ +home-get=你的回程傳送點在 x: __1__ y: __2__ + +[expcom-interface] +description=利用後台運行代碼 + +[expcom-inv-search] +description-ia=顯示按持有物品數量排序的玩家 +description-ir=顯示持有物品的玩家,按加入時間排序 +description-i=顯示按持有物品數量和遊戲時間排序的玩家 +description-io=顯示線上玩家,按持有物品數量和遊戲時間排序 +reject-item=沒找到 __1__; 可試用富文本。 +results-heading=以下用戶有 [item=__1__]: +results-item=__1__) __2__ 有 __3__ 個。 (__4__) +results-none=沒用戶有 [item=__1__] [expcom-jail] +description-jail=把用戶送監而禁止其行動。 +description-unjail=取消把用戶送監 give=__1__ 已被 __2__ ,因 __3__ 而被禁止行動。 remove=__1__ 已被 __2__。 already-jailed=__1__ 已被禁止行動。 not-jailed=__1__ 目前沒有被禁止行動。 +[expcom-kill] +description=弄死你自己或其他用戶。 +already-dead=你已經死了。 + +[expcom-lastlocation] +description=取得其他用戶的最後出現地點 +response=__1__ 最後出現在 [gps=__2__,__3__] + +[expcom-me] +description=在聊天中發送操作訊息 + +[expcom-pol] +description-clr=清除污染 +description-off=停用污染 +clr=__1__ 清除了污染。 +off=__1__ 停用了污染。 + +[expcom-protection] +description-pe=啟用建築保護,按著shift來取消 +description-pa=啟用地區保護,按著shift來取消 +entered-entity-selection=建築保護,選擇一個建築來保護,按住 shift 來選擇則可取消。 +entered-area-selection=地區保護,選擇一個地區來保護,按住 shift 來選擇則可取消。 +protected-entities=__1__ 個建築現已受保護。 +unprotected-entities=__1__ 個建築現不受保護。 +already-protected=本地區已受保護。 +protected-area=本地區現已受保護。 +unprotected-area=本地區現不受保護。 +repeat-offence=__1__ 在 [gps=__3__,__4__] 拆除了 __2__ + +[expcom-rainbow] +description=在聊天中發送多色訊息 + +[expcom-ratio] +description=此指令將給出所選機器的輸入和輸出比率。使用此參數來計算每秒處理該數量的物品所需的機器。 +notSelecting=還沒選擇項目。 +item-in=你每秒需要 __1__ 來做 [item=__2__]. +fluid-in=你每秒需要 __1__ 來做 [fluid=__2__]. +item-out=結果: __1__ [item=__2__] 每秒. +fluid-out=結果: __1__ [fluid=__2__] 每秒. +machines=你需要 __1__ 部同樣的機器. + +[expcom-repair] +description=維修周邊的建築 +result=一共把 __1__ 個建築恢復,和回滿 __2__ 個建築耐久。 + [expcom-report] +description-report=檢舉玩家並通知管理員。 +description-get-reports=取得玩家的報告清單。如果沒有設定玩家,則列出所有玩家以及有關他們的報告數量。 +description-clear-reports=清除一名玩家的所有報告或僅清除一名玩家的報告。 player-immune=該用戶不能被舉報。 self-report=你不能舉報你自己。 non-admin=__1__ 因 __2__ 而被舉報。 @@ -39,95 +156,8 @@ player-report-title=__1__ 有以下舉報: list=__1__: __2__ removed=__1__ 的舉報已被清除。 -[expcom-warnings] -received=__1__ 被 __2__ ,因 __3__ 而發出了一個警告。 -player=__1__ 有 __2__ 個警告和 __3__/__4__ 自動警告。 -player-detail=__1__ 因 __2__ 而被警告 -list-title=該用戶警告如下: -list=__1__: __2__ (__3__/__4__) -cleared=__1__ 的警告己被 __2__ 清除。 - -[expcom-spawn] -unavailable=現在沒辦法傳送到出生點。 - -[expcom-repair] -result=一共把 __1__ 個建築恢復,和回滿 __2__ 個建築耐久。 - -[expcom-ratio] -notSelecting=還沒選擇項目。 -item-in=你每秒需要 __1__ 來做 [item=__2__]. -fluid-in=你每秒需要 __1__ 來做 [fluid=__2__]. -item-out=結果: __1__ [item=__2__] 每秒. -fluid-out=結果: __1__ [fluid=__2__] 每秒. -machines=你需要 __1__ 部同樣的機器. - -[expcom-home] -no-home=你還沒設回程傳送點。 -no-return=你還沒使用過回程。 -home-set=你的回程傳送點為 x: __1__ y: __2__ -return-set=你的去程傳送點為 x: __1__ y: __2__ -home-get=你的回程傳送點在 x: __1__ y: __2__ - -[expcom-server-ups] -no-ext=沒找到外置數據,沒法顯示。 - -[expcom-connect] -too-many-matching=該伺服器名稱有多過一個結果: __1__ -wrong-version=該伺服器版本不同: __1__ -same-server=你已連接該伺服器: __1__ -offline=該伺服器不在線: __1__ -none-matching=沒找到伺服器。 - -[expcom-lastlocation] -response=__1__ 最後出現在 [gps=__2__,__3__] - -[expcom-protection] -entered-entity-selection=建築保護,選擇一個建築來保護,按住 shift 來選擇則可取消。 -entered-area-selection=地區保護,選擇一個地區來保護,按住 shift 來選擇則可取消。 -protected-entities=__1__ 個建築現已受保護。 -unprotected-entities=__1__ 個建築現不受保護。 -already-protected=本地區已受保護。 -protected-area=本地區現已受保護。 -unprotected-area=本地區現不受保護。 -repeat-offence=__1__ 在 [gps=__3__,__4__] 拆除了 __2__ - -[expcom-spectate] -follow-self=你不能追蹤自己。 - -[expcom-admin-marker] -exit=你已離開管理員地圖標記模式,所有新地圖標記將不受保護。 -enter=你已進入管理員地圖標記模式,所有新地圖標記將受保護。 -place=你放了一個管理員地圖標記。 -edit=你修改了一個管理員地圖標記。 -revert=你沒辦法修改管理員地圖標記。 - -[expcom-inv-search] -reject-item=沒找到 __1__; 可試用富文本。 -results-heading=以下用戶有 [item=__1__]: -results-item=__1__) __2__ 有 __3__ 個。 (__4__) -results-none=沒用戶有 [item=__1__] - -[expcom-speed] -result=__1__ 把遊戲速度改成 __2__ 。 - -[expcom-bot-queue] -result=__1__ 把建設隊列改成 __2__ 成功嘗試,和 __3__ 嘗試。 - -[expcom-pol] -clr=__1__ 清除了污染。 -off=__1__ 停用了污染。 - -[expcom-train] -manual-result=__1__ 把 __2__ 個火車設置為自動模式。 - -[expcom-cheat] -res=__1__ 啟用了所有科技。 -day=__1__ 把永久白天設置為 __2__ 。 - -[expcom-ff] -ff=__1__ 把友方傷害設置為 __2__ 。 - [expcom-res] +description-ares=啟用自動研究 res=__1__ 把自動研究設置為 __2__ 。 msg=[color=255, 255, 255] 研究完成在 __1__ - [technology=__2__][/color] inf=[color=255, 255, 255] 研究完成在 __1__ - [technology=__2__] - __3__[/color] @@ -139,7 +169,59 @@ attempt=用時 difference=差距 main-tooltip=研究介面 +[expcom-roles] +description-assign-role=為用戶指配用戶組 +description-unassign-role=為用戶取消指配用戶組 +description-list-roles=顯示所有用戶組 +higher-role=你所安排的身份組比你目前的還要高。 +list=所有身份組: __1__ +list-player=__1__ 有: __2__ +list-element=__1__, __2__ + +[expcom-server-ups] +no-ext=沒找到外置數據,沒法顯示。 + +[expcom-spawn] +description=傳送到出生點 +unavailable=現在沒辦法傳送到出生點。 + +[expcom-spectate] +description-spectate=切換旁觀者模式 +description-follow=開始在旁觀者模式中關注玩家 +follow-self=你不能追蹤自己。 + +[expcom-speed] +description=設定遊戲速度 +result=__1__ 把遊戲速度改成 __2__ 。 + +[expcom-surface-clearing] +description-ci=清除地面上的物品 +description-cb=清除藍圖 + +[expcom-tp] +description-tp=將一名玩家傳送到另一名玩家。 +description-bring=將一名玩家傳送到你身邊。 +description-goto=將你傳送到玩家身邊。 +no-position-found=沒找到空間進行傳送。 +to-self=沒辦法傳送到自己。 + +[expcom-train] +description=把火車設置為自動模式 +manual-result=__1__ 把 __2__ 個火車設置為自動模式。 + +[expcom-warnings] +description-give=向玩家發出警告;可能會導致自動腳本操作。 +description-get=取得玩家收到的警告次數。如果沒有玩家,則列出所有玩家以及他們受到警告的次數。 +description-clear=清除玩家的所有警告(和腳本警告) +received=__1__ 被 __2__ ,因 __3__ 而發出了一個警告。 +player=__1__ 有 __2__ 個警告和 __3__/__4__ 自動警告。 +player-detail=__1__ 因 __2__ 而被警告 +list-title=該用戶警告如下: +list=__1__: __2__ (__3__/__4__) +cleared=__1__ 的警告己被 __2__ 清除。 + [expcom-waterfill] +description=把地換為水 waterfill-distance=位置太近。 waterfill-cliff=沒有足夠的懸崖炸藥。 entered-area-selection=已進入選取模式,選定區域進行轉換。 diff --git a/locale/zh-TW/data.cfg b/locale/zh-TW/data.cfg index 765c1707..26d83a56 100644 --- a/locale/zh-TW/data.cfg +++ b/locale/zh-TW/data.cfg @@ -1,5 +1,5 @@ [join-message] -greet=[color=0,1,0] 歡迎來到 EXP 的伺服器! 若果你喜歡本伺服器可加入 DISCORD: __1__ [/color] +greet=[color=0,1,0] 歡迎來到 EXP 的服務器! 若果你喜歡本服務器可加入 DISCORD: __1__ [/color] message-set=你的加入信息已更新。 message-cleared=你的加入信息已清除。 @@ -24,8 +24,8 @@ QuickbarFilters-value-tooltip=使用 /save-quickbar 來更換快捷欄的選項 UsesAlt=細節模式 UsesAlt-tooltip=你加入時是否使用細節模式 UsesAlt-value-tooltip=按下 __CONTROL__show-info__ 來更改 -UsesServerUps=伺服器更新數 (SUPS) -UsesServerUps-tooltip=現在是否顯示伺服器更新數 (SUPS) +UsesServerUps=服務器更新數 (SUPS) +UsesServerUps-tooltip=現在是否顯示服務器更新數 (SUPS) UsesServerUps-value-tooltip=使用 /server-ups 來更換顯示 Tag=你的人物標籤 Tag-tooltip=你的人物標籤 @@ -40,53 +40,53 @@ HasEnabledDecon=快速拆除樹木 [exp-statistics] MapsPlayed=地圖遊玩次數 -MapsPlayed-tooltip=你在本伺服器遊玩過的地圖數 +MapsPlayed-tooltip=你在本服務器遊玩過的地圖數 JoinCount=登入次數 -JoinCount-tooltip=你在本伺服器遊玩的次數 +JoinCount-tooltip=你在本服務器遊玩的次數 Playtime=遊玩時間 -Playtime-tooltip=你在本伺服器遊玩的時間 +Playtime-tooltip=你在本服務器遊玩的時間 AfkTime=掛機時間 -AfkTime-tooltip=你在本伺服器掛機的時間 +AfkTime-tooltip=你在本服務器掛機的時間 ChatMessages=傳送信息次數 -ChatMessages-tooltip=你在本伺服器發送信息的次數 +ChatMessages-tooltip=你在本服務器發送信息的次數 CommandsUsed=使用指令次數 -CommandsUsed-tooltip=你在本伺服器使用指令的次數 +CommandsUsed-tooltip=你在本服務器使用指令的次數 RocketsLaunched=火箭發射次數 -RocketsLaunched-tooltip=你在本伺服器在線時所發射過火箭的次數 +RocketsLaunched-tooltip=你在本服務器在線時所發射過火箭的次數 ResearchCompleted=研究次數 -ResearchCompleted-tooltip=你在本伺服器在線時完成研究的次數 +ResearchCompleted-tooltip=你在本服務器在線時完成研究的次數 MachinesBuilt=機器建造次數 -MachinesBuilt-tooltip=你在本伺服器建造過機器的次數 +MachinesBuilt-tooltip=你在本服務器建造過機器的次數 MachinesRemoved=機器拆除次數 -MachinesRemoved-tooltip=你在本伺服器拆除過機器的次數 +MachinesRemoved-tooltip=你在本服務器拆除過機器的次數 TilesBuilt=地磚建造次數 -TilesBuilt-tooltip=你在本伺服器建造過地磚的次數 +TilesBuilt-tooltip=你在本服務器建造過地磚的次數 TilesRemoved=地磚拆除次數 -TilesRemoved-tooltip=你在本伺服器拆除過地磚的次數 +TilesRemoved-tooltip=你在本服務器拆除過地磚的次數 TreesDestroyed=樹木拆除次數 -TreesDestroyed-tooltip=你在本伺服器拆除過樹木的次數 +TreesDestroyed-tooltip=你在本服務器拆除過樹木的次數 OreMined=挖礦次數 -OreMined-tooltip=你在本伺服器挖掘礦的次數 +OreMined-tooltip=你在本服務器挖掘礦的次數 ItemsCrafted=物品合成數 -ItemsCrafted-tooltip=你在本伺服器合成過物品的次數 +ItemsCrafted-tooltip=你在本服務器合成過物品的次數 ItemsPickedUp=物品拾起數 -ItemsPickedUp-tooltip=你在本伺服器起過物品的次數 +ItemsPickedUp-tooltip=你在本服務器起過物品的次數 Kills=撃殺數 -Kills-tooltip=你在本伺服器殺過的敵人數量 +Kills-tooltip=你在本服務器殺過的敵人數量 Deaths=死亡次數 -Deaths-tooltip=你在本伺服器死過的數量 +Deaths-tooltip=你在本服務器死過的數量 DamageDealt=傷害量 DamageDealt-tooltip=你在本伺服器對敵人所造成的傷害量 DistanceTravelled=移動距離 -DistanceTravelled-tooltip=你在本伺服器的總移動距離 +DistanceTravelled-tooltip=你在本服務器的總移動距離 CapsulesUsed=膠囊使用次數 -CapsulesUsed-tooltip=你在本伺服器使用過膠囊的次數 +CapsulesUsed-tooltip=你在本服務器使用過膠囊的次數 EntityRepaired=機器維修次數 -EntityRepaired-tooltip=你在本伺服器維修過機器的次數 +EntityRepaired-tooltip=你在本服務器維修過機器的次數 DeconstructionPlannerUsed=拆除規劃器使用次數 -DeconstructionPlannerUsed-tooltip=你在本伺服器使用過拆除規劃器的次數 +DeconstructionPlannerUsed-tooltip=你在本服務器使用過拆除規劃器的次數 MapTagsMade=地圖標籤數量 -MapTagsMade-tooltip=你在本伺服器放過的地圖標籤數量 +MapTagsMade-tooltip=你在本服務器放過的地圖標籤數量 DamageDeathRatio=傷害死亡比 DamageDeathRatio-tooltip=傷害除以死亡 KillDeathRatio=撃殺死亡比 diff --git a/locale/zh-TW/gui.cfg b/locale/zh-TW/gui.cfg index 8d231e96..16421849 100644 --- a/locale/zh-TW/gui.cfg +++ b/locale/zh-TW/gui.cfg @@ -134,12 +134,12 @@ goto-edit=修改傳送陣圖案 main-tooltip=資訊 welcome-tab=歡迎 welcome-tooltip=歡迎來到 Explosive Gaming -welcome-general=歡迎來到 Explosive Gaming; 你在這裏的時候要遵守規。 你可以在左上方的介面找到更多資訊。 地圖時間 __2__。\n下次地圖重設: __1__ +welcome-general=歡迎來到 Explosive Gaming; 你在這裏的時候要遵守規則。 你可以在左上方的介面找到更多資訊。 地圖時間 __2__。\n下次地圖重設: __1__ welcome-roles=我們有自訂的身份組來保護其他用戶。 所以你有機會不能使用拆除規劃器或掉東西。 身份組給予你各種權限\n你有以下身份組: __1__ welcome-chat=你可以使用 「重音符/抑音符」 鍵 (ESC 鍵 下方) - 你也可以在選項中修改按鍵。\n你目前設定為 「__CONTROL__toggle-console__」 rules-tab=規則 -rules-tooltip=伺服器規則 -rules-general=你在本伺服器遊玩即等同同意以下規則。管理員有機會就相關事項提問。你可能會因為違反規則而被封禁,你可以在 Discord 中提出反對。 +rules-tooltip=服務器規則 +rules-general=你在本服務器遊玩即等同同意以下規則。管理員有機會就相關事項提問。你可能會因為違反規則而被封禁,你可以在 Discord 中提出反對。 rules-1=開掛或濫用漏洞將不會被容忍。 rules-2=當你找到漏洞可以通知職員。 rules-3=請在聊天室中尊重其他人。 @@ -154,41 +154,45 @@ rules-11=請不要用迴旋處。 火車站尾返程則是例外。 rules-12=請跟其他人使用相同的火車組成。常用的有 1-2-1,2-4-2,或 3-8-3,即1個動車組拖2個貨車組再拖不同方向的1個動車組。 rules-13=火車必須是左上右下 (LHD)。 rules-14=禁止要求身份組,發廣告,發惡意連結。 -rules-15=使用常識, 舉報違規人員,管理員只有最終決定權。 +rules-15=使用常識, 舉報違規人員,管理員有最終決定權。 commands-tab=指令 commands-tooltip=你可用的指令 commands-general=這裏有自訂的指令。你可以在下邊找到你可用的指令及其功能介紹。你可以用 /search-help 來取得更多資訊。 +servers-tab=服務器 +servers-tooltip=到其他服務器及網站的連結 +servers-general=這是其中一個服務器。你可以在下方找到其他同樣是由我們運行的伺服器資料。 +servers-factorio=異星工廠服務器 servers-tab=伺服器 servers-tooltip=到其他伺服器及網站的連結 servers-general=這是其中一個伺服器。你可以在下方找到其他同樣是由我們運行的伺服器資料。 servers-factorio=異星工廠伺服器 servers-1=S1 公共 -servers-d1=這個伺服器每兩日重設。 +servers-d1=這個服務器每兩日重設。 servers-2=S2 - -servers-d2=這個伺服器沒在營運。 +servers-d2=這個服務器沒在營運。 servers-3=S3 周 -servers-d3=這個伺服器每週重設。 +servers-d3=這個服務器每週重設。 servers-4=S4 月 -servers-d4=這個伺服器每月重設。 +servers-d4=這個服務器每月重設。 servers-5=S5 模組 -servers-d5=這個伺服器運行模組,可在 Discord 中得到更多資訊。 +servers-d5=這個服務器運行模組,可在 Discord 中得到更多資訊。 servers-6=S6 Donator -servers-d6=這個伺服器為支持者運行,可在 Discord 中得到更多資訊。 +servers-d6=這個服務器為支持者運行,可在 Discord 中得到更多資訊。 servers-7=S7 項目 -servers-d7=這個伺服器只在有項目期間運行。 +servers-d7=這個服務器只在有項目期間運行。 servers-8=S8 T̷-̶s̶-̴:̷ servers-d8=N̵o̴ ̶o̷-̶e̵ ̴k̸n̷-̶w̵s̸ ̴w̷h̷a̶-̶ ̷h̴a̴p̷p̴e̷n̷s̸ ̷o̶n̴ ̷t̶h̴-̶s̶ ̷s̷e̶r̸v̸e̴r̷,̶ ̸i̸t̴ ̷m̶-̸g̴h̶t̷ ̸n̸-̶t̵ ̷e̴v̸e̸n̶t̷ ̵-̷x̴i̵s̶t̸。̸ -servers-connect-Offline=該伺服器目前沒有在運行 +servers-connect-Offline=該服務器目前沒有在運行 servers-connect-Current=你目前所在的伺服器 -servers-connect-Version=該伺服器運行不同的遊戲版本: __1__ -servers-connect-Password=該伺服器需要密碼 -servers-connect-Modded=該伺服器需要下載模組 -servers-connect-Online=該伺服器在線 +servers-connect-Version=該服務器運行不同的遊戲版本: __1__ +servers-connect-Password=該服務器需要密碼 +servers-connect-Modded=該服務器需要下載模組 +servers-connect-Online=該服務器在線 servers-external=外部連結 servers-open-in-browser=可在你的瀏覽器中打開 backers-tab=支持者 backers-tooltip=支持者 -backers-general=他們為伺服器運行提供了不少幫助。 +backers-general=他們為服務器運行提供了不少幫助。 backers-management=系統管理員 backers-board=議員 backers-staff=職員 @@ -215,7 +219,7 @@ control-pts-a=可用分數 control-pts-n=必要分數 control-pts-r=餘下分數 control-reset=重置 -control-apply=套用 +control-apply=應用 control-pts-exceed=分數超出可用上限 display-cmms=挖掘速度 display-cmms-tooltip=個人挖掘速度 @@ -252,6 +256,9 @@ display-ffrlm-tooltip=勢力戰鬥機械人生命時間 [vlayer] main-tooltip=Vlayer 介面 +description-pbr=使用 Vlayer 為玩家電池充電 +description-vi=Vlayer 資訊 +pbr-not-running=vlayer 沒有運行 display-item-solar=[img=entity/solar-panel] 太陽能板 display-item-accumulator=[img=entity/accumulator] 蓄電池 display-current-production=[virtual-signal=signal-P] 現時產能 diff --git a/modules/commands/admin-chat.lua b/modules/commands/admin-chat.lua index f42f1e8b..b755c49a 100644 --- a/modules/commands/admin-chat.lua +++ b/modules/commands/admin-chat.lua @@ -10,17 +10,18 @@ require 'config.expcore.command_general_parse' --- Sends a message in chat that only admins can see -- @command admin-chat -- @tparam string message the message to send in the admin chat -Commands.new_command('admin-chat', 'Sends a message in chat that only admins can see.') +Commands.new_command('admin-chat', {'expcom-admin-chat.description'}, 'Sends a message in chat that only admins can see.') :add_param('message', false) :enable_auto_concat() :set_flag('admin_only') :add_alias('ac') :register(function(player, message) local player_name_colour = format_chat_player_name(player) + for _, return_player in pairs(game.connected_players) do if return_player.admin then return_player.print{'expcom-admin-chat.format', player_name_colour, message} end end return Commands.success -- prevents command complete message from showing -end) \ No newline at end of file +end) diff --git a/modules/commands/admin-markers.lua b/modules/commands/admin-markers.lua index 91fab3ec..098fd07d 100644 --- a/modules/commands/admin-markers.lua +++ b/modules/commands/admin-markers.lua @@ -21,7 +21,7 @@ end) --- Toggle admin marker mode, can only be applied to yourself -- @command admin-marker -Commands.new_command('admin-marker', 'Toggles admin marker mode, new markers can only be edited by admins') +Commands.new_command('admin-marker', {'expcom-admin-marker.description'}, 'Toggles admin marker mode, new markers can only be edited by admins') :set_flag('admin_only') :add_alias('am', 'admin-markers') :register(function(player) @@ -85,4 +85,4 @@ local function maintain_tag(event) end Event.add(defines.events.on_chart_tag_modified, maintain_tag) -Event.add(defines.events.on_chart_tag_removed, maintain_tag) \ No newline at end of file +Event.add(defines.events.on_chart_tag_removed, maintain_tag) diff --git a/modules/commands/artillery.lua b/modules/commands/artillery.lua index fbf1ae3a..01e9e4d9 100644 --- a/modules/commands/artillery.lua +++ b/modules/commands/artillery.lua @@ -72,7 +72,7 @@ Selection.on_selection(SelectionArtyArea, function(event) end end) -Commands.new_command('artillery-target-remote', 'Artillery Target Remote') +Commands.new_command('artillery-target-remote', {'expcom-artillery.description'}, 'Artillery Target Remote') :register(function(player) if Selection.is_selecting(player, SelectionArtyArea) then Selection.stop(player) diff --git a/modules/commands/bot-queue.lua b/modules/commands/bot-queue.lua index 02633e9f..65a967eb 100644 --- a/modules/commands/bot-queue.lua +++ b/modules/commands/bot-queue.lua @@ -6,7 +6,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' -Commands.new_command('bot-queue-get', 'Get bot queue') +Commands.new_command('bot-queue-get', {'expcom-bot-queue.description-get'}, 'Get bot queue') :set_flag('admin_only') :register(function(player) local s = player.force.max_successful_attempts_per_tick_per_construction_queue @@ -14,7 +14,7 @@ Commands.new_command('bot-queue-get', 'Get bot queue') return Commands.success{'expcom-bot-queue.result', player.name, s, f} end) -Commands.new_command('bot-queue-set', 'Set bot queue') +Commands.new_command('bot-queue-set', {'expcom-bot-queue.description-set'}, 'Set bot queue') :add_param('amount', 'integer-range', 1, 20) :set_flag('admin_only') :register(function(player, amount) diff --git a/modules/commands/cheat-mode.lua b/modules/commands/cheat-mode.lua index b4fe93f7..853d82b9 100644 --- a/modules/commands/cheat-mode.lua +++ b/modules/commands/cheat-mode.lua @@ -9,7 +9,7 @@ require 'config.expcore.command_general_parse' --- Toggles cheat mode for your player, or another player. -- @command toggle-cheat-mode -- @tparam[opt=self] LuaPlayer player player to toggle chest mode of, can be nil for self -Commands.new_command('toggle-cheat-mode', 'Toggles cheat mode for your player, or another player.') +Commands.new_command('toggle-cheat-mode', {'expcom-cheat.description-cheat'}, 'Toggles cheat mode for your player, or another player.') :add_param('player', true, 'player') :set_defaults{player=function(player) return player -- default is the user using the command @@ -20,7 +20,7 @@ end} return Commands.success end) -Commands.new_command('research-all', 'Set all research for your force.') +Commands.new_command('research-all', {'expcom-cheat.description-res'}, 'Set all research for your force.') :set_flag('admin_only') :add_param('force', true, 'force') :set_defaults{force=function(player) @@ -32,7 +32,7 @@ end} return Commands.success end) -Commands.new_command('toggle-always-day', 'Toggles always day in surface') +Commands.new_command('toggle-always-day', {'expcom-cheat.description-day'}, 'Toggles always day in surface.') :set_flag('admin_only') :add_param('surface', true, 'surface') :set_defaults{surface=function(player) diff --git a/modules/commands/clear-inventory.lua b/modules/commands/clear-inventory.lua index ceb6b3e9..21df9a0a 100644 --- a/modules/commands/clear-inventory.lua +++ b/modules/commands/clear-inventory.lua @@ -10,7 +10,7 @@ require 'config.expcore.command_role_parse' --- Clears a players inventory -- @command clear-inventory -- @tparam LuaPlayer player the player to clear the inventory of -Commands.new_command('clear-inventory', 'Clears a players inventory') +Commands.new_command('clear-inventory', {'expcom-clr-inv.description'}, 'Clears a players inventory') :add_param('player', false, 'player-role') :add_alias('clear-inv', 'move-inventory', 'move-inv') :register(function(_, player) diff --git a/modules/commands/connect.lua b/modules/commands/connect.lua index 7951e628..ba128b2c 100644 --- a/modules/commands/connect.lua +++ b/modules/commands/connect.lua @@ -51,7 +51,7 @@ end -- @command connect -- @tparam string server The address or name of the server to connect to -- @tparam[opt=false] boolean is_address If an address was given for the server param -Commands.new_command('connect', 'Connect to another server') +Commands.new_command('connect', {'expcom-connect.description'}, 'Connect to another server') :add_param('server') :add_param('is_address', true, 'boolean') :add_alias('join', 'server') @@ -71,7 +71,7 @@ end) -- @tparam string address The address or name of the server to connect to -- @tparam LuaPlayer player The player to connect to a different server -- @tparam[opt=false] boolean is_address If an address was given for the server param -Commands.new_command('connect-player', 'Send a player to a different server') +Commands.new_command('connect-player', {'expcom-connect.description-player'}, 'Send a player to a different server') :add_param('player', 'player-role') :add_param('server') :add_param('is_address', true, 'boolean') @@ -90,7 +90,7 @@ end) -- @command connect-all -- @tparam string address The address or name of the server to connect to -- @tparam[opt=false] boolean is_address If an address was given for the server param -Commands.new_command('connect-all', 'Connect all players to another server') +Commands.new_command('connect-all', {'expcom-connect.description-all'}, 'Connect all players to another server') :add_param('server') :add_param('is_address', true, 'boolean') :register(function(_, server, is_address) @@ -104,4 +104,4 @@ Commands.new_command('connect-all', 'Connect all players to another server') for _, player in pairs(game.connected_players) do External.request_connection(player, server_id) end -end) \ No newline at end of file +end) diff --git a/modules/commands/debug.lua b/modules/commands/debug.lua index 649bf6d5..df0daf36 100644 --- a/modules/commands/debug.lua +++ b/modules/commands/debug.lua @@ -8,7 +8,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands --- Opens the debug pannel for viewing tables. -- @command debug -Commands.new_command('debug', 'Opens the debug pannel for viewing tables.') +Commands.new_command('debug', {'expcom-debug.description'}, 'Opens the debug pannel for viewing tables.') :register(function(player) DebugView.open_dubug(player) -end) \ No newline at end of file +end) diff --git a/modules/commands/enemy.lua b/modules/commands/enemy.lua index 897cb95d..b0313a15 100644 --- a/modules/commands/enemy.lua +++ b/modules/commands/enemy.lua @@ -6,14 +6,14 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' -Commands.new_command('kill-biters', 'Kill all biters (only)') +Commands.new_command('kill-biters', {'expcom-enemy.description-kill'}, 'Kill all biters only') :set_flag('admin_only') :register(function(_, _) game.forces['enemy'].kill_all_units() return Commands.success end) -Commands.new_command('remove-biters', 'Remove biters and prevent generation') +Commands.new_command('remove-biters', {'expcom-enemy.description-remove'}, 'Remove biters and prevent generation') :set_flag('admin_only') :add_param('surface', true, 'surface') :set_defaults{surface=function(player) @@ -27,4 +27,3 @@ end} surface.map_gen_settings.autoplace_controls['enemy-base'].size = 'none' return Commands.success end) - diff --git a/modules/commands/find.lua b/modules/commands/find.lua index 13639fef..be9dc5f3 100644 --- a/modules/commands/find.lua +++ b/modules/commands/find.lua @@ -9,11 +9,11 @@ require 'config.expcore.command_general_parse' --- Find a player on your map. -- @command find-on-map -- @tparam LuaPlayer the player to find on the map -Commands.new_command('find-on-map', 'Find a player on your map.') +Commands.new_command('find-on-map', {'expcom-find.description'}, 'Find a player on your map.') :add_param('player', false, 'player-online') :add_alias('find', 'zoom-to') :register(function(player, action_player) local position = action_player.position player.zoom_to_world(position, 1.75) return Commands.success -- prevents command complete message from showing -end) \ No newline at end of file +end) diff --git a/modules/commands/friendly-fire.lua b/modules/commands/friendly-fire.lua index 0f51000e..15c182a0 100644 --- a/modules/commands/friendly-fire.lua +++ b/modules/commands/friendly-fire.lua @@ -7,7 +7,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' -- For Modded Server Use -Commands.new_command('toggle-friendly-fire', 'Toggle Friendly Fire') +Commands.new_command('toggle-friendly-fire', {'expcom-ff.description'}, 'Toggle friendly fire') :add_param('force', true, 'force') :set_defaults{force=function(player) return player.force diff --git a/modules/commands/help.lua b/modules/commands/help.lua index 6bb31c93..83e66394 100644 --- a/modules/commands/help.lua +++ b/modules/commands/help.lua @@ -18,29 +18,34 @@ end) -- @command chelp -- @tparam string keyword the keyword that will be looked for -- @tparam number page the page of help to view, must be in range of pages -Commands.new_command('search-help', 'Searches for a keyword in all commands you are allowed to use.') +Commands.new_command('search-help', {'expcom-chelp.description'}, 'Searches for a keyword in all commands you are allowed to use.') :add_alias('chelp', 'shelp', 'commands') :add_param('keyword', true) :add_param('page', true, 'integer') :set_defaults{keyword='', page=1} :register(function(player, keyword, page) local player_index = player and player.index or 0 + -- if keyword is a number then treat it as page number if tonumber(keyword) then page = math.floor(tonumber(keyword)) keyword = '' end + -- gets a value for pages, might have result in cache local pages local found = 0 + if search_cache[player_index] and search_cache[player_index].keyword == keyword:lower() then pages = search_cache[player_index].pages found = search_cache[player_index].found + else pages = {{}} local current_page = 1 local page_count = 0 local commands = Commands.search(keyword, player) + -- loops other all commands returned by search, includes game commands for _, command_data in pairs(commands) do -- if the number of results if greater than the number already added then it moves onto a new page @@ -49,6 +54,7 @@ Commands.new_command('search-help', 'Searches for a keyword in all commands you current_page = current_page + 1 table.insert(pages, {}) end + -- adds the new command to the page page_count = page_count + 1 found = found + 1 @@ -61,6 +67,7 @@ Commands.new_command('search-help', 'Searches for a keyword in all commands you alias_format }) end + -- adds the result to the cache search_cache[player_index] = { keyword=keyword:lower(), @@ -68,21 +75,26 @@ Commands.new_command('search-help', 'Searches for a keyword in all commands you found=found } end + -- print the requested page keyword = keyword == '' and '' or keyword Commands.print({'expcom-chelp.title', keyword}, 'cyan') + if pages[page] then for _, command in pairs(pages[page]) do Commands.print(command) end + Commands.print({'expcom-chelp.footer', found, page, #pages}, 'cyan') + else Commands.print({'expcom-chelp.footer', found, page, #pages}, 'cyan') return Commands.error{'expcom-chelp.out-of-range', page} end + -- blocks command complete message return Commands.success end) -- way to access global -return search_cache \ No newline at end of file +return search_cache diff --git a/modules/commands/home.lua b/modules/commands/home.lua index 851141d9..7310b790 100644 --- a/modules/commands/home.lua +++ b/modules/commands/home.lua @@ -30,7 +30,7 @@ end --- Teleports you to your home location -- @command home -Commands.new_command('home', 'Teleports you to your home location') +Commands.new_command('home', {'expcom-home.description-home'}, 'Teleports you to your home location') :register(function(player) local home = homes[player.index] if not home or not home[1] then @@ -44,7 +44,7 @@ end) --- Sets your home location to your current position -- @command home-set -Commands.new_command('home-set', 'Sets your home location to your current position') +Commands.new_command('home-set', {'expcom-home.description-home-set'}, 'Sets your home location to your current position') :register(function(player) local home = homes[player.index] if not home then @@ -58,7 +58,7 @@ end) --- Returns your current home location -- @command home-get -Commands.new_command('home-get', 'Returns your current home location') +Commands.new_command('home-get', {'expcom-home.description-home-get'}, 'Returns your current home location') :register(function(player) local home = homes[player.index] if not home or not home[1] then @@ -70,7 +70,7 @@ end) --- Teleports you to previous location -- @command return -Commands.new_command('return', 'Teleports you to previous location') +Commands.new_command('return', {'expcom-home.description-return'}, 'Teleports you to previous location') :register(function(player) local home = homes[player.index] if not home or not home[2] then @@ -80,4 +80,4 @@ Commands.new_command('return', 'Teleports you to previous location') teleport(player, home[2]) home[2] = rtn Commands.print{'expcom-home.return-set', rtn.x, rtn.y} -end) \ No newline at end of file +end) diff --git a/modules/commands/interface.lua b/modules/commands/interface.lua index a95d66be..1ed5410b 100644 --- a/modules/commands/interface.lua +++ b/modules/commands/interface.lua @@ -62,7 +62,7 @@ end --- Sends an invocation to be ran and returns the result. -- @command interface -- @tparam string invocation the command that will be run -Commands.new_command('interface', 'Sends an invocation to be ran and returns the result.') +Commands.new_command('interface', {'expcom-interface.description'}, 'Sends an invocation to be ran and returns the result.') :add_param('invocation', false) :enable_auto_concat() :set_flag('admin_only') @@ -113,4 +113,4 @@ return { add_interface_callback = add_interface_callback, interface_env = interface_env, clean_stack_trace = function(str) return str:gsub('%.%.%..-/temp/currently%-playing', '') end -} \ No newline at end of file +} diff --git a/modules/commands/jail.lua b/modules/commands/jail.lua index a68553dc..3b1385e7 100644 --- a/modules/commands/jail.lua +++ b/modules/commands/jail.lua @@ -12,7 +12,7 @@ require 'config.expcore.command_role_parse' -- @command jail -- @tparam LuaPlayer player the player that will be jailed -- @tparam[opt] string reason the reason why the player is being jailed -Commands.new_command('jail', 'Puts a player into jail and removes all other roles.') +Commands.new_command('jail', {'expcom-jail.description-jail'}, 'Puts a player into jail and removes all other roles.') :add_param('player', false, 'player-role') :add_param('reason', true) :enable_auto_concat() @@ -31,7 +31,7 @@ end) --- Removes a player from jail. -- @command unjail -- @tparam LuaPlayer the player that will be unjailed -Commands.new_command('unjail', 'Removes a player from jail.') +Commands.new_command('unjail', {'expcom-jail.description-unjail'}, 'Removes a player from jail.') :add_param('player', false, 'player-role') :add_alias('clear-jail', 'remove-jail') :enable_auto_concat() diff --git a/modules/commands/kill.lua b/modules/commands/kill.lua index dad370b1..7f928103 100644 --- a/modules/commands/kill.lua +++ b/modules/commands/kill.lua @@ -11,7 +11,7 @@ require 'config.expcore.command_role_parse' --- Kills yourself or another player. -- @command kill -- @tparam[opt=self] LuaPlayer player the player to kill, must be alive to be valid -Commands.new_command('kill', 'Kills yourself or another player.') +Commands.new_command('kill', {'expcom-kill.description'}, 'Kills yourself or another player.') :add_param('player', true, 'player-role-alive') :set_defaults{player=function(player) -- default is the player unless they are dead @@ -26,9 +26,11 @@ end} end if player == action_player then action_player.character.die() + elseif Roles.player_allowed(player, 'command/kill/always') then action_player.character.die() + else return Commands.error{'expcore-commands.unauthorized'} end -end) \ No newline at end of file +end) diff --git a/modules/commands/last-location.lua b/modules/commands/last-location.lua index f52ebe83..3796a452 100644 --- a/modules/commands/last-location.lua +++ b/modules/commands/last-location.lua @@ -10,7 +10,7 @@ require 'config.expcore.command_general_parse' --- Get the last location of a player. -- @command last-location -- @tparam LuaPlayer player the player that you want a location of -Commands.new_command('last-location', 'Sends you the last location of a player') +Commands.new_command('last-location', {'expcom-lastlocation.description'}, 'Sends you the last location of a player') :add_alias('location') :add_param('player', false, 'player') :register(function(_, action_player) diff --git a/modules/commands/me.lua b/modules/commands/me.lua index d13a71c9..16d9b575 100644 --- a/modules/commands/me.lua +++ b/modules/commands/me.lua @@ -8,10 +8,10 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands --- Sends an action message in the chat -- @command me -- @tparam string action the action that follows your name in chat -Commands.new_command('me', 'Sends an action message in the chat') +Commands.new_command('me', {'expcom-me.description'}, 'Sends an action message in the chat') :add_param('action', false) :enable_auto_concat() :register(function(player, action) local player_name = player and player.name or '' game.print(string.format('* %s %s *', player_name, action), player.chat_color) -end) \ No newline at end of file +end) diff --git a/modules/commands/pollution.lua b/modules/commands/pollution.lua index be2d783f..9e13c096 100644 --- a/modules/commands/pollution.lua +++ b/modules/commands/pollution.lua @@ -6,7 +6,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' -Commands.new_command('pollution-clear', 'Clear pollution') +Commands.new_command('pollution-clear', {'expcom-pol.description-clr'}, 'Clear pollution') :set_flag('admin_only') :add_alias('pol-clr') :add_param('surface', true, 'surface') @@ -19,7 +19,7 @@ end} return Commands.success end) -Commands.new_command('pollution-off', 'Disable pollution') +Commands.new_command('pollution-off', {'expcom-pol.description-off'}, 'Disable pollution') :set_flag('admin_only') :add_alias('pol-off') :register(function(player) diff --git a/modules/commands/protection.lua b/modules/commands/protection.lua index 6dbb83f4..5a5554d4 100644 --- a/modules/commands/protection.lua +++ b/modules/commands/protection.lua @@ -96,7 +96,7 @@ end --- Toggles entity protection selection -- @command protect-entity -Commands.new_command('protect-entity', 'Toggles entity protection selection, hold shift to remove protection') +Commands.new_command('protect-entity', {'expcom-protection.description-pe'}, 'Toggles entity protection selection, hold shift to remove protection') :add_alias('pe') :register(function(player) if Selection.is_selecting(player, SelectionProtectEntity) then @@ -109,7 +109,7 @@ end) --- Toggles area protection selection -- @command protect-area -Commands.new_command('protect-area', 'Toggles area protection selection, hold shift to remove protection') +Commands.new_command('protect-area', {'expcom-protection.description-pa'}, 'Toggles area protection selection, hold shift to remove protection') :add_alias('pa') :register(function(player) if Selection.is_selecting(player, SelectionProtectArea) then @@ -212,4 +212,4 @@ end) Event.add(EntityProtection.events.on_repeat_violation, function(event) local player_name = format_chat_player_name(event.player_index) Roles.print_to_roles_higher('Regular', {'expcom-protection.repeat-offence', player_name, event.entity.localised_name, event.entity.position.x, event.entity.position.y}) -end) \ No newline at end of file +end) diff --git a/modules/commands/rainbow.lua b/modules/commands/rainbow.lua index 58fa8836..ac9c16d8 100644 --- a/modules/commands/rainbow.lua +++ b/modules/commands/rainbow.lua @@ -43,7 +43,7 @@ end --- Sends an rainbow message in the chat -- @command rainbow -- @tparam string message the message that will be printed in chat -Commands.new_command('rainbow', 'Sends an rainbow message in the chat') +Commands.new_command('rainbow', {'expcom-rainbow.description'}, 'Sends an rainbow message in the chat') :add_param('message', false) :enable_auto_concat() :register(function(player, message) @@ -59,4 +59,4 @@ Commands.new_command('rainbow', 'Sends an rainbow message in the chat') return rtn end) game.print(output) -end) \ No newline at end of file +end) diff --git a/modules/commands/ratio.lua b/modules/commands/ratio.lua index 51737d0e..0d230280 100644 --- a/modules/commands/ratio.lua +++ b/modules/commands/ratio.lua @@ -17,66 +17,70 @@ local function AmountOfMachines(itemsPerSecond, output) end end -Commands.new_command('ratio', 'This command will give the input and output ratios of the selected machine. Use the parameter for calculating the machines needed for that amount of items per second.') - :add_param('itemsPerSecond', true, 'number') - :register(function(player, itemsPerSecond) - local machine = player.selected -- selected machine - if not machine then --nil check - return Commands.error{'expcom-ratio.notSelecting'} +Commands.new_command('ratio', {'expcom-ratio.description'}, 'This command will give the input and output ratios of the selected machine. Use the parameter for calculating the machines needed for that amount of items per second.') +:add_param('itemsPerSecond', true, 'number') +:register(function(player, itemsPerSecond) + local machine = player.selected -- selected machine + + if not machine then --nil check + return Commands.error{'expcom-ratio.notSelecting'} + end + + if machine.type ~= "assembling-machine" and machine.type ~= "furnace" then + return Commands.error{'expcom-ratio.notSelecting'} + end + + local recipe = machine.get_recipe() -- recipe + + if not recipe then --nil check + return Commands.error{'expcom-ratio.notSelecting'} + end + + local items = recipe.ingredients -- items in that recipe + local products = recipe.products -- output items + local amountOfMachines + local moduleInventory = machine.get_module_inventory()--the module Inventory of the machine + local multi = Modules(moduleInventory) --function for the productively modals + + if itemsPerSecond then + amountOfMachines = math.ceil( AmountOfMachines(itemsPerSecond, 1/recipe.energy*machine.crafting_speed*products[1].amount*multi)) -- amount of machines + end + + if not amountOfMachines then + amountOfMachines = 1 --set to 1 to make it not nil + end + + ----------------------------items---------------------------- + for i, item in ipairs(items) do + local sprite -- string to make the icon work either fluid ore item + + if item.type == "item" then + sprite = 'expcom-ratio.item-in' + + else + sprite = 'expcom-ratio.fluid-in' end - if machine.type ~= "assembling-machine" and machine.type ~= "furnace" then - return Commands.error{'expcom-ratio.notSelecting'} - end - local recipe = machine.get_recipe() -- recipe + local ips = item.amount/recipe.energy*machine.crafting_speed*amountOfMachines --math on the items/fluids per second + Commands.print{sprite, math.round(ips, 3), item.name} -- full string + end - if not recipe then --nil check - return Commands.error{'expcom-ratio.notSelecting'} + ----------------------------products---------------------------- + for i, product in ipairs(products) do + local sprite -- string to make the icon work either fluid ore item + + if product.type == "item" then + sprite = 'expcom-ratio.item-out' + else + sprite = 'expcom-ratio.fluid-out' end - local items = recipe.ingredients -- items in that recipe - local products = recipe.products -- output items - local amountOfMachines - local moduleInventory = machine.get_module_inventory()--the module Inventory of the machine - local multi = Modules(moduleInventory) --function for the productively modals + local output = 1/recipe.energy*machine.crafting_speed*product.amount*multi --math on the outputs per second + Commands.print {sprite, math.round(output*amountOfMachines, 3), product.name} -- full string - if itemsPerSecond then - amountOfMachines = math.ceil( AmountOfMachines(itemsPerSecond, 1/recipe.energy*machine.crafting_speed*products[1].amount*multi)) -- amount of machines - end - if not amountOfMachines then - amountOfMachines = 1 --set to 1 to make it not nil - end - ----------------------------items---------------------------- - for i, item in ipairs(items) do - local sprite -- string to make the icon work either fluid ore item + end - if item.type == "item" then - sprite = 'expcom-ratio.item-in' - else - sprite = 'expcom-ratio.fluid-in' - end - - local ips = item.amount/recipe.energy*machine.crafting_speed*amountOfMachines --math on the items/fluids per second - Commands.print {sprite, math.round(ips, 3), item.name}-- full string - end - ----------------------------products---------------------------- - - for i, product in ipairs(products) do - local sprite -- string to make the icon work either fluid ore item - - if product.type == "item" then - sprite = 'expcom-ratio.item-out' - else - sprite = 'expcom-ratio.fluid-out' - end - - local output = 1/recipe.energy*machine.crafting_speed*product.amount*multi --math on the outputs per second - Commands.print {sprite, math.round(output*amountOfMachines, 3), product.name} -- full string - - end - - if amountOfMachines ~= 1 then - Commands.print{'expcom-ratio.machines', amountOfMachines} - end - - end) \ No newline at end of file + if amountOfMachines ~= 1 then + Commands.print{'expcom-ratio.machines', amountOfMachines} + end +end) diff --git a/modules/commands/repair.lua b/modules/commands/repair.lua index cd4723c8..72be75d1 100644 --- a/modules/commands/repair.lua +++ b/modules/commands/repair.lua @@ -11,7 +11,7 @@ local max_time_to_live = 4294967295 -- unit32 max --- Repairs entities on your force around you -- @command repair -- @tparam number range the range to repair stuff in, there is a max limit to this -Commands.new_command('repair', 'Repairs entities on your force around you') +Commands.new_command('repair', {'expcom-repair.description'}, 'Repairs entities on your force around you') :add_param('range', false, 'integer-range', 1, config.max_range) :register(function(player, range) local revive_count = 0 @@ -49,4 +49,4 @@ Commands.new_command('repair', 'Repairs entities on your force around you') end end return Commands.success{'expcom-repair.result', revive_count, heal_count} -end) \ No newline at end of file +end) diff --git a/modules/commands/reports.lua b/modules/commands/reports.lua index 6609189e..82512c1d 100644 --- a/modules/commands/reports.lua +++ b/modules/commands/reports.lua @@ -22,7 +22,7 @@ end -- @command report -- @tparam LuaPlayer player the player to report, some players are immune -- @tparam string reason the reason the player is being reported -Commands.new_command('report', 'Reports a player and notifies moderators') +Commands.new_command('report', {'expcom-report.description-report'}, 'Reports a player and notifies moderators') :add_param('player', false, function(input, player, reject) input = Commands.parse('player', input, player, reject) if not input then return end @@ -51,7 +51,7 @@ end) --- Gets a list of all reports that a player has on them. If no player then lists all players and the number of reports on them. -- @command get-reports -- @tparam LuaPlayer player the player to get the report for -Commands.new_command('get-reports', 'Gets a list of all reports that a player has on them. If no player then lists all players and the number of reports on them.') +Commands.new_command('get-reports', {'expcom-report.description-get-reports'}, 'Gets a list of all reports that a player has on them. If no player then lists all players and the number of reports on them.') :add_param('player', true, 'player') :add_alias('reports', 'list-reports') :register(function(_, player) @@ -78,7 +78,7 @@ end) -- @command clear-reports -- @tparam LuaPlayer player the player to clear the report(s) from -- @tparam[opt=all] LuaPlayer from-player remove only the report made by this player -Commands.new_command('clear-reports', 'Clears all reports from a player or just the report from one player.') +Commands.new_command('clear-reports', {'expcom-report.description-clear-reports'}, 'Clears all reports from a player or just the report from one player.') :add_param('player', false, 'player') :add_param('from-player', true, 'player') :register(function(player, action_player, from_player) @@ -94,4 +94,4 @@ Commands.new_command('clear-reports', 'Clears all reports from a player or just local action_player_name_color = format_chat_player_name(action_player) local by_player_name_color = format_chat_player_name(player) game.print{'expcom-report.removed', action_player_name_color, by_player_name_color} -end) \ No newline at end of file +end) diff --git a/modules/commands/research.lua b/modules/commands/research.lua index 39810c8e..3f75447c 100644 --- a/modules/commands/research.lua +++ b/modules/commands/research.lua @@ -22,7 +22,7 @@ local function res_queue(force, res, by_script) end end -Commands.new_command('auto-research', 'Automatically queue up research') +Commands.new_command('auto-research', {'expcom-res.description-ares'}, 'Automatically queue up research') :add_alias('ares') :register(function(player) research.res_queue_enable = not research.res_queue_enable diff --git a/modules/commands/roles.lua b/modules/commands/roles.lua index 20bd93d4..194c017e 100644 --- a/modules/commands/roles.lua +++ b/modules/commands/roles.lua @@ -12,15 +12,17 @@ local format_chat_player_name, format_chat_colour_localized = _C.format_chat_pla -- @command assign-role -- @tparam LuaPlayer player the player to assign the role to -- @tparam string role the name of the role to assign to the player, supports auto complete after enter -Commands.new_command('assign-role', 'Assigns a role to a player') +Commands.new_command('assign-role', {'expcom-roles.description-assign-role'}, 'Assigns a role to a player') :add_param('player', false, 'player-role') :add_param('role', false, 'role') :set_flag('admin-only') :add_alias('rpromote', 'assign', 'role', 'add-role') :register(function(player, action_player, role) local player_highest = Roles.get_player_highest_role(player) + if player_highest.index < role.index then Roles.assign_player(action_player, role, player.name) + else return Commands.error{'expcom-roles.higher-role'} end @@ -30,15 +32,17 @@ end) -- @command unassign-role -- @tparam LuaPlayer player the player to unassign the role from -- @tparam string role the name of the role to unassign from the player, supports auto complete after enter -Commands.new_command('unassign-role', 'Unassigns a role from a player') +Commands.new_command('unassign-role', {'expcom-roles.description-unassign-role'}, 'Unassigns a role from a player') :add_param('player', false, 'player-role') :add_param('role', false, 'role') :set_flag('admin-only') :add_alias('rdemote', 'unassign', 'rerole', 'remove-role') :register(function(player, action_player, role) local player_highest = Roles.get_player_highest_role(player) + if player_highest.index < role.index then Roles.unassign_player(action_player, role, player.name) + else return Commands.error{'expcom-roles.higher-role'} end @@ -47,28 +51,33 @@ end) --- Lists all roles in they correct order -- @command list-roles -- @tparam[opt=all] LuaPlayer player list only the roles which this player has -Commands.new_command('list-roles', 'Lists all roles in they correct order') +Commands.new_command('list-roles', {'expcom-roles.description-list-roles'}, 'Lists all roles in they correct order') :add_param('player', true, 'player') :add_alias('lsroles', 'roles') :register(function(_, player) local roles = Roles.config.order local message = {'expcom-roles.list'} + if player then roles = Roles.get_player_roles(player) end + for index, role in pairs(roles) do role = Roles.get_role_from_any(role) local colour = role.custom_color or Colours.white local role_name = format_chat_colour_localized(role.name, colour) if index == 1 then message = {'expcom-roles.list', role_name} + if player then local player_name_colour = format_chat_player_name(player) message = {'expcom-roles.list-player', player_name_colour, role_name} end + else message = {'expcom-roles.list-element', message, role_name} end end + return Commands.success(message) -end) \ No newline at end of file +end) diff --git a/modules/commands/search.lua b/modules/commands/search.lua index 4eb70b57..bc306d05 100644 --- a/modules/commands/search.lua +++ b/modules/commands/search.lua @@ -103,7 +103,7 @@ end --- Get a list of players sorted by the quantity of an item in their inventory -- @command search-amount -- @tparam LuaItemPrototype item The item to search for in players inventories -Commands.new_command('search-amount', 'Display players sorted by the quantity of an item held') +Commands.new_command('search-amount', {'expcom-inv-search.description-ia'}, 'Display players sorted by the quantity of an item held') :add_alias('ia') :add_param('item', false, item_parse) :enable_auto_concat() @@ -122,7 +122,7 @@ end --- Get a list of players who have the given item, sorted by how recently they joined -- @command search-recent -- @tparam LuaItemPrototype item The item to search for in players inventories -Commands.new_command('search-recent', 'Display players who hold an item sorted by join time') +Commands.new_command('search-recent', {'expcom-inv-search.description-ir'}, 'Display players who hold an item sorted by join time') :add_alias('ir') :add_param('item', false, item_parse) :enable_auto_concat() @@ -141,7 +141,7 @@ end --- Get a list of players sorted by quantity held and play time -- @command search -- @tparam LuaItemPrototype item The item to search for in players inventories -Commands.new_command('search', 'Display players sorted by the quantity of an item held and playtime') +Commands.new_command('search', {'expcom-inv-search.description-i'}, 'Display players sorted by the quantity of an item held and playtime') :add_alias('i') :add_param('item', false, item_parse) :enable_auto_concat() @@ -155,7 +155,7 @@ end) --- Get a list of online players sorted by quantity held and play time -- @command search-online -- @tparam LuaItemPrototype item The item to search for in players inventories -Commands.new_command('search-online', 'Display online players sorted by the quantity of an item held and playtime') +Commands.new_command('search-online', {'expcom-inv-search.description-io'}, 'Display online players sorted by the quantity of an item held and playtime') :add_alias('io') :add_param('item', false, item_parse) :enable_auto_concat() @@ -164,4 +164,4 @@ Commands.new_command('search-online', 'Display online players sorted by the quan if #players == 0 then return {'expcom-inv-search.results-none', item.name} end local top_players = sort_players(players, combined_sort) display_players(player, top_players, item) -end) \ No newline at end of file +end) diff --git a/modules/commands/spawn.lua b/modules/commands/spawn.lua index f88194d9..471067d6 100644 --- a/modules/commands/spawn.lua +++ b/modules/commands/spawn.lua @@ -39,7 +39,7 @@ end --- Teleport to spawn -- @command go-to-spawn -- @tparam[opt=self] LuaPlayer player the player to teleport to their spawn point -Commands.new_command('go-to-spawn', 'Teleport to spawn') +Commands.new_command('go-to-spawn', {'expcom-spawn.description'}, 'Teleport to spawn') :add_param('player', true, 'player-role-alive') :set_defaults{ player=function(player) @@ -52,15 +52,18 @@ Commands.new_command('go-to-spawn', 'Teleport to spawn') :register(function(player, action_player) if not action_player then return Commands.error{'expcom-spawn.unavailable'} + elseif action_player == player then if not teleport(player) then return Commands.error{'expcom-spawn.unavailable'} end + elseif Roles.player_allowed(player, 'command/go-to-spawn/always') then if not teleport(action_player) then return Commands.error{'expcom-spawn.unavailable'} end + else return Commands.error{'expcore-commands.unauthorized'} end -end) \ No newline at end of file +end) diff --git a/modules/commands/spectate.lua b/modules/commands/spectate.lua index aa74d591..cf08682d 100644 --- a/modules/commands/spectate.lua +++ b/modules/commands/spectate.lua @@ -9,10 +9,11 @@ require 'config.expcore.command_general_parse' --- Toggles spectator mode for the caller -- @command spectate -Commands.new_command('spectate', 'Toggles spectator mode') +Commands.new_command('spectate', {'expcom-spectate.description-spectate'}, 'Toggles spectator mode') :register(function(player) if Spectate.is_spectating(player) then Spectate.stop_spectate(player) + else Spectate.start_spectate(player) end @@ -21,13 +22,14 @@ end) --- Enters follow mode for the caller, following the given player. -- @command follow -- @tparam LuaPlayer player The player that will be followed -Commands.new_command('follow', 'Start following a player in spectator') +Commands.new_command('follow', {'expcom-spectate.description-follow'}, 'Start following a player in spectator') :add_alias('f') :add_param('player', false, 'player-online') :register(function(player, action_player) if player == action_player then return Commands.error{'expcom-spectate.follow-self'} + else Spectate.start_follow(player, action_player) end -end) \ No newline at end of file +end) diff --git a/modules/commands/speed.lua b/modules/commands/speed.lua index bf28664f..cb61ed9e 100644 --- a/modules/commands/speed.lua +++ b/modules/commands/speed.lua @@ -6,7 +6,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' -Commands.new_command('game-speed', 'Set game speed') +Commands.new_command('game-speed', {'expcom-speed.description'}, 'Set game speed') :add_param('amount', 'number-range', 0.2, 8) :set_flag('admin_only') :register(function(player, amount) diff --git a/modules/commands/surface-clearing.lua b/modules/commands/surface-clearing.lua index 99e4254a..d1a546de 100644 --- a/modules/commands/surface-clearing.lua +++ b/modules/commands/surface-clearing.lua @@ -7,7 +7,7 @@ local copy_items_stack = _C.copy_items_stack --- @dep expcore.common local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' -Commands.new_command('clear-item-on-ground', 'Clear Item On Ground') +Commands.new_command('clear-item-on-ground', {'expcom-surface-clearing.description-ci'}, 'Clear Item On Ground') :add_param('range', false, 'integer-range', 1, 1000) :register(function(player, range) for _, e in pairs(player.surface.find_entities_filtered{position=player.position, radius=range, name='item-on-ground'}) do @@ -22,7 +22,7 @@ Commands.new_command('clear-item-on-ground', 'Clear Item On Ground') return Commands.success end) -Commands.new_command('clear-blueprint', 'Clear Blueprint') +Commands.new_command('clear-blueprint', {'expcom-surface-clearing.description-cb'}, 'Clear Blueprint') :add_param('range', false, 'integer-range', 1, 1000) :register(function(player, range) for _, e in pairs(player.surface.find_entities_filtered{position=player.position, radius=range, type='entity-ghost'}) do @@ -30,4 +30,4 @@ Commands.new_command('clear-blueprint', 'Clear Blueprint') end return Commands.success -end) \ No newline at end of file +end) diff --git a/modules/commands/teleport.lua b/modules/commands/teleport.lua index 667d63de..19d4b54e 100644 --- a/modules/commands/teleport.lua +++ b/modules/commands/teleport.lua @@ -41,7 +41,7 @@ end -- @command teleport -- @tparam LuaPlayer from_player the player that will be teleported, must be alive -- @tparam LuaPlayer to_player the player to teleport to, must be online (if dead goes to where they died) -Commands.new_command('teleport', 'Teleports a player to another player.') +Commands.new_command('teleport', {'expcom-tp.description-tp'}, 'Teleports a player to another player.') :add_param('from_player', false, 'player-alive') :add_param('to_player', false, 'player-online') :add_alias('tp') @@ -60,7 +60,7 @@ end) --- Teleports a player to you. -- @command bring -- @tparam LuaPlayer player the player that will be teleported, must be alive -Commands.new_command('bring', 'Teleports a player to you.') +Commands.new_command('bring', {'expcom-tp.description-bring'}, 'Teleports a player to you.') :add_param('player', false, 'player-alive') :set_flag('admin_only') :register(function(player, from_player) @@ -78,7 +78,7 @@ end) --- Teleports you to a player. -- @command goto -- @tparam LuaPlayer player the player to teleport to, must be online (if dead goes to where they died) -Commands.new_command('goto', 'Teleports you to a player.') +Commands.new_command('goto', {'expcom-tp.description-goto'}, 'Teleports you to a player.') :add_param('player', false, 'player-online') :add_alias('tp-me', 'tpme') :register(function(player, to_player) diff --git a/modules/commands/train.lua b/modules/commands/train.lua index af440465..a38fb9ba 100644 --- a/modules/commands/train.lua +++ b/modules/commands/train.lua @@ -7,7 +7,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' local format_number = require('util').format_number -Commands.new_command('set-trains-to-automatic', 'Set All Trains to Automatic') +Commands.new_command('set-trains-to-automatic', {'expcom-train.description'}, 'Set All Trains to Automatic') :register(function(player) local count = 0 diff --git a/modules/commands/vlayer.lua b/modules/commands/vlayer.lua index 03db8604..ec25fe3e 100644 --- a/modules/commands/vlayer.lua +++ b/modules/commands/vlayer.lua @@ -5,11 +5,11 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' local vlayer = require 'modules.control.vlayer' -Commands.new_command('personal-battery-recharge', 'Recharge Player Battery upto a portion with vlayer') +Commands.new_command('personal-battery-recharge', {'vlayer.description-pbr'}, 'Recharge Player Battery upto a portion with vlayer') :add_param('amount', 'number-range', 0.2, 1) :register(function(player, amount) if vlayer.get_statistics()['energy_sustained'] == 0 then - return Commands.error('vlayer need to be running to get this command work') + return Commands.error({'vlayer.pbr-not-running'}) end local armor = player.get_inventory(defines.inventory.character_armor)[1].grid @@ -27,7 +27,7 @@ Commands.new_command('personal-battery-recharge', 'Recharge Player Battery upto return Commands.success end) -Commands.new_command('vlayer-info', 'Vlayer Info') +Commands.new_command('vlayer-info', {'vlayer.description-vi'}, 'Vlayer Info') :register(function(_) local c = vlayer.get_circuits() diff --git a/modules/commands/warnings.lua b/modules/commands/warnings.lua index 0bce9168..656a36ec 100644 --- a/modules/commands/warnings.lua +++ b/modules/commands/warnings.lua @@ -13,7 +13,7 @@ require 'config.expcore.command_role_parse' -- @command give-warning -- @tparam LuaPlayer player the player the will recive a warning -- @tparam string reason the reason the player is being given a warning -Commands.new_command('give-warning', 'Gives a warning to a player; may lead to automatic script action.') +Commands.new_command('give-warning', {'expcom-warnings.description-give'}, 'Gives a warning to a player; may lead to automatic script action.') :add_param('player', false, 'player-role') :add_param('reason', false) :add_alias('warn') @@ -28,7 +28,7 @@ end) --- Gets the number of warnings a player has. If no player then lists all players and the number of warnings they have. -- @command get-warnings -- @tparam[opt=list] LuaPlayer player the player to get the warning for, if nil all players are listed -Commands.new_command('get-warnings', 'Gets the number of warnings a player has. If no player then lists all players and the number of warnings they have.') +Commands.new_command('get-warnings', {'expcom-warnings.description-get'}, 'Gets the number of warnings a player has. If no player then lists all players and the number of warnings they have.') :add_param('player', true, 'player') :add_alias('warnings', 'list-warnings') :register(function(_, player) @@ -63,7 +63,7 @@ end) --- Clears all warnings (and script warnings) from a player -- @command clear-warnings -- @tparam LuaPlayer player the player to clear the warnings from -Commands.new_command('clear-warnings', 'Clears all warnings (and script warnings) from a player') +Commands.new_command('clear-warnings', {'expcom-warnings.description-clear'}, 'Clears all warnings (and script warnings) from a player') :add_param('player', false, 'player') :register(function(player, action_player) Warnings.clear_warnings(action_player, player.name) @@ -71,4 +71,4 @@ Commands.new_command('clear-warnings', 'Clears all warnings (and script warnings local action_player_name_color = format_chat_player_name(action_player) local by_player_name_color = format_chat_player_name(player) game.print{'expcom-warnings.cleared', action_player_name_color, by_player_name_color} -end) \ No newline at end of file +end) diff --git a/modules/commands/waterfill.lua b/modules/commands/waterfill.lua index b8bd0726..bdaa8e5f 100644 --- a/modules/commands/waterfill.lua +++ b/modules/commands/waterfill.lua @@ -4,7 +4,7 @@ local Commands = require 'expcore.commands' --- @dep expcore.commands require 'config.expcore.command_general_parse' local Selection = require 'modules.control.selection' --- @dep modules.control.selection -local SelectionConvertArea = 'ConvertArea' +local SelectionConvertArea = 'WaterfillConvertArea' --- Align an aabb to the grid by expanding it local function aabb_align_expand(aabb) @@ -14,7 +14,7 @@ local function aabb_align_expand(aabb) } end -Commands.new_command('waterfill', 'Change tile to water') +Commands.new_command('waterfill', {'expcom-waterfill.description'}, 'Change tile to water') :register(function(player) local inv = player.get_main_inventory() @@ -37,6 +37,10 @@ Selection.on_selection(SelectionConvertArea, function(event) local area = aabb_align_expand(event.area) local player = game.get_player(event.player_index) + if not player then + return + end + local entities = player.surface.find_entities_filtered{area=area, name='steel-chest'} if #entities == 0 then @@ -46,6 +50,11 @@ Selection.on_selection(SelectionConvertArea, function(event) local tiles_to_make = {} local inv = player.get_main_inventory() + + if not inv then + return + end + local clf_exp = inv.get_item_count('cliff-explosives') for _, entity in pairs(entities) do