Commit Graph

144 Commits

Author SHA1 Message Date
Celotajs
190d0a0384 Replace alert usage with tgui_alert (#58419)
Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?
2021-05-20 22:43:27 +12:00
Seris02
ff2f6abe83 Sort the majority of the rest of the unsorted chat (#58821)
* FINALLY IT IS DONE FUCK

* tip of the round into ooc

* adds cyopod chat messages to the info chat filter

* last one I promise probably, mob spawner messages to info filter

* holoparasite, round will start in x and keybinding conflict to respective filters

* removed motd from constants, made it infoplain surrounded instead

* changed info to infoplain
2021-05-05 05:57:40 +03:00
ArcaneDefence
3476d18620 Fixes multiple issues related to suicides (#58178) 2021-04-06 16:40:10 -07:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Ryll Ryll
e6cae4fac5 Improves friendly commendation code (#56453) 2021-02-05 01:42:34 -08:00
Qustinnus
707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00
Emmanuel S
222cdccd10 [bounty code moment] Adds a way to view the 'Server's Last Round' (#55646)
* Adds "View Last Server Round Report" option.
2021-01-12 18:22:26 +01:00
Seris02
a6f93b4f96 Some of the unsorted chat types being sorted (#55947)
The emote CSS class was no longer in use, it has been unitalicized and made into the actual emote class, back into local.
    A CSS class for info has been created which has no special CSS.
    The who verb has been put into info. (infoplain CSS class)
    PDA message receiving has been put into info (PDA message sending was already in info). (infoplain CSS class)
    Supply radio has been properly placed into radio.
    Service radio has been properly placed into radio.
    Binary talk has been placed into radio.
    A CSS class for minor announcements has been created.
    Minor announcements (shuttle purchases, head of staff office announcements, silicon announcements, etc) have been placed into radio (major announcements are already in radio). (minorannounce CSS class)
2021-01-06 12:20:40 -03:00
Qustinnus
f66ca34626 Refactors monkeys into a species (#55614)
Changes monkeys from carbon subtype to species.
2020-12-30 16:30:15 +01:00
KathrinBailey
f3b2802b9c Fixes an oversight allowing players to list ckeys and the names of the mobs they're controlling under certain conditions (#55332)
About The Pull Request

• Resolves a probably unknown oversight allowing players to find out who plays who by using the ignore verb, which if the user is a ghost, will list the names of people's mobs alongside their ckey if they are also a ghost.
Why It's Good For The Game

Removes a potential method of metagrudging and addresses a privacy concern for those who wish to play anonymous characters. Yes, you can still see this stuff in the round-end report.
We don't lose anything here. If we're using this verb, we're doing it because we want to ignore someone's OOC messages. We don't need this additional information. I feel like this is just an oversight.
Changelog

🆑
fix: Players can no longer us the ignore verb to gather a list of people's characters and ckeys together.
/🆑
2020-12-13 18:43:39 +13:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Jared-Fogle
80bb4cd03f New view tracked playtime menu (#54681)
* New view tracked playtime menu

* Put living/ghost in their own category
2020-11-03 03:43:17 +02:00
Rohesie
5beb871aea [s] Reworks the sanitize_ooccolor proc (#54221)
* Reworks the sanitize_ooccolor proc

* regex

* cleanup

* grammer is herd
2020-10-08 23:23:13 +08:00
anconfuzedrock
cbc6842e8c adds a new default "dance" suicide. (#54040)
About The Pull Request

This adds a new default help intent suicide, a dance.
Why It's Good For The Game

I think fondly of our suicides getting more and more fun over time, and even the defaults go from "bites his tongue" to now "getting high on life" and I think this is a fun new default suicide.
Changelog

cl
add: adds a new default suicide, a dance.
/cl
2020-09-30 14:07:58 +13:00
Rohesie
b3eb90b5e9 Fixes cases of held keys getting stuck (#53988) 2020-09-29 01:20:11 -07:00
Jared-Fogle
b79daed120 Remove tab before names in Who for deadmins (#53930)
Previously, names were prefixed with tabs for deadmins. This makes the output look significantly worse.
2020-09-26 21:38:33 -07:00
Jared-Fogle
e0b6f80912 Change the "Who" verb to display a table rather than a list (#53839)
Doesn't apply for active admins since those have longer lines that wouldn't fit well.
2020-09-23 06:53:28 -03:00
Rohesie
8b224ef13e Refactors the keys_held rolling buffer (#53773)
* rolling key rip

* category

* comment

* oops
2020-09-20 15:01:21 -07:00
Timberpoes
6f2bcf879a Add additional info to a runtime situation to be able to handle it better in the future. (#53727)
Added two CRASHes for two areas where this could go wrong to better understand what and why this is happening.
2020-09-15 19:16:10 -04:00
Couls
75cdfc88f6 Optimize stat panel and fix guardian verbs (#53463)
Optimizes stat panel code for better performance, including icon caching and removing some unnecessary processing
Also fixes #53432
fix #53381
fix #53724
Changelog

add: icons are back on alt clicks
fix: horrible performance from alt clicking turfs with multiple objects
tweak:browser should notify the SS when it's ready to receive data

* Update statbrowser.html

* Apply suggestions from code review

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>

* hidden = TRUE

* almost ready

* Browser should notify when ready to receive data

* Apply MSO's suggestions

* reset cache if something in it gets deleted

* Fix runtime

* fix my stupid code

* send href_token when adding admin tabs

* fix an issue with cyborg suit topic

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-14 23:36:46 -07:00
Tad Hardesty
3ad54d0606 Avoid resizing chat to nothing in the Fit Viewport verb (#53393) 2020-09-04 23:08:11 +03:00
TiviPlus
ca366c3ea1 Bools and returns super-pr (#53221)
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is

Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
2020-08-28 14:26:37 -07:00
Couls
e7f99e3b8b Browser Status Panel (#53112) 2020-08-27 15:28:03 -07:00
Rohesie
3a1020e47d Crit status refactor (#53117) 2020-08-24 07:41:00 -07:00
Aleksej Komarov
0e1b20e6db tgchat (#52426)
Replaces goonchat with a tgui based chat panel

    Fixes #52898
    Fixes #52663

It is as fast as goonchat was (if not faster in certain circumstances), and is very extensible. It has all the necessary code for sorting messages into categories, which means that one of the next features will be multiple tab support.

Additional features that you will get with tgchat right now:
    Massively faster server-side performance compared to goonchat, especially if batching multiple messages to one client.
    Message persistence across rounds and reconnects. (All messages are stored client-side in IndexedDB)
    More robust scroll tracking. If you scroll up, it will not change the scroll position on new messages like goonchat did.
    Multiple message combining. (Currently set to combine up to 5 messages over last 5 seconds).
    If using the highlighting feature, it highlights the whole message as well as the matching word.
    "Now playing" widget, with preview of the song title, a knob for adjusting the volume and a stop button.

Architecture is as following:
```
to_chat() -+
           |
        SSchat
   (queue, batching)
           |
  window.send_message()
           |
           v
+-------------+
| tgui-panel  |
|+-----------+|
|| tgchat    ||
|+-----------+|
+-------------+
```

Subsystem is basically goonchat, but without all the garbage that slows the servers down (string concatenation, double urlencoding, sanitizing, etc). Now, instead of all that, it's being slowed down by json_encode in /datum/tgui_window/proc/send_message, which IMO is completely worth it, and allows sending various templates and widgets to tgchat.

/datum/tgui_window abstracts the whole window away from you, establishes a nice message-passing interface between DM and JS, with two message queues on each side, automatically loads js/css assets for you, basically does everything. You as a developer only have to worry about sending/receiving messages and write javascript.

tgui-panel is a slimmed down version of tgui, and functions as a container for various widgets, and tgchat is one of them. It of course can be expanded with more stuff.

It's also a separate entry point and a JS bundle, so it's not bloating the main tgui bundle, and is currently sitting at about 230kB.
2020-08-14 13:21:40 +12:00
TiviPlus
b4fe4f717b Refactors area stuff (#52751)
-bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot
-Unused vars
-Fixed a var pretending to be a fake bool
-Probably more
2020-08-10 16:31:59 -03:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
tralezab
7af27992b5 [READY] Mafia Documentation and Improvements (#52065)
* controller doc'd

* k traitors work, can't target themselves and sounds for gamestart is louder

* ARGUMENTS!

* missed one tee hee

* better sound playing, ghosts can hear the game sometimes

* removal of "= null"

Co-authored-by: ラッピ from PSO2 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>

* clearer explanation

Co-authored-by: ラッピ from PSO2 <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
2020-07-08 16:44:42 -04:00
nemvar
b87f65d95e Converts ALL typepaths to lowercase (#51642)
* Case of lower

* More changes

* Ruins the nice 420 diff, brainfart when doing the second batch of conversions

* More changes

* Next batch. I think

* Converts even more paths

* Restarts bots

* Capital Free Zone

* Come on travis, do something

* Renames areas

* Bots, please stop dying

* Updates CONTRIBUTING.md and updates a few paths I missed.

* APC recgarftzfvas
/obj/item/computer_hardware/recharger/apc to /obj/item/computer_hardware/recharger/apc_recharger
2020-06-17 20:47:57 -03:00
Tümer Türkmen
e314669651 ooc no longer checks if message is ic if round hasn't started (#51660)
* pog

* fixed

* oops
2020-06-16 12:18:04 -04:00
PrimordialOoze
60a9158a9b Better Player Ignore (#51353)
* Revamp the player ignore system

* Move a variable definition out of a loop

* Replace a |= with +=

* Improve some code

* Fix some code

Co-authored-by: Local <none>
2020-06-01 01:01:40 +02:00
Ryll Ryll
753af7bda5 Adds friendly commendations (#51217)
* with message

* remove message, neaten up
2020-05-25 01:49:12 +08:00
peoplearestrange
c8bd6a175d changes to category
changes Administration to Admin
2020-02-04 20:23:30 +00:00
peoplearestrange
060d16d5eb Changes to category
changes Administration to Admin
2020-02-04 20:23:13 +00:00
peoplearestrange
75304837f0 Changes Category
Adminwho = Administration
2020-02-04 04:36:01 +00:00
peoplearestrange
c9f82866ae Changes Category
Set player OOC color = Server
Reset player OOC color = Server
Adminnotice = Administration
2020-02-04 04:35:21 +00:00
MrPerson
12eecfd181 Makes raw HTML and browser datum popups UTF-8 aware (#49066)
* Makes raw HTML and browser datum popups UTF-8 aware

Admin menus specifically really shouldn't break just because you named some guy "☺s the Clown"

* Fixed new_player.dm

* Fucking filing cabinets
2020-02-01 22:14:31 +01:00
skoglol
b735d25cb6 Swaps boh and ooc confirm dialog button positions (#48905)
* Swaps boh confirm dialog button positions

* and the ooc alert
2020-01-22 12:52:17 -05:00
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
skoglol
10de2370cf New disarm intent suicide (#47902)
About The Pull Request

Adds a new disarm intent suicide. Fixes the intent logic, it will now run different suicides for disarm and grab. Added some ghostize that I overlooked last time.

https://streamable.com/ifx25
Why It's Good For The Game

Fixes, silly new content
Changelog

cl Skoglol
fix: All human intent suicides now work properly
add: New disarm intent suicide
/cl
2019-12-10 20:44:28 +13:00
Bobbahbrown
0d7ef73b17 Refactors References to IRC to be TGS (#47954)
* TGS updates round 1

* TGS updates round 2
2019-11-30 03:59:42 -08:00
skoglol
ad0d270d58 Cleans up observer mind on control transfer, ghosting, DNR, suicide (#47826)
* Fixes admin ghost drag

* Covers more cases

* And assume control
2019-11-18 17:59:47 +00:00
Couls
971ef6a416 Custom movement hotkeys and restore macros for T, O and M (#47626)
* Custom movement hotkeys and restore macros for T, O and M

* stray comma

* update movement keys on SSinput initialize

* use cardinals
2019-11-07 18:07:17 -05:00
Couls
65ce56587c fixes modifier hotkeys and adds alternative move intent toggle (#47569)
* fixes modifier hotkeys and adds alternative move intent toggle

* Fixes pulling keybind

* make the wrappers look more like the old popup windows

* it was the freaking save file

* bump up save file version

* reset keybindings to default
2019-11-06 04:20:30 -08:00
spookydonut
2591ce17a6 Travis EOF newline detection v3 (#47539)
* scream

* aaa

* aaa

* new one
2019-11-04 19:16:50 -08:00
Couls
070bb5e69c Port Custom hotkeys from TGMC (#47003)
* custom keybindings

* Update _lists.dm

* Update robot.dm

* modify weights and clean up some vars

* Update say.dm

* Apply suggestions from code review

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>

* some review changes

* formatting

* include focus hack, remove me_wrapper, give default keybinds to new characters, misc fixes

* revert hack and more reviews

* remove another focus hack

this was causing issues with the keydown proc returning early
2019-11-03 01:35:30 -07:00
Brett Williams
77d3fd8136 jannies get this too 2019-10-31 12:27:56 -03:00
Brett Williams
c13585621d we fixed it for real 2019-10-31 00:43:33 -03:00
kingofkosmos
8358169b8e New 'hear' span class (#46369)
* Reverts italics-span back to no color.

* Cleans up many extra spaces and indents.

* Adds 'hear' span class.

* Replaces all 'italics' used in heard messages with 'hear'.
2019-09-14 23:56:34 -07:00
bgobandit
90fbce8d95 ignoring OOC players should display the correct name (#46155)
About The Pull Request

Fixes #46039. Or should at least I haven't tested it.

please note I did not write the ignoring code
Why It's Good For The Game

bug, fix, etc
Changelog

cl bandit
fix: Fixed an erroneous message with ignoring a player's OOC messages.
/cl
2019-08-28 11:11:30 +12:00