TeamREPENTOGON / REPENTOGON

Script extender for The Binding of Isaac: Repentance
https://repentogon.com/
GNU General Public License v2.0
215 stars 23 forks source link

[Rep+] Reload Custom Shaders #624

Closed Lunastela closed 2 months ago

Lunastela commented 2 months ago

As the title implies, adds the ability to reload custom shaders via the use of the reloadshaders command.

https://github.com/user-attachments/assets/e17af34c-f66b-4aa7-a05d-ce00a7d72fe4

(Please ignore the mod.)

Lunastela commented 2 months ago

This seems to be working still, now with the suggested changes. Sorry, I am very inexperienced by the looks of it. Please let me know if there's anything else I should change!

Lunastela commented 2 months ago

Unrelated to the PR (mostly), but I think it's okay to keep Path on CustomShaders. It would be neat to add something like GetCustomShader() which returns the path of a custom shader. It would be niche, but someone would get use out of it.

ConnorForan commented 2 months ago

Mainly just redundant considering the map key is the exact same string as the path, heh. Not major either way but I might fiddle with it later.

In any case thanks for adding this feature! Hadn't even considered reloading these with the reloadshaders command honestly. Will merge this in later and give it a quick test myself later on if nothing else comes up.

EDIT: For posterity, after I sat down to take a closer look and refresh myself on the code, the path field is used a bit, primarily when the CustomShader struct is referred to by pointer in Anm2Extras