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>
This commit is contained in:
ShadowCommander
2024-09-19 00:42:49 -07:00
committed by GitHub
parent bdd0561254
commit 3fc9f96b75
4 changed files with 31 additions and 8 deletions

View File

@@ -364,7 +364,9 @@ public abstract class SharedStorageSystem : EntitySystem
if (args.Handled || !CanInteract(args.User, (uid, storageComp), storageComp.ClickInsert, false))
return;
if (HasComp<PlaceableSurfaceComponent>(uid))
var attemptEv = new StorageInteractUsingAttemptEvent();
RaiseLocalEvent(uid, ref attemptEv);
if (attemptEv.Cancelled)
return;
PlayerInsertHeldEntity((uid, storageComp), args.User);