Uberi / Minetest-WorldEdit

The ultimate in-game world editing tool for Minetest! Tons of functionality to help with building, fixing, and more.
https://forum.minetest.net/viewtopic.php?f=11&t=572
GNU Affero General Public License v3.0
162 stars 81 forks source link

Use chatcommand return values #193

Closed HybridDog closed 6 months ago

HybridDog commented 4 years ago

This fixes #60; please test.

sfan5 commented 4 years ago

Not sure if this is worth doing actually, what advantage is there?

Coloring the messages is a good idea however (though I think just the prefix should be colorful).

HybridDog commented 4 years ago

Not sure if this is worth doing actually, what advantage is there?

The first commit changes how the GUI invokes chatcommands. Before this PR, the code directly uses minetest.chatcommands at many places. minetest.chatcommands is not officially documented, so the commit makes the code more robust.

The second commit changes code so that chatcommand return values are used. The advantage is that the function now returns a success boolean, so it could be, for example, easier to handle errors in the WorldEdit GUI or brush code.

HybridDog commented 3 years ago

rebased