[0.16.51] MapPreset width/height is not applied before click

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[0.16.51] MapPreset width/height is not applied before click

Post by eradicator »

What?
When a custom map-gen-preset has settings for width/height, and the game is restarted, then clicking new game does not apply the settings until the map-gen-preset's name is clicked.

Code: Select all

  data.raw['map-gen-presets'].default['er:tiny-debug-map'] = {
    order = '00',
    basic_settings = {
      height = 100,
      width = 100,
      }
    }
Reproduction
Add above preset. Click "New game", click "Default", click "close", click "New game".
My preset will now be shown as selected, but height/width is not applied.
Click my preset.
Now heigh/width will be applied.

I suspect the preset is only shown as selected, but the actual selected preset is still "default". (And i can't make my preset default=true because then the engine complains that default may not have settings.)
mapgenpreset.png
mapgenpreset.png (325.34 KiB) Viewed 1911 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13793
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.51] MapPreset width/height is not applied before click

Post by Rseding91 »

Thanks for the report. It's meant to always have default selected so the bug here is the visual part of the list view not showing default as selected.

Default as you said can't have anything defined: it's default values.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.51] MapPreset width/height is not applied before click

Post by eradicator »

Rseding91 wrote:It's meant to always have default selected so the bug here is the visual part of the list view not showing default as selected.
As expected.
It works btw after using it to start a map once and then going back to main menu. I mainly want to use the preset to quickly get back into game when debugging control.lua. And limiting the map size significantly reduces the time it takes to generate a map.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.51] MapPreset width/height is not applied before click

Post by eradicator »

As of 0.17.46 it's still showing my preset as selected even though it isn't.

Code: Select all

  data.raw['map-gen-presets'].default['er:tiny-debug-map'] = {
    order = '00',
    basic_settings = {
      height = 100,
      width = 100,
      }
    }
Which with the new interface now requires four clicks (select different preset -> select my preset) to get to my preset.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Resolved Problems and Bugs”