Commit Graph

65 Commits

Author SHA1 Message Date
SyncIt21
8a1b4e8d01 Remove unused output var from sql_message_system.dm (#80951)
## About The Pull Request
Fixes this
![Screenshot
(382)](https://github.com/tgstation/tgstation/assets/110812394/39f8ae38-0632-4429-9d46-3355d16b9e86)

## Changelog
N/A
2024-01-15 22:05:46 +01:00
LemonInTheDark
2ed5a9fca0 Fixes the "Saw this admin message" button not working (#80908)
## About The Pull Request

Wrong fuckin name brother (also topic doesn't automake textnums into
nums)

## Why It's Good For The Game

Closes #80020

## Changelog
🆑
admin: Confirming that you have read an admin message now uh, works.
it's been 2 years bros
/🆑
2024-01-13 16:13:45 -07:00
lessthanthree
fdaec05ebe Watchlist notification text color (#73304)
## About The Pull Request
Changes the adminnotice text for watchlists to a similar pink used in
the TGUI box for asay.


![image](https://user-images.githubusercontent.com/83487515/217653246-e13b91dd-d510-447a-9460-c0d03865898f.png)

![image](https://user-images.githubusercontent.com/83487515/217653391-562fa69a-a7b9-4057-afd2-0055cdcc7756.png)

## Why It's Good For The Game
Color has better contrast for dark mode users (where it's currently a
pain) without much of a contrast hit for light mode users. For
accessibility, WCAG 2.0 level AA requires a contrast ratio of at least
4.5:1. D100D1 scores 4.53:1 on white and 4.63:1 on black, meeting
standards for both.
## Changelog
🆑 LT3
admin: Changed color for watchlist notifications
/🆑
2023-02-09 23:18:44 -07:00
Jeremiah
872e64fb05 Adds spaces around logical operators (#72603)
## About The Pull Request
Part of a prior PR that was closed (#72562). This version does not add
the check in CI.
## Why It's Good For The Game
The work is already done, so I figured why not.
## Changelog
N/A Nothing player facing

Co-authored-by: Jeremiah Snow <jlsnow301@pm.me>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-16 16:56:35 -08:00
san7890
fccf93e133 Fixes weird blank in Watchlist Update Messages when adding a expiration date (#69897)
When you add a watchlist expiration date without having previously set one, the logged message should now be more clear as to this.
2022-09-14 23:18:34 -07:00
wesoda25
a9f7acedd2 Slight change to admin messages, ensuring people actually see and read them (take 2) (#65871)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-04-03 15:57:29 -07:00
AnturK
db4310d8c5 Fixes a few runtimes with armor, spatial grids, and notes (#64514)
* Atoms  (mostly new players caused by logout) can get deleted before spatial grid initializes.

* Fixes images when viewing your notes before SSassets initializes.

* Fixes abandoned crate runtime.

* Fixes armor runtimes on eating clothes (this really needs alternative solution)
2022-01-29 22:04:54 -05:00
Nick
2b411035c4 Adds additional DB logging for admin help interactions (#62994)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-11-22 14:53:08 -08:00
Watermelon914
9c3fb6cfd7 [s] Hotfix notes not belonging to players being shown to players (#62352)
See title.
Other players will no longer see other player's notes when they connect to the server.
Memos will still be shown to admins.

Things that I have tested in the making of this PR:

    Notes of a player not being shown to other players definitely work
    Notes of a player being shown to a player definitely work.
    Memos are still shown to admins.

Closes #62348
2021-10-26 13:53:01 -04:00
Watermelon914
001db28eac Players now see any notes they may have gotten whilst disconnected when they join the server for the next time (#62063)
Players no longer find out they were noted days later when they check their notes for any notes/bans applied by an admin.
2021-10-25 11:22:57 -04:00
Jordie
db4f3972a1 Display round id in notes panel (#60811)
Round id when a note was made in now displayed in the notes panel
2021-08-12 02:44:57 -03:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
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
Jordie
1dcd9b4438 fix living playtime subquery and display (#55893) 2021-01-02 12:49:33 -03:00
MissFox0810
c0a4df5efb Add playtime tracking to notes (#55800)
* Added playertime tracking to player notes

* Updated sql change log with revision

* Fixed typo in db_query

* And fixed another typo with query_get...

* Add recomended changes from Jordie0608

* Added missing DEFAULT NULL to sql

Co-authored-by: MissFox <github@aesir.org.uk>
2021-01-01 21:10:27 +11:00
Kyle Spier-Swenson
8df93ba39e [Ready] CDN browser assets! (#52681)
Rewrites the asset_cache system to handle sending assets to a CDN via a webroot.

see https://github.com/MrStonedOne/tgstation/blob/asset-cdn/code/modules/asset_cache/readme.md

Fixed a lot of bugs with assets, removed some dead code.

Changes:
    Moved asset cache code to transport datums, the currently loaded one is located at SSassets.transport, asset cache calls made before the config is loaded use the simple browse_rsc transport.
    Added subsystem call for when the config loads or reloads.
    Added a webroot CDN asset transport. assets are saved to a file in a format based on the file's hash (currently md5).
    Assets that don't use get_asset_url or get_url_mappings (such as browser assets referred to by static html files like changelog.html or static css files) can be saved to browse_rsc even when in cdn asset mode by setting legacy to TRUE on the datum returned by register_assets
    Added a system for saving assets on a cdn in a hash based namespace (folder), assets within the same namespace will always be able to refer to each other by relative names. (used to allow cdn'ing font awesome without having to make something that regenerates it's css files.).
    The simple/namespaced asset cache datum helper will handle generating a namespace composed of the combined md5 of everything in the same datum, as well as registering them properly.
    Moved external resource from a snowflake loaded file to a config entry, added it to resources.txt
    To ensure the system breaks in local testing in any situation that wouldn't work in cdn mode, the simple transport will mutate the filenames of non-legacy and non-namespaced assets and return this with get_asset_url.
    Simple transport's passive send of all roundstart assets to all clients is now a config that defaults to off. this is to break race conditions during local testings from devs accidentally relying on this instead of using send() properly.

cl
refactor: Interface assets (js/css/images) can now be managed using an external webserver instead of byond's one at a time file transfer queue.
admin: Adds admin verb toggle-cdn that allows admins to disable the external webserver asset transport and revert to the old system. Useful if the webserver backing this goes down (thanks cloudflare).
config: New config file, resources.txt, (must be loaded by an $include statement from the main config)
server: The external_rsc_urls.txt config has been moved to the main config system.
/cl
Porting notes:

Interface webpages must refer to their assets (css/js/image/etc) by a generated url, or the asset must register itself as a legacy asset. The system is designed to break in localtest (on simple/legacy mode) in most situations that would break in cdn mode.

Requires latest tgui.

The webserver must set the proper CORS headers for font files or font awesome (and other fonts) won't load.

/tg/'s webserver config: https://gist.github.com/MrStonedOne/523388b2f161af832292d98a8aad0eae
2020-08-12 13:51:43 +12: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
Jordie
68db4a0c23 fix ban note expiry time (#51636)
Expiry time was being inserted as 0000-00-00 00:00:00 when NULL was expected for non-expiring notes.
2020-06-14 18:34:41 +12:00
Tad Hardesty
829e95896e Replace BSQL with rust-g, paramaterize all queries (#51255)
cl
refactor: BSQL has been replaced with rust-g, improving SQL reliability and safety.
/cl

Queries were parameterized as much as possible. Careful code read by someone else also versed in SQL would be a good idea. Things seemed fine spot-testing roundstart, library, bans, and polls, but more stress-testing may be useful.

Also updates rust-g to v0.4.5:

    Improved Linux .so detection
    Perlin noise functions

Also updates Travis script to bionic.
2020-06-08 16:00:07 +12:00
Jordie
4c7dfbc655 adds recording who deleted a note (#50445)
It came up that this isn't recorded, only logged.

Technically needs syncing merge with schema change but only deleting notes would break from this and tbh that isn't done very often so I think it'd be fine to yolo.
2020-04-18 11:28:34 +12:00
Rob Bailey
c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00
ShizCalev
7209ac3c93 Removes unnessacary math defines 2020-02-17 23:09:09 -05: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
Tad Hardesty
1433e48eba Fix some proc calls with bad keyword arguments 2019-03-09 12:56:19 -08:00
Jordan Brown
bd7c22dda9 Moves TgsInitializationsComplete call to immediately after world/New() (#39771)
* Moves TgsInitializationsComplete call to immediately after world/New()

* Subsystem PreInit data directory audit

* world/New data directory audit

* Needful here too

* Remove SS_NO_INIT from SStitle

* Don't create banlist.bdb for SQL banning

* Stop creating legacy notes file

* Moves iconCache from data to tmp
2018-09-15 21:34:14 +12:00
Jordie0608
d5c42bc79c Merge branch 'master' of https://github.com/tgstation/tgstation into onedayillmakeeveryquerylongenoughtowrapontothenextline 2018-08-26 20:53:05 +10:00
CitrusGender
bb2c82375e Add Note severity and changes UI of administrative notes (#39808)
* Adds note_severity and updates dbconfig. New SQL stuff too.

* whoops please don't hack into my database >:^(

* UI change, changed how it's stored in the DB, removed some queries when it returns, changed stuff to key.

* Update sql_message_system.dm

* this was not defined

* random indent

* wait how did this get here

* okay enough web edits I promise

* just kidding I got u

* Update common.css

* Added buttons, changed UI again, standardized the inputs, added severity for appearance bans, fed the dog

* forgot about the banning panel

* added an asset cache

* corrects asset datum var name
2018-08-26 20:23:29 +10:00
Jordie0608
3f881722e8 adds query safety for getting ckeys not in player table 2018-08-26 01:45:25 +10:00
Jordie0608
46fecfdc99 fix missing ckey to key in edit_meesage_expiry 2018-08-16 20:43:02 +10:00
Ling
73e300d8df Add some missing query qdels (#39726)
* qdel some more queires

* Another one
2018-08-16 03:16:57 +03:00
Jordie
b675aa03db fix adding notes for ckeys without any (#39677) 2018-08-13 22:43:03 +03:00
Jordie0608
17dc011101 fixes messages not having targetckey 2018-08-12 08:12:37 +10:00
Jordie
31f020f3cc Add expiration time for admin messages (#39502)
* add expiration time for messages

* typo

* fix

* src to usr

* allows removing expiry from existing messages

* cancel button
2018-08-12 06:31:14 +10:00
Jordie
0d7ef3ed65 Key instead of ckey for user facing logs and ui (#39009)
* converts to using key instead of ckey for user facing logs and ui

* more key_name for airlock wires

* futureproofing check for if key changes

* --onlyckeymatch script argument and fail/success counter

* fix
2018-08-11 02:15:50 +10:00
Jordan Brown
b1fc23c4c0 Fix undeleted note edit query (#39238) 2018-07-20 19:44:02 -07:00
AnturK
5a13417149 Fixes note deletion logging. (#39060)
* Fixes note deletion logging.

* Ok
2018-07-12 17:27:48 +10:00
Jordan Brown
cf7e8aa9ec Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling

* DB Core messages admins about undeleted queries

* Compile fixes. Adds missing set waitfor

* Remove world/New shennanigans. Add DBQuery/BlockingExecute()

* Less spammy notifications to admins about undeleted queries

* Increase dbcore fire time to 1 minute

* Upgrade undeleted query warning

* Better place of death

* Fix build

* Remove BlockingExecute, see BSQL PR for why

* Yep, missed that one.

* Psyche, that's the WRONG QUERY!!
2018-06-18 22:48:35 +03:00
MrStonedOne
0814e09bd5 Fix warning. 2018-06-09 11:24:34 -07:00
MrStonedOne
7f323c1dfe Fixes note interface flooding the string tree. 2018-06-08 23:42:57 -07:00
KorPhaeron
a0e1f05519 Watchlist timestamps 2018-01-28 14:25:07 -06:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* Revert "all this wrapping and it's not even christmas (#33035)"

This reverts commit faaf151580.

* Revert "fuck me for forgetting to graph this one"

This reverts commit 45d7acea2f.

* Revert "defines math"

This reverts commit 2817a1737b.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
Jordan Brown
4178c209f1 Configuration datum refactor (#30763)
* Configuration datum refactor

* More WIP

* New easier on the eyes format

* More WIP

* Finished config.txt

* Fucktons more WIP

* The end of conversion draws near...

* Add all this shit

* Done converting entries finally

* Hunting down compile errors

* More WIP

* MORE CONVERSIONS

* More WIP

* More WIP

* Oh shit only 90 errors this time!

* IT COMPILES!!!

* Fixes world start runtimes
2017-09-29 15:36:51 +13:00
Jordan Brown
5f75559540 Fixes missing Href tokens (#30987)
* Fixes missing Href tokens

* Add missing form field. Fixes #30986
2017-09-26 14:26:42 +02:00
ShizCalev
9cd4677eb9 Href tokens 2017-09-23 01:00:52 -04:00
Jordan Brown
0e40bc4f9b Adds more missing href tokens (#30664) 2017-09-14 09:16:06 +02:00
Jordan Brown
84b1e3d71e [s] Adds a security token to all admin hrefs (#29839)
There's a certain issue of people spoofing real byond links to admins. Now all links should come with a generated key that is validated when the Topic is run.

Added DEBUG_ADMIN_HREFS to debug this system while we test it (Allows hrefs without tokens and complains about it in the logs)

Just add [HrefToken()] as a parameter to all admin hrefs. Anything that ends up running through VV or Holder will be verified
2017-09-09 12:15:53 +10:00
MrStonedOne
f3bf3663cc Actually, lets make it say how many are hidden. 2017-08-30 23:34:04 -07:00
MrStonedOne
a27a454c4a Make the fact there are hidden notes more obvious.
We print the first note that would be skipped then pixel shift the show all button over the skipped noted.

The rest after that are not printed
2017-08-30 22:11:08 -07:00