Cubyz icon indicating copy to clipboard operation
Cubyz copied to clipboard

Mod simple structures

Open codemob-dev opened this issue 1 month ago • 9 comments

Fixes #1539

codemob-dev avatar Nov 04 '25 13:11 codemob-dev

This will conflict with #2131 (and maybe #2129 since it depends on #2131) so we'll have to deal with that as it comes

BoySanic avatar Nov 04 '25 16:11 BoySanic

This will conflict with #2131 (and maybe #2129 since it depends on #2131) so we'll have to deal with that as it comes

Maybe a little, but the PR is basically 2 lines besides removing the old IDs in the structures and moving the files.

codemob-dev avatar Nov 04 '25 16:11 codemob-dev

With so many contributors it's inevitable that in busy parts of the codebase there will be conflicts. The sooner we move the code to it's final destination the better. It's up to Quantum anyway.

Argmaster avatar Nov 04 '25 18:11 Argmaster

I would like to have an answer to https://github.com/PixelGuys/Cubyz/pull/1630#discussion_r2173316900 before I approve any further modding attempts

IntegratedQuantum avatar Nov 06 '25 18:11 IntegratedQuantum

I would like to have an answer to #1630 (comment) before I approve any further modding attempts

From https://github.com/PixelGuys/Cubyz/pull/1630#discussion_r2500248580 to keep the discussion out of closed PRS:

What if we keep the @ notation in the list struct for use from zon files but have a separate autogenerated struct that uses this syntax for use from the code itself?

codemob-dev avatar Nov 06 '25 18:11 codemob-dev

I'd rather not have so many auto-generated files, and having two version of one thing will inevitably get misused.

IntegratedQuantum avatar Nov 06 '25 20:11 IntegratedQuantum

I'd rather not have so many auto-generated files, and having two version of one thing will inevitably get misused.

How would we access this nested struct at runtime then?

codemob-dev avatar Nov 06 '25 20:11 codemob-dev

You can't access any struct at runtime, neither the one with @"" nor the one with namespaces. Runtime mappings are stored in a HashMap.

IntegratedQuantum avatar Nov 06 '25 20:11 IntegratedQuantum

Runtime mappings are stored in a HashMap.

Ah, right.

codemob-dev avatar Nov 06 '25 20:11 codemob-dev