Cubyz icon indicating copy to clipboard operation
Cubyz copied to clipboard

[WE] Make blueprint assets also accessible for `/blueprint load` command

Open Argmaster opened this issue 9 months ago • 4 comments

Right now accessing those assets would require trickery with relative paths and since we would like to disallow .. completely, we should have a different system.

Argmaster avatar Apr 24 '25 14:04 Argmaster

By blueprint assets you mean structures?

IntegratedQuantum avatar Apr 24 '25 14:04 IntegratedQuantum

I mean the things we started loading with #1207

Argmaster avatar Apr 24 '25 15:04 Argmaster

Maybe a new set of similar commands would make sense? /sbb <load|store|list> It should of course have more restrictions on who can run those, in case of multiplayer.

IntegratedQuantum avatar Apr 24 '25 15:04 IntegratedQuantum

Sbbs are different thing, they are from #1240, blueprints are blueprints.

I was thinking about adding flags --server, --local, --assets and --world for selecting scope for each of blueprint commands.

  • --server/-s would result in currently implemented behavior and would remain the default (server side <cwd>/blueprints/)
  • --local/-l would instead always use local <cwd>/blueprints/ folder, regardless if you are on a remote server or on localhost
  • --assets/-a would allow accessing things in server side assets/<addon>/blueprints/ folder
  • --world/-w would allow accessing things in server side <world>/assets/<addon>/blueprints/ folder

On localhost --server and --local are same thing. I think that they also should use Ids instead of paths, this would solve #1263 as they would have to comply to Id constraints. Ideally we would make player names take addon spot in id strings for --server, but since they contain color coding and probably need to be encoded, that would be hard to work with.

I would also like to add /blueprint move for moving assets between those locations.

Argmaster avatar Apr 24 '25 15:04 Argmaster