Follow-up Comment #6, patch #4104 (project freeciv):
> Of course, once the climate change script becomes ruleset-dependent then the
transformation arcs could just be rendered directly in the code: "if forest
then jungle" etc. Can we do better?
Another possibility is to generate a multidimensional table from the generator
data. If a neighbor exist it becomes its result in that direction. On the
other hand arbitrary key/value pairs are more reusable.
> we'd probably want to provide a ruleset-adaptive Lua version of the current
engine in default.lua taking its parameters from the ruleset.
Some (old but cleaned up) notes I have regarding that:
#define SPECENUM_NAME temperature_change
#define SPECENUM_VALUE0 TCH_MORE_EXTREME
#define SPECENUM_VALUE0NAME "More Extreme"
#define SPECENUM_VALUE1 TCH_LESS_EXTREME
#define SPECENUM_VALUE1NAME "Less Extreme"
#define SPECENUM_VALUE2 TCH_COLDER
#define SPECENUM_VALUE2NAME "Colder"
#define SPECENUM_VALUE3 TCH_WARMER
#define SPECENUM_VALUE3NAME "Warmer"
#define SPECENUM_VALUE4 TCH_RANDOM
#define SPECENUM_VALUE4NAME "Random"
#define SPECENUM_VALUE5 TCH_SAME
#define SPECENUM_VALUE5NAME "Same"
#include "specenum_gen.h"
#define SPECENUM_NAME humidity_change
#define SPECENUM_VALUE0 HCH_MORE_EXTREME
#define SPECENUM_VALUE0NAME "More Extreme"
#define SPECENUM_VALUE1 HCH_LESS_EXTREME
#define SPECENUM_VALUE1NAME "Less Extreme"
#define SPECENUM_VALUE2 HCH_WETTER
#define SPECENUM_VALUE2NAME "Wetter"
#define SPECENUM_VALUE3 HCH_DRYER
#define SPECENUM_VALUE3NAME "Dryer"
#define SPECENUM_VALUE4 HCH_RANDOM
#define SPECENUM_VALUE4NAME "Random"
#define SPECENUM_VALUE5 HCH_SAME
#define SPECENUM_VALUE5NAME "Same"
#include "specenum_gen.h"
#define SPECENUM_NAME global_disaster_flags
/* Don't create islands/inland lakes when not transformable */
#define SPECENUM_VALUE0 GDF_CONTINUEOUS_CLASS
#define SPECENUM_VALUE0NAME "Continueous Class"
#define SPECENUM_VALUE1 GDF_SPARE_CITIES
#define SPECENUM_VALUE1NAME "Spare Cities"
#define SPECENUM_BITVECTOR bv_global_disaster_flags
#include "specenum_gen.h"
struct global_disaster_type {
int id;
struct name_translation name;
bv_extras triggers; /* or requirement vector? */
enum temperature_change temperature;
enum humidity_change humidity;
bv_global_disaster_flags flags;
}
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?4104>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev