Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatCommander 0.18 #144

Merged
merged 9 commits into from
Jun 15, 2024
Merged

ChatCommander 0.18 #144

merged 9 commits into from
Jun 15, 2024

Conversation

hexarobi
Copy link
Contributor

@hexarobi hexarobi commented Jun 4, 2024

If I am updating an existing package...

  • I have ensured that all modified files now have a different URL.
  • If resources were modified, I also made sure to bump the resources_version.

@Sainan
Copy link
Member

Sainan commented Jun 5, 2024

That's a pretty stupid description.

@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 5, 2024

That's a pretty stupid description.

any suggestions to improve?

@Sainan
Copy link
Member

Sainan commented Jun 5, 2024

Something that justifies why one might want to download this instead of just using the builtin feature?

@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 5, 2024

Something that justifies why one might want to download this instead of just using the builtin feature?

Hmm, hard to explain that in one line. How about "Expose chat commands to other players, alternative to built-in chat commands."?

@Sainan
Copy link
Member

Sainan commented Jun 5, 2024

What do you mean with "automated lobby-finding while AFK"?

@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 5, 2024

What do you mean with "automated lobby-finding while AFK"?

there's an "AFK" mode that will check every few minutes to see if you are alone in a lobby, if so it will issue a gopub command to find a new lobby and give it a few mins for people to join before trying again. the intent is to not get stuck in a private lobby that no one else can join while AFK.

@Sainan
Copy link
Member

Sainan commented Jun 6, 2024

That's forumulated a bit awkardly and I feel like could be a slight vector of abuse combined with "announcements."

@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 6, 2024

That's forumulated a bit awkardly and I feel like could be a slight vector of abuse combined with "announcements."

The announcements can't be configured to trigger more often than once every 30 mins. Someone could edit the script directly, but if they can figure that out its pretty trivial to write their own announcement script. Are you saying I shouldn't mention it in the description, or that it needs to be removed from the script before being shared on repo?

@Sainan
Copy link
Member

Sainan commented Jun 6, 2024

My concern was only about the description. It looks fine now. I will look at the actual script tomorrow.

@Sainan
Copy link
Member

Sainan commented Jun 7, 2024

It seems all the lib/ChatCommands/player files are cooked:

Failed to fetch hexarobi/stand-lua-chatcommander@c59ed1bd655219649a295056449ba870e1be8ad5lib from GitHub.

@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 7, 2024

It seems all the lib/ChatCommands/player files are cooked

Hmm must have done something weird when bulk editing, but should be fixed now.

@Sainan
Copy link
Member

Sainan commented Jun 7, 2024

You cannot use https:// here as we don't use fully qualified URLs.

@Sainan
Copy link
Member

Sainan commented Jun 7, 2024

The announcements being on by default seems problematic to me.

@Sainan
Copy link
Member

Sainan commented Jun 7, 2024

Although there is also an "Auto-Announcements" option in the settings which is off by default? What's the point of an announcement being "enabled" exactly?

@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 7, 2024

Although there is also an "Auto-Announcements" option in the settings which is off by default? What's the point of an announcement being "enabled" exactly?

An announcement has to be enabled to ever be announced. Some announcements need additional context to be enabled, such as the casino announcement you must be in the casino for it to trigger.

Your currently enabled and valid announcements can be manually triggered with the "Announce All" option, or specifically on each announcement (like if someone asks how to gift, you might manually trigger that one)

You can optionally also enable auto-announcements, that will trigger the announcements every 30mins to every 120mins. Announcements can still be manually triggered any time, but will reset the auto-timer each time.

@Sainan
Copy link
Member

Sainan commented Jun 7, 2024

It really seems to me like your script has at least 2 settings in completely disjointed places for every single piece of functionality, which just seems really odd.

@hexarobi hexarobi changed the title ChatCommander 0.15.1 ChatCommander 0.16 Jun 9, 2024
@hexarobi
Copy link
Contributor Author

hexarobi commented Jun 9, 2024

It really seems to me like your script has at least 2 settings in completely disjointed places for every single piece of functionality, which just seems really odd.

I moved the announcements settings into the announcements section. Any other places you suggest?

@Sainan
Copy link
Member

Sainan commented Jun 10, 2024

The announcement settings definitely look better now. You have a similar thing with the commands having "Enabled", "Enabled For", and then "Authorized For" in a completely different spot.

@hexarobi hexarobi changed the title ChatCommander 0.16 ChatCommander 0.17 Jun 12, 2024
@hexarobi
Copy link
Contributor Author

The announcement settings definitely look better now. You have a similar thing with the commands having "Enabled", "Enabled For", and then "Authorized For" in a completely different spot.

rearranged things a bit to hopefully make it clearer. there is a general authorized for option, that controls global access to all chat commands, like if you want it for friends-only. the specific access controls access to specific commands, so you can make certain commands only for friends, or blessed users.

@Sainan
Copy link
Member

Sainan commented Jun 12, 2024

I also don't quite understand the "Help" action on commands. It has the same help text as the list and "Run" action, and does nothing when I click it.

@hexarobi
Copy link
Contributor Author

I also don't quite understand the "Help" action on commands. It has the same help text as the list and "Run" action, and does nothing when I click it.

clarified the help text on these options. The Run option is for executing the command without typing it, and ignoring all restrictions. The Help option is similar for executing the !help for the command without typing it. Useful for debugging things mostly.

@Sainan
Copy link
Member

Sainan commented Jun 13, 2024

If that is supposed to print to something in chat, it is broken without any indication in SP.

@hexarobi
Copy link
Contributor Author

If that is supposed to print to something in chat, it is broken without any indication in SP.

Added a util.toast() to go with it and make it clearer what is triggering. I assume in SP there is no chat box so you can't see any output. This is generally intended to be used in MP, not SP.

@Sainan
Copy link
Member

Sainan commented Jun 13, 2024

It seems "Passthrough Commands" are outright broken:

[13/06/2024 19:51:30] [string "ChatCommander.lua"]:961: bad argument #1 to 'get_children' (CommandRef expected, got nil)
stack traceback:
	[C]: in field 'get_children'
	[string "ChatCommander.lua"]:961: in field 'add_passthrough_command_menu'
	[string "ChatCommander.lua"]:927: in function <[string "ChatCommander.lua"]:925>
	[C]: in function 'xpcall'
	[string "Stand Lua Runtime"]:22: in function 'internal_xpcall_ioiqocsdvv'
	[string "Stand Lua Runtime"]:28: in function <[string "Stand Lua Runtime"]:27>
[13/06/2024 19:51:31] [string "ChatCommander.lua"]:935: Cannot create new commands in this context
stack traceback:
	[C]: in method 'list'
	[string "ChatCommander.lua"]:935: in field 'add_passthrough_command_menu'
	[string "ChatCommander.lua"]:927: in function <[string "ChatCommander.lua"]:925>
	[C]: in function 'xpcall'
	[string "Stand Lua Runtime"]:22: in function 'internal_xpcall_ioiqocsdvv'

(I added the last error because it was causing an exception when stopping the script.)

They don't seem to save, and the "Delete" button doesn't work.

@hexarobi hexarobi changed the title ChatCommander 0.17 ChatCommander 0.18 Jun 14, 2024
@hexarobi
Copy link
Contributor Author

It seems "Passthrough Commands" are outright broken:

Thx, I had made an update that broke some stuff, so made some more and I think this is working now.

@Sainan
Copy link
Member

Sainan commented Jun 15, 2024

It seems to still be kinda broken: This part is only generated after restarting the script, not when initially creating the command.

image

@hexarobi
Copy link
Contributor Author

It seems to still be kinda broken: This part is only generated after restarting the script, not when initially creating the command.

image

Ya, I was hoping nobody would notice ;) ended up redoing things a bit to make that work better, now the Chat Commands menu is based off your files and only updates when reloading script. The Passthrough Commands menu is dynamic and can be edited, and they dont mix.

@Sainan Sainan merged commit 63581e8 into calamity-inc:main Jun 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants