From cd6819221b5178319d73c7679f0cc7a2d934579f Mon Sep 17 00:00:00 2001 From: cuddleandtea <105150564+cuddleandtea@users.noreply.github.com> Date: Fri, 19 Apr 2024 06:41:11 +0300 Subject: [PATCH] Adds color to VV (#2903) ## About The Pull Request Hello dear comrades! I represent to you a more convenient way to change color of anything through View Variables. ## Why It's Good For The Game Before you was forced to search or remember colors code to apply it to light or obj color. And now it's more easy to use. Just like in character creation. 1. Select VV of anything and go to color ![image](https://github.com/shiptest-ss13/Shiptest/assets/105150564/be9629bc-f9cf-4e8b-90da-8a36fbe8a880) 2. Press C to change type of var ![image](https://github.com/shiptest-ss13/Shiptest/assets/105150564/7ae39847-1e7e-4c72-8932-2d47a36c66ca) 3. Select color ![image](https://github.com/shiptest-ss13/Shiptest/assets/105150564/5bd73fb9-7978-498c-b677-e99da686846d) 4. Apply changes and be happy ![image](https://github.com/shiptest-ss13/Shiptest/assets/105150564/ed5bd567-41a4-4c4e-9130-18d17b00a455) ## Changelog :cl: admin: adds color type to variables /:cl: --- code/__DEFINES/vv.dm | 1 + code/modules/admin/view_variables/get_variables.dm | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm index 2ac0032b77bd1..5d9522b18ee45 100644 --- a/code/__DEFINES/vv.dm +++ b/code/__DEFINES/vv.dm @@ -11,6 +11,7 @@ #define VV_TYPE "Custom Typepath" #define VV_FILE "File" #define VV_LIST "List" +#define VV_COLOR "Color" #define VV_NEW_ATOM "New Atom" #define VV_NEW_DATUM "New Datum" #define VV_NEW_TYPE "New Custom Typepath" diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm index 3f90002edc056..75892a87e2c1f 100644 --- a/code/modules/admin/view_variables/get_variables.dm +++ b/code/modules/admin/view_variables/get_variables.dm @@ -62,6 +62,7 @@ VV_DATUM_TYPE, VV_TYPE, VV_FILE, + VV_COLOR, VV_NEW_ATOM, VV_NEW_DATUM, VV_NEW_TYPE, @@ -190,6 +191,12 @@ .["class"] = null return + if(VV_COLOR) + .["value"] = input("Pick color:", "Color", current_value) as null|color + if(.["value"] == null) + .["class"] = null + return + if(VV_ICON) .["value"] = input("Pick icon:", "Icon") as null|icon if(.["value"] == null)