Skip to content

Commit

Permalink
Adds color to VV (#2903)
Browse files Browse the repository at this point in the history
## 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:
  • Loading branch information
cuddleandtea authored Apr 20, 2024
1 parent ad9a4dc commit a8c1468
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions code/modules/admin/view_variables/get_variables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
VV_DATUM_TYPE,
VV_TYPE,
VV_FILE,
VV_COLOR,
VV_NEW_ATOM,
VV_NEW_DATUM,
VV_NEW_TYPE,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a8c1468

Please sign in to comment.