]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
WebP lobby images (#25184)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 16 Feb 2024 23:55:57 +0000 (00:55 +0100)
committerGitHub <noreply@github.com>
Fri, 16 Feb 2024 23:55:57 +0000 (16:55 -0700)
* Allow webp in lobby background files

* Make lobby art webp images

Reduces folder from 10 MB to 2.5 MB without only slight quality loss.

* Update PutLobbyScreensHere.txt

28 files changed:
Content.Server/GameTicking/GameTicker.LobbyBackground.cs
Resources/Prototypes/lobbyscreens.yml
Resources/Textures/LobbyScreens/PutLobbyScreensHere.txt
Resources/Textures/LobbyScreens/attributions.yml
Resources/Textures/LobbyScreens/doomed.png [deleted file]
Resources/Textures/LobbyScreens/doomed.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/doomed.webp.yml [moved from Resources/Textures/LobbyScreens/doomed.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/pharmacy.png [deleted file]
Resources/Textures/LobbyScreens/pharmacy.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/pharmacy.webp.yml [moved from Resources/Textures/LobbyScreens/pharmacy.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/robotics.png [deleted file]
Resources/Textures/LobbyScreens/robotics.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/robotics.webp.yml [moved from Resources/Textures/LobbyScreens/robotics.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/skellyvstherev.png [deleted file]
Resources/Textures/LobbyScreens/skellyvstherev.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/skellyvstherev.webp.yml [moved from Resources/Textures/LobbyScreens/skellyvstherev.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/ssxiv.png [deleted file]
Resources/Textures/LobbyScreens/ssxiv.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/ssxiv.webp.yml [moved from Resources/Textures/LobbyScreens/ssxiv.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/supermatter.png [deleted file]
Resources/Textures/LobbyScreens/supermatter.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/supermatter.webp.yml [moved from Resources/Textures/LobbyScreens/supermatter.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/susstation.png [deleted file]
Resources/Textures/LobbyScreens/susstation.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/susstation.webp.yml [moved from Resources/Textures/LobbyScreens/susstation.png.yml with 100% similarity]
Resources/Textures/LobbyScreens/warden.png [deleted file]
Resources/Textures/LobbyScreens/warden.webp [new file with mode: 0644]
Resources/Textures/LobbyScreens/warden.webp.yml [moved from Resources/Textures/LobbyScreens/warden.png.yml with 100% similarity]

index 7f2ccfe235b7d7197e7919de75db694972dc98b9..2090e3e31f02f1b7352206b0de616ee006081412 100644 (file)
@@ -13,7 +13,7 @@ public sealed partial class GameTicker
     [ViewVariables]
     private List<ResPath>? _lobbyBackgrounds;
 
-    private static readonly string[] WhitelistedBackgroundExtensions = new string[] {"png", "jpg", "jpeg"};
+    private static readonly string[] WhitelistedBackgroundExtensions = new string[] {"png", "jpg", "jpeg", "webp"};
 
     private void InitializeLobbyBackground()
     {
index b61e6b73a48cc8ea92636f9a97ee85ce9718beb6..b158d7856eddbbb9cf6e13c7306c1df2ce9bbf7c 100644 (file)
@@ -1,31 +1,31 @@
 - type: lobbyBackground
   id: Robotics
-  background: /Textures/LobbyScreens/robotics.png
+  background: /Textures/LobbyScreens/robotics.webp
 
 - type: lobbyBackground
   id: Supermatter
-  background: /Textures/LobbyScreens/supermatter.png
+  background: /Textures/LobbyScreens/supermatter.webp
 
 - type: lobbyBackground
   id: Warden
-  background: /Textures/LobbyScreens/warden.png
+  background: /Textures/LobbyScreens/warden.webp
 
 - type: lobbyBackground
   id: Pharmacy
-  background: /Textures/LobbyScreens/pharmacy.png
+  background: /Textures/LobbyScreens/pharmacy.webp
 
 - type: lobbyBackground
   id: SSXIV
-  background: /Textures/LobbyScreens/ssxiv.png
+  background: /Textures/LobbyScreens/ssxiv.webp
 
 - type: lobbyBackground
   id: Susstation
-  background: /Textures/LobbyScreens/susstation.png
+  background: /Textures/LobbyScreens/susstation.webp
 
 - type: lobbyBackground
   id: SkellyVsTheRev
-  background: /Textures/LobbyScreens/skellyvstherev.png
+  background: /Textures/LobbyScreens/skellyvstherev.webp
 
 - type: lobbyBackground
   id: Doomed
-  background: /Textures/LobbyScreens/doomed.png
+  background: /Textures/LobbyScreens/doomed.webp
index 52cb3f1dc9043b184da64b02df784aedb0828f46..7d7777fa101d6e63fc4cc05aed9fe537e01295d3 100644 (file)
@@ -1,2 +1,3 @@
 Note:
-Only png and jpgs files are supported, and you need a prototype in Resources/Prototypes/lobbyscreens.yml
+PNG, JPEG and WebP is supported. Please prefer a lossy WebP compression since lobby art is big.
+You also need to put a prototype in Resources/Prototypes/lobbyscreens.yml
index 90287ef893765657430e2906a772b5232b14ee1e..c84bac0ebb0d787be554343c30356fb364241da3 100644 (file)
@@ -1,29 +1,29 @@
-- files: ["supermatter.png", "robotics.png"]
+- files: ["supermatter.webp", "robotics.webp"]
   license: "CC-BY-NC-SA-3.0"
   copyright: "Veritius#2351 (257233913951289344) on discord / @Veritius on GitHub"
   source: "https://github.com/Veritius"
 
-- files: ["warden.png", "pharmacy.png"]
+- files: ["warden.webp", "pharmacy.webp"]
   license: "CC-BY-NC-SA-3.0"
   copyright: "Solbusaur#4343 (220208697429852160) on discord"
   source: "https://github.com/space-wizards/space-station-14"
 
-- files: ["ssxiv.png"]
+- files: ["ssxiv.webp"]
   license: "CC-BY-NC-SA-3.0"
   copyright: "Abyssal#4842 on discord / @aby_doodles on Twitter"
   source: "https://twitter.com/aby_doodles"
 
-- files: ["susstation.png"]
+- files: ["susstation.webp"]
   license: "CC-BY-NC-SA-3.0"
   copyright: "Alekshhh github"
   source: "https://github.com/space-wizards/space-station-14"
 
-- files: ["skellyvstherev.png"]
+- files: ["skellyvstherev.webp"]
   license: "CC-BY-SA-4.0"
   copyright: "Hannah 'FairlySadPanda' Dawson 2024"
   source: "https://github.com/FairlySadPanda"
 
-- files: ["doomed.png"]
+- files: ["doomed.webp"]
   license: "CC-BY-NC-SA-3.0"
   copyright: "brainfood1183 github"
   source: "https://github.com/space-wizards/space-station-14"
diff --git a/Resources/Textures/LobbyScreens/doomed.png b/Resources/Textures/LobbyScreens/doomed.png
deleted file mode 100644 (file)
index 123f8ac..0000000
Binary files a/Resources/Textures/LobbyScreens/doomed.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/doomed.webp b/Resources/Textures/LobbyScreens/doomed.webp
new file mode 100644 (file)
index 0000000..58a7313
Binary files /dev/null and b/Resources/Textures/LobbyScreens/doomed.webp differ
diff --git a/Resources/Textures/LobbyScreens/pharmacy.png b/Resources/Textures/LobbyScreens/pharmacy.png
deleted file mode 100644 (file)
index d49aa9c..0000000
Binary files a/Resources/Textures/LobbyScreens/pharmacy.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/pharmacy.webp b/Resources/Textures/LobbyScreens/pharmacy.webp
new file mode 100644 (file)
index 0000000..0ee24d8
Binary files /dev/null and b/Resources/Textures/LobbyScreens/pharmacy.webp differ
diff --git a/Resources/Textures/LobbyScreens/robotics.png b/Resources/Textures/LobbyScreens/robotics.png
deleted file mode 100644 (file)
index e392828..0000000
Binary files a/Resources/Textures/LobbyScreens/robotics.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/robotics.webp b/Resources/Textures/LobbyScreens/robotics.webp
new file mode 100644 (file)
index 0000000..43d3258
Binary files /dev/null and b/Resources/Textures/LobbyScreens/robotics.webp differ
diff --git a/Resources/Textures/LobbyScreens/skellyvstherev.png b/Resources/Textures/LobbyScreens/skellyvstherev.png
deleted file mode 100644 (file)
index 2d4887c..0000000
Binary files a/Resources/Textures/LobbyScreens/skellyvstherev.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/skellyvstherev.webp b/Resources/Textures/LobbyScreens/skellyvstherev.webp
new file mode 100644 (file)
index 0000000..09bcf5b
Binary files /dev/null and b/Resources/Textures/LobbyScreens/skellyvstherev.webp differ
diff --git a/Resources/Textures/LobbyScreens/ssxiv.png b/Resources/Textures/LobbyScreens/ssxiv.png
deleted file mode 100644 (file)
index ffa20f4..0000000
Binary files a/Resources/Textures/LobbyScreens/ssxiv.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/ssxiv.webp b/Resources/Textures/LobbyScreens/ssxiv.webp
new file mode 100644 (file)
index 0000000..32e248f
Binary files /dev/null and b/Resources/Textures/LobbyScreens/ssxiv.webp differ
diff --git a/Resources/Textures/LobbyScreens/supermatter.png b/Resources/Textures/LobbyScreens/supermatter.png
deleted file mode 100644 (file)
index 1cc7c6c..0000000
Binary files a/Resources/Textures/LobbyScreens/supermatter.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/supermatter.webp b/Resources/Textures/LobbyScreens/supermatter.webp
new file mode 100644 (file)
index 0000000..d5fb190
Binary files /dev/null and b/Resources/Textures/LobbyScreens/supermatter.webp differ
diff --git a/Resources/Textures/LobbyScreens/susstation.png b/Resources/Textures/LobbyScreens/susstation.png
deleted file mode 100644 (file)
index c0f5c6a..0000000
Binary files a/Resources/Textures/LobbyScreens/susstation.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/susstation.webp b/Resources/Textures/LobbyScreens/susstation.webp
new file mode 100644 (file)
index 0000000..c30abb4
Binary files /dev/null and b/Resources/Textures/LobbyScreens/susstation.webp differ
diff --git a/Resources/Textures/LobbyScreens/warden.png b/Resources/Textures/LobbyScreens/warden.png
deleted file mode 100644 (file)
index 925a1a9..0000000
Binary files a/Resources/Textures/LobbyScreens/warden.png and /dev/null differ
diff --git a/Resources/Textures/LobbyScreens/warden.webp b/Resources/Textures/LobbyScreens/warden.webp
new file mode 100644 (file)
index 0000000..997bd67
Binary files /dev/null and b/Resources/Textures/LobbyScreens/warden.webp differ