Project

General

Profile

Bug #758989

Tilesets: too easy for extrastyle and defined extra graphics not to match

Added by Jacob Nevins almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Bug #758964 highlighted this. It's too easy to add extra graphics but forget to add an extra style in the .tilespec, and you often mostly get away with it because of fallbacks in common rulesets. It would be nice if the game could warn you about this mistake.

I don't think it's possible to do it purely at tileset load time; at this stage, a tileset is a collection of random graphics waiting for a ruleset to come along and make sense of some of them.

A simple approach to this is to use the tag for which we found an extra style defined for loading all graphics for that extra. As well as not allowing the style and graphics to differ, this disallows fallbacks within extras; currently, for instance, each individual road direction can independently be a primary or fallback sprite.

I suspect such flexible fallbacks were possible just because coding up proper whole-extra rollback and fallback when we found one of a set missing would have been too painful, rather than because anyone thought they would be useful. I can't think of plausible ways to use this flexibility that can't be done another way.

It is probably too late to make such a tileset semantic change for 2.6, though.


Related issues

Blocked by Freeciv - Bug #758964: Missing extrastyles in supplied tilesetsClosed

History

#1 Updated by Jacob Nevins almost 2 years ago

  • Related to Bug #758964: Missing extrastyles in supplied tilesets added

#2 Updated by Jacob Nevins almost 2 years ago

A simple approach to this is to use the tag for which we found an extra style defined for loading all graphics for that extra.

Attached patch does this.

I plan to commit to S3_0 and master soon if no objections. (Not S2_6, although it does apply to that branch.)

#3 Updated by Jacob Nevins almost 2 years ago

  • Related to deleted (Bug #758964: Missing extrastyles in supplied tilesets)

#4 Updated by Jacob Nevins almost 2 years ago

  • Blocked by Bug #758964: Missing extrastyles in supplied tilesets added

#5 Updated by Jacob Nevins almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF