From ec0bf05163053df9b6fea7c012d8c1cd1729f3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Mon, 30 Oct 2023 17:21:03 +0100 Subject: [PATCH] Rename "cpu" parameter to correct "humans" --- Mods/vcmi/config/vcmi/rmg/hdmod/coldshadowsFantasy.json | 2 +- Mods/vcmi/config/vcmi/rmg/hdmodUnused/midnightMix.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/heroes3/meetingInMuzgob.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/heroes3/worldsAtWar.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/heroes3unused/gauntlet.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON | 2 +- Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON | 2 +- config/schemas/template.json | 2 +- lib/rmg/CRmgTemplate.cpp | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Mods/vcmi/config/vcmi/rmg/hdmod/coldshadowsFantasy.json b/Mods/vcmi/config/vcmi/rmg/hdmod/coldshadowsFantasy.json index 539c90dbc..d62bdde01 100755 --- a/Mods/vcmi/config/vcmi/rmg/hdmod/coldshadowsFantasy.json +++ b/Mods/vcmi/config/vcmi/rmg/hdmod/coldshadowsFantasy.json @@ -2,7 +2,7 @@ "Coldshadow's Fantasy": { "minSize" : "xl+u", "maxSize" : "g+u", - "players" : "4-8", "cpu" : "3-6", + "players" : "4-8", "humans" : "3-6", "zones": { "1": diff --git a/Mods/vcmi/config/vcmi/rmg/hdmodUnused/midnightMix.JSON b/Mods/vcmi/config/vcmi/rmg/hdmodUnused/midnightMix.JSON index 33af217a1..015cf2168 100644 --- a/Mods/vcmi/config/vcmi/rmg/hdmodUnused/midnightMix.JSON +++ b/Mods/vcmi/config/vcmi/rmg/hdmodUnused/midnightMix.JSON @@ -5117,7 +5117,7 @@ "Midnight Mix 34" : { "minSize" : "l", "maxSize" : "xl+u", - "players" : "6", "cpu" : "2", + "players" : "6", "humans" : "2", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/heroes3/meetingInMuzgob.JSON b/Mods/vcmi/config/vcmi/rmg/heroes3/meetingInMuzgob.JSON index d88b64e4a..189124ae2 100644 --- a/Mods/vcmi/config/vcmi/rmg/heroes3/meetingInMuzgob.JSON +++ b/Mods/vcmi/config/vcmi/rmg/heroes3/meetingInMuzgob.JSON @@ -2,7 +2,7 @@ "Meeting in Muzgob" : { "minSize" : "l", "maxSize" : "xl+u", - "players" : "2-6", "cpu" : "2", + "players" : "2-6", "humans" : "2", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON b/Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON index 1c18e5574..ba1663150 100644 --- a/Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON +++ b/Mods/vcmi/config/vcmi/rmg/heroes3/newcomers.JSON @@ -2,7 +2,7 @@ "Newcomers" : { "minSize" : "m+u", "maxSize" : "xl+u", - "players" : "2-3", "cpu" : "1", + "players" : "2-3", "humans" : "1", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON b/Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON index 2be3522d0..8b76bb100 100644 --- a/Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON +++ b/Mods/vcmi/config/vcmi/rmg/heroes3/southOfHell.JSON @@ -2,7 +2,7 @@ "South of Hell" : { "minSize" : "m+u", "maxSize" : "l+u", - "players" : "2", "cpu" : "1", + "players" : "2", "humans" : "1", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/heroes3/worldsAtWar.JSON b/Mods/vcmi/config/vcmi/rmg/heroes3/worldsAtWar.JSON index e3d640f71..d3f603b66 100644 --- a/Mods/vcmi/config/vcmi/rmg/heroes3/worldsAtWar.JSON +++ b/Mods/vcmi/config/vcmi/rmg/heroes3/worldsAtWar.JSON @@ -2,7 +2,7 @@ "Worlds at War" : { "minSize" : "m+u", "maxSize" : "xl+u", - "players" : "2", "cpu" : "3", + "players" : "2", "humans" : "3", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/heroes3unused/gauntlet.JSON b/Mods/vcmi/config/vcmi/rmg/heroes3unused/gauntlet.JSON index 399bc52ed..a71dc2ae4 100644 --- a/Mods/vcmi/config/vcmi/rmg/heroes3unused/gauntlet.JSON +++ b/Mods/vcmi/config/vcmi/rmg/heroes3unused/gauntlet.JSON @@ -2,7 +2,7 @@ "Gauntlet" : { "minSize" : "m+u", "maxSize" : "xl+u", - "players" : "1", "cpu" : "5", + "players" : "1", "humans" : "5", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON index 5a8c3ca18..a8f6e81d4 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/2sm0k.JSON @@ -2,7 +2,7 @@ "2SM0k" : { "minSize" : "s", "maxSize" : "m+u", - "players" : "2", "cpu" : "6", + "players" : "2", "humans" : "6", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON index bf6bc85e0..3cc442b31 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/2sm2i(2).JSON @@ -3,7 +3,7 @@ { "minSize" : "s", "maxSize" : "m+u", "players" : "2", - "cpu": "1-2", + "humans": "1-2", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON index 61b8fd0aa..6b784d53f 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0b.JSON @@ -2,7 +2,7 @@ "3SB0b" : { "minSize" : "s", "maxSize" : "m+u", - "players" : "2", "cpu" : "1", + "players" : "2", "humans" : "1", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON index 47647e043..3be8223b8 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/3sb0c.JSON @@ -2,7 +2,7 @@ "3SB0c" : { "minSize" : "s+u", "maxSize" : "m+u", - "players" : "2", "cpu" : "1", + "players" : "2", "humans" : "1", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON index 774a10cfa..ca3b27d8c 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0a.JSON @@ -2,7 +2,7 @@ "5SB0a" : { "minSize" : "s", "maxSize" : "m+u", - "players" : "2-3", "cpu" : "2", + "players" : "2-3", "humans" : "2", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON index cae17f7f8..c92c16a7c 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/5sb0b.JSON @@ -2,7 +2,7 @@ "5SB0b" : { "minSize" : "s", "maxSize" : "m+u", - "players" : "2-3", "cpu" : "2", + "players" : "2-3", "humans" : "2", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON index eb3c34ba6..75428a8d8 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0b.JSON @@ -2,7 +2,7 @@ "7SB0b" : { "minSize" : "s", "maxSize" : "l", - "players" : "2-6", "cpu" : "1", + "players" : "2-6", "humans" : "1", "zones" : { "1" : diff --git a/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON b/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON index ed62a587d..aefb1e142 100644 --- a/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON +++ b/Mods/vcmi/config/vcmi/rmg/symmetric/7sb0c.JSON @@ -2,7 +2,7 @@ "7SB0c" : { "minSize" : "s+u", "maxSize" : "l", - "players" : "2-7", "cpu" : "2-6", + "players" : "2-7", "humans" : "2-6", "zones" : { "1" : diff --git a/config/schemas/template.json b/config/schemas/template.json index c91f3bd4d..67cbca49f 100644 --- a/config/schemas/template.json +++ b/config/schemas/template.json @@ -119,7 +119,7 @@ "description" : "Number of players that will be present on map (human or AI)", "type": "string" }, - "cpu" : { + "humans" : { "description" : "Optional, number of AI-only players", "type": "string" }, diff --git a/lib/rmg/CRmgTemplate.cpp b/lib/rmg/CRmgTemplate.cpp index 98887914d..5a688da6a 100644 --- a/lib/rmg/CRmgTemplate.cpp +++ b/lib/rmg/CRmgTemplate.cpp @@ -691,7 +691,7 @@ void CRmgTemplate::serializeJson(JsonSerializeFormat & handler) serializeSize(handler, minSize, "minSize"); serializeSize(handler, maxSize, "maxSize"); serializePlayers(handler, players, "players"); - serializePlayers(handler, humanPlayers, "cpu"); // TODO: Rename this parameter + serializePlayers(handler, humanPlayers, "humans"); // TODO: Rename this parameter { auto connectionsData = handler.enterArray("connections");