Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show requirements for Spaceship components in help #691

Open
andreasrosdal opened this issue Jun 5, 2023 · 11 comments
Open

Show requirements for Spaceship components in help #691

andreasrosdal opened this issue Jun 5, 2023 · 11 comments

Comments

@andreasrosdal
Copy link
Contributor

andreasrosdal commented Jun 5, 2023

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.

  1. /Set techlevel 100

  2. Build Apollo program in a city.

  3. 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.

@cazfi

@cazfi
Copy link
Member

cazfi commented Jun 5, 2023

Do you the other requirements than Apollo fulfilled?

@andreasrosdal
Copy link
Contributor Author

andreasrosdal commented Jun 5, 2023

What are the other requirements?

Yes, I set techlevel to 100.

@cazfi
Copy link
Member

cazfi commented Jun 5, 2023

Can't check just now. Help should tell, or if it doesn't (which I guess would count as a bug), check the ruleset.

@andreasrosdal
Copy link
Contributor Author

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.

@cazfi
Copy link
Member

cazfi commented Jun 6, 2023

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.

@cazfi
Copy link
Member

cazfi commented Jun 6, 2023

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.

@cazfi
Copy link
Member

cazfi commented Jun 6, 2023

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]

@andreasrosdal
Copy link
Contributor Author

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.

@andreasrosdal
Copy link
Contributor Author

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.

@andreasrosdal
Copy link
Contributor Author

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.

@cazfi
Copy link
Member

cazfi commented Jun 6, 2023

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.

@andreasrosdal andreasrosdal changed the title Unable to build Space Race improvements in current Freeciv-web Show requirements for Spaceship components in help Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants