MikaylaFischler / cc-mek-scada

Configurable ComputerCraft SCADA system for multi-reactor control of Mekanism fission reactors with a GUI, automatic safety features, waste processing control, and more! Please be sure to take a look at the Wiki tab, this project has lots of docs!
https://youtube.com/playlist?list=PLPTRLQjcSlD2s6HsPe3COlfaULQZogWKK
MIT License
281 stars 10 forks source link

Resource Pack setup #385

Open DarkTechnician opened 6 months ago

DarkTechnician commented 6 months ago

Is your feature request related to a problem? Please describe. Only problem it would be related to, would have to do with needing to download resources for each install.

Describe the solution you'd like Obviously can't make a shared cache for all computers, but I know you can make a Lua Resource Pack. Maybe set up so that the install script checks the rom of the computer for the files it needs, and if it finds them, it copies from there. Maybe have it run a check and/or update afterwards, to make sure everything is up to date?

Additional Context I'm going to assemble my own resource pack based on what is here in the directories. Probably modify the install script to do as I suggested above. I just know that some servers don't allow you to have lua scripts connect to the internet, and know that this project would still be good on one such server. I also just went through an 8-hour internet outage, and am also on a limited-transfer connection.

MikaylaFischler commented 6 months ago

Oh, I did not know about this! That sounds promising, and I found this example https://github.com/cc-tweaked/datapack-example

I should be able to set up GitHub actions to generate these with new releases.

This would address #375 to some degree, but would require server filesystem access. However, it would only need to be done once per update and be centralized, rather than have to be done for every single computer if I'm understanding correctly.

My concerns were around multiplayer, as with single player the user could just enable HTTP or even load files with copy & paste, though they would need to know which directories to include.

This sounds like it would help in circumstances where the server filesystem can have it pre-loaded and function without HTTP, assuming the server operator(s) are willing to add it. Is this a correct understanding of how this all works? I haven't played around with this, but it seems like for multiplayer it would need to be on the server.

DarkTechnician commented 6 months ago

I actually haven't quite tested if it requires to be on server-side, yet. Might explain why when I tried to make mine, it didn't seem to work. (Might need to be in the server-resourcepacks folder) I bet you could make use of some of the other parts of the datapack better than I can make it, as well. (Like modules, APIs..) Looks like you can also make a script to have it check for updates on startup. [](https://www.computercraft.info/wiki/Lua_Resource_PackMaking(Tutorial)) mentions more of what could be implemented, near the bottom.

DarkTechnician commented 6 months ago

Also looks like there's more to the installation than resource pack making, according to Minecraft Wiki Data Pack. I did manage to get my pack working, after following the instructions on that page.