Commit Graph

680 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
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
ShadowCommander 13fb095cae
Fix ghosts getting spawned in nullspace (#27617)
* Add tests for ghost spawn position

* Make ghosts spawn immediately

* Format mind system

* Move ghost spawning to GhostSystem

* Spawn ghost on grid or map

This fixes the ghosts being attached the parent entity instead of the grid.

* Move logging out of the ghost system

* Make round start observer spawn using GhostSystem

* Move GameTicker ghost spawning to GhostSystem

Moved the more robust character name selection code over.
Moved the TimeOfDeath code over.
Added canReturn logic.

* Add overrides and default for ghost spawn coordinates

* Add warning log to ghost spawn fail

* Clean up test

* Dont spawn ghost on map delete

* Minor changes to the role test

* Fix role test failing to spawn ghost

It was failing the map check due to using Nullspace

* Fix ghost tests when running in parallel

Not sure what happened, but it seems to be because they were running simultaneously and overwriting values.

* Clean up ghost tests

* Test that map deletion does not spawn ghosts

* Spawn ghost on the next available map

* Disallow spawning on deleted maps

* Fix map deletion ghost test

* Cleanup
2024-05-18 13:53:01 +02:00
Ed c0d1c43003
New event: Approaching unknown shuttle (#24490)
* setup codebase

* Add first shuttle

* tak

* sync striker

* sync 2

* pipipi

* Preloaded roundstart shuttles!

* Make it abstract "PreloaderGrid" not "PreloaderShuttle"

* to do

* added china cuisin shuttle

* fixes

* add disaster evacpod

* remove enemy

* final shuttles

* weight 5 -> 10

* move data to component

* remove autotrailer touching

* doc, respath

* fix frozen positioning

* fixes + cvar

* finally

* fix evacpod

* remove blacklistrules

* remove `UnknownShuttleSpawnRule`, refactor `LoadMapRule` to support preloaded grids

* use tryload

* cleanup

* fixes

* use preloadedgrid for loneops

* weight unknown shuttles differently (preliminal)

* leftover

* cleanup and raffling

* partial review

* singleton gridpreloader no station coupling

* fix grid atmoses

* `roleLoadout` support for `LoadoutComponent`, fix missing gear

* weighting changes

* init logic fix

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
2024-05-18 13:51:30 +02:00
username fe7f506139
Traitor objective issuers (#27855)
* the thing

* another one

---------

Co-authored-by: whateverusername0 <whateveremail>
2024-05-18 13:47:19 +02:00
Mr. 27 a56b364c7e
Prevent non-inital infected from getting the succumb to zombie action (#27820)
* b

* Update ZombieRuleSystem.cs

* hi
2024-05-18 13:35:55 +02:00
Killerqu00 a9f81262d9
Revolutionaries can now cuff command instead of killing/exiling them (#27627)
* command can now be restrained for revs victory

* headrevs still must be killed
2024-05-18 13:34:17 +02:00
ShadowCommander 2d48912bc9
Make arguments and parameters wrap to one variable per line (#27766) 2024-05-18 13:30:18 +02:00
Pieter-Jan Briers 8689c7f90d
Fix preference loading bugs (#27742)
First bug: if an error occured during pref loading code, it would fail. If the person then readied up, it would likely cause the round to fail to start.

Why could they ready up? The code only checks that the prefs finished loading, not that they finished loading *successfully*. Whoops.

Anyways, now people get kicked if their prefs fail to load. And I improved the error handling.

Second bug: if a user disconnected while their prefs were loading, it would cause an exception. This exception would go unobserved on lobby servers or raise through gameticker on non-lobby servers.

This happened even on a live server once and then triggered the first bug, but idk how.

Fixed this by properly plumbing through cancellation into the preferences loading code. The stuff is now cancelled properly.

Third bug: if somebody has a loadout item with a playtime requirement active, load-time sanitization of player prefs could run into a race condition because the sanitization can happen *before* play time was loaded.

Fixed by moving pref sanitizations to a later stage in the load process.
2024-05-18 13:30:09 +02:00
Mr. 27 c4bbb2ae26
Change return to continue in gamerulesystem (#27656)
Update GameRuleSystem.cs
2024-05-15 19:57:51 +02:00
Mr. 27 85f50943eb
Fix some gamerules' round summary not working (#27654)
Update GameRuleSystem.cs
2024-05-15 19:57:37 +02:00
Nemanja c6d1f12be8
fix antag bugs (#27319)
* fix antag bugs

* Update NukeopsRuleComponent.cs
2024-05-15 19:56:34 +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
Kara 1680be6f0d
Fix `TryFindRandomTile` grid weighting (#27724) 2024-05-07 04:39:58 +02:00
Leon Friedrich 5c4aeadd3f
Prevent SecretRule from picking invalid presets (#27456)
* Prevent SecretRule from picking invalid presets

* remove lonely semicolon

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2024-05-07 02:05:12 +02:00
DrSmugleaf e46d06a6d2
Fix the game giving up forever when not being able to start a preset (#27359)
(cherry picked from commit 413d69e71f883501285e1673e5b669713af5547d)
2024-05-03 00:19:11 +02:00
Leon Friedrich 5bb755467e
Add NukeOps Test (#27207)
* Add NukeOps Test

* Update EvacShuttleTest to also check mapinit

* Update RuleMaxTimeRestartTest

* Fix cvar cleanup

* A

* Revert some changes

* comments

* Add MappingTests

* Finally fix the test

* A
2024-05-03 00:01:36 +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
ElectroJr 1ed79afa1d
Un-revert #26994
(cherry picked from commit 3a8249e5fdc3750c46ede6fa04e312b68cdc8f9b)
2024-04-21 23:37:18 +02:00
Vasilis 848da59332
Revert #26994 and #27077 (#27090)
(cherry picked from commit 5769bf38f8c995735b9c08f3cfc8824fc0f1cfdf)
2024-04-21 23:16:06 +02:00
Nemanja 9c59f11c89
Flash buff (#25730)
* flash buff

* oops!

* bool

* 3 -> 1.5 seconds

* okay fix

* sluth

(cherry picked from commit 3af744e4a98839a04da97b608f87b619cd5222cf)
2024-04-21 22:34:16 +02:00
Leon Friedrich 717a2e1712
Content changes for MapManager/System refactor (#26994)
* Content changes for MapManager/System refactor

* Poke Tests

* Why is this failing?

* Will this make the analyzer happy?

(cherry picked from commit ee96d8aa6636ef091ee823b49ff78ebc13bcce5e)
2024-04-21 22:25:07 +02:00
Wrexbe (Josh) 72153e42d0
Make Zombie, Initial Infected fix (#26665)
Make zombie fix

(cherry picked from commit d9c1130d8c20d99286bf3119f38090d093637b51)
2024-04-07 14:34:09 +02:00
Tayrtahn 491b6b7c32
Make the station start with random broken wiring (#26695)
Random wire cutting on round start

(cherry picked from commit a1a12194a58591fade0468cc0889ae69ed4bd292)
2024-04-07 14:32:40 +02:00
Wrexbe (Josh) e8201e1b1a
Auto DeAdmin sooner (#26551)
Co-authored-by: wrexbe <wrexbe@protonmail.com>
(cherry picked from commit 6d1511124f5ba8f3a2ecc5297600e0dd008cfb82)
2024-04-07 14:22:49 +02:00
lzk 8f6d167e72
Send what seleted for secret to admin chat (#26500)
* Send what seleted for secret to admin chat

* add line

* Add localization support

(cherry picked from commit 69a15ada7f83cd7ad6010c7d6ac80ab7fc6b1e23)
2024-04-07 14:11:02 +02:00
Leon Friedrich 480c59499f
Remove atmos method events (#26402)
* Remove HasAtmosphereMethodEvent

* Remove GetTileMixturesMethodEvent

* Remove GetTileMixtureMethodEvent

* Remove GetAdjacentTilesMethodEvent

* Add TileMixtureEnumerator

* Remove GetAdjacentTileMixturesMethodEvent

* Remove IsTileSpaceMethodEvent

* Remove HotspotExposeMethodEvent

* Remove pipe net method events

* Remove device method events

* Use Entity<T>

* Misc fixes

* A

* Theres probably a few more of these

* Fix other resolve errors

(cherry picked from commit 77e029d4ca787485152dec5a4aaafd4589f9ad43)
2024-04-07 14:04:38 +02:00
DEATHB4DEFEAT 758540ffc9
Admin New Player Notification Sound (#24327)
play a sound to active admins when a new player joins

(cherry picked from commit b9db06ebb1af41f2809f6c31dc4990b6a729d041)
2024-03-27 18:28:29 +01:00
Tayrtahn 3dd5dcadc5
Code cleanup: Purge calls to obsolete EntityCoordinates methods (#26292)
* Purge calls to obsolete EntityCoordinates methods

* Pizza defruited; rerun those tests!

(cherry picked from commit f4cb02fb0ca385c858569c07c51afb0d24ade949)
2024-03-24 00:07:58 +01:00
deltanedas e948115f9f
Move faction exception and everything it needs to shared (#25154)
* move faction prototype to shared

* move faction exception and member stuff to shared

* fix breaking changes for random stuff

* move pettable friend stuff to shared

* mostly fix

* final fixy

* dragonops

* final fixy II

* use querys and fix warpspeed fish (probably)

* fixer

* Rrrr!

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>

(cherry picked from commit 7561bef6a7aee65149381e155da53abc65a6a4e7)
2024-03-23 23:55:48 +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
nikthechampiongr 29582a48dc
Add log when a player starts observing. (#26091)
(cherry picked from commit 85e0a5328a28b02fc29575648cfa7421f5bfb410)
2024-03-17 15:05:58 +01:00
Brandon Hu 37f2d417b7
Remove the ability for command or any antag-safe role from being initial infected in zombie mode #25529 (#25785)
* fix(antags): respects canBeAntag = true

* updated more

* includeAllJobs = False??????????

* fixed comma placement

* removed unused dependencies

(cherry picked from commit 511e245de1fe668e0af5d2ae0581c54e44712812)
2024-03-07 01:25:07 +01:00
Fildrance 426b208c1d
fix: lobby music volume will be changed on options change without restart (also lobby music not looped anymore) (#25530)
* fix: lobby music volume will be changed on options change without restart (also lobby music not looped anymore)

* refactor: now lobby music is part of ContentAudioSystem. Lobby playlist is used instead of single track. Client now selects next lobby soundtrack after previous finished.

* refactor: incapsulated info on current lobby track in simple record

* refactor: fixed inconsistent naming between song and soundtrack for lobbymusic

* refactor: xml-doc for LobbyPlaylistChangedEvent

* fix: inverted invalid _audio.PlayGlobal check to return only if lobby soundtrack play call failed

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
(cherry picked from commit 4c87dcd3cb92855df1fa01dea52d2ddd09f2adce)
2024-03-07 01:18:33 +01:00
deltanedas a3a4f14b96
make thief a subgamemode (#25740)
* add SubGamemodes comp/sys

* remove RuleChance from thief rule

* use SubGamemodes for adding thief rule instead of adding ThiefRule component to random gamemodes

* clean up thief rule prototype

* add better logging + end rule if it fails to start

* march 1st incident

* preset ops

* the dreaded

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>

(cherry picked from commit 7f060eb129f100754647e5221e9ebab2b00e6925)
2024-03-07 01:18:13 +01:00
DrSmugleaf 56dd39497a
Make the round end sound collection a cvar (#25741)
* Make the round end sound collection a cvar

* Fix comment

* Clarity

(cherry picked from commit 30ccde0a47f65d0f6b0641f5bf92d95650c4fb87)
2024-03-07 01:13:37 +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
Vasilis 976ae5a466
Add server name into the replay final (#25564)
Turns out this is not what serverid was for... i guess you can find server familys with this so im not gonna remove it. Best we get for server name is the admin logs server name.

(cherry picked from commit 3ef4e835583b99b020c0bb317be99cb06ade2ec9)
2024-03-07 00:52:58 +01:00
ArchPigeon 96d1370bfd
Remove the ability for command or any antag-safe role from being initial infected in zombie mode (#25529)
Remove the ability for command to be initial infected in zombie mode

(cherry picked from commit 580640150285e1f90f25ca014991c09f2fed3cdc)
2024-03-05 09:50:11 +01:00
Vasilis 0c95a1db1a
Add roundid to replay_final.yml (#25398)
oopsy i forgor

(cherry picked from commit 5170593e853ab074f4351281073e4da4e39324bd)
2024-02-21 04:08:52 +01:00
Vasilis f1bacc31d2
Hotfix: Set round end information for replays back to null on round start instead of round end (#25394)
* Hotfix

* I dont think i need this now

(cherry picked from commit 2548b13abf882a33ef3bf98c79ddaf91eddfa956)
2024-02-21 04:03:40 +01:00
Vasilis df79ac49b9
Save round information into replay_final.yml (#23013)
* Save round information into the replay

* Add round end text too

* This is way better

* Get actual job

* oop

* OK THERE

* Fake line endings to make life easier

* I was told this yaml is legal

* I just realised this will make my life easier

* REVIEWS BABY IM A PROGRAMMER MOMMY

* Live pjb reaction

* Live pjb reaction 2

* Reviews 2

* Dont need this

* Please no more have mercy on my soul

* Oh frick

(cherry picked from commit cb999d23f4b15e1c182e1ae4bf2e414306822f89)
2024-02-18 23:36:10 +01:00
Debug 93503d9fd1
WebP lobby images (#25184) 2024-02-18 23:32:45 +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
Hannah Giovanna Dawson 29e65fd324
Actually fix round restart audio this time (#24754)
In which I'm a goober and don't clean up after
myself and accientally don't fix the issue I tried
to fix in my last round restart PR.

The audio is now maintained just like music during
restarts (yippee to ContentAudioSystem::OnRoundRestart)

This needs a refactor but at least the defect is fixed now.

(cherry picked from commit 2e7d23674ed315aa3cd36e5a744008900474c3fd)
2024-02-08 12:31:24 +01:00
Kara d35e2f39a7
Roundstart variation game rules (#24397)
* Raise `StationPostInitEvent` broadcast

* Basic variation pass handling

* standardize names + rule entities

* why does it work like that?

* add to defaults

* light break variation pass

* ent spawn entry

* move some stationevent utility functions to gamerule + add one for finding random tile on specified station

* forgot how statistics works

* powered light variation pass is good now

* station tile count function

* public method to ensure all solutions (for procedural use before mapinit)

* move gamerulesystem utility funcs to partial

* ensure all solutions before spilling in puddlesystem. for use when spilling before mapinit

* trash & puddle variation passes!

* oh yeah

* ehh lets live a little

* std

* utility for game rule check based on comp

* entprotoid the trash spawner oops

* generalize trash variation

* use added instead of started for secret rule

* random cleanup

* generic replacement variation system

* Wall rusting variation rule

* account for modifying while enumerating

* use localaabb

* fix test

* minor tweaks

* reinforced wall replacer + puddletweaker

(cherry picked from commit cc24ba6a317c4bee84ffa1eda8397c255ca92be9)
2024-02-08 12:03:43 +01:00
Simon bb24353b5a
ERT, DeathSquad and Central Command Officer Inital Infected immunity (#23601)
II immunity

Make ERT, DeathSquad and Central Command officers immune to being II

(cherry picked from commit bb828af6d31f2cf705fe9cacb7130a94f70d8092)
2024-01-28 00:32:22 +01:00
LordCarve ad35a2fda3
Obsolete refactor - ConnectedClient to Channel (#24409)
(cherry picked from commit 05a2e6b3a21e5fb3198432d885bbe28506d85b9c)
2024-01-27 23:44:02 +01:00