Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #856947

"You may want to start a revolution" message for buildings

Added by Jacob Nevins over 2 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Low
Category:
Server
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Currently, when acquiring a new tech, found_new_tech() checks whether it enabled any new governments for any player and prints "Discovery of %s makes the government form %s available. You may want to start a revolution." This suits our supplied rulesets.

In the augmented2 modpack, some governments additionally require buildings (e.g. Palace). It might be nice if a similar check was done whenever a building was completed ("Completion of Palace makes the government form Despotism available ...")

This would apply to great and small wonders (as those are the only buildings testable at player range, required for governments). Like techs, great wonders can enable govs for players other than the owner. In existing rulesets it would also apply to Statue of Liberty. Since that allows Any_Government, the current found_new_tech() behaviour -- one message per government -- would be a bit overwhelming; if more than one government is newly enabled (by building or tech) I think it would be better to print "Completion of Palace makes several new government forms available ..."

Some implementation notes:
  • Factor out the government switch checking code from found_new_tech() (creation and check of could_switch[] array into reusable functions
  • Every caller to city_add_improvement() needs checking. Can't put the check within that function, too low-level. Might need different messages for different situations (completion of production, acquisition of building by city trading or conquest, ...)

History

#1 Updated by Marko Lindqvist 3 months ago

  • Category set to Server
  • Sprint/Milestone set to 3.2.0

Jacob Nevins wrote:

  • Factor out the government switch checking code from found_new_tech() (creation and check of could_switch[] array into reusable functions

-> https://osdn.net/projects/freeciv/ticket/44510

#2 Updated by Marko Lindqvist 3 months ago

Jacob Nevins wrote:

the current found_new_tech() behaviour -- one message per government -- would be a bit overwhelming; if more than one government is newly enabled (by building or tech) I think it would be better to print "Completion of Palace makes several new government forms available ..."

-> https://osdn.net/projects/freeciv/ticket/44677

#4 Updated by Marko Lindqvist 2 months ago

This has textual conflict with https://osdn.net/projects/freeciv/ticket/44696

One of the patches, likely this one, needs to be rebased on top of the other.

#5 Updated by Marko Lindqvist 2 months ago

Marko Lindqvist wrote:

This has textual conflict with https://osdn.net/projects/freeciv/ticket/44696

One of the patches, likely this one, needs to be rebased on top of the other.

Rebased

#6 Updated by Marko Lindqvist 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF