Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.78k stars 495 forks source link

Make chunk visuals load through the VisualResourceIdentifier instead of exact paths #5402

Open hhyyrylainen opened 2 weeks ago

hhyyrylainen commented 2 weeks ago

as this will make renaming files possible without breaking save compatibility

https://github.com/Revolutionary-Games/Thrive/blob/4174a44e6ca7e02e71bf47b59db5771af3d3f808/src/microbe_stage/Spawners.cs#L225

Update: I realized that the CollisionShapeLoader component has a hardcoded path to a physics data object. Meaning that just these changes aren't sufficient to protect the chunks from save breakage when moving resource files around. So in addition the physics loading system should get a similar fix.

CI09 commented 2 weeks ago

I'd need help here:

image

Meshes is: public List<VisualResourceData> Meshes; Edit: this is no longer an issue.

hhyyrylainen commented 2 weeks ago

Why I set this as intermediate difficulty now:

I add the tags based on my initial impression which was that just a few places would need the data changed, but it's now turns out to be about 5-6 things. I marked it as intermediate as it doesn't require any novel new code, just reusing existing patterns in the codebase.

I don't think this qualifies as difficult as there's nothing really hard to do here, just quite a bit of fixing one thing and then everything depending on it.