From 55bb2e0c0d1f6105d4449cabe6e1dbdd42ea435e Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Wed, 22 May 2024 00:11:33 +0300
Subject: [PATCH 71/71] Add "g_generic" sound tag

All governments in supplied rulesets fallback to using
that sound tag.

Sound was Public Domain (CC0) sample by Spring Spring
https://opengameart.org/content/just-a-random-fanfare

See RM #657

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 data/alien/governments.ruleset         |  10 +++++-----
 data/civ1/governments.ruleset          |  10 +++++-----
 data/civ2/governments.ruleset          |  12 ++++++------
 data/civ2civ3/governments.ruleset      |  16 ++++++++--------
 data/classic/governments.ruleset       |  10 +++++-----
 data/goldkeep/governments.ruleset      |  10 +++++-----
 data/granularity/governments.ruleset   |   2 +-
 data/multiplayer/governments.ruleset   |  12 ++++++------
 data/sandbox/governments.ruleset       |  16 ++++++++--------
 data/stdsounds.soundspec               |   4 +++-
 data/stdsounds/Makefile.am             |   1 +
 data/stdsounds/fanfare.ogg             | Bin 0 -> 295834 bytes
 data/stub/governments.ruleset          |   2 +-
 data/webperimental/governments.ruleset |  10 +++++-----
 meson.build                            |   3 ++-
 15 files changed, 61 insertions(+), 57 deletions(-)
 create mode 100644 data/stdsounds/fanfare.ogg

diff --git a/data/alien/governments.ruleset b/data/alien/governments.ruleset
index 92df1216dc..608a8a264c 100644
--- a/data/alien/governments.ruleset
+++ b/data/alien/governments.ruleset
@@ -93,7 +93,7 @@ reqs =
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Leader %s")
@@ -116,7 +116,7 @@ reqs =
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -140,7 +140,7 @@ reqs =
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -165,7 +165,7 @@ graphic     = "gov.dual_communism"
 graphic_alt = "gov.monarchy"
 sound       = "g_dual_communism"
 sound_alt   = "g_monarchy"
-sound_alt2  = "-"
+sound_alt2  = "g_generic"
 
 ruler_male_title = _("Comrade %s")
 ruler_female_title = _("?female:Comrade %s")
@@ -189,7 +189,7 @@ graphic     = "gov.dual_democracy"
 graphic_alt = "gov.republic"
 sound       = "g_dual_democracy"
 sound_alt   = "g_republic"
-sound_alt2  = "-"
+sound_alt2  = "g_generic"
 
 ruler_male_title = _("President %s")
 ruler_female_title = _("?female:President %s")
diff --git a/data/civ1/governments.ruleset b/data/civ1/governments.ruleset
index d6754d1447..0e12285d18 100644
--- a/data/civ1/governments.ruleset
+++ b/data/civ1/governments.ruleset
@@ -97,7 +97,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -122,7 +122,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Communism"
 
@@ -147,7 +147,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -174,7 +174,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Consul %s")
@@ -199,7 +199,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
diff --git a/data/civ2/governments.ruleset b/data/civ2/governments.ruleset
index 183251b884..7995371378 100644
--- a/data/civ2/governments.ruleset
+++ b/data/civ2/governments.ruleset
@@ -95,7 +95,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -120,7 +120,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Communism"
 
@@ -145,7 +145,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -172,7 +172,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.fundamentalism"
 graphic_alt = "-"
 sound       = "g_fundamentalism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("High Priest %s")
@@ -203,7 +203,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Consul %s")
@@ -228,7 +228,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
diff --git a/data/civ2civ3/governments.ruleset b/data/civ2civ3/governments.ruleset
index 23b9c2f1cc..ac6e980c57 100644
--- a/data/civ2civ3/governments.ruleset
+++ b/data/civ2civ3/governments.ruleset
@@ -112,7 +112,7 @@ name        = _("Tribal")
 graphic     = "gov.tribal"
 graphic_alt = "s.tax_luxury"
 sound       = "g_tribal"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Republic"
 
@@ -154,7 +154,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -196,7 +196,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("King %s")
@@ -236,7 +236,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -277,7 +277,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.fundamentalism"
 graphic_alt = "-"
 sound       = "g_fundamentalism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("High Priest %s")
@@ -326,7 +326,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.federation"
 graphic_alt = "s.tax_gold"
 sound       = "g_federation"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Consul %s")
@@ -365,7 +365,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -406,7 +406,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Prime Minister %s")
diff --git a/data/classic/governments.ruleset b/data/classic/governments.ruleset
index d193f5d263..3e0e3c2b31 100644
--- a/data/classic/governments.ruleset
+++ b/data/classic/governments.ruleset
@@ -95,7 +95,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -120,7 +120,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Communism"
 
@@ -145,7 +145,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -172,7 +172,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -197,7 +197,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Prime Minister %s")
diff --git a/data/goldkeep/governments.ruleset b/data/goldkeep/governments.ruleset
index 5fb73070ee..9884a08766 100644
--- a/data/goldkeep/governments.ruleset
+++ b/data/goldkeep/governments.ruleset
@@ -99,7 +99,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -124,7 +124,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Communism"
 
@@ -149,7 +149,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -176,7 +176,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -201,7 +201,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Prime Minister %s")
diff --git a/data/granularity/governments.ruleset b/data/granularity/governments.ruleset
index 8017ed9ace..14af7542ce 100644
--- a/data/granularity/governments.ruleset
+++ b/data/granularity/governments.ruleset
@@ -92,7 +92,7 @@ reqs =
 graphic     = "gov.tribal"
 graphic_alt = "-"
 sound       = "g_tribal"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Warlord %s")
diff --git a/data/multiplayer/governments.ruleset b/data/multiplayer/governments.ruleset
index 7e1569cd1e..b0f9704b3a 100644
--- a/data/multiplayer/governments.ruleset
+++ b/data/multiplayer/governments.ruleset
@@ -95,7 +95,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -120,7 +120,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Communism"
 
@@ -145,7 +145,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -172,7 +172,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -197,7 +197,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Prime Minister %s")
@@ -221,7 +221,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.fundamentalism"
 graphic_alt = "-"
 sound       = "g_fundamentalism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("High Priest %s")
diff --git a/data/sandbox/governments.ruleset b/data/sandbox/governments.ruleset
index 43c62d0fb5..18a821f2f9 100644
--- a/data/sandbox/governments.ruleset
+++ b/data/sandbox/governments.ruleset
@@ -112,7 +112,7 @@ name        = _("Tribal")
 graphic     = "gov.tribal"
 graphic_alt = "s.tax_luxury"
 sound       = "g_tribal"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Republic"
 
@@ -154,7 +154,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -196,7 +196,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("King %s")
@@ -236,7 +236,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -278,7 +278,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.fundamentalism"
 graphic_alt = "-"
 sound       = "g_fundamentalism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("High Priest %s")
@@ -327,7 +327,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.federation"
 graphic_alt = "s.tax_gold"
 sound       = "g_federation"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Consul %s")
@@ -366,7 +366,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -408,7 +408,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Prime Minister %s")
diff --git a/data/stdsounds.soundspec b/data/stdsounds.soundspec
index 455fd31124..f1cf087ad3 100644
--- a/data/stdsounds.soundspec
+++ b/data/stdsounds.soundspec
@@ -8,7 +8,8 @@ artists = "\
  OpenQuartz - Ali Jackson (alister667@hotmail.com) [ali]\
  OpenQuartz - Frank Condello (pox@planetquake.com) [pox]\
  Warzone - Eidos Entertainment (GPL release) [warzone]\
- Eskapada - eskapada@o2.pl (Public Domain) [jt]"
+ Eskapada - eskapada@o2.pl (Public Domain) [jt]\
+ Spring Spring - https://opengameart.org/users/spring-spring [spring]"
 
 ; For a list of tags used see README.sound, buildings.ruleset and
 ; units.ruleset.
@@ -194,6 +195,7 @@ m_trireme = "stdsounds/inh2o.ogg" ; [pox]
 ;w_united_nations = ""
 ;w_womens_suffrage = ""
 
+g_generic = "stdsounds/fanfare.ogg" ; [spring]
 ;g_anarchy = ""
 ;g_despotism = ""
 ;g_tribal = ""
diff --git a/data/stdsounds/Makefile.am b/data/stdsounds/Makefile.am
index fd27591a66..30d39a1532 100644
--- a/data/stdsounds/Makefile.am
+++ b/data/stdsounds/Makefile.am
@@ -4,6 +4,7 @@
 pkgdatadir = $(datadir)/$(PACKAGE)/stdsounds
 
 pkgdata_DATA =          \
+	fanfare.ogg	\
 	foot3.ogg	\
 	illegal.ogg	\
 	inh2o.ogg	\
diff --git a/data/stdsounds/fanfare.ogg b/data/stdsounds/fanfare.ogg
new file mode 100644
index 0000000000000000000000000000000000000000..3278b91257a728f3d5d44d2bfd6e524b6686d53b
GIT binary patch
diff --git a/data/stub/governments.ruleset b/data/stub/governments.ruleset
index d6af7d7783..9316cad736 100644
--- a/data/stub/governments.ruleset
+++ b/data/stub/governments.ruleset
@@ -82,7 +82,7 @@ reqs =
    }
 graphic     = "gov.despotism"
 graphic_alt = "-"
-sound       = "g_despotism"
+sound       = "g_generic"
 sound_alt   = "-"
 sound_alt2  = "-"
 
diff --git a/data/webperimental/governments.ruleset b/data/webperimental/governments.ruleset
index 5bc07d27c2..37f90ea7f1 100644
--- a/data/webperimental/governments.ruleset
+++ b/data/webperimental/governments.ruleset
@@ -95,7 +95,7 @@ name        = _("Despotism")
 graphic     = "gov.despotism"
 graphic_alt = "-"
 sound       = "g_despotism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Monarchy"
 
@@ -120,7 +120,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.monarchy"
 graphic_alt = "-"
 sound       = "g_monarchy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 ai_better   = "Communism"
 
@@ -145,7 +145,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.communism"
 graphic_alt = "-"
 sound       = "g_communism"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Comrade %s")
@@ -172,7 +172,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.republic"
 graphic_alt = "-"
 sound       = "g_republic"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("President %s")
@@ -197,7 +197,7 @@ reqs = { "type", "name", "range"
 graphic     = "gov.democracy"
 graphic_alt = "-"
 sound       = "g_democracy"
-sound_alt   = "-"
+sound_alt   = "g_generic"
 sound_alt2  = "-"
 
 ruler_male_title = _("Prime Minister %s")
diff --git a/meson.build b/meson.build
index 7a0287191a..ea73db29a7 100644
--- a/meson.build
+++ b/meson.build
@@ -3137,7 +3137,8 @@ install_data('data/amplio2/activities.png',
 install_data('data/stdmusic/CullamBruce-Lockhart--Dawning_Fanfare.ogg',
              install_dir : join_paths(get_option('datadir'), 'freeciv/stdmusic'))
 
-install_data('data/stdsounds/foot3.ogg',
+install_data('data/stdsounds/fanfare.ogg',
+             'data/stdsounds/foot3.ogg',
              'data/stdsounds/illegal.ogg',
              'data/stdsounds/inh2o.ogg',
              'data/stdsounds/LrgCan.ogg',
-- 
2.43.0

