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 Mod Menu #3060

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open

Add Mod Menu #3060

wants to merge 22 commits into from

Conversation

lemz1
Copy link
Contributor

@lemz1 lemz1 commented Jul 25, 2024

NOTE

Credit to @JVNpixels for the idea.

Mod icons should be the size of 32x32.

ADDITIONS

This pr adds a simple mod menu using HaxeUI, which allows you to disable/enable and order mods.
After quitting the mod menu, the assets are reloaded.

TODO

  • Add simple mod menu
  • Make mod description popup visible (tooltip)
  • Load mods (just steal the code from the old mod menu)
  • Save enabled mods and keep the order
  • Enabled mod id order needs to be reversed
  • Add mod icon to ModBox

KNOWN ISSUES

The game crashes when clicking on File > Quit
The crash log is this:

Called from haxe.ui.containers.menus.MenuEvents.findRootMenu (haxe/ui/containers/menus/Menu.hx line 374)
Called from haxe.ui.containers.menus.MenuEvents.onItemClick (haxe/ui/containers/menus/Menu.hx line 176)
Called from haxe.ui.util.Timer.delay (haxe/ui/util/Timer.hx line 10)
Called from haxe.ui.backend.TimerImpl.update (haxe/ui/backend/TimerImpl.hx line 17)
Called from openfl.events.EventDispatcher.__dispatchEvent (openfl/events/EventDispatcher.hx line 402)
Called from openfl.display.DisplayObject.__dispatch (openfl/display/DisplayObject.hx line 1399)
Null Object Reference

Using the shortcut for quitting (CTRL + Q) works though.

PREVIEW

preview.mp4

@lemz1 lemz1 marked this pull request as draft July 25, 2024 02:50
@lemz1 lemz1 marked this pull request as ready for review July 25, 2024 05:31
@JVNpixels
Copy link

Yea I stopped working on it, but thanks for continuing! Could you give slight credit for the idea?

@EliteMasterEric EliteMasterEric added type: enhancement Provides an enhancement or new feature. status: pending triage The bug or PR has not been reviewed yet. mods Issue is related to the use of mods. labels Jul 25, 2024
@AbnormalPoof
Copy link

Would it be feasible to put mod icons into use in some way for this menu?

@JVNpixels
Copy link

Would it be feasible to put mod icons into use in some way for this menu?

Good idea! I was gonna recommend that thought but I got busy.

@lemz1
Copy link
Contributor Author

lemz1 commented Jul 26, 2024

Would it be feasible to put mod icons into use in some way for this menu?

I believe HaxeUI got an Image component, so I guess I'll look into it.

@Cartridge-Man
Copy link

Huh, I actually was about to comment smth like “prob will be added to full game but good try” but oh my god this actually works. Like this looks awesome, keep up the great work

@Cartridge-Man
Copy link

Yea I stopped working on it, but thanks for continuing! Could you give slight credit for the idea?

I’m pretty sure the idea to add a mod menu to this game has existed even before Week 7 lol.

@lightcatdev
Copy link

amazing!

@AbnormalPoof
Copy link

I've been thinking, would it be possible to also re-order the mods? Perhaps by having arrows on the side of each mod to move them up and down in the mod list.

@NotHyper-474
Copy link
Contributor

I've been thinking, would it be possible to also re-order the mods? Perhaps by having arrows on the side of each mod to move them up and down in the mod list.

In fact it's what is intended: #3029 (comment)

and players should be able to re-order mods from the UI (similar to how Minecraft displays resource packs).

@lemz1
Copy link
Contributor Author

lemz1 commented Aug 8, 2024

you can technically reorder the mods by disabling and enabling them, but its kinda annoying to do it like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mods Issue is related to the use of mods. status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants