Skip to content

Bug(?): Re-definition of alternative sprites is not treated as an error but has no productive use #372

Description

@zephyris

NML warns when alternative_sprites with the same zoom level and bit depth are defined twice, and overwrites the earlier definition with the later definition. However, there is never(?) a productive use of this behaviour, as alternative sprites are effectively part of the real sprite, so can't be redefined without redefining the entire real sprite.

replace grid_temperate_spr3981(3981, "temperate_groundtiles_gridline_8bpp.png") { template_groundtiles(0, 0, 1) }
alternative_sprites (grid_temperate_spr3981, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "temperate_groundtiles_gridline_bt32bpp.png") { template_groundtiles(0, 0, 1) }
alternative_sprites (grid_temperate_spr3981, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "arctic_groundtiles_gridline_bt32bpp.png") { template_groundtiles(0, 0, 1) }

Gives a warning like:

nmlc warning: "test.nml", line 47: Sprites are already defined for replace-block 'grid_temperate_spr3981' for this zoom level / bit depth combination. This data will be overridden.

This is reported as a warning at the same level as the 8bpp sprites containing white or animated pixels. However, as there are no(?) valid uses for redefining an alternative sprite set then it should probably be an error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions