Commit Graph

544 Commits

Author SHA1 Message Date
Kara b93f956353
Resolve `'EntitySystem.Get<T>()' is obsolete` in content (#27936)
* PROJECT 0 WARNINGS: Resolve `'EntitySystem.Get<T>()' is obsolete` in content

* pass entman

* dog ass test

* webeditor
2024-05-18 13:58:55 +02:00
no 3e277a22d1
Prevent admin-frozen players from ghosting or suiciding, add "Freeze And Mute" verb (#27813)
* prevent admin-frozen players from ghosting or suiciding

* Add "Freeze and Mute" admin verb

* Allow "Freeze And Mute" admin verb when player is already frozen but not muted

* Remove redundant scream handler (scream action just emotes, duh)

* AdminFrozenSystem: clean imports

* Update Content.Server/Chat/Commands/SuicideCommand.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Update Ghost.cs

* retrigger ci (empty commit)

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-05-18 13:58:36 +02:00
Kara c56db3b1a8
Resolve `'TransformComponent.MapPosition' is obsolete` in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content

* build?
2024-05-18 13:58:34 +02:00
Kara 74eef92443
Resolve all non-obsoleting warnings in content (#27934)
* Resolve all non-obsoleting warnings in content

* Update ClientGameTicker.cs

* Update SkeletonAccentSystem.cs

* Update BwoinkSystem.cs
2024-05-18 13:57:06 +02:00
Джексон Миссиссиппи e8dce2b0ed
Add an admin smite for making people slip really far (and localize the admin smites better) (#27246)
* Sliiiiiiiiiiiiiiiiiip

* what

* Localize!

* antiterminate
2024-05-18 13:57:03 +02:00
Ciac32 5150178041
Fix antag verb incorrectly giving role to admin player instead of target (#27584)
Fix antag verb giving role to admin player instead of target
2024-05-15 19:57:19 +02:00
Nemanja 3055d7bac5
Mega Antag Refactor (#25786)
* Mega Antag Refactor

* last minute delta save

* more workshopping

* more shit

* ok tested this for once

* okkkkk sure

* generic delays for starting rules

* well darn

* nukies partially

* ouagh

* ballin' faded and smonkin wed

* obliterated the diff

* Spread my arms and soak up congratulations

* I've got plenty of love, but nothing to show for it

* but there’s too much sunlight
Shining on my laptop monitor, so I
Can’t see anything with any amount of clarity

* ok this junk

* OOK!

* fubar

* most of sloth's review

* oh boy

* eek

* hell yea!

* ASDFJASDJFvsakcvjkzjnhhhyh
2024-05-15 19:48:32 +02:00
null 8db7894d51
Merge remote-tracking branch 'refs/remotes/upstream/master' into 2024/04/21-loadouts 2024-05-07 22:52:49 +02:00
metalgearsloth 1d63b4cfcb
Content update for UI prediction (#27214)
* Content update for UI refactor

* Big update

* Sharing

* Remaining content updates

* First big update

* Prototype updates

* AUGH

* Fix UI comp ref

* Cleanup

- Fix predicted message, fix item slots, fix interaction range check.

* Fix regressions

* Make this predictive

idk why it wasn't.

* Fix slime merge

* Merge conflict

* Fix merge

(cherry picked from commit 5896e6875266b22c565009b5d45f60ceb981d90a)
2024-05-03 00:15:32 +02:00
Whisper a87ea50246
lower max firestacks to 10, refactor flammable (#27159)
* lower max firestacks to 10, refactor flammable

* fix

* uncap fire stack damage, lower fire stack damage

(cherry picked from commit eee056eaf063caa690516bf8b4eb7e65a0199e9c)
2024-05-02 23:59:27 +02:00
NullWanderer 74002a1c4e
Merge remote-tracking branch 'refs/remotes/upstream/master' into 2024/04/21-loadouts
# Conflicts:
#	Content.Server/IoC/ServerContentIoC.cs
#	Resources/Prototypes/Roles/Jobs/Medical/chemist.yml
2024-04-22 19:41:29 +02:00
metalgearsloth d49eabc1a5
Partial cherry-pick: Loadouts redux (#25715)
Signed-off-by: NullWanderer <56081759+NullWanderer@users.noreply.github.com>
2024-04-22 03:28:58 +02:00
no e2cc7156c0
"make thief" admin action: fix missing icon (#27119)
(cherry picked from commit 94f296f9d62eaedd20b0d3d84d0c2dccc5e82dce)
2024-04-21 23:18:53 +02:00
Pieter-Jan Briers 4c7c6f28be
Game server admin API (#26880)
* Reapply "Game server api" (#26871)

This reverts commit 3aee19792391cbfb06edb65d6f16f77da0f36f13.

* Rewrite 75% of the code it's good now

(cherry picked from commit 9d0dfcf2b9fa1b6ba54b3aa26a3f41982b945323)
2024-04-21 21:58:13 +02:00
Pieter-Jan Briers e984da8467
Revert "Game server api" (#26871)
Revert "Game server api (#24015)"

This reverts commit 297853929b7b3859760dcdda95e21888672ce8e1.

(cherry picked from commit 3aee19792391cbfb06edb65d6f16f77da0f36f13)
2024-04-21 21:48:02 +02:00
Simon ad65e75624
Game server api (#24015)
* Revert "Revert "Game server api (#23129)""

* Review pt.1

* Reviews pt.2

* Reviews pt. 3

* Reviews pt. 4

(cherry picked from commit 297853929b7b3859760dcdda95e21888672ce8e1)
2024-04-21 21:47:56 +02:00
c4llv07e ecbef2b8eb
Add door electronics access configuration menu (#17778)
* Add door electronics configuration menu

* Use file-scoped namespaces

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Open door electronics configuration menu only with network configurator

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Doors will now try to move their AccessReaderComponent to their door electronics when the map is initialized

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Make the access list in the id card computer a separate control

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix merge conflict

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove DoorElectronics tag

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Integrate doors with #17927

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Move door electornics ui stuff to the right place

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Some review fixes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* More fixes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* review fix

Signed-off-by: c4llv07e <kseandi@gmail.com>

* move all accesses from airlock prototypes to door electronics

Signed-off-by: c4llv07e <kseandi@gmail.com>

* rework door electronics config access list

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove Linq from the door electronics user interface

* [WIP] Add EntityWhitelist to the activatable ui component

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Better interaction system

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Refactor

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix some door electronics not working without AccessReaderComponent

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Move AccessReaderComponent update code to the AccessReaderSystem

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unnecesary newlines in the door access prototypes

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unused variables in access level control

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unnecessary method from the door electronics configuration menu

Signed-off-by: c4llv07e <kseandi@gmail.com>

* [WIP] change access type from string to ProtoId<AccessLevelPrototype>

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Remove unused methods

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Newline fix

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Restored to a functional state

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Fix access configurator not working with door electronics AccessReaderComponent

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Replace all string access fields with ProtoId

Signed-off-by: c4llv07e <kseandi@gmail.com>

* move access level control initialization into Populate method

Signed-off-by: c4llv07e <kseandi@gmail.com>

* Review

---------

Signed-off-by: c4llv07e <kseandi@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>

(cherry picked from commit 64bb8dbdd50e0b1e5744e1eb0cc6f24bda959ade)
2024-04-07 14:26:56 +02:00
Simon 16d1e88389
Make aghost command work on other players using optional argument (#26546)
* Translations

* Make aghost command work on other players using optional argument

* Reviews

(cherry picked from commit 87a56b25c3f06ea98661684b8e62f8acb0afee85)
2024-04-07 14:16:28 +02:00
Jake Huxell 7be31aab33
Reduced Warning Count By 130 For Full Rebuilds (#26518)
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50

* final toCoords Removed

* Remove all unused variables and dead code paths

* remove always true variable, should be a cvar or something instead

* remove superfluous variables from tests

(cherry picked from commit 59e46aab93ca38f8d57fcad4e3a2c893737d9ad4)
2024-04-07 14:11:06 +02:00
nikthechampiongr ff85afa140
Fix Incorrect stealth messages appearing on readmin. (#26511)
Fix major skill issue/Incorrect stealth messages appearing on readmin.

(cherry picked from commit df631ff8a07325a889b45235120eec60fe844233)
2024-04-07 14:10:40 +02:00
Tayrtahn aa766da2c5
Code cleanup: Purge obsoleted SharedPhysicsSystem methods (#26287)
Updated calls to SharedPhysicsSystem methods

(cherry picked from commit 964c6d54caae45b205a326143f56d6458a1bbc8a)
2024-03-27 18:35:38 +01:00
IProduceWidgets 242d6dd30e
Fix admin verb to set unspawned ballisic ammo count (#26411)
Don't crash if an invalid value is given.

(cherry picked from commit 451890b85b49e17a0019d107db4a31a48cdd3518)
2024-03-27 18:35:09 +01:00
nikthechampiongr 1a1e423a44
Add stealthmins (#26263)
* Add stealthmin command.

* Update Content.Server/Administration/Commands/AdminWhoCommand.cs

As suggested by CE.

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>

* Add admin notifications for admins toggling stealthmin.

* Localize stealthmin command

---------

Co-authored-by: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>

(cherry picked from commit dca0c6694bce56fcf962feab2b59ad4a849f4533)
2024-03-27 18:32:01 +01:00
Pieter-Jan Briers fa250d23ed
Add Prometheus stats for admin count (#26284)
* Add Prometheus stats for admin count

Fixes #20828

Reports time series for admin count. Counts are separated by state (active, AFK, or deadminned) and admin rank.

* Use static constructor instead of static readonly for the metric

Docs recommend this due to inconsistent execution of C# static constructors.

* Remove static usage, use IoC IMeterFactory.

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
(cherry picked from commit a1817a12dbb385275f4273c1abf48fac0a989ddd)
2024-03-27 18:28:49 +01:00
metalgearsloth ffb74765c5
Fix playglobalsound autocompletion (#26167)
(cherry picked from commit 65960facf522627c939a35a65b025ec49ffa5c52)
2024-03-27 18:28:32 +01:00
Pieter-Jan Briers 16c7c2882d
Improve admin message seen/dismiss state. (#26223)
Fixes #26211

Admin messages now have separate "seen" and "dismissed" fields. The idea is that an admin should be able to tell whether a user pressed the "dismiss for now" button. Instead of using "seen" as "show this message to players when they join", "dismissed" is now used for this.

Existing notes in the database will automatically be marked as dismissed on migration. A note cannot be dismissed without being seen (enforced via constraint in the database too, aren't I fancy).

As part of this, it has become impossible for a player to play without dismissing the message in some form. Instead of a shitty popup window, the popup is now a fullscreen overlay that blocks clicks behind it, making the game unplayable. Also, if a user somehow has multiple messages they will be combined into one popup.

Also I had enough respect for the codebase to make it look better and clean up the code somewhat. Yippee.

(cherry picked from commit d776c4b392a082dba7539d77cfa20fc904ed4091)
2024-03-24 00:08:01 +01:00
Tayrtahn 11eff87687
Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.

* Missed a few

* Revert changes to pulling

* No

(cherry picked from commit 4a83c365858830e3b2ff2b94fff501256422c20e)
2024-03-24 00:04:13 +01:00
LordCarve f8ea31a192
Obsolete `Logger` cleanup for `EntitySystem`s part 2 (#26159)
* Kill the static InRangeUnOccluded

* Adjusted 4 more EntitySystems that were missed.

(cherry picked from commit 7d275a4b5e4188db424cc417c609dced3f9aca89)
2024-03-17 15:11:33 +01:00
SlamBamActionman 3dda5a6cec
Enable multiple Solution Editor windows (#26005)
* More solution edit windows

* Fix error when closing euis after round restart

---------

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
(cherry picked from commit 0da09db99ac556e0efdce40268e60eb5a06a0694)
2024-03-17 14:54:32 +01:00
Arendian 13c6eeb87a
Criminal record hud icons (#25192)
* Security hud shows icon based on criminal record status

* Criminal status now linked to name instead of identity

* parole loc

* Test fix

* review changes

* Check station records instead of storing names on criminal record consoles.

* cleanup

* more cleanup

* review changes

* change outdated comments

* rename

* review changes

* remove event subscription

* replaced event with trycomp

* default value

(cherry picked from commit 60b9d89e4dbdd8aaad4992a105628297d9480617)
2024-03-17 14:52:22 +01:00
Rainfey b9d2f5a409
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>

(cherry picked from commit 4e6c59cfe51211064d79a727cc2d37c2a2f55a2c)
2024-03-07 01:06:59 +01:00
Nemanja 384c060ea5
Predict doors and airlocks (#25419)
* predict doors and airlocks

* prying, too

* ack

* eek

(cherry picked from commit ce0a51fc29675b3b0afb90296b6a8ce90c3f9cd3)
2024-03-05 09:48:41 +01:00
metalgearsloth 9516ab5794
Fix bwoink sounds (#25441)
* Fix bwoink sounds

Didn't get a chance to test with 2 clients as I'm about to sleep but otherwise I'll check tomorrow.

* a

(cherry picked from commit 79c6385ca7d1b42263e154dc1dad4fe912ac0bbf)
2024-03-05 09:45:58 +01:00
dffdff2423 6757f63a90
Add option for admins to disable bwoink (#25008)
* Add option for admins to disable bwoink

In a vain attempt to get people to ahelp more, provide the possibility
for admins to not play the bwoink sound if they don't want to scare the
player.

* Add silent indicator to discord relay

* Use string interpolation

(cherry picked from commit a3c93b0bd7478c0f75daaa2f7d0bd8b88565b27e)
2024-03-05 09:43:40 +01:00
Pieter-Jan Briers 837272c745
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

(cherry picked from commit 2e6eaa45c57c7f5ba561d1fb1ef6712d2432a8fa)
2024-02-21 04:03:44 +01:00
Pieter-Jan Briers ccea85136b
Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
(cherry picked from commit 68ce53ae17985876d6d112b764b2144964a9f42e)
2024-02-18 23:02:29 +01:00
crazybrain23 9a5206051b
fix follow comannd help locale (#25032)
(cherry picked from commit f77550dc83c52b693ac7f18214514df280e3f2f6)
2024-02-18 22:35:13 +01:00
deltanedas 965e1cae57
criminal records revival (#22510)
(cherry picked from commit 683591ab046eb720e6ccfd3d0f6e5574f5f7efbc)
2024-02-08 12:37:29 +01:00
Repo f016a076c2
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>
(cherry picked from commit 00841217062ba60d38320dfd2b93288548bb4201)
2024-02-08 12:22:51 +01:00
AJCM-git 8081242009
Cleanups PolymorphSystem/Components/Prototypes (#23721)
* Cleanups PolymorphSystem

* forgot this

* Nah

* Fix test

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
(cherry picked from commit b8f0ed3975a4b887ca8dd75dcc07e0ac5ee11646)
2024-02-08 12:20:24 +01:00
DrSmugleaf 5329280378
Add events for GunComponent values, muzzle flashes and cartridge spread (#24077)
* Add a modifier event for GunComponent values

* Add docs

* Add VV readwrite to modified values

* Add more docs

* More docs

* Add Gun parameter to GunRefreshModifiersEvent

* Add another event for handling cartridge spread

* Fix pneumatic speed

(cherry picked from commit 4e8b1fb0d3ef23c79ea3ca0cec05932de03601f5)
2024-02-08 11:52:29 +01:00
crazybrain23 5476d09276
Fix Admin Antag ctrl headrev icon to use RSI instead of texture (#24474)
Fix the warning about direct texture for headrev

(cherry picked from commit 80e0e2d1016674c9fdef51d16b74ac1d83b1a78e)
2024-01-27 23:51:46 +01:00
LordCarve ad35a2fda3
Obsolete refactor - ConnectedClient to Channel (#24409)
(cherry picked from commit 05a2e6b3a21e5fb3198432d885bbe28506d85b9c)
2024-01-27 23:44:02 +01:00
Errant a91ce6459a
Fix battery trick debug assert (#24408)
* Why

* Missed a spot

(cherry picked from commit 044e6d6f3f7b85515e8490447dcfd3a12f94599d)
2024-01-27 23:43:02 +01:00
LankLTE ab5cc6b25e
Follow command and ahelp menu follow (#24142)
* Command & ahelp rename

* Reviews

* remove tpto

(cherry picked from commit 44abe3e54d8522fe795a59a0b302a0f1f858cbbc)
2024-01-26 22:58:09 +01:00
metalgearsloth a36f876422
Teleport fixes (#24064)
- Teleport to physics center not transform center.
- Fix NetEntity not being passed in.

(cherry picked from commit db175fd9ba425a7c87eff3ae8bb9cd1d2fdf2b98)
2024-01-26 22:37:57 +01:00
Pieter-Jan Briers ea0318b2e0
Fix solution editor UI (#24004)
Fixes #23645

The problem is that the solution editor UI is an EUI, so the UI updates before the game states are applied.

A correct fix would be to move it to a BUI in some way, but that's a little involved as we don't really have pre-existing code that uses BUIs in a manner good for this. I decided against this because I realized we'd want to have more tools similar to this and tbh I kinda figured integrating it with VV would be a better fix instead, so...

This is a bad workaround to manually synchronize the UI updates against game timing. It's not pretty but it works.

(cherry picked from commit 3a2cd95d7f8d2b6975ebfda715b4cbf858e74668)
2024-01-26 22:34:27 +01:00
DrSmugleaf 9f4fa43635
Revert "Game server api (#23129)" (#23672)
This reverts commit dfc8ea6aee85776dd1676df601ff8c22ea205a08.

(cherry picked from commit c05a458de23469d2210629cfd705ce2b9c494351)
2024-01-26 22:07:25 +01:00
Simon 3259264602
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

(cherry picked from commit dfc8ea6aee85776dd1676df601ff8c22ea205a08)
2024-01-26 22:04:36 +01:00
Pieter-Jan Briers 7fa89a2d17
Fix bad sawmill IPostInjectInit (#23626)
Same issue as 359811f71e

(cherry picked from commit d8cbddf1f4adf5fce5399ea6674a7eeaa1b612a9)
2024-01-26 22:03:20 +01:00