mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Resolve object types and properties should be split into two? #3787

jestarray posted onGitHub

{
"gid":3993,
"height":32,
"id":310,
"name":"shutter2",
"rotation":0,
"type":"foo", // i just need the type written out and not all the props
"visible":true,
"width":32,
"x":1536,
"y":1248
},

These should be really split into two parts:

  1. Resolve object types
  2. Resolve object properties

because I only need object types resolved and not the properties themselves as I prefer to save safe and do a lookup.


On that note, perhaps it should also work on save rather than file -> export? I was re-saving the file a lot of times looking for changes

posted by jestarray over 1 year ago

On that note, perhaps it should also work on save rather than file -> export? I was re-saving the file a lot of times looking for changes

Resolved properties erase the distinction between values that are inherited and not overridden, and values that are explicitly set but happen to match the current default. Writing out those values to the working map (i.e. on Save) would remove a lot of the benefit of the inheritance system. It would require the user to manually update all their maps any time they change the original value, as Tiled would not be able to correctly propagate the change.

Even an entirely separate option for enabling this on Save would likely lead to a lot of accidentally wrecked map files. (Well, not wrecked, but annoying-to-update xP)

Edit: Explicitly setting types and/or property values from tiles can be accomplished easily via scripting, so you can have that capability if you need it. For values inherited from custom types it's more challenging since the scripting API does not expose custom types yet, but it can be accomplished by parsing the project file. Scripts can listen for assetAboutToBeSaved signals and do this automatically on save.

posted by eishiya over 1 year ago

@eishiya Oh right! I have not thought about it erasing work. Never mind that suggestion then

posted by jestarray over 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests