diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f70983..dc3fd54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ **Server-Browser** - **Hervorgehobene Server**: vom Keymaster-Admin markierte Server (Tag `featured`) stehen ganz oben, mit goldener Zeile und **FEATURED**-Abzeichen (Liste und Profil) -- **Tags** der Server (z.B. `OFFICIAL`) erscheinen im Server-Profil; die Suche findet auch Tags +- **Tags** der Server erscheinen im Server-Profil; die Suche findet auch Tags. Serverbetreiber setzen eigene Tags im + Web-Panel (Einstellungen), **OFFICIAL** vergeben nur die MSCO-Admins und wird hervorgehoben - Braucht keinen neuen Server: die Infos kommen vom Master (msco.mbm.wtf) und funktionieren mit 2.8-Servern **Mitfahren ohne Ruckeln** diff --git a/LobbyUI.cs b/LobbyUI.cs index 3cdddc1..1a1b57f 100644 --- a/LobbyUI.cs +++ b/LobbyUI.cs @@ -543,12 +543,14 @@ namespace MSCO Rect badgeRow = GUILayoutUtility.GetRect(S(10), S(20), GUILayout.ExpandWidth(true)); float bx = badgeRow.x; if (s.Featured) bx += Pill(bx, badgeRow, "FEATURED", pillFeaturedStyle); + bool official = s.Tags != null && s.Tags.Contains("official"); // vergibt nur ein MSCO-Admin + if (official) bx += Pill(bx, badgeRow, "OFFICIAL", pillStyle); bx += Pill(bx, badgeRow, s.RequireSteam ? "STEAM" : "NON-STEAM", s.RequireSteam ? pillStyle : pillMutedStyle); if (s.IsLocal) bx += Pill(bx, badgeRow, "LOCAL", pillStyle); if (s.Version != MSCO.ModVersion) bx += Pill(bx, badgeRow, "v" + s.Version, pillStyle); if (s.Tags != null) foreach (string tag in s.Tags) - if (!string.IsNullOrEmpty(tag) && tag != "featured") bx += Pill(bx, badgeRow, tag.ToUpper(), pillMutedStyle); + if (!string.IsNullOrEmpty(tag) && tag != "featured" && tag != "official") bx += Pill(bx, badgeRow, tag.ToUpper(), pillMutedStyle); GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.Space(S(12)); diff --git a/ServerBrowser.cs b/ServerBrowser.cs index b951d2e..537179b 100644 --- a/ServerBrowser.cs +++ b/ServerBrowser.cs @@ -24,7 +24,7 @@ namespace MSCO public bool RequireSteam = true; // false = Non-Steam-Server public string Owner; // Besitzer des Lizenzschlüssels public bool Featured; // vom Keymaster-Admin hervorgehoben (steht in der Liste oben) - public List Tags = new List(); // Tags des Lizenzschlüssels (Keymaster-Admin), z.B. "official" + public List Tags = new List(); // Admin-Tags (z.B. "official") und eigene Tags des Servers (Web-Panel) [JsonIgnore] public int UptimeSeconds = -1; [JsonIgnore] public List PlayerNames = new List();