1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-05 13:15:03 +02:00

can only overwrite existing passwords

This commit is contained in:
danielmartin0 2024-09-13 15:01:29 +01:00
parent 6d89f5247f
commit 74a502d25a
2 changed files with 7 additions and 0 deletions

View File

@ -550,6 +550,7 @@ cmd_notify_set_private_run_password=The password for __1__ has been set to __2__
gui_runs_launch=Launch crew
gui_runs_launch_error_2=The number of concurrent crews on the server has reached the cap set by the admins.
gui_runs_launch_error_4=No sloops available. Join an existing crew instead.
@ -615,6 +616,7 @@ cmd_error_invalid_player_name=[ERROR] Player __1__ not found.
cmd_error_invalid_class_name=[ERROR] Class __1__ not found.
cmd_error_color_not_found=[ERROR] Color __1__ not found.
cmd_error_not_creator_of_crew=[ERROR] Only the original creator of the crew can run this command.
cmd_error_no_existing_password=There is no existing password to overwrite for this crew.
cmd_explain_set_max_crews=is an admin command to set the maximum number of concurrent crews allowed on the server.
cmd_explain_sail=is an admin command to set the ship sailing after an island, in case there's a problem with the captain doing so.

View File

@ -374,6 +374,11 @@ commands.add_command(
if check_creator_of_crew(cmd) then
local player = game.players[cmd.player_index]
if not memory.private_run_password then
Common.notify_player_error(player, { 'pirates.cmd_error_no_existing_password' })
return false
end
memory.private_run_password = param
Common.notify_player_expected(player, { 'pirates.cmd_notify_set_private_run_password', memory.name, param })
end