Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This has multiple advantages: 1) It makes the code easier to understand because we now can use local variables and return values. 2) It makes the code easier to debug because we don't have to reload the wml cache anymore for changes to have an effect 3) It makes loading the multiplayer wml faster, specially dark forecasts wml codes is now so short that we don't need to guard it inside its own preprocessor marco anymore. 4) It decreases the save file size. This commit also does other improvements to the code, for example: 1) We don't create temporary units anymore just to query the costs of a unittype. 2) We now load the weather maps dynamically at runtime with wesnoth.read_file, this decreased the prorocessor paring time and savefile size further. 3) When creating the new spawns we use temporary objects to decrease the units movement, instead of changing and resetting the unit stats manually. This also has a disadvantage: 1) It now requires all players to have this scenario installed, since it it a mainline scenario i see no problems with that.
- Loading branch information