1
0
forked from mirrors/0ad

Add specific tips for multiplayer sessions

A multi player loading screen will have possibility of showing single
and multi player tips while multi player tips are in favor.

Tips are now separated by categories. During loading those category
have an occurrence probability, where we are choosing a random category
based on chance and not by complete randomness. From there we just
picking a random tip from that category.
This commit is contained in:
ramtzok1
2025-01-13 11:14:56 +02:00
committed by Dunedan
parent 8482f25800
commit 1b797ce0a0
15 changed files with 502 additions and 372 deletions
+8 -5
View File
@@ -829,11 +829,14 @@ class CheckRefs:
self.files.append(fp)
self.roots.append(fp)
with open(ffp, encoding="utf-8") as f:
tips = load(f)
for tip in tips:
self.deps.append((fp, Path(f"gui/reference/tips/texts/{tip['textFile']}")))
for image in tip.get("imageFiles", []):
self.deps.append((fp, Path(f"art/textures/ui/tips/{image}")))
categories = load(f)
for category in categories:
for tips_category in category["files"]:
self.deps.append(
(fp, Path(f"gui/reference/tips/texts/{tips_category['textFile']}"))
)
for image in tips_category.get("imageFiles", []):
self.deps.append((fp, Path(f"art/textures/ui/tips/{image}")))
def add_rms(self):
self.logger.info("Loading random maps...")