space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.62k stars 3.27k forks source link

Transform datafields should be inline on map files #18323

Open metalgearsloth opened 1 year ago

metalgearsloth commented 1 year ago

It lets you save an extra line per transformcomponent for stonks.

So

- proto: Window
  entities:
  - uid: 37
    components:
    - pos: 0.5,-2.5
      parent: 181
      type: Transform
  - uid: 46
    components:
    - pos: -5.5,-1.5
      parent: 181
      type: Transform

becomes

- proto: Window
  entities:
  - uid: 37
    pos: 0.5,-2.5
    parent: 181
  - uid: 46
    pos: -5.5,-1.5
    parent: 181

(where no comps found which is 90% of entities you also save the extra line).

PJB3005 commented 1 year ago

Are these changes really worth the effort? This is just saving file size, right?

If the maps are compressed (git), a change like this would barely matter.

metalgearsloth commented 1 year ago

Makes diffs smaller, idc as much about file size.

metalgearsloth commented 1 year ago

But I guess now that decals are deterministic it's less of an issue.