Page MenuHomeWildfire Games

Adopt the generator based interface by all maps
Needs ReviewPublic

Authored by phosit on Wed, Apr 17, 5:44 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Most changes are trivial:

  • Adding the function signature and scope
    • Indent and linewrap
  • changing g_Map.ExportMap() to return g_Map
  • changing Engine.SetProgress(NN) to yield NN
  • changing var g_Map = ... to global.g_Map = ...

On some maps I used the argument mapSettings.

Some scripts are split up in multiple functions. Since many variables aren't global anymore I had to pass them to thous helper-functions.
In "unknown.js" there was a function called like this global[...](). Since the functions aren't global anymore i put them in an object. Now it's they are called like this unknownFunctions[...]().

I also converted the tests. I'm not sure that's usefull since the tests don't test the generator-interface but the rmlib which could be tested on global scope.

Refs: #4964

Test Plan

Generate maps. With different settings.

Event Timeline

phosit created this revision.Wed, Apr 17, 5:44 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/7693/display/redirect

phosit edited the summary of this revision. (Show Details)Wed, Apr 17, 5:45 PM
phosit removed rP 0 A.D. Public Repository as the repository for this revision.
phosit published this revision for review.Wed, Apr 17, 5:48 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/9356/display/redirect