From 39763e85c6da1e57355cbf4af59038eda075a5fb Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Sat, 5 Aug 2023 20:57:34 +0200 Subject: [PATCH] documentation: Creates a short documentation for vchat I ran into issues figuring out why modifying vchat.js did not cause changes to the game when the last PR I saw modifying it did nothing else (about may, 2022). Turns out, in september 2022 - minification was done. This readme instructs developers to do so to avoid future confusion and explains how. I also made a note about keeping ss13styles.css sync'd with stylesheet.dm --- code/modules/vchat/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 code/modules/vchat/README.md diff --git a/code/modules/vchat/README.md b/code/modules/vchat/README.md new file mode 100644 index 00000000000..fc7029b2173 --- /dev/null +++ b/code/modules/vchat/README.md @@ -0,0 +1,24 @@ +# VChat +(Please add to this file as you learn how this thing works. Thank you!) +## Development + +To implement changes to VChat, one must modify either vchat.js or vchat_client, + where vchat.js corresponds to what actually appears to the user. + Not all of the logic is isolated within vchat_client, vchat.js handles a significant amount of processing as well. + +### vchat.js + +vchat.js is a development file - it is not actually included in the actual game code. Instead, what the game expects is +the minified version "vchat.min.js" + +Therefore, to have your changes in "vchat.js" apply to the game for either PR or testing - you must first minify your script. +If you are unfamiliar how to, simply you copy the file contants in vchat.js, paste them into https://codebeautify.org/minify-js +or any similar tool and paste its output into vchat.min.js . + +As of 2023/08/05, no tool is provided by the codebase to handle minification for the developer. + +### ss13styles.css + +Handles chat colours, background colours, filtering. + +Please keep this file synchronized with code\stylesheet.dm where possible (filters, lightmode colours).