-
Give some essential items and blocks when entering Level Editor
-
Have an in-game hint on how to use the Level Editor
-
(削除) Alias every block so that it can be given without knowing its mod of origin (e.g. "/giveme lzr_laser:detector" equivalent to "/giveme detector") (削除ここまで) -
Grant
fly,fast,noclipandgivewhen entering Level Editor -
Support custom level names for
/editor_saveand/editor_load
Improve Level Editor (#2) #9
rudzik8/Lazarr:improve_level_editor into master
c17a8647b3
to f2365e5434
Seems to look good but I don't really care about Lazarr! atm, at least as long there are no real quality levels. But still! These level editor improvements are definitely welcome and I need to test them out later.
For 3adc14086f:
I thought of adding a similar revoking callback when you exit Level Editor, but it doesn't make much sense given you only leave it to test your levels and then return to making changes... also this way you could get stuck when exiting Level Editor with noclip on
Add a new line to the hint that refers to LEVEL_EDITOR.md, only show the hint if player enters Level Editor for the first time and make editor_save and editor_load accept custom names (ALONGSIDE the older numbering format!)
/editor_save 9
/editor_save the_best_level_ever
/editor_save абвгд
A showcase video (also features ropes from #10)
YouTube link: https://youtu.be/YeBPi3bTUak
Also attached here if you prefer to not use YT
P.S. The background song is the legendary Mortimer's Chipdisko from SuperTux OST!
EDIT by Wuzzy: Removed attached video (large file)
Thanks, but the video wasn't really neccessary, you already explained it well. Just give me time to review it.
OK, here's my review:
First, I appreciate the usability improvements and new features. This is definitely very welcome.
Note that the way I selected items was using an external mod. I originally used the Chest of Everything from DevTest. Now I would use the Bag of Everything from the getitem mod, it's very convenient. Probably I might want to add a variant of this mod into Lazarr! (you can ignore this).
Now, there are a few things of the code quality that need improvement IMHO:
I disapprove of the aliases completely, I don't want them. Sorry. They are poorly implemented as this code tries to alias everything, even non-Lazarr! nodes and builtin nodes like air and ignore. Also, what if there are two items with the same name after the modname? Sounds like a great way to introduce sneaky bugs.
The aliases create warnings:
2024年03月09日 12:33:30: WARNING[Server]: Not registering alias, item with same name is already defined: ->
2024年03月09日 12:33:30: WARNING[Server]: Not registering alias, item with same name is already defined: ignore -> ignore
2024年03月09日 12:33:30: WARNING[Server]: Not registering alias, item with same name is already defined: unknown -> unknown
2024年03月09日 12:33:30: WARNING[Server]: Not registering alias, item with same name is already defined: air -> air
When entering the editor grants privs, leaving the editor should revoke these privs. I agree that auto-granting of privs is a nice convenience.
In my opinion, chat commands must always be fully documented, including their parameters. Your PR lacks this info. Please add params = to the chat command definitions.
I think for later, I want to abolish the number-based level name system for custom levels. It was a dummy behavior anyway (you can ignore this complaint).
SUMMARY:
If you want this to get merged:
- Remove aliases
- Revoke privs when leaving editor
- Document chat command params
I disapprove of the aliases completely, I don't want them. Sorry. They are poorly implemented as this code tries to alias everything, even non-Lazarr! nodes and builtin nodes like
airandignore. Also, what if there are two items with the same name after the modname? Sounds like a great way to introduce sneaky bugs.The aliases create warnings:
...
Yeah, lzr_alias was quite the failure. But I do think having aliases is very convenient, as even if you use a creative menu mod you will still benefit from having to type less when using WorldEdit. Perhaps I will later rework that mod to exclude builtin nodes and resolve (or at least log) name disputes, but that'll be its own PR
Looks good now, I've merged this with a few changes.
Thank you.
Pull request closed
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?