OpenClonk Bugtracker - OpenClonk
View Issue Details
0001533OpenClonkEnginepublic2016-01-03 20:422017-08-20 11:29
Assigned ToSven2 
PrioritynormalSeverityfeatureReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target Version9.0Fixed in Version 
Summary0001533: Feature Request: Map script functions to work at runtime.
DescriptionI want to redraw the landscape at runtime, and it is quite confusing that [url=]DrawMap[/url] works with the [url=]Landscape.txt[/url] format only, and not with proplists as used in [url=]Map.c[/url], since the latter seem more convenient than writing a map string into a function.
TagsNo tags attached.
Attached Files

2016-01-27 14:32   
Since Landscape.txt should be slowly abandoned I propose to make DrawMap and DrawDefMap only work with map scripts.

I think we don't have any uses of it yet in the game.
2016-01-27 18:01   
Yes, DrawMap and DrawDefMap are deprecated. We also don't need two functions for that.

My idea for an implementation would be that you call DrawMap with some range and configuration parameters and it gives you a callback during which the layer proplists are valid.

Note that layer proplists are not saved, so they cannot persist beyond the InitializeMap function calls. I.e. you cannot "keep" a layer in a global variable in InitializeLandscape and then later re-use it in a call to DrawMap. That would not work with savegames or runtime join.

Issue History
2016-01-03 20:42MarkyNew Issue
2016-01-27 14:32MaikelNote Added: 0004893
2016-01-27 14:32MaikelTarget Version => 8.0
2016-01-27 14:32MaikelAssigned To => Sven2
2016-01-27 14:32MaikelStatusnew => assigned
2016-01-27 18:01Sven2Note Added: 0004899
2017-08-20 11:29ZapperTarget Version8.0 => 9.0