Commit Graph

127 Commits

Author SHA1 Message Date
Perry Fraser
5ade6688e7 HOTFIX Fix pickup effects occurring with verb creation (#38705)
* fix: don't run pickup effects on verb creation

* review

* redundant

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-11 21:42:10 +02:00
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
slarticodefast
4bd437272f fix ItemSlotsSystem debug assert (#38655) 2025-06-29 10:33:58 -04:00
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07: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
ScarKy0
208b245dcb Retractable items system + Arm Blade action (#38150) 2025-06-14 21:29:06 +03:00
Fildrance
291ccfbe23 Spray nozzle can suck puddles into tank directly! (#30600)
* feat: now vacuum cleaner can suck solutions from floor

* refactor using AbsorbentSystem instead of separate vacuum cleaner

* refactor: remove unused vacuum cleaner files

* refactor: renamed ConnectedContainerComponent to SlotBasedConnectedContainerComponent (and system)

* fix: fix invalid comp name

* fix: no more spray nozzle messaging about water inside bottles etc.

* refactor: minor refactor in SlotBasedConnectedContainerSystem and adjustments after merge

* refactor: cleanups

* refactor: renaming

* refactor: update to use _puddleSystem.GetAbsorbentReagents

* refactor: changed interactions with SlotBasedConnectedContainerSystem into events

* refactor: new sound and action delay adjusted to sound (amount tweaked a bit accordingly, almost)

* refactor: added networking for SlotBasedConnectedContainerComponent

* fix attribution for vacuum-cleaner-fast.ogg

* trying to fix multi-license for mix sound file

* remove empty line

* refactor: remove trailing whitespace

* by ref struct, brother

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2025-05-25 23:36:16 -04:00
metalgearsloth
63dfd21b14 Predict dumping (#32394)
* Predict dumping

- This got soaped really fucking hard.
- Dumping is predicted, this required disposals to be predicte.d
- Disposals required mailing (because it's tightly coupled), and a smidge of other content systems.
- I also had to fix a compnetworkgenerator issue at the same time so it wouldn't mispredict.

* Fix a bunch of stuff

* nasty merge

* Some reviews

* Some more reviews while I stash

* Fix merge

* Fix merge

* Half of review

* Review

* re(h)f

* lizards

* feexes

* feex
2025-04-19 16:20:40 +10:00
Leon Friedrich
e4f3d19094 Make MappingDataNode use string keys (#36111)
* MappingDataNode string keys

* a

* poke
2025-04-18 19:28:22 +10:00
Tayrtahn
99484ad744 Make ContainerFillSystem print contents on failure (#36128)
* Make ContainerFill/EntityTableContainerFill print current contents when failing to spawn an entity

* List each entry on a new line; add fallback for empty
2025-03-28 16:37:34 +01:00
TemporalOroboros
f37d5c9f0f Purge uses of TransformComponent.AttachToGridOrMap (#34940)
Switches over all extant uses of TransformComponent.AttachToGridOrMap to use SharedTransformSystem.AttachToGridOrMap
2025-02-07 12:49:22 +01:00
Booblesnoot42
ded6b46b80 Remove instant cryobed insertion (#34619)
* added optional delay to DragInsertContainerComponent

* comments

* Change EntryDelay on DragInsertContainerComponent to use TimeSpan + cleanup

* changed drag insert container comp to match naming conventions
2025-02-05 15:46:21 +01:00
ArtisticRoomba
d6e55edb4a Make Mime PDA interactions silent (#34426)
* make insert and eject datafields in ItemSlotsComponent.cs nullable, make mime PDA silent

* make it so that you can't fit wirecutters into the slots, among other various things
2025-01-15 19:03:49 +01:00
Brandon Li
26194e2f41 Fix ItemSlotSystem popup Logic (#28856)
* move popup call out of `CanInsert` into `OnInteractUsing`

* im stupid and `reason` is completely unnecessary

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>

* return early when `itemSlots.Slots.Count == 0`

* tweak logic for triggering popups

* change popup logic again

* Consolidate whitelist check

* Get any popup message not just last failed slot

* Apply suggestions from code review

Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>

* yoink

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>

---------

Signed-off-by: Brandon Li <sirbrandonthenerd@gmail.com>
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>
2024-11-01 20:33:26 -05:00
ShadowCommander
7ceb2d2507 Add a method to get the first available ItemSlot (#29846)
* Add a method to get the first available ItemSlot

* Make TryInsertEmpty use TryGetAvailableSlot

* Add param doc comments
2024-09-19 09:55:53 +10:00
metalgearsloth
ae4c7ad0bc ContainerComp fix (#31434)
Forgot to push these ones on the branch.
2024-08-26 01:22:01 +10:00
metalgearsloth
c0a07614c0 ItemToggle + slots stuff (#31312)
* ItemToggle + slots stuff

- Add component for itemslot locks to match LockComponent (surprised this didn't exist).
- Add thing for pointlight to match itemtoggle. In future should be used for PDAs and stuff but need to fix some other stuff first.

* Also this

* grill
2024-08-25 22:30:28 +10:00
metalgearsloth
a89d4c750b Power stuff (#31314)
* Power stuff

- Add shared IsPowered
- Add shared ResolveApc
- Move PowerChangedEvent to shared for now
- Add SlimPoweredLight that actually functions how you'd expect a PoweredLight to function it id didn't have a bunch of bloat on it.

* big update

* boing
2024-08-25 22:18:42 +10:00
metalgearsloth
f03fc585ba Add ContainerComp (#31311)
Applies EntProtoId changes upon insertion / removal from container. Can also be useful for borgs / mechs / vehicles in future but atm I just used it for AI.
2024-08-25 22:06:06 +10:00
Nemanja
437c861622 Entity Tables (EntitySpawnEntry replacement) (#30579)
* Entity table code

* entity table examples

* fix dat shit

* access

* tests tests tests

* sloth review
2024-08-09 22:12:40 -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
DrSmugleaf
0e0f50f3d1 Prioritize empty item slots when inserting (#28203)
* Prioritize empty item slots when inserting

* Revert "Prioritize empty item slots when inserting"

This reverts commit 4272a65cba5fc18df801812b0af20123aec08409.

* Prioritize empty item slots when inserting

* Try drop

* Check for any can insert before dropping
2024-05-23 14:16:14 +10:00
metalgearsloth
5896e68752 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
2024-04-26 18:16:24 +10:00
metalgearsloth
fc4389f2d7 Fix itemslots swapping (#25634)
Fix itemslots prediction
2024-03-30 14:31:47 +11:00
Tayrtahn
4a83c36585 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
2024-03-19 23:27:02 -04:00
LordCarve
06d755a860 Make ItemSlots more verbose + AME proof of concept (#25779)
* Make itemslots more verbose with AME proof of concept.

* Remove unnecessary [DataField] strings and use null coalescing in whitelist checks.

* Change optional popup fields into LocId.
2024-03-03 16:37:34 +11:00
metalgearsloth
a9502be29e Revert "Fix chat bubbles (#25643)" (#25645)
* Revert "Fix chat bubbles (#25643)"

This reverts commit 23d2c4d924.

* Revert "Fixes obsolete Transform warnings in Content. (#25256)"

This reverts commit f284b43ff6.
2024-02-28 00:51:20 +11:00
Krunklehorn
6485dd4f4d Revert "Fix ItemSlots prediction" (#25610)
Revert "Fix ItemSlots prediction (#25552)"

This reverts commit ad29dbe302.
2024-02-27 23:32:16 +11:00
TemporalOroboros
f284b43ff6 Fixes obsolete Transform warnings in Content. (#25256)
* Fix TransformComponent.MapPosition warnings in Content.Client

* Fix TransformComponent.MapPosition warnings in Content.IntegrationTests

* Fix TransformComponent.MapPosition warnings in Content.Shared

* Fix TransformComponent.MapPosition warnings in Content.Server

* Fix TransformComponent.WorldPosition warnings in Content.Shared

* Fix TransformComponent.WorldPosition warnings in Content.Client
Excepts ClickableComponent b/c that needs to be ECS'd entirely later

* Fix TransformComponent.WorldPosition warnings in Content.Server

* Fix TransformComponent.WorldRotation warnings in Content.*

* Fix TransformComponent.MapPosition warnings I missed

* Fix TransformComponent.WorldMatrix warnings in Content.*

* Fix TransformComponent.InvWorldMatrix warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotationMatrixWithInv warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotationMatrix warnings in Content.*

* Fix TransformComponent.GetWorldPositionRotation warnings in Content.*

* Fix TransformComponent.Anchored.set warnings in Content.*

* Fix TransformComponent.Coordinates.set warnings in Content.*

* Fix TransformComponent.LocalPosition.set warnings in Content.*

* Fix TransformComponent.AttachToGridOrMap warnings in Content.*

* Fix TransformComponent.AttachParent warnings in Content.*

* Preempt TransformComponent.LocalRotation.set warnings in Content.Shared

* Preempt TransformComponent.LocalRotation.set warnings in Content.Client

* Preempt TransformComponent.LocalRotation.set warnings in Content.IntegrationTests

* Preempt TransformComponent.LocalRotation.set warnings in Content.Server

* Fix/Preempt the remaining obsolete TransformComponent properties/methods in Content.*

* ECS ClickableComponent

* Fix obsolete SharedTransformSystem methods in Content.*

* Fix ExplosionOverlay `SharedTransformSystem` dependency

* Maybe fix null eye position breaking tests

* MGS requested changes
2024-02-27 12:06:20 +11:00
metalgearsloth
ad29dbe302 Fix ItemSlots prediction (#25552)
IDK what this arg is for but seems okay with guns. Without it it always thinks the insertion can work.
2024-02-25 12:22:43 -08:00
Kevin Zheng
9394a26245 Add limited-reagent dispensers (#23907)
* Add limited-reagent dispensers

* Add empty versions for all dispensers

* Fix lint

* Set initial window size so all buttons are visible

* Simplify logic, add parenthesis

* Use localized name for initial labels

* Adjust button style

* Avoid touching items before MapInit

* Remove pre-labeling

* Reduce diff

* Clean up YAML

* Fix test

* Really fix test

* Document

* Adjust based on review

* Add labels for obnoxiously long bottles

---------

Co-authored-by: AWF <you@example.com>
2024-01-17 16:43:48 -05:00
Nemanja
e075a90421 fix cryo bed dragging (#24125) 2024-01-15 17:40:18 -05: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
Nemanja
58d518a2a0 Fix small logic issue in item slot swapping (#23378)
fix swapping item slots sometimes failing
2024-01-03 17:16:37 +11:00
TemporalOroboros
7a77d6d5dd Content ecs containers (#22484) 2023-12-28 01:30:03 -04:00
Kara
fdf718e586 Reimplement smart equipping (#22815)
* Reimplement smart equipping

* inv prediction fix

* oops
2023-12-22 01:17:09 +11:00
metalgearsloth
269c93245d Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:34 +11:00
metalgearsloth
64343c289d Revert Arch testmerge 2 (#21901) 2023-11-26 14:20:07 +11:00
metalgearsloth
855ab4d129 Update submodule to 182.1.0 (#21900) 2023-11-26 13:53:54 +11:00
metalgearsloth
d4bed09cdc Revert the other arch changes (#21871) 2023-11-24 11:19:46 +11:00
metalgearsloth
93bd9972f1 Content arch (#20107)
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-11-23 14:34:37 +11:00
metalgearsloth
5b8f3c48c4 Revert "Update submodule to 175.0.0 (#21318)" (#21319) 2023-10-29 15:29:30 +11:00
metalgearsloth
9b1b3e03ed Content audio (#20862) 2023-10-29 14:58:23 +11:00
Doru991
6b04aaf964 Potato battery update + potato AI (#21142)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-10-26 00:52:49 +11:00
DrSmugleaf
f560f88eb5 Remove 700 usages of Component.Owner (#21100) 2023-10-19 12:34:31 -07:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
metalgearsloth
4d1c3ae66a Revert "Remove IContainer and move functions to the container system.… (#19975) 2023-09-10 21:46:36 +10:00
deltanedas
24810d916b ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-10 16:20:27 +10:00
Leon Friedrich
b45e53603d Remove IContainer and move functions to the container system. (#19834) 2023-09-10 12:16:37 +10:00
Leon Friedrich
2d71eec6f9 Remove AllComponentsOneEntityDeleteTest (#19965)
* Remove AllComponentsOneEntityDeleteTest

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2023-09-09 19:35:05 -05:00