Commit Graph

100 Commits

Author SHA1 Message Date
MrMelbert
d1cadb24f9 Vote clean up and admin additions (#82981)
## About The Pull Request

- Fixes `vote_delay` not being a thing. I broke this two years ago but
there's no bug report associated.

- Admins can now reset the vote delay (to let people vote again
instantly)

- Admins can now end the current vote immediately (rather than
cancelling)

- Custom multi and custom single combined into one vote

## Why It's Good For The Game

Makes voting a bit easier to use, both for admins and for coders adding
new votes.


![image](https://github.com/tgstation/tgstation/assets/51863163/40b8857c-76b7-4a58-82bc-1b82640d550a)

## Changelog

🆑 Melbert
admin: Custom Single and Custom Multi votes are now combined into one
vote
admin: Admins can now end votes instantly, rather than cancelling them
admin: Admins can now reset the vote cooldown
fix: Vote cooldown actually applies now
/🆑
2024-05-01 16:55:01 -06:00
Zephyr
cbcf5a7108 ip intel mk2 (#82683)
Do not merge this without coordinating with your server's host.

## About The Pull Request

Slightly refactors the way we handle IP intel.
You can still use the old data stored in the database.
Adds the ability to automatically reject connections determined by
config flags.

## Why It's Good For The Game

We used to have IP intel to check for VPNs, although it was disabled due
to being bad and unhelpful.
This refactor should make it much more manageable for hosts and admins.

## HOSTS BEWARE
This adds a new SQL table `ipintel_whitelist`
Look at the schema!

## Changelog

🆑
admin: The return of IPIntel
/🆑

---------

Co-authored-by: MrStonedOne <kyleshome@gmail.com>
Co-authored-by: oranges <email@oranges.net.nz>
2024-04-26 14:52:54 +12:00
MrMelbert
a69ede8114 Adds respawn config option forcing respawn as another character slot (#78459)
## About The Pull Request

Adds an option to the respawn config which forces you to pick another
character (slot) before you respawn.

## Why It's Good For The Game

Just an idea i'm throwing out there, not necessarily pushing for it to
be enabled on any servers.

Respawning as an alternative character can be a good way to make people
less frustrated at dying, particularly if paired with the cooldown
config that already exists:

"Oh shucks, I died and got my head cut off and got absorbed and got
spaced by some changeling. I won't be able to finish my project or
whatever. At least in 15 minutes I may be able to join as my botanist
character to try something else rather than having to wait an hour and a
half for the round to tick over."

Also nice for downstream support. 

(Obviously you can just, *ban* people who respawn as the same character,
use an honor system, but codifying it seems better than not.)

## Changelog

🆑 Melbert
config: Adds a config option for player respawning that enables
respawns, but forces you pick a new character.
config: "NORESPAWN" has been replaced with "ALLOW_RESPAWN 0". Unlimited
respawns is "ALLOW_RESPAWN 1" and character limited respawns is
"ALLOW_RESPAWN 2".
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-09-26 19:17:37 -06:00
Striders13
bf6648b3a9 Makes client upload limit a config, bumps admin file size upload limit to 5mb (from 2.5mb) (#77708)
## About The Pull Request
Makes client upload limit a config. Increases max file size admins can
upload to 5mb, up from 2.5mb.
## Why It's Good For The Game
Makes it easier to do custom maps for events. Some of our in-game maps
are already larger than 2.5mb (delta is almost 3mb).
## Changelog
🆑
admin: admins can now upload files to the server up to 5mb (used to be
2.5mb)
config: file upload restriction is now config
/🆑
2023-08-19 12:19:55 -06:00
Vekter
a8737f7d58 Removes redundant CID randomizer check (#76396)
## About The Pull Request
This check is redundant because 512 fixed the exploit it was designed to
check. Randomizers still exist, but this code doesn't apply to them
since they use a different method.

Someone else tried this before but got his shit slapped for it being his
first PR and there being a possibility he was removing it so he could
bypass it. I'm not banned and have no possible ulterior motives; I just
want to get rid of dead code.

## Why It's Good For The Game
I'd make an Old Yeller joke, but the code's already dead, so.

Fixes #43227

## Changelog

This is not a player-facing change.
2023-06-30 20:59:50 +01:00
LemonInTheDark
d93e81c2fc Emergency Profile Dumps (#75924)
## About The Pull Request

Adds some hooks to the MC that detect if something ate a ton of real
time last tick, and reacts by dumping our current profile into a file

It's really frustrating to see a spike in td in our performance logs,
but see no reason in the profile because it's only taken every 5
minutes. This resolves that

I'm throwing this up so mso can give it a look over, not sure if I want
to use defines or configs here, taking suggestions

🆑
server: Adds a system to emergency dump profiles if too much time passes
between ticks
config: Added configs that control how often emergency profiles are
allowed to dump, alongside the threshold for what counts as too much
time between ticks
/🆑
2023-06-23 10:35:43 +02:00
larentoun
036cfc84c8 feat: Respawn delay (optional) (#75544)
## About The Pull Request
Adds optional (disabled by default) respawn delay. If the player is
observer and have a body, it will firstly check the body. If the body is
destroyed or if there was none, then it will check observer's login
time.

## Why It's Good For The Game
Optional respawn delay is good, when you want players to comeback not
only as a midround event, but don't want them to not care about their
life. Also, if respawn is enabled, removes "money dupe" and other
problems with 0 respawn delay.

This proc can also be used for ghost-roles or anything else, where we
need to check how much time has elapsed since their death, but is not
implemented here.

## Changelog
🆑
add: Added optional respawn delay (disabled by default), which prevents
returning to lobby while dead.
/🆑
2023-06-08 23:28:45 -06:00
Zephyr
fbec9c14e9 JSON Logging Take Two (#73604)
## About The Pull Request

Converts all logging, excluding perf and investigate, to json.
I focused on making the system as easy to use and as easy to add new
categories as possible.

Due to issues related to logging to world at global creation logger is
now a byond real, which is created directly before Master

Log categories support versioning, secret flagging, and sub-category
filtering. Although all of this is entirely optional for coders.
If you ever want to add a new category and use it, all you need to do is
make the barebones category datum and the define.
I've kept existing procs such as log_game, and simply turned them into a
wrapper for Logger.Log(xxx, ...)
## Why It's Good For The Game

Makes processing and filtering logs much easier in the future, while
only minimally downgrading log crawling experience.
I am also working on a log viewer frontend for admin usage however that
will take a little bit longer to finish up.
Also makes special logging and data tracking much easier thanks to a
data list processing implementation and handling
## Changelog
🆑
server: All logs are now formatted in json, excluding perf and
investigations
/🆑

---------

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-05-22 14:51:00 +12:00
san7890
912e843f53 Allows Export of your Preferences JSON File (#75014)
## About The Pull Request

Hey there,

This was spoken about in #70492 (specifically
https://github.com/tgstation/tgstation/pull/70492#issuecomment-1278069607),
and I have been waiting for this to be implemented for some time. It
never got implemented, so I decided to code it myself.

Basically, **if the server host doesn't disable it**, you are free to
export your JSONs as a player, right from the stat-panel. It's a pretty
JSON on 515 versions, too!

It's right here:


![image](https://user-images.githubusercontent.com/34697715/235251447-1c977718-51fd-4025-8d89-c60bffc379ec.png)

Here's what the prettified JSON looks like on 515.


![image](https://user-images.githubusercontent.com/34697715/235321061-4a217e26-c082-4bba-b54a-2c780defda0a.png)

There's a cooldown (default to 10 seconds) between exporting your
preferences.

#### Why is this config?

It's because in the past, a server host could always just file-share the
.sav or .json or whatever to the player, but they would have to do the
explicit option of actually bothering to make the files accessible to
the player. In that same line of logic, the server operator will have to
explicitly make the files accessible. This is mostly because I'm not
sure how good `ftp()` is at being a player function and wanted to have
some sort of cap/control somehow in case an exploit vector is detected
or it's just plain spammed by bots, so we'll just leave it up to the
direct providers of this data to elect if they wish to provide the data
or not.
## Why It's Good For The Game

Players don't have to log into Server A to remember what hairstyle they
loved using when they want to swap to Server B! That's amazing actually.
I always forget what ponytail my character has, and it'll be nice to
have the hairstyle in a readily accessible place (after I prettify the
JSON for myself).

It's also more convenient for server hosts to make player data like this
accessible if they really want to, too.

If we ever add an _import_ feature in the future (which would have to be
done with a LOT of care), this will also be useful. I wouldn't advise it
though having taken a precursory look at how much goes into it while
trying to ascertain the scope of this PR.
## Changelog
🆑
qol: The game now supports export of your preferences into a JSON file!
The verb (export-preferences) should now be available in the OOC tab of
your stat-panel if enabled by server operators.
server: Exporting player preferences is controlled by a configuration
option, 'FORBID_PREFERENCES_EXPORT'. If you do not wish to let clients
access the ftp() function to their own preferences file (probably for
bandwidth reasons?) you should uncomment this or add it to your config
somehow.
config: Server operators are also able to set the cooldown between
requests to download the JSON Preferences file via the
'SECONDS_COOLDOWN_FOR_PREFERENCES_EXPORT' config option.
/🆑
2023-05-02 08:22:44 -07:00
san7890
b3f5dfae14 Config Flag to Save Generated Spritesheets to Logs (#74884)
## About The Pull Request

I was helping someone debug some weird bug with spritesheets a bit ago,
and I didn't like having to manually comment out all of the `fdel()`
stuff in order to help visualize what the potential issue might have
been with the spritesheets on either their DM-side generation or their
TGUI-level display. I decided to add a compile-time level flag that will
automatically copy over any generated spritesheet assets (css and pngs)
to the round-specific `data/logs` folder for analysis when a developer
should need it.

I also had to switch around some vars and make a few new ones to reduce
how copy-pasta it might get and ensure standardization/readability while
also being 0.001 times faster since we benefit from the string cache
(unprovable fact).
## Why It's Good For The Game

It's incredibly useful to see the actual flattened spritesheet itself
sometimes when you're doing this type of work and you keep getting odd
bugs here and there. Also saves headache from having to clear out the
temp `/data/spritesheets` folder every time you comment shit out, as
well as having an effective paper trail for A/B testing whatever
bullshit you've got going on.


![image](https://user-images.githubusercontent.com/34697715/233516033-1f5dde1a-e549-4e5a-aa99-0d531b34fbb5.png)
## Changelog
Doesn't affect players.
2023-04-23 23:05:56 -07:00
SomeRandomOwl
b2f6058c92 Music Widget Modifications + Request Music Verb (#74170)
## About The Pull Request

This PR alters the Play Internet Sound, First off it modifies the Widget
To clean up some info on the widget to hide information when that
information is not available to be shown. Secondly it makes the URL
input prompt for Play Internet Sound to be a TGUI text input box, as
well as adds in a warning if a song being played is >10 minutes long,
and adds in a proc to play music with a supplied variable.

Secondly This PR adds in a new player facing VERB in the OOC tab called
`Request Internet Sound` functionally the verb is similar to Pray but it
grants admins the ability to play URL's directly from the chat or
Request Manager, where it will prompt the admin if they wish to play the
song.

<details>
<summary>Screenshots/Videos</summary>


![dreamseeker_PJ1PCCWxT3](https://user-images.githubusercontent.com/2568378/226795466-541def6e-d1cc-4481-b14a-21d2690c80b3.png)

<details>
<summary>Widget</summary>


![image](https://user-images.githubusercontent.com/2568378/226794671-ab1f6f3f-08e4-44f7-9569-634ff70e8462.png)

![image](https://user-images.githubusercontent.com/2568378/226794685-4f2e71bd-c3f9-4409-86f1-8b5be28bed41.png)

![image](https://user-images.githubusercontent.com/2568378/226794696-2725fadf-0066-4cd4-b975-e9e69f1ef4c9.png)
</details>

<details>
<summary>New Prompts</summary>


![tO6QsZdHfe](https://user-images.githubusercontent.com/2568378/226794891-ce2e6737-409d-479c-90f2-57d55fc89561.png)

![RZVwU417nX](https://user-images.githubusercontent.com/2568378/226794912-0261e374-a7fa-4864-b5b8-99821cff32a8.png)
</details>

<details>
<summary>Videos</summary>


https://user-images.githubusercontent.com/2568378/226794939-4ca018b3-bba5-4893-9301-6858b0d433b9.mp4


https://user-images.githubusercontent.com/2568378/226794783-ca750840-3149-489c-9239-00014ac4ca5c.mp4
</details>
</details>

## Why It's Good For The Game

This cleans up the UI for the Play Internet Sound so that things to hide
info when admins choose to hide it, or to not show it if that
information exists at all. As well as grants players a ability to
request music to be played via Admin Midi and sorts them with prayers
and allows admins to directly play URL's simultaneously cleaning up any
music requests made through prays as well as a more obvious way for
people to request music rather than them Ahelping for music

## Changelog

🆑
add: New VERB, Request Internet Sound, It is in the OOC tab and allows
you to request music from admins to play, by default only allows
bandcamp, youtube, and soundcloud links
fix: Fixes the Admin Midi Widget UI to only present info that is
available to players to be seen
admin: Play Internet Sound URL input is now TGUI
admin: Play Internet Sound warns you if a song length is >10 Minutes
admin: Added new mute type to mute internet sound requests from a player
config: Added thee new config options, LOG_INTERNET_REQUEST,
REQUEST_INTERNET_SOUND, REQUEST_INTERNET_ALLOWED
/🆑

---------

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2023-03-29 19:04:41 -06:00
Kyle Spier-Swenson
57db2c1cd1 Add config to validate admin discord commands with discord links and admin ranks (#73818)
This adds a config to secure discord chat commands used by admins.

When enabled it compares the discord id the chat command came from with
the linked discords db to find their ckey, then checks they have the
correct admin rights.

The check automatically self disables if the db is down or if legacy
admin ranks are enabled. (There is no config for discord account linking
or i'd just use that.)

Moved non-admin discord commands out of the admin modules folder and
into the discord modules folder.

Deleted some defunct shit. There was a global list and admin only notify
command that was used by nothing.

There was a whole discord config section that was used by nothing.
2023-03-07 15:26:00 -07:00
LemonInTheDark
dfeb4f4086 Adds a config option for warning clients about older builds (not just older versions) (#73549)
## About The Pull Request

MSO was being tsundere about this and it seemed useful, so here we go

## Changelog
🆑
config: Added a warning build config setting, you can now lightly
repremand but not block clients with older builds but fine major
versions
/🆑
2023-02-20 18:55:50 -07:00
Zephyr
bb3947e68f add a stack_trace to config validation checking (#73160)
## About The Pull Request

config validation didn't actually throw on invalid configs, thus CI
never caught breaking changes
## Why It's Good For The Game

config should work
2023-02-07 07:05:41 +00:00
John Willard
dee7874b96 Adds a config-optional endgame chat message (#72860)
## About The Pull Request

This basically does what we do for roundstart announcements, but for
round end.

With a delay between a round ending, the server rebooting, and a new
round starting, sometimes it feels like players would be more likely to
catch a roundstart when they know the previous game has just ended, and
not a few moments before the next one starts.

## Why It's Good For The Game

This idea was suggested to me several times by many people who don't
have good connections to servers and keep missing roundstart because
they just aren't given enough time to get on SS13.

I also included Round ID in this, so people who know what time they've
played a round can also now easily see which round it was, if they
wanted to go back to look at the logs for any reason they have.

## Changelog

🆑
config: There's now a config-optional announcer for a round ending.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-29 19:52:05 +08:00
Zephyr
18b041bf47 Add logging for manually changing your targeted zone (#72814)
## About The Pull Request

See title.
Surgery hud is exempt from this.
## Why It's Good For The Game

Requested by @Mothblocks 
## Changelog

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com>
2023-01-23 22:22:24 -08:00
Y0SH1M4S73R
612c041dbc Sends a toast notification when initializations complete. (#72465)
## About The Pull Request

Initialization is significantly slowed down by the presence of clients,
though when testing features, you need to join the server. I've been
told that some devs (particularly Mothblocks) are alt-tabbed out of
Dream Daemon while doing dev work, meaning that they are liable to miss
initializations completing, causing an effective slowdown in the dev
cycle. Mothblocks said it would be nice if there was a way to produce a
desktop notification when initialization completes.

I originally intended to add a function to rust_g that would produce a
Windows toast notification with a button allowing you to immediately
launch Dream Seeker. However, I couldn't find a reliable way to detect
if the OS version was Windows 7 or earlier, so running this function on
such an OS would cause a rust panic (which I was told is only a problem
because MSO probably still uses Windows 7).

Fortunately, PowerShell scripts can access the necessary .NET APIs to
produce toast notifications on Windows 10, while also failing more
gracefully than crashing the host process. So I recreated the
functionality I intended in PowerShell.

Toast notifications will only be sent on Windows, if the
TOAST_NOTIFICATION_ON_INIT config flag is enabled, AND there are no
clients on the server.

**Note for downstreams:** If you want the toast notification to have
your downstream's icon, copy it, scale the copy down to 16x16, and
either rename it "tg_16.png" or change that path in the call to
`world.shelleo` to the name of the new file.

Video Demo:


https://user-images.githubusercontent.com/12720844/210492033-963923d7-a1de-4326-9c9f-4f0c0b71d1a5.mp4

## Why It's Good For The Game

This isn't really a line item in the Dev Cycles Initiative, but even if
Mothblocks was exaggerating the benefits, it would still be a
significant speedup in the dev cycles.

## Changelog

No player-facing changes.
2023-01-09 22:05:07 -08:00
John Willard
06197693a5 Adds support for non-science techwebs (+Config) (#71070)
## About The Pull Request

This is an expanding of
https://github.com/tgstation/tgstation/pull/69708

Adds a config to not connect machines to a techweb at the start of a
round
Adds the ability to multitool a server to get its techweb in its buffer,
which can then be used on machines to sync them.
Adds support for some machines to not cry when they don't have a techweb
linked to it, in case they actually don't.

If the config to not have machines connected to the science server is
enabled, research servers will make their own techwebs instead. This is
barebones though and would need more work if this option is used.

For misc stuff:
- I replaced checking ``GLOB.machines`` for research servers, to instead
check ``SSresearch.servers``, where we can use ``as anything``.
- Removed unused vars on the RD server control
- I renamed the operating computer's .dm file to remove the capitalized
letter from it. It's now operating_computer instead of Operations.

## Why It's Good For The Game

This is adding support for 2 different cases that can be used in the
future:
1. Off-station roles, we can make roles like Oldstation have their own
techweb so they don't ruin science's efforts, or use their advanced
research to get things we don't want, or even possibly have some
blacklist webs for ghost roles (like teleporters) so that way we don't
need to have this dance where we have to give them a very specific
amount of materials for them to do things while not being able to get a
teleporter and leaving. I heard discussions that people wanted this a
while back, and one of the main things preventing this from happening is
the lack of support. Hopefully this is encouragement to make it a
reality, because I think it would be a really cool expansion of ghost
roles and a good way to prevent them from messing with the round in
progress.
2. Downstreams who want to do different things with Science. Personally
I made this PR with voidcrew(shiptest) in mind and think this would make
their lives easier. I didn't expand too much on this because I'm leaving
up mostly to the downstreams to figure out what they want to do with
these systems.

## Changelog

This generally isn't really player facing, since most of the changes
would only come into effect if the config is enabled??

🆑
fix: Research servers now only show servers connected to their techweb.
/🆑
2022-11-20 15:34:53 +01:00
ShizCalev
e1ca0e6f7f Cadaver spawner fixes (#69544)
fix: Fixed a runtime preventing nonhuman cadavers from spawning properly.
config: Cadaver spawners will no longer yell at you when morgue_cadaver_other_species_probability is blank.
config: morgue_cadaver_disable_nonhumans will now properly disable nonhuman races! (It was reversed, woops.)
2022-09-06 23:04:33 -07:00
san7890
3b2cf65d59 Rocking The Boat, er, Map Vote (#69561)
* Rocking The Boat, er, Map Vote

Hey there,

A while ago, I spooke (typo intentional) to some other people. One frustration I heard was the fact that people would sometimes sneak through map votes during the very start of a shift, during a high-paced portion, or just as a meme. People in OOC would then flood the vote, putting in any given station. However, if a vote happens 10 minutes in- and the round goes for 70 minutes and not many of the original players are around, then it's not particularly fair to those who have to play next shift on a map they bemoan.

So, we can rock the vote! If a player isn't particularly chuffed with the hand they are given, they can poll the players to see if they want to change the map as well. If rocking the vote goes through, huzzah, you get the ability to vote for the map again. If it doesn't go through: tough luck. You can rock the vote one time per shift by default, and server operators can change the amount of times you can call to rock the map vote at their discretion. Calling to rock the vote either successfully or non-successfully counts as a "call", and when that limit is exceeded: no more calls.

Does this mean that we will only rotate between two maps because pissants will keep rocking the vote until they get what they like? Maybe? I still see people bemoan getting Tram or shit the bed over IceBox, but I think enough people get sick of bread-on-butter to take the server where it need to go. If operators don't really like seeing only two maps play, they can always adjust the config to ensure it doesn't happen.

* makes the grammar grammar

it would be "Rock the Vote vote" otherwise
2022-09-06 11:06:01 +12:00
ShizCalev
298f15e091 Allows non-human bodies to spawn in the morgue at roundstart (#68867)
Adds a configurable probability for the cadavers in the morgue to spawn as nonhuman species.
2022-08-09 10:51:52 -07:00
Jeremiah
acfa5e4fdd TGUI Say: Upgrades chat input with modern features (#67116)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: KubeRoot <6917698+KubeRoot@users.noreply.github.com>
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Iamgoofball <4081722+Iamgoofball@users.noreply.github.com>
Co-authored-by: DomitiusKnack <56321744+DomitiusKnack@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
2022-06-16 17:21:21 -07:00
dragomagol
6525ca4472 Removes log_cloning (#66912)
Right now there is only 1 source of cloning: pod cloning-- and pod cloning is exceedingly rare. I don't think this warrants its own file anymore with the death of regular cloning a few years back.
2022-05-12 22:55:46 -07:00
MrMelbert
6e098e2dba Refactors SSvote, makes votes into datums, also makes vote ui Typescript (#66772)
Makes vote into their own singleton datums.
Refactors the voting subsystem to accommodate.
Refactors the vote UI from JS to TSX (probably badly).
2022-05-08 11:52:29 -07:00
Kyle Spier-Swenson
565319095f Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. (#66473)
* Adds MC initialization stages. Earlier stages can fire while later ones init.
Removes TICK_LIMIT_MC_INIT config for barely doing anything to speed up init and being inconvenient to work with if fires and inits can happen at the same time.
2022-04-24 21:29:06 -07:00
dragomagol
971749c06d Gives traitor logging its own config flag (#66148)
Co-authored-by: tattle <article.disaster@gmail.com>
2022-04-13 18:36:06 -07:00
Watermelon914
7e32bdfca1 Pingbus changes and improvements (#65625)
Adds new configs for non-urgent ahelps to be sent to a channel when no admins are on. This will include urgent ahelps too.
Adds a response message that is sent to discord when an ahelp is responded to in any way
Player counts are now sent in the embed.
2022-03-30 15:13:02 +01:00
Watermelon914
2b11472f02 Changes what appears for urgent ahelps to supportmins. (#64748)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2022-02-14 16:11:52 -08:00
Ryll Ryll
48f37a3a5c Adds a config toggle for granting admin server profile access (#64408)
* adds allow_admin_profiling config entry

* Update config/config.txt

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

* per mso request, add the second define

* actually adds the second define

* allows through Profile requests if the config isn't init'd yet

* makes sure we're loaded

* Update code/game/world.dm

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-02-03 11:44:47 -08:00
Tim
baeb120232 Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET (#64368)
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-01-30 01:27:25 -08:00
John Willard
8c6f29b894 Logs tool usage (#64430) 2022-01-27 02:53:44 -08:00
Mothblocks
fc882d9ee0 Add config entry to hide the station name in the hub entry (#63735) 2021-12-31 21:39:51 -08:00
Mothblocks
af8902331d Amortize the cost of creating preference assets by caching them per git revision on production, reducing best case init times by ~20 seconds (#63503)
Preference asset creation, which while consistently created in early assets, can be requested at any time before then and often is, currently takes about 15 to 25 seconds to produce. Because of extremely hard to reproduce BYOND icon bugs, most of this is done on the same tick.

Lowering the cost of initialization itself is very tricky. Some of it we can theoretically optimize, such as creating humans for antagonists, others we can't, such as the raw cost of icon blending.

Furthermore, adding new icons later down the line would just increase this initialization time even more.

Instead of optimizing the asset creation, which is an uphill battle, this instead chooses to amortize the cost by caching preference assets created per git revision. This means that preference assets will be created, with their long delay, only once whenever the code changes.

This is done on a config, defaulting to on so that production needs no changes, as the whole point of these being made at runtime at all is that it keeps assets/art styles consistent, and PRs making subtle bugs that break preference generation in some way is not uncommon. On development, your git revision will stay the same until you commit, no matter what code changes you make.
2022-01-01 04:36:30 +00:00
Doctor Pope
aa034d02cd Fixed spelling of possession, separate, and cemetery (#63203)
Just fixes some spelling for gangs. I also fixed misspellings for "posession" to "possession". Fixed "seperate " to "Separate" Fixed "Cemetary" to "Cemetery"
2021-12-03 13:29:29 -08:00
Watermelon914
fb8d95a2f5 Allows players to send more visible adminhelps when no admins are on, which'll definitely alert admins (#62711)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-20 03:06:50 -08:00
John Willard
ffc8e3bc17 Adds logging for all Silicon rather than just Laws (#62500)
I find stuffing everything in game.log is a real problem when you need to actually find useful information about what happened to a specific Silicon. It's hard to tell what happened to Silicon throughout a round, even when crossreferencing attack/game logs, so having a Silicon log for all the information related to them would be really useful.
For example, a Cyborg can spawn unlinked on Robocop, go Janitor and crowbar someone to death with a Robodoctor AI. When looking through logs, an Admin can easily assume it was a rogue Engineering cyborg who disobeyed their laws to kill someone.
This also isn't adding a whole new log file, more than it is just renaming the law log file to silicon and adding more useful things into it, so it isn't logging bloat (if that's even a concern)
2021-11-09 17:41:45 +00:00
TiviPlus
124e1b485b Asset log config (#61687)
Adds config to toggle on/off logging to asset.log

Special thanks to @TiviPlus who stole it from @TiviPlus at tgstation/TerraGov-Marine-Corps#8406
2021-09-25 23:16:13 +01:00
Mothblocks
7b0c926634 Add support for multiple MOTD in config (#61589)
## About The Pull Request
Changes "motd.txt" from being hardcoded to being a list of files which are read sequentially.

CC @MrStonedOne for config changes

## Why It's Good For The Game
On production, our MOTDs contain several individual sections:

- Active Trial Admin threads
- General game information
- MRP specific information

I want to automate number 1, I want number 2 to be shared among all servers, and I want number 3 to be shared among all MRP servers.
2021-09-21 12:03:46 -04:00
Mothblocks
0990a8ddcf Give admins the ability to put a popup notice for players in tickets (#61010)
Admins can now give players a popup if they are not responding to tickets.
Popup is cleared when player replies or ticket is resolved/closed.
As more and more of the chat screen is made irrelevant, new players read it less and less.
This means that a lot of new players are ignoring ahelps, which is something I've encountered myself.
2021-08-29 21:11:38 -03:00
Timberpoes
dc5158324b Adds new config flag to mirror logging of suspicious failed logins to its own file (#60791) 2021-08-12 17:58:08 -07:00
Rohesie
6c4134d1ea Job refactor 2: less hardcoded lists (#60578)
* Job refactor 2: less hardcoded lists

* Obsessed can happen
2021-08-05 21:13:05 +02:00
Wayland-Smithy
0d1ef29662 Drastic Lag Mitigation Subsystem: SSlag_switch (#59717)
Requested by oranges and inspired by the upcoming event. A new subsyetem, non-processing (for now), aimed at providing some toggle switches that can be flipped as a last ditch effort to save some CPU cycles by sacrificing some non-critical mechanics. Below you can see each individual toggle.

Screenshot of the admin panel:
image
Surely there are more opportunities for toggles I missed, but adding new ones is not very difficult at all.
Why It's Good For The Game

Better performance during extreme pop, I hope.
Changelog

cl
code: Introduces the Lag Switch subsystem for when a smoother experience is worth trading a few bells and whistles for. Performance enhancement measures can be togged by admins with the Show Lag Switches admin verb or enabled automatically at a pop amount set via config.
config: Added a new config var: number/auto_lag_switch_pop
2021-07-08 11:02:52 +12:00
Bobbahbrown
634049e1e9 Add $reset directive to config processor for setting a config entry to default value (#59874)
added this so that the value of INTERVIEW_QUESTIONS (and subsequently any other string list) can be overridden without much issue by additional config files.

i also changed the functionality of default on config_entry as it seemed to be counterintuitive to have it be set to the initial value of the config_entry. in my opinion this should be a compile-time default, and so i've refactored the code such that default now contains the actual default, and the config_entry_value is set at intialization.
2021-06-30 16:20:57 +12:00
Kyle Spier-Swenson
7ace8da9e0 Adds configs to disable laggy hard deletes (#59750)
cl
server: Added configs to disable laggy hard deletes once they lag the server too much.
admin: laggy hard deletes only output once per type path.
/cl

closes #58379
2021-06-28 10:31:03 +12:00
Aziz Chynaliev
0dc279397f Port: fixes of SStimer subsystem from RU SS220 Paradise (#59718)
Unobvious problem spot

#define BUCKET_POS(timer) (((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN)

With tick_lag equal to 0.1, 0.25, 0.5, rounding of division is normal. But at other values it may be shifted either more or less due to the specifics of floating-point storage and processing. Numbers 0.1, 0.25, 0.5 have blank mantissa, unlike others which lead to numbers such as 245.0000004 when divided.
PS: tick_lag is rounded to the first two decimal places.


Fixes

    Rewrote the circular doubly linked list to a regular doubly linked list, because it could cause timers to loop infinitely.
    Fixed re-creation of a bucket if the timer does not have a callback.
    Added debug stat indicator RST to MC SStimer.
    Added optional ability to log dump all timers on crash.
    Fixed subsystem logic when a bucket position is misplaced due to division and rounding inaccuracy. The system now captures such rounding errors and restores the correct timer position.

References

[RU] SS220 Paradise port process from TGstation and fixes:

    ss220-space/Paradise#5
    ss220-space/Paradise#10
    ss220-space/Paradise#26
    ss220-space/Paradise#32
    ss220-space/Paradise#37

Contributors

    @semoro: fixes
    @Bizzonium: port

Changelog

cl Semoro and azizonkg
fix: Ported fixes of SStimer subsystem from RU SS220 Paradise
config: Added a new config var: flag/log_timers_on_bucket_reset
/cl
2021-06-22 23:06:40 +12:00
Mothblocks
3e1e7f7f92 2FA for Admins (#59467)
Adds a 2FA system for admins. When a config is enabled, a database storing your last CID and IP will be checked to see if you have connected through there before. If not, you will not be able to admin until you are verified. Verification is done by opening a website (decided by config), which is tasked with updating the database entry, which will then let you reverify.

MSO wants to implement this as a forum page, but the DM-side is completely agnostic to whatever the implementation is, just that it updates the database. This means that it could potentially be some TOTP stuff, even.

If the database is down, a backup file is checked for your most recent verified connection (IP + CID). If you are on this connection, you will be able to connect fine. If the database is down and you are on a new connection, someone with +PERMISSIONS can manually verify you through the Permissions Panel.

We've had repeated attacks of admins getting their accounts stolen, it's time.
2021-06-09 17:07:36 -07:00
Mothblocks
7e4de07506 Remove all gamemodes except Dynamic (#58470)
Removes all /datum/game_mode except dynamic. Eventually, all of mode and game_mode will be removed, and Dynamic will become an ingrained system. Every single other gamemode was unmaintained at best and poisoned other code at worst. Currently all tg servers run 24/7 Dynamic, so the time to act is now.

* Remove gamemode references from age checks

* Monkey

* Remove heretics

* Remove BBs

* Refactor uplinks and remove clown ops

* Remove nuke ops

* Removes and refactors cult

* Remove extended

* Remove and move out meteors

* Removes wizard

* Remove sandbox

* Remove changelings

* Remove traitors

* Remove revs

* Remove gangs

* Remove changing mode and voting for new gamemodes

* get_candidates signature fix

* Summon ERT and NERD in their own panel

* Remove some old unneeded age_check stuff

* Fix old signatures of get_uplink_items

* Use Extended like config for dynamic.json

* Fix discounted gear
2021-04-25 01:55:10 -07:00
Timberpoes
9034dab179 Implements a new auto-tagging system for ID card which adds a config to auto-flag them as an intern. (#58236)
About The Pull Request

ID cards when equipped will check the player's living hours if the USE_LOW_LIVING_HOUR_INTERN flag is set. If their living hours is less than the first of the following (checked in order from 1st to 3rd until a valid value is found):

    Config USE_LOW_LIVING_HOUR_INTERN_HOURS
    Config USE_EXP_RESTRICTIONS_HEADS_HOURS
    Hardcoded 15 hours

Then their ID card is tagged as Intern Assignment, unless they're a Head of Staff in which case they become an Assignment-in-Training.

PDAs, Wallets and Tablets also update any ID cards they hold, so equipping a PDA, Tablet or Wallet will also update any ID cards inside it.

This occurs automatically, even if the card does not belong to the owner. This only occurs when the user's assigned_role is a station job.
2021-04-13 12:24:27 +12: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
TemporalOroboros
11b3d16edb Adds logging to uplinks, spellbooks, and the codex ciatrix (#56450)
* Initial logging

* Bugfix and adds uplink logging to config file

* Another bugfix
2021-01-29 14:34:59 +08:00