dialogic-godot / dialogic

💬 Create Dialogs, Visual Novels, RPGs, and manage Characters with Godot to create your Game!
https://dialogic.pro
MIT License
3.42k stars 206 forks source link

Update DialogicAnimaResources.gd #1974

Closed TheMeddlingMechanic closed 4 months ago

TheMeddlingMechanic commented 5 months ago

Hi, This is theMeddlingMechanic from the dialogic discord (sorry for taking a while). I've added a single line of of code (line 39) on the DialogicAnimaResources.gd script. This is to account for developers who use PckEncryption in their game builds.

Jowan-Spooner commented 4 months ago

@zaknafean This seems like a pretty simple PR, anything you need to test before we can merge this?

zaknafean commented 4 months ago

Unfortunately it may break non encrypted builds as written. I gotta add a branch of some kind that can determine if you're encrypted or not.

TheMeddlingMechanic commented 4 months ago

Hi guys, I believe this shouldn't cause issues like that as it adds a new line (rather than changing the existing one) , replacing both .gdc and .gde with .gd in the saved list. Feel free to test it, but if I remember correctly, that should work.

Jowan-Spooner commented 4 months ago

Hmmm... I'm unable to test this as I don't have a dialogic 1 environment anymore. Wouldn't it need to be something like

filtered.push_back(file.replace('.gde', '.gd').replace('.gdc', '.gd'))

So any file is only added once and depending on what "wrong" extension it has they get corrected?

TheMeddlingMechanic commented 4 months ago

Hmm, this could be the case, I'm not home at the moment, but when I am I'll record myself testing this for both encrypted and not (I can print out the list and check the logs). I'll get back to you with the recording once I've got an answer.

TheMeddlingMechanic commented 4 months ago

EDIT: just checked the docs for the push back function, and I believe you're almost definitely right

Actually, I doubt this will be an issue, as every script in the pck should be the same type (gdc vs gde), so only one of these lines of code should make a difference, but I'll still test it once I have the chance, just in case.

TheMeddlingMechanic commented 4 months ago

I didn't record this in the end, just added another commit because of the obvious meaning of the docs for that method.

zaknafean commented 4 months ago

Confirmed it still works on non-encrypted exports just fine. Thanks for the PR @TheMeddlingMechanic , merging it in now.