Skip to content

Commit 137a87d

Browse files
committed
Fixes
- Allow 16:9 `primarybackground`s - Require a primary background in PRs (not yet forced for existing servers) - Remove the `secondarybackground` requirement in PRs - Increase the char limit of descriptions to 50 - Fixed `Electron Network`'s game types - Fixed `Scala Network`'s logo - Fixed `Scala Network`'s primarybackground - Renamed `ViperMC`'s primarybackground - Fixed `ElevateMC`'s primarybackground
1 parent d178cee commit 137a87d

File tree

9 files changed

+17
-22
lines changed

9 files changed

+17
-22
lines changed

.github/pull_request_template.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* You can view our patterns here: [metadata.schema.json](https://github.com/CheatBreakerNet/Client-API/blob/master/mappings/metadata.schema.json), or take a look below and complete the field checklist:
1212
- [ ] `id`: a lowercase string, which should match the folder name *(ex. `goldenpvpnetwork`)*
1313
- [ ] `name`: a string *(ex. `GoldenPvP Network`)*
14-
- [ ] `description`: hook between 16 and 40 characters *(ex. `We're the home of classic PvP gamemodes`)*
14+
- [ ] `description`: between 16 and 50 characters *(ex. `We're the home of classic PvP gamemodes`)*
1515
- [ ] `addresses`: an array with lowercase strings *(ex. `["goldenpvp.net", "routing.center"]`)*
1616
- You do not need to specify subdomains, CheatBreaker services automatically detect them.
1717
- [ ] `primaryAddress`: the primary address that people connect to with (please include the subdomain if required) *(ex. `mc.goldenpvp.net`)*
@@ -58,16 +58,9 @@
5858
* [ ] My logo is between `512` and `1024` pixels in width and height.
5959
* [ ] My logo is my own/the server's property and complies with relevant copyright/privacy laws.
6060

61-
#### Primary Background (Only required for partnered servers)
62-
* [ ] My primary background is a `png` file.
63-
* [ ] I have uploaded my primary background to my server folder *(ex. `goldenpvpnetwork`)* and named it `primarybackground.png`.
64-
* [ ] My primary background is `774` pixels in width and `363` pixels in height.
65-
* [ ] My primary background contains relevant content pertaining to the server, is my own/the server's property, and complies with relevant copyright/privacy laws.
66-
* [ ] My primary background doesn't contain any markings, text, or logos (unless part of a build).
67-
68-
#### Secondary Background (Only required for partnered servers)
69-
* [ ] My secondary background is a `png` file.
70-
* [ ] I have uploaded my secondary background to my server folder *(ex. `goldenpvpnetwork`)* and named it `secondarybackground.png`.
71-
* [ ] My secondary background is `447` pixels in width and `172` pixels in height.
72-
* [ ] My secondary background contains relevant content pertaining to the server, is my own/the server's property, and complies with relevant copyright/privacy laws.
73-
* [ ] My secondary background doesn't contain any markings, text, or logos (unless part of a build).
61+
#### Background
62+
* [ ] My background is a `png` file.
63+
* [ ] I have uploaded my background to my server folder *(ex. `goldenpvpnetwork`)* and named it `primarybackground.png`.
64+
* [ ] My background has an aspect ratio of `16:9`.
65+
* [ ] My background contains relevant content pertaining to the server, is my own/the server's property, and complies with relevant copyright/privacy laws.
66+
* [ ] My background doesn't contain any markings, text, or logos (unless part of a build).

mappings/metadata.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"description": {
2121
"type": "string",
2222
"minLength": 16,
23-
"maxLength": 40
23+
"maxLength": 50
2424
},
2525
"server_brand": {
2626
"type": "string",

mappings/scripts/utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def validate_discord_logo(path, server_name) -> list:
154154
'''
155155
Validate that server primary background meets the following requirements:
156156
* is a PNG
157-
* is 774x363
157+
* is 774x363 or 16:9
158158
'''
159159
def validate_primary_background(path, server_name) -> list:
160160
# Check image exits - silently skip if not (as it is not yet a requirement)
@@ -170,10 +170,12 @@ def validate_primary_background(path, server_name) -> list:
170170
errors.append(
171171
f'{server_name}\'s server primary background is not a PNG (currently {primary_background_image.format})... Please ensure the image meets the requirements before proceeding.')
172172

173-
# Check image dimensions are 774x363
174-
if primary_background_image.width != 774 or primary_background_image.height != 363:
175-
errors.append(
176-
f'{server_name}\'s server primary background resolution is not 774x363... Please ensure the image meets the requirements before proceeding.')
173+
aspect_ratio = primary_background_image.width / primary_background_image.height
174+
# Check image dimensions are 774x363 or if the aspect ratio is 16:9
175+
if (abs(aspect_ratio - (16 / 9)) > 0.01):
176+
if (primary_background_image.width != 774 or primary_background_image.height != 363):
177+
errors.append(
178+
f'{server_name}\'s server primary background resolution is not 774x363 or 16:9... Please ensure the image meets the requirements before proceeding.')
177179

178180
return errors
179181

mappings/servers/electronnetwork/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "electronnetwork",
33
"name": "Electron Network",
4-
"description": "A unique PVP server with HCF, PVP and minigames.",
4+
"description": "A unique PVP server with HCF, PVP and minigames",
55
"addresses": [
66
"electronmc.club"
77
],
@@ -23,7 +23,7 @@
2323
],
2424
"gameTypes": [
2525
"HCF",
26-
"PVP",
26+
"PvP",
2727
"Minigames"
2828
],
2929
"website": "https://www.electronmc.club/",
-340 KB
Binary file not shown.
372 KB
Loading
39.2 KB
Loading
68.7 KB
Loading
File renamed without changes.

0 commit comments

Comments
 (0)