Follow-up Comment #1, patch #3923 (project freeciv):
I finally remembered why this wouldn't work: there is no guarantee that a
given ruleset requires the player on whose behalf partisans are generated to
be able to build partisans (e.g. the Classic ruleset only requires that
Guerilla Warfare be known in range World, rather than by the player). Unless
I am misreading best_role_unit_for_player(), if a player wouldn't be able to
build a unit directly, that player would not be granted any partisans, or
there could be an issue with LUA script handling (and it would probably
trigger a null utype assert in unit_virtual_create() if neither of the above
caused issues). The above notwithstanding, if there is a test case
demonstrating this speculation as wrong, it should not block the patch.
I suspect that using "Partisan" and "PartisanTech" in a matter similar to
"Hut"/"HutTech" or "BarbarianBuild"/"BarbarianBuildTech", etc. would allow
safe partisan selection without these potential issues: players granted
partisans but unable to build partisans directly could be granted the
"Partisan" unit, and players capable of building any of the "PartisanTech"
units could be granted the most advanced partisan.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list