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

Add help formspec for CSM commands #13937

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

zmv7
Copy link
Contributor

@zmv7 zmv7 commented Oct 27, 2023

This PR adds graphical interface for .help command, the similar as used on the server (/help).

How to test

  • Set enable_client_modding to true in minetest.conf
  • Install some client mods (optional)
  • Join singleplayer or any server that allows to load client mods
  • Type .help in the chat and test the functionality of formspec.
  • .help -t and .help all -t should return output to the chat without using formspec

@Zughy Zughy added Roadmap The change matches an item on the current roadmap Feature ✨ PRs that add or enhance a feature labels Jan 22, 2024
Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it duplicates existing help formspec code. Can't that be moved to builtin/common/information_formspecs.lua?

@zmv7 zmv7 requested a review from appgurueu January 23, 2024 05:51
@zmv7
Copy link
Contributor Author

zmv7 commented Jan 23, 2024

Here we go, now there is universal function for both server and client help formspecs in information_formspecs.lua

@@ -86,6 +91,9 @@ end
-- PRIVILEGES FORMSPEC

local function build_privs_formspec(name)
if INIT == "client" then
Copy link
Contributor

@appgurueu appgurueu Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary? If you don't want this to be called by clients, why not do assert(INIT ~= "client")?

Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, works.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works.

@SmallJoker SmallJoker merged commit 893594d into luanti-org:master Feb 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client Script API Feature ✨ PRs that add or enhance a feature Roadmap The change matches an item on the current roadmap >= Two approvals ✅ ✅ UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants