The `clotheslist` and `clotheslistnear` can be used to list the
clothes (and their tint) of a player in the terminal.
The other fix prevents text input in the console from activating
devtools hotkeys (e.g. "p" placing a player).
folder of type ".png". You may add any png file in that folder and use it
with the clothes command. See Decal Editing to create such files.
clothesnear - does the same for the character nearest to you.
folder of type ".png". You may add any png file in that folder and use it
with the clothes command. See Decal Editing to create such files.
clothesnear - does the same for the character nearest to you.
+clotheslist - lists the clothes of the main player (and their tint).
+clotheslistnear - does the same for the character nearest to you.
Person::players[pnum]->DoMipmaps();
}
Person::players[pnum]->DoMipmaps();
}
+static void list_clothes(int pnum)
+{
+ printf("Clothes from player %d:\n", pnum);
+ for (int i = 0; i < Person::players[pnum]->numclothes; i++) {
+ printf("%s (%f %f %f)\n",
+ Person::players[pnum]->clothes[i],
+ Person::players[pnum]->clothestintr[i],
+ Person::players[pnum]->clothestintg[i],
+ Person::players[pnum]->clothestintb[i]);
+ }
+}
+
/* Console commands themselves */
void ch_quit(const char*)
/* Console commands themselves */
void ch_quit(const char*)
+void ch_clotheslist(const char*)
+{
+ list_clothes(0);
+}
+
+void ch_clotheslistnear(const char*)
+{
+ int closest = findClosestPlayer();
+ if (closest >= 0) {
+ list_clothes(closest);
+ }
+}
+
void ch_belt(const char*)
{
Person::players[0]->skeleton.clothes = !Person::players[0]->skeleton.clothes;
void ch_belt(const char*)
{
Person::players[0]->skeleton.clothes = !Person::players[0]->skeleton.clothes;
DECLARE_COMMAND(metal)
DECLARE_COMMAND(clothes)
DECLARE_COMMAND(clothesnear)
DECLARE_COMMAND(metal)
DECLARE_COMMAND(clothes)
DECLARE_COMMAND(clothesnear)
+DECLARE_COMMAND(clotheslist)
+DECLARE_COMMAND(clotheslistnear)
DECLARE_COMMAND(noclothes)
DECLARE_COMMAND(noclothesnear)
DECLARE_COMMAND(belt)
DECLARE_COMMAND(noclothes)
DECLARE_COMMAND(noclothesnear)
DECLARE_COMMAND(belt)
printf("Stereo separation increased to %f\n", stereoseparation);
}
printf("Stereo separation increased to %f\n", stereoseparation);
}
- /* Devtools */
- if (devtools && !mainmenu) {
- ProcessDevInput();
- }
-}
-
-void Game::ProcessDevInput()
-{
- if (!devtools || mainmenu) {
- return;
- }
-
/* Console */
if (Input::isKeyPressed(consolekey)) {
console = !console;
/* Console */
if (Input::isKeyPressed(consolekey)) {
console = !console;
+ /* Devtools */
+ if (devtools && !mainmenu && !console) {
+ ProcessDevInput();
+ }
+}
+
+void Game::ProcessDevInput()
+{
+ if (!devtools || mainmenu || console) {
+ return;
+ }
+
if (Input::isKeyDown(SDL_SCANCODE_LALT)) {
/* Enable editor */
if (Input::isKeyPressed(SDL_SCANCODE_M) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) {
if (Input::isKeyDown(SDL_SCANCODE_LALT)) {
/* Enable editor */
if (Input::isKeyPressed(SDL_SCANCODE_M) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) {