Show requirements for Spaceship components in help
andreasrosdal opened this issue ยท 11 comments
Unable to build Space improvements in current Freeciv-web, such as Space Component, Space Module and Space Structural.
How to reproduce:
/set victories spacerace
in the console to enable space victory.
-
/Set techlevel 100
-
Build Apollo program in a city.
-
Observe that it is not possible to build Space Component, Space Module and Space Structural in the city now.
This same bug is present in www.Fciv.net. In freecivweb.org this bug is not present.
This is when building Freeciv-web, the latest version from this Git repository.
Do you the other requirements than Apollo fulfilled?
What are the other requirements?
Yes, I set techlevel to 100.
Can't check just now. Help should tell, or if it doesn't (which I guess would count as a bug), check the ruleset.
I have all the requirements, I checked this now. Techlevel 100. So possibly the Freeciv server doesn't allow building spaceship modules now. Ruleset classic.
Tested the server with desktop client & editor mode, classic ruleset.
Help for Space Structural tells that it requires Factory in the city and player to know Space Flight technology.
In editor:
- Added Apollo Program and Factory to a city
- Gave "Space Flight" technology to the player
Proceeded one turn to make sure Apollo is active (likely not needed for having building requirements fulfilled, but did it just to be sure)
The city is able to build Space Structural.
So likely this is a web-client issue.
Did a test of freeciv-web too, by dropping attached patch to freeciv/patches/local/ and rebuilding. The patch removes all requirements from "Enable Space" effect, and "Space Structural" improvement on classic ruleset.
My first city was immediately able to start building Space Structural.
attached patch
Except that github did not like its format. Let's try to inline it, though that doesn't make it nearly as handy.
diff --git a/data/classic/buildings.ruleset b/data/classic/buildings.ruleset
index 73a75c6611..f25119f0f0 100644
--- a/data/classic/buildings.ruleset
+++ b/data/classic/buildings.ruleset
@@ -1032,8 +1032,8 @@ name = _("Space Structural")
genus = "Special"
reqs =
{ "type", "name", "range"
- "Tech", "Space Flight", "Player"
- "Building", "Factory", "City"
+; "Tech", "Space Flight", "Player"
+; "Building", "Factory", "City"
}
graphic = "b.space_structural"
graphic_alt = "-"
diff --git a/data/classic/effects.ruleset b/data/classic/effects.ruleset
index 6642091c25..0c539637eb 100644
--- a/data/classic/effects.ruleset
+++ b/data/classic/effects.ruleset
@@ -1782,7 +1782,7 @@ type = "Enable_Space"
value = 1
reqs =
{ "type", "name", "range", "survives"
- "Building", "Apollo Program", "World", TRUE
+; "Building", "Apollo Program", "World", TRUE
}
[effect_asmiths_trading_co]
The problem is that I didn't know that Space components requires a factory in the city, and the Freeciv-web documentation inside the game doesn't say that a Factory is required for building Space components.
https://github.com/freeciv/freeciv/blob/main/data/classic/buildings.ruleset#L957
Also, Freeciv-web is not able to list Factory as a requirement for Space components.
This issue can be solved by making Freeciv-web list Fabtory as a requirement for Space Component, Space Module and Space Structural in the help.
Well, not specifically "Factory" but whatever requirements the current ruleset has, i.e., it needs to be generated.
To solve problems in maintaining help-browser code in general, maybe we should make it to rely on freeciv-manual output only, and not to try to construct some pages by itself.