Commit Graph

377 Commits

Author SHA1 Message Date
Pieter-Jan Briers
0ecc5e8c96 Throttle people trying to connect to a full server. (#20972)
* Throttle people trying to connect to a full server.

To reduce spam/load on the server and connection logs table.

Players are forced to wait 30 seconds after getting denied for "server full", before they can try connecting again.

This code is an absolute nightmare mess. I tried to re-use the existing code for the redial timer but god everything here sucks so much.

Requires https://github.com/space-wizards/RobustToolbox/pull/4487

* Use new NetDisconnectMessage API instead.

* Add admin.bypass_max_players CVar.

Just something to help with debugging the player cap on dev, I don't expect this to ever be disabled on real servers.
2024-03-14 19:00:47 +11:00
Nemanja
f3f4616c49 Add a toggle for colorblind friendly progress bar colors (#25318)
* Add a toggle for progress bar colors

* yeah this thing

* PJB review

* optimization
2024-03-09 12:43:19 +01:00
DrSmugleaf
30ccde0a47 Make the round end sound collection a cvar (#25741)
* Make the round end sound collection a cvar

* Fix comment

* Clarity
2024-03-01 21:08:48 +11:00
Rainfey
4e6c59cfe5 Refactor antag rule code (#23445)
* Initial Pass, Rev, Thief

* Zombie initial pass

* Rebase, Traitor

* Nukeops, More overloads

* Revert RevolutionaryRuleComponent

* Use TryRoundStartAttempt, Rewrite nukie spawning

* Comments, Add task scheduler to GameRuleSystem

* Zombie initial testing done

* Sort methods, rework GameRuleTask

* Add CCVar, Initial testing continues

* Might as well get rid of the obsolete logging

* Oops, i dont know how to log apparently

* Suggested formatting fixes

* Suggested changes

* Fix merge issues

* Minor optimisation

* Allowed thief to choose other antags

* Review changes

* Spawn items on floor first, then inserting

* minor tweaks

* Shift as much as possible to ProtoId<>

* Remove unneeded

* Add exclusive antag attribute

* Fix merge issues

* Minor formatting fix

* Convert to struct

* Cleanup

* Review cleanup (need to test a lot)

* Some fixes, (mostly) tested

* oop

* Pass tests (for real)

---------

Co-authored-by: Rainfall <rainfey0+git@gmail.com>
Co-authored-by: AJCM <AJCM@tutanota.com>
2024-02-29 17:25:10 +11:00
Pieter-Jan Briers
715794dd41 Make department / job list sorting consistent. (#25486)
* Make department / job list sorting consistent.

This makes late join, crew manifest and character profile all apply consistent sorting for jobs and departments.

We use the already-defined weights for departments (so command, then sec, then station specific, then just sort by prototype ID). Jobs also use weight (so heads are always at the top) then prototype ID, then character name (for manifest).

Removed the crewmanifest.ordering CVar as doing it via prototype weight is just easier, and that CVar was already a mess anyways.

* Fix jittery job icons in lists.

They were set to KeepCentered in TextureRect. This has issues because the allocated space is actually an odd number of pixels, so it tries to position the draw at a half pixel offset.

Now, yes, fixing this in TextureRect would make much more sense, but get off my back. (Ok seriously we need better helper functions for doing that in the engine. Don't wanna deal with that right now and I already have this patch made.)

Instead I'm just gonna fix the issue by using VerticalAlignment in all these places instead which ends up doing exactly the same thing YIPPEE.

Also gave a margin next to the icon on the crew manifest. Margins people!
2024-02-23 15:04:44 +11:00
Pieter-Jan Briers
2e6eaa45c5 Fix admin notes and database time nonsense. (#25280)
God bloody christ. There's like three layers of shit here.

So firstly, apparently we were still using Npgsql.EnableLegacyTimestampBehavior. This means that time values (which are stored UTC in the database) were converted to local time when read out. This meant they were passed around as kind Local to clients (instead of UTC in the case of SQLite). That's easy enough to fix just turn off the flag and fix the couple spots we're passing a local DateTime ez.

Oh but it turns out there's a DIFFERENT problem with SQLite: See SQLite we definitely store the DateTimes as UTC, but when Microsoft.Data.Sqlite reads them it reads them as Kind Unspecified instead of Utc.

Why are these so bad? Because the admin notes system passes DateTime instances from EF Core straight to the rest of the game code. And that means it's a PAIN IN THE ASS to run the necessary conversions to fix the DateTime instances. GOD DAMNIT now I have to make a whole new set of "Record" entities so we avoid leaking the EF Core model entities. WAAAAAAA.

Fixes #19897
2024-02-20 10:13:31 +01:00
Pieter-Jan Briers
1ce2155315 Add new "OptionsVisualizer" (#25128)
This is a visualizer somewhat similar to the Generic. It allows configuring appearance info based on specific CVars the user has set. This allows YAML to easily configure alternatives for accessibility CVars like reduced motion.
2024-02-17 15:52:11 -05:00
Vasilis
7e44c50d19 Made ghost.role_time a server modifiable only cvar (#25292)
Fix
2024-02-16 00:30:55 +01:00
SlamBamActionman
247be5b5c7 Add option for character name colors in chat & move coloration to clientside (#24625)
* Adds option to disable character names in chat/speechbubbles

* Moved the coloring of names to clientside

* Move string functions to SharedChatSystem to avoid duplicate code in SpeechBubble.cs

* Changed to be put under Accessibility section

* Cache CVar
2024-02-10 22:38:55 -08:00
Psychpsyo
ba0ca39a7a Screen Shake Intensity Slider in Accessibility Settings (#24749)
* Reduced motion toggle disables screen shake

* Actually, screen shake is its own slider instead

* Cache screen shake intensity cvar
2024-02-02 13:39:12 +01:00
Repo
0084121706 Fix aHelp relay to detect AFK Admins (#24482)
* Add AFK detection for aHelp relay and admin specific afk time.

* Correct query to new refactor

* Change AFK timeout to 10min or else Pancake closes my PR 😭

* It wasnt a bug it was a feature, way less aHelps that way.

* aHelp Colors arn't real!

* Update Content.Shared/CCVar/CCVars.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-02-02 00:03:49 +11:00
Kot
8c5898b006 Add chat.max_announcement_length cvar (#23571)
* Add announce message length to UI and make a cvar for it

* Update comm console server-side trim to use the cvar

* Rely on the new OnTextChanged event

Because OnKeyBindUp only works for keys that have binds

* Add a similar indicator to nukies' war declaration UI

* Remove message length indicators for now cuz it requires the engine update

* Rename cvar slightly

* Refactor duplicated code to a helper method

* Remove message trimming from *Window class as it's better to live in the BoundUserInterface where the other message handling happens

* Rename to chat.max_announcement_length
2024-01-21 20:14:01 +11:00
Repo
7bf62f1d19 Restart votes check player count and ghost levels (#23453)
* Restarts have max player count

* Now counts ingame ghosts to determine if restart can be called

* consistant cvar name

* Added a player count with state conditional
2024-01-19 18:10:05 +11:00
Nemanja
736b9dd7df Cryogenic Sleep Units (#24096)
* Cryogenic sleep units

* pause map support

* no more body deletion

* Cryogenic Storage Units

* boowomp

* no more emag, no more dropping present people
2024-01-14 23:35:28 -07:00
Vasilis
22c0b4425d Cvar to allow whitelisted players to bypass panic bunker (#23885)
Among us
2024-01-14 16:27:32 +11:00
DrSmugleaf
c05a458de2 Revert "Game server api (#23129)" (#23672)
This reverts commit dfc8ea6aee.
2024-01-07 02:04:21 -08:00
Simon
dfc8ea6aee Game server api (#23129)
* Stuff

* Fix RoundStatus Action

* Rename stuff

* Also needs to run on the main thread

* minor stuff

* Move to not be an EntitySystem

* Part 1 of making this less shit

* Make some more stuff run on main thread

* Actor check, logging and remove token from log.

* Better log

* Change ActionKick to use Guid instead of username

* Fix build

* Bandaid fix for test fails
2024-01-06 17:47:29 -08:00
Vigers Ray
5492cc5fd1 Login tips (#22234)
* Init coomit

* meh

* okay

* Revert "okay"

This reverts commit bb638aa4baa8dbd0e285c3435aabf83171a4806a.

* enable-d

* Update Content.Client/Launcher/LauncherConnectingGui.xaml.cs

Co-authored-by: Kara <lunarautomaton6@gmail.com>

* review

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-01-06 17:06:49 +11:00
LankLTE
4c179d69e7 add secret weight prototype cvar (#23564)
Add cvar
2024-01-05 18:30:00 -05:00
LankLTE
01082c6c27 Add cvar to show new players in ahelp (#23265)
* Implement cvar

* Enable cvar on Wizden
2024-01-04 15:45:23 +11:00
metalgearsloth
bf79acd127 Salvage magnet revamp (#23119)
* Generic offering window

* More work

* weh

* Parity

* Progression meter

* magnet

* rona

* PG asteroid work

* code red

* Asteroid spawnings

* clams

* a

* Marker fixes

* More fixes

* Workings of biome asteroids

* A

* Fix this loading code

* a

* Fix masking

* weh

* Fixes

* Magnet claiming

* toe

* petogue

* magnet

* Bunch of fixes

* Fix default

* Fixes

* asteroids

* Fix offerings

* Localisation and a bunch of fixes

* a

* Fixes

* Preliminary draft

* Announcement fixes

* Fixes and bump spawn rate

* Fix asteroid spawns and UI

* More fixes

* Expeditions fix

* fix

* Gravity

* Fix announcement rounding

* a

* Offset tweak

* sus

* jankass

* Fix merge
2024-01-04 14:25:32 +11:00
Chief-Engineer
7ecd7668a1 Enable panic bunker by default (#23252)
* update cvars

* vote 1984

* rip

* add custom reason

* make panic_bunker.enabled a server cvar

I am kind of guessing

---------

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2024-01-03 03:26:13 -06:00
deathride58
aa6645c8e9 Blindness rework - damaged eyes are now a stylized simulation of legal blindness (#23212)
* blindness rework - damaged eyes now simulate legal blindness

* hEY THATS FOR DEMONSTRATION PURPOSES ONLY AAA

* attributions

* makes eyeclosecomponent adminbus compatible

* useshader(null)
2024-01-03 01:07:02 -08:00
Kara
f9355c6151 Remove ambient sound from lv/mv/pipes + up default ambience volume (#22536)
* Remove remaining ambientsound enabled overrides on maps

* Disable LV and MV ambience altogether

* hv enable default

* not necessary bc subfloor

* up default volume

* no pipe ambience

* pepis
2023-12-31 23:57:33 -08:00
LankLTE
e76d8390bd add cvar for custom panic bunker reason (#23267)
Panic bunker cvar
2023-12-31 21:53:49 -05:00
metalgearsloth
4023134cf0 Add UI click sounds (#22410)
* Add UI click sounds

* tweaks

* Significant cleanup

* Audio options and numerous fixes

* Fix the remaining UI elements

* new click sound

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
2023-12-29 15:43:36 +11:00
LankLTE
82ddf451e6 change the restart vote to have no effect with admins online (#22945)
* Change the vote and cvar

* Only denies successful votes

* Add comments because I'm a good coder, I swear

* I added a space to the first line of ccvars it's so over
2023-12-24 23:55:56 -08:00
Simon
dc017dd6fa CVar for custom name in client-side ahelp menu. (#22069)
* the grinch will ruin christmas

* comments here, comments there, comments should not be a thing :godo:

* Unsubscribe from CVar

* rename cvar to be clearer.

* Change switch to if statement.
2023-12-19 17:40:37 -06:00
deltanedas
cce7aa777c start of persistence support (#20770)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-12-16 19:55:19 -08:00
Kara
e4a227ff0d Explosion SFX juicing + higher persistence (#22544) 2023-12-16 03:57:46 +11:00
LankLTE
94628d6ab1 Relay custom votes to a webhook (#18561)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-12-14 20:03:32 -08:00
Kevin Zheng
24629ad487 Fix heat capacity scaling (#22464)
* Correctly apply HeatScale

* Apply HeatScale on InitializeGases()

* Re-add conservative heat scaling and speedup
2023-12-13 21:38:58 -05:00
DrSmugleaf
77e872fe8b Add ahelp bwoink sound cvar (#22439) 2023-12-13 01:51:30 -07:00
Kevin Zheng
454eb5307f Turn off speedup and heat scaling to isolate bug (#22405) 2023-12-12 03:03:01 -07:00
Kevin Zheng
405e569cd5 Split up atmos speedup from heat scaling (#22372) 2023-12-12 00:49:20 -07:00
Kevin Zheng
a2ed25ad03 Add atmos time compression (#21954)
Add atmos.speedup which is effectively a atmos-only time compression
CVar. This adjusts heat capacities and transfer rates to effectively
globally speed up the time constants of atmos.

This allows faster response to heating/cooling changes and faster
cleanups (by buffing scrubbers, pumps, and everything else) that is
tunable through one global time compression CVar.

It also achieves this without any thermodynamic unsoundness.
2023-12-11 15:59:47 -08:00
Flareguy
a69c5e3742 Document why tile ripping was disabled upstream (#22315) 2023-12-11 11:45:26 -08:00
metalgearsloth
02c8e585f7 Turn arrivals into a planetmap (#21777) 2023-12-11 20:34:19 +11:00
Pieter-Jan Briers
46e36934a6 High-latency DB testing stuff (#22282) 2023-12-10 16:30:12 +01:00
metalgearsloth
98d5f9f56b Make audio sliders use gain not volume (#21984) 2023-12-09 14:03:08 +11:00
Nemanja
9ca84ac3fb Grid inventory fixes (#22161)
* Gridinv fixes

* eek

* oh yeah this too

* eek
2023-12-05 16:38:10 -07:00
deathride58
e32ede5882 Fancy speech bubbles - Names over speech bubbles, and 1:1 chat parity for emotes and LOOC! (#21999) 2023-12-04 16:10:49 -07:00
Nemanja
cc8984d096 Grid Inventory (#21931)
* Grid Inventory

* oh boy we keep cracking on

* auto insertion is kinda working? gross, too!

* pieces and proper layouts

* fix the sprites

* mousing over grid pieces... finally

* dragging deez nuts all over the screen

* eek!

* dragging is 90% less horrendous

* auto-rotating

* flatten

* Rotation at last

* fix rotation and change keybind for removing items.

* rebinding and keybinding

* wow! look at that! configurable with a button! cool!

* dragging is a bit cooler, eh?

* hover insert, my beloved

* add some grids for storage, fix 1x1 storages, fix multiple inputs at once

* el navigation

* oh yeah some stuff i forgor

* more fixes and QOL stuff

* the griddening

* the last of it (yippee)

* sloth review :)
2023-12-04 16:04:39 -07:00
metalgearsloth
783879921b Disable artifact spam on roundend (#21970)
* Disable artifact spam on roundend

I think part of the issue was the enormous amount of logspam but at any rate this turns it off.

* Also this

* And these
2023-11-28 22:39:16 -05:00
Flareguy
c7f4294d73 disables space wind and tile ripping cvars (#21847) 2023-11-27 14:42:29 -07:00
metalgearsloth
269c93245d Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:34 +11:00
Pieter-Jan Briers
8bf807a9b5 Basic rate limiting for chat messages (#21907) 2023-11-27 14:08:30 +11:00
metalgearsloth
5cbf935cf0 Wrap gateway generator in cvar for dev (#21758) 2023-11-21 21:36:38 -07:00
metalgearsloth
aae3d7133a Bump expedition timer to 11mins (#21635)
We've had it at like, 18, 12, and 7, I think 7 is too low and 18 is definitely too high.

Ideally:
- 2 minutes to get inside
- 7 or so minutes inside.
- 2 minutes as a buffer to either fulton themselves out or run out if necessary.
2023-11-13 15:39:33 -07:00
Vasilis
2f2d237f86 LOOC will appear on top of your head (#21514)
* Oh well

* Minor fixing up

* HOLY BINGLE I DID IT

* TOGGLE!
2023-11-09 02:18:58 -07:00