Wuzzy/Lazarr
2
12
Fork
You've already forked Lazarr
5

Improve Level Editor (#2) #9

Closed
rudzik8 wants to merge 0 commits from rudzik8/Lazarr:improve_level_editor into master
pull from: rudzik8/Lazarr:improve_level_editor
merge into: Wuzzy:master
Wuzzy:master
Wuzzy:pages
Wuzzy:pack_editor
Wuzzy:singleton_load_async
Wuzzy:hotfix_emerge_cancelled_spam
Wuzzy:dichroic_mirror
Wuzzy:pane_box
Wuzzy:banana
Wuzzy:mirror_block
Wuzzy:2side_pane
Wuzzy:subtitles
Wuzzy:credits_person_list
Wuzzy:hidden_parrot_feather
Wuzzy:red_arrow
Wuzzy:doorbreak
Wuzzy:hook_overlay
Wuzzy:shallow_ocean
Wuzzy:hparrot_levels
Wuzzy:perma_pirate_sense
Wuzzy:green_level_packs
Wuzzy:lever
Wuzzy:new_crystals
Wuzzy:sender_type
Wuzzy:copy_area
Wuzzy:credits2
Wuzzy:level_packs
Wuzzy:secret_parrots
Wuzzy:open_chest_anim
Wuzzy:burn_performance
Wuzzy:solutions
Wuzzy:trigger
Wuzzy:bomb
Wuzzy:laser_debug
Wuzzy:islands_mapgen
Wuzzy:rotatable_nodes
Wuzzy:laser_patterns_2
Wuzzy:laser_patterns_config
Wuzzy:laser_patterns
Wuzzy:laser_colors
Wuzzy:pickaxe_bug_test
Wuzzy:credits
Wuzzy:parrot_npc
Wuzzy:select_item_editor
Wuzzy:new_crystal_mesh
Wuzzy:speaker_anim
Wuzzy:master_postjam
Wuzzy:vmanip
Contributor
Copy link
  • 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, noclip and give when entering Level Editor

  • Support custom level names for /editor_save and /editor_load

- [x] Give some essential items and blocks when entering Level Editor - [x] Have an in-game hint on how to use the Level Editor - [x] ~~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`")~~ - [x] Grant `fly`, `fast`, `noclip` and `give` when entering Level Editor - [x] Support custom level names for `/editor_save` and `/editor_load`
rudzik8 force-pushed improve_level_editor from c17a8647b3 to f2365e5434 2024年03月08日 07:53:56 +01:00 Compare
rudzik8 changed title from (削除) WIP: Make Level Editor slightly more bearable (#2) (削除ここまで) to Improve Level Editor (#2) 2024年03月08日 08:04:04 +01:00
Owner
Copy link

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.

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.
Author
Contributor
Copy link

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

For [`3adc14086f`](https://codeberg.org/Wuzzy/Lazarr/commit/3adc14086fdaf8c8f247a1a94a63e814b77cb7ef): 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!)
Author
Contributor
Copy link
/editor_save 9
/editor_save the_best_level_ever
/editor_save абвгд

Screenshot

``` /editor_save 9 /editor_save the_best_level_ever /editor_save абвгд ``` ![Screenshot](/attachments/786dd1a3-3953-4a39-8570-8bcda1a30736)
Author
Contributor
Copy link

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)

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)
Owner
Copy link

Thanks, but the video wasn't really neccessary, you already explained it well. Just give me time to review it.

Thanks, but the video wasn't really neccessary, you already explained it well. Just give me time to review it.
Owner
Copy link

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
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
Author
Contributor
Copy link

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:

...

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

> 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: > > ... 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
Owner
Copy link

Looks good now, I've merged this with a few changes.

Thank you.

Looks good now, I've merged this with a few changes. Thank you.
Wuzzy closed this pull request 2024年03月09日 14:10:55 +01:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
audio
Sound effects, music, ambience, etc.
decoration and theming
Decorative elements related to the overall theme of the game "pirates with lasers"
editor
Anything related to the level editor
entities
Anything related to entities
graphics
About how the game looks, rendering, textures, meshes, etc.
help wanted
Help from other people is highly appreciated!
high priority
This is important!
Kind
balancing
Affects the game balance
Kind
bug
Something is not working
Kind
enhancement
New feature
Kind
maintenance
Code quality, coding style, dealing with legacy, etc.
Kind
performance
How fast/slow the game runs
laser blocks
Everything related to nodes that interact with lasers but aren't laser nodes themselves
lasers
Everything directly related to the lasers
levels
Everything related to levels
main menu
Anything related to the "main menu ship"
mapgen
Anything related to the map generator
needs research
When something needs more data or information in order to make a decision
non-laser nodes
Issues about nodes that aren't lasers or laser nodes
signals
About the wireless signals sent and received by laser blocks (detectors, emitters, etc.)
Status
changes needed
This proposal or PR needs changes before it will be accepted
Status
duplicate
This issue or pull request already exists
Status
invalid
Something is wrong with the issue
Status
rejected
A proposal or PR was rejected
translations
About the game’s translation support and the translations themselves
upstream
Related to an upstream problem with Luanti
UX
User experience, usability, and the like
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Wuzzy/Lazarr!9
Reference in a new issue
Wuzzy/Lazarr
No description provided.
Delete branch "rudzik8/Lazarr:improve_level_editor"

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?