Commit Graph

86 Commits

Author SHA1 Message Date
Pieter-Jan Briers
0c97520276 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-09 18:17:56 +02:00
lolman360
3638b2f44e fixes items with complex shapes failing to insert sometimes (#38896)
* fixes item insertion bug

fixes bug where items with complex shapes would fail to insert if the item's StoredRotation wasn't a right angle

* independence from StoredRotation
2025-08-07 12:01:18 -04:00
poklj
f76e3b63b7 Changeling devour and transform (#34002)
* Initial:

Create Devour componentry, preliminary identity storage and the systems
for Devouring

* I have genuinely no idea what i'm doing

- added the radial menu, it has nothing in it.

- trying to get it to populate. the event under the event is broken,
i don't know why, but apparently it's not typed right

- Added a placeholder transform

- oh also fixed up some devour stuff and moved some things around.

* Holey moley, Transform, better devour, oh my!

- Move DnaComponent into Shared because we need it for the DNA cloning

- Make Transform MOSTLY work on the LAST identity devoured.

- Fix some issues on devour that involved prediction, canceling and
Damage exeucting (Thanks Plykiya for pointing out AttemptFrequency!)

* Proper tail stealing and Damage modifier attempt

Add check to add a wagging component on the Changeling if the victim's
species Prototype had one.

attempt to add the Damage mitigation check

* MAJOR CLEANUP AND FIXES AUGH 3 DAYS!!!

- Nullspaced a clone of a victim

- fix audio using server virtualized Pvs (i hate this)

- fix the mispredicted doafters

- Clean up a wholelotta code

- utilize clone systems to clone appearances

- Move CloneAppearance from server to shared So we can actually access
it

* Examine stuff, more cleanup, Jumpsuit ripping

- make rotting prevent the action

- Add ripping of clothing (guh why is it also server)

- add some System stuff for pushing husked corpse inspection

- clean up more badcode

* Doing things properly, UI sorta kinda works.

- Utilize Relayed events for Devour checking

- Get a UI that partially works, Says the name of identities, doesn't
show their looks

- Make use of the New Dynamic BUI assignment

- commit the sin of no client prediction cause nullspace entities aren't
networked

* Got an entity for the Frontend transform

Issue with the looks

* Stick a camera into a fake mobs forehead

- Get the UI to see the net entity in pause space by using a
ViewSubscriber to get the Pvs from the initially stored identity entity

- Remove all the other parts used to try to get this to work before hand

* Raaaaadiallllllls also fix protection coefficents

- Change FancyWindow to Radial

- Fix Issue where coeffeient checking was the wrong way round

* absolutely massive cleanup, no more camera in mobs

- cleaned up event variables that are not needed

- Removed the use of a Pause space and go back to Nullspace usage

- use a PvsOverride rather than ViewSharing

- Remove old commented out code and Lots of unused code

* Fix "Ui elements" dying  on the screen

- some minor cleanup

- don't start the entities that get cloned

* ftl, cleanup, and fixing missing transform details

- add replace functionality to TypingIndicatorSystem and
BodyEmotesSystem

- add placeholder sounds and functions to TransformBodyEmotes

- add extra Pvs handling for later use

- attributions for the funny straw sound

- Sound collections for all of the sounds

- various cleanups

* Some extra cleanup

* Fix some false assumptions about TypingIndicator

- Bubbles now transfer on spawned humans rather than used humans

- Clean up YET MORE CODE

- make it so you can't eat yourself

* Oooprs, forgot to add a Husked Corpse Loc

* Missing period in the husked corpse loc

* bad devour windup placeholder

* Husking and WIP Lungs

- Husking now will be prevented from Revival fully and will change
the appearance of players

* Add finalized Sprites for actions and final meta

- add devour on and off sprites

- add transform action sprite

- Add Armblade sprite for future use

- Credit obscenelytinyshark for the sprites <3

* Remove ling lungs, Entity<> everything

- Remove the ling lungs stuff for now... body system is overly
complicated, makes my head hurt

- Switch every method to use Entity<> from Uid, Comp format

* cleanup, admin logging, WIP Roles

* Admin verb, Roundstart, gamerule stuff

- add a Admin verb to make Changelingification easy!

- Add game rule stuff for admin verb and to tell the hapless
goober how to be a changeling... sorta

- clean up parts to make VV easy... USE THE VERB!!

* Armor Coefficent Check

- Remove bespoke changeling armor check and replace it
with a generic armor coefficient query.

* move to UnrevivableComponent instead of husked

- Move UnrevivableComponent to shared

- add Analyzable and ReasonMessage to UnrevivableComponent
to give granular control of the message and whether or not it shows up
in the analyzer

- remove the check for HuskedComponent in DefibrillatorSystem

* aaaaaaa CopyComp

- Some cleanup

- make Vocal system shared

- make VocalSystem Not make more Actions than it needs

- Use some code from ChameleonProjector so we can copy components

- partially ungod method the Transform system

* Cleanup, Moving more things to CopyComp

- TransformBodyEmotes now uses CopyComp (it's a server component so i
need to tell the server to deal with it

- TypingIndicatorComponent also now uses CopyComp

- cleaned up old, now unused "replace" methods in favor of CopyComp

- BodyEmotesSystem now has a publically accessable LoadSounds to deal
with the same problem Screaming had

* WIP

* Devour Windup noise, ForensicsSystem cleanup

* Revert VocalSystem Changes

- Reverted Moving VocalSystem to shared, copy comp acomplishes it

- added component.ScreamActionEntity = null; for copy comp

* cleanup unneeded comments

* revert an accidental line removal

* Remove duplicate SharedHumanoidAppearanceSystem

* Cleanup Typo's and import Forensics components for Dna

* Some more forensics calls

* cleanup use CopyComp for now until CopyComps

* CR cleanup

* Undo some SharedHumanoidAppearanceSystem changes

* Confound these spaces

* Some Copycomp stuff and fixing some PVS override

* use the proper TryCopyComps that are merged

* Change TransformMenu with RadialWithSector

* All sounds done, Fix lack of typing indicator issue

* Updated attributions to include used sound authors

* some ftl typos and mind_role text issue

* DNA, Screaming, appearance, grammar, wagging

- reduced all of the above using ApplyComponentChanges

- Issue still remains with bodyEmotes sticking around in the UI

* Fix UI stuff, partials, entprotoid, good practices

- bunch of partials added

- UI now has a predicted message

- EntProtoID in the admin verb

- RipClothing now uses Entity<ButcherableComponent>

- husking is now optional (off by default) for testing/till we have
hivemind/when we figure out what were doing with devour

- remove TransformGrammarSet

* More CR stuff and documentation

- Make TargetIsProtected less of a meme, with a prototype
set of DamageTypes to check

- Documenation everywhere

- Move DevourEvents into its own file

* Predicted sounds and fix the comp clone list

- Made all start and stop sounds shared

- Split out the rest of the events and UI stuff into subfiles

- Fixed some Clone comp list issues where comments had -'s causing them
to be read incorrectly

* Damage cap check, Identity Shutdown cleanup, cleanup

* Sound stuff (but actually this time)

* Missed documentation

* Missed Documentation and a EntProtoId

* Remove unused dependency

* Remove a nullcheck

* Some dummy minplayers

* CR - Husked now uses a rem/ensure

* Update Actions in the Prototype

* Fixup mindswap handover

- cleanup and handover PVS on mindswap

* Fixup Missing meta from accidental "Take-theirs"

* Add the Armblade to the roundstart-role

* Cleanup, CR (everything but the UI and renames)

* missed a spot

* missed some more whitespace

* Renames

* Primary constructor and a space in these trying times

* User interface stuff for Slime transformation

* popup prediction

* Ling devour no longer makes duplicate identities

- added a key to identities to the original victim

- Add some extra clone settings

* add guard statements to OnClones

* SentOnlyToOwner additions

* fix for sound stoppage error

* Move Organ deleter into soon to be atomized husk

* clone event inventory

* mono sounds

* lower sound volume

* Fix networked sound warning

* Clone comps thing

* review

* attributions

* Fix clobbered changes

* I'm gonna weh out

- whole bunch of CR changes

* fix some very buggy git

* okay its fixed

* address most review points

* fix inventory

* we hate entityuids

* fix test and more cleanup

* move this

* fix more stuff

* fix validation and rootable

* Remove Quickswitch due to some UI quirks

* oops left out some better explanation

* remove dangling LastConsumed component fields

* fix test fail

* try this

* cleanup cloning subscriptions, add movement speed modifier

* fix slime storage

* fix cloning setting inheritance

* Add session information to transform admin logs

* slay the integration test hydra

* dwarf size

* more volume tweaks

* comments

* improve comments and unpredict deletion due to errors when shutting down the server

* fix displancement cloning

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-06 21:55:49 +02:00
Tayrtahn
c565b44965 Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)
* The easy ones

* For certain values of easy

* Easy test

* Hair

* Fix sandbox violations

* Sort usings
2025-07-07 21:57:05 +02:00
Nemanja
524725d378 HandsSystem Refactor (#38438)
* checkpoint

* pt 2

* pt... i forgot

* pt 4

* patch

* More test fixes

* optimization!!!

* the REAL hand system

* fix RetractableItemActionSystem.cs oversight

* the review

* test

* remove test usage of body prototype

* Update Content.IntegrationTests/Tests/Interaction/InteractionTest.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* hellcode

* hellcode 2

* Minor cleanup

* test

* Chasing the last of the bugs

* changes

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-06-25 15:13:03 +02:00
slarticodefast
be761ea537 merge stable into master (#37856) 2025-05-26 21:37:20 +02:00
Nemanja
854c506a75 Fix storage fastpath logical oversight (#37852) 2025-05-26 21:26:28 +02:00
slarticodefast
c1f1eaa0c3 Cleanup TryGetContainingContainer (#37752)
kill
2025-05-23 17:11:29 +02:00
metalgearsloth
d924e11c3a Fix storage (#37714)
The one path I forgot to get the relative index.
2025-05-22 10:11:36 -04:00
metalgearsloth
a393033c64 Optimise storage a quadrillion times (#37638)
* Optimise storage a quadrillion times

* How sweaty can we get

* Add fast angle checks

* Fix chunk indices

* Optimise the refresh method

Helps on client a lot as the clientside is suboptimal atm.

* Better name

* wawawewa

* Add single-angle path

* Okay FINE rider
2025-05-21 02:16:26 -04:00
slarticodefast
0e586e3fae Hotfix: Fix item toggling crashing the client for slimes (#37054)
fix item toggling crashing the server for slimes
2025-04-30 02:19:07 +02:00
metalgearsloth
e1a21728e7 Storage fixes (#36533)
* Storage fixes

- Add size event.
- Fix reclaim not running always.

* Block the toggles

* Standardise and popup explaining

* Disable item toggles in bags

* Fix verb popping up even if we can't activate

* Conflicts

* Validate

* Stop drags if source closes

* Really fixes

* Real fix

* Revert this
2025-04-18 12:11:31 +10:00
beck-thompson
28b4fd9763 Fix trash bag visuals (#32386)
* First commit

* Dont even look what I did at first I'm silly

* more negative diff!!
2025-04-17 20:36:23 +10:00
Milon
3a6441932e Directional BoundUserInterfaceMessageAttempt content edition (#36320) 2025-04-12 01:33:32 +10:00
lzk
8f049f174d make admin interacts with storages silent (#35417)
* make admin interacts with storages silent

* review

* silent insert and transfer

* i love code

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
2025-03-27 18:42:57 +01:00
ArtisticRoomba
deea33a36a DetGadget Hat Revitalization (#35438)
* DetGadget Hat

* uh... half-assed item description

* Reduce hat range to one tile, you have to stand on someone to steal their hat items

* Fix Integration Errors

* Only the wearer can access voice commands

* init work - handscomp is unable to be pulled

* second bit of progress

* basic working implementation

* nuke storageslots and add adminlogging

* disallow trolling nukies or hiding objective items

* remove unnecessary tags additions

* finish nuking unused tags

* death to yamllinter

* int tests be damned

* milon is a furry

* address review

* upd desc

* address reviews part 2

* address more reviews

* remove unused refs

* fix order of dependencies

* add ShowVerb to SharedStorageSystem.cs

This will allow or disallow showing the "Open Storage" verb if defined on the component.

* orks is a nerd

* add proper locale, fix adminlogging

* orks is a nerd 2

---------

Co-authored-by: Coenx-flex <coengmurray@gmail.com>
2025-03-01 19:03:27 +01:00
lzk
b8806759fd make opening storage on verb or on interact not silent (#35413)
* make storage make sound

* remove

Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>

---------

Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
2025-02-22 18:01:33 -08:00
Kyle Tyo
c8dce26dbb Replace obsolete FromMap calls with ToCoordinates (#35304) 2025-02-20 23:03:42 +11:00
metalgearsloth
cf38814515 General storage fixes (#34845)
* Fix storage stars

* Fix some more storage bugs

- Fix positions not saving.
- Fix the 1-tick delay between parent and child storage UIs opening / closing.
- Fix BackButton being visible sometimes when it shouldn't be.

* milon is a furry
2025-02-17 19:24:34 +11:00
metalgearsloth
e971d6e077 Revert engine reverties (#34968) 2025-02-08 17:17:55 +11:00
Errant
fc80a18c35 Revert "Storage UI V2 (#33045)"
This reverts commit fd25dac720.
2025-02-05 14:13:06 +01:00
Errant
d6a9ddd9e0 Revert "Storage sidebar fix (#34680)"
This reverts commit 3e091c4dfa.
2025-02-05 14:12:52 +01:00
metalgearsloth
3e091c4dfa Storage sidebar fix (#34680) 2025-01-28 10:09:52 +11:00
metalgearsloth
fd25dac720 Storage UI V2 (#33045) 2025-01-27 21:29:51 +11:00
slarticodefast
908e476643 Fix admins not being able to health scan slimes (#33884) 2024-12-18 01:12:35 +01:00
SlamBamActionman
89392e2424 Remove drag & drop dropping items from containers (#32706)
* Initial commit

* Update based on maintainer discussion

* Forgot to remove this woops
2024-11-20 12:00:38 +11:00
Callmore
7039f87bd4 Fix saving prefered quick store item locations (#32480)
this was just copypasted without any context wasn't it
2024-10-16 23:00:52 -05:00
metalgearsloth
f46f5e2835 Fix storage area pickup sound playing multiple times (#32397) 2024-09-27 17:09:17 +10:00
Dvir
50395e25cf Allow AreaInsert pickups for one item (#32153)
Update SharedStorageSystem.cs
2024-09-24 16:23:48 +02:00
ShadowCommander
3fc9f96b75 Move PlaceableSurfaceComponent usages to PlaceableSurfaceSystem (#28384)
* Move placeable check to PlaceableSurfaceSystem

This check stops entities from being inserted into a storage entity
when it has a PlaceableSurfaceComponent.

The entity is instead placed on top of the entity like a table.

* Move SetPlaceable to PlaceableSurfaceSystem

* Update to transform system and consolidate code

* Fix interaction with storage that has a placeable component

* deadlock

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-09-19 17:42:49 +10:00
slarticodefast
8f4ee7ac96 Make storage implant closable using the action again (#31381) 2024-08-24 11:31:02 +10:00
ShadowCommander
2f77d0d4f3 Add a component that inserts the held item when no interaction happens on the stored item (#29823)
* Insert when held item has no interaction with stored item

* Decouple inserting on failure

* Add component that stores the used entity when no interaction happened

* Add prediction
2024-08-11 12:29:44 +10:00
Plykiya
190ceda02e Add BreakOnDropItem, update do afters, remove unnecessary declarations (#30361)
* Add BreakOnDropItem, update do afters, remove unnecessary declarations

* bola

* Changed my mind about the nuke

* gennies too

* Make the comments more clear.

* Sorry for the trailing commas

* Revert "Sorry for the trailing commas"

This reverts commit e60fd9a30977393df3344948e6d5c0ce035723cd.

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-08-08 13:39:46 +02:00
Leon Friedrich
b4dfeec696 Add more storage admin logs & fix some interaction validation (#30725) 2024-08-07 10:15:41 +10:00
slarticodefast
bb2981400c replace all uses of TryGetContainingContainer with non-obsolete overload (#30583)
* replace all uses of TryGetContainerContainer with non-obsolete overload

* rerun
2024-08-04 15:38:53 +10:00
Plykiya
edd9bb6e74 Quieter bag sounds (#30225)
Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-22 12:54:15 +03:00
Crude Oil
6c6ae35cf8 Add ability to show stack visuals on closed containers (#29309)
* add ability to show stack visuals on closed containers

* remove container stack visuals logic from sharedstoragesystem

* improve comments a bit

* move logic for open/closed containers into itemcountersystem

* move behavior to storage component

* remove unused import

* remove old comment

* fix comments

* fix wrong property name

* Update Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

* Rename variable for clarity

---------

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
2024-07-20 22:49:48 -07:00
DrSmugleaf
58efe4fdd1 Fix storages bugging out if an open storage has its component removed (#29485)
* Fix storages bugging out if an open storage has its component removed

* Fix error on close
2024-06-27 00:11:51 +10:00
Tayrtahn
0b3459268a Add logging to SharedStorageSystem prototype indexing failure (#29273) 2024-06-21 10:16:43 +10:00
Leon Friedrich
ba57e3e4d9 Add closing storage UIs to StorageInteractionTest (#28633) 2024-06-05 18:14:25 -04:00
Plykiya
d6ba166d3b Replace obsolete EntityWhitelist IsValid usages (#28465)
* Replace obsolete whitelist is valid with whitelist system

* Consistency

* Fix logic

* Bork

* I figured out how to get whitelists on the client lol

* test fail

* woops

* HELP ME FUNCTIONS

* Fix errors

* simplify

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-06-01 23:10:24 -04:00
Nemanja
a1a8f04036 Decouple interactions from hands, cleanup old events, add new fears (#28393)
* ok basic shit

* second part

* pretend it isn't real it can't hurt you.

* 👁️ 👁️

* shadowcommander review
2024-05-31 13:26:19 -07:00
DrSmugleaf
8619f241d4 Fix not networking whitelist and blacklist in storage component (#28238) 2024-05-25 16:07:37 -04:00
Leon Friedrich
76e13eed35 Improve InteractionSystem range & BUI checks (#27999)
* Improve InteractionSystem range & BUI checks

* Ghost fixes

* AAA

* Fix test

* fix nullable

* revert to broadcast event

* Fixes for eengine PR

* Ah buckle code

* )
2024-05-24 15:03:03 +10:00
DrSmugleaf
594a898260 Fix whatever the fuck is going on in storage system slightly (#28236)
* Fix whatever the fuck is going on in storage system slightly

* Fix inverted check

* h

* Add silent bool

* Silent
2024-05-23 18:23:55 -07:00
Leon Friedrich
0f6e1196d8 Use non-generic TryComp() for metadata & transform (#28133) 2024-05-20 22:40:35 -07:00
Kara
d6e2cc0a8b Open slot storage keybind can now also close the UI (#27962) 2024-05-12 20:03:07 -04:00
ShadowCommander
1db48b86d1 Fix collection modified error when locking storage (#27913) 2024-05-11 02:25:40 -07:00
Sphiral
de729f9037 Make storage UI close upon being locked (#27810)
* make storage close on lock

* formatting and comments

* Update Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

Co-authored-by: ShadowCommander <shadowjjt@gmail.com>

* Apply suggestions from code review

Co-authored-by: ShadowCommander <shadowjjt@gmail.com>

* Swap to foreach instead of for

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

---------

Co-authored-by: ShadowCommander <shadowjjt@gmail.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2024-05-08 23:50:50 -07:00
Tayrtahn
236da1cd27 Make UseDelay SetLength do EnsureComp (#27601)
Make UseDelay.SetLength do EnsureComp
2024-05-02 22:16:16 +10:00