Changes required for component tree engine PR (#13109)

This commit is contained in:
Leon Friedrich
2022-12-27 15:34:22 +13:00
committed by GitHub
parent c02fbc3659
commit 7c7c7d3206
8 changed files with 5 additions and 15 deletions

View File

@@ -29,6 +29,7 @@ public abstract class SharedDoorSystem : EntitySystem
[Dependency] protected readonly SharedAudioSystem Audio = default!; [Dependency] protected readonly SharedAudioSystem Audio = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!; [Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly OccluderSystem _occluder = default!;
/// <summary> /// <summary>
/// A body must have an intersection percentage larger than this in order to be considered as colliding with a /// A body must have an intersection percentage larger than this in order to be considered as colliding with a
@@ -390,8 +391,8 @@ public abstract class SharedDoorSystem : EntitySystem
if (!collidable) if (!collidable)
door.CurrentlyCrushing.Clear(); door.CurrentlyCrushing.Clear();
if (door.Occludes && Resolve(uid, ref occluder, false)) if (door.Occludes)
occluder.Enabled = collidable; _occluder.SetEnabled(uid, collidable);
} }
/// <summary> /// <summary>

View File

@@ -186,7 +186,8 @@ namespace Content.Shared.Examine
continue; continue;
} }
var bBox = o.BoundingBox.Translated(entMan.GetComponent<TransformComponent>(o.Owner).WorldPosition); var bBox = o.BoundingBox;
bBox = bBox.Translated(entMan.GetComponent<TransformComponent>(o.Owner).WorldPosition);
if (bBox.Contains(origin.Position) || bBox.Contains(other.Position)) if (bBox.Contains(origin.Position) || bBox.Contains(other.Position))
{ {

View File

@@ -127,8 +127,6 @@
mask: mask:
- WallLayer - WallLayer
- type: Occluder - type: Occluder
sizeX: 32
sizeY: 32
- type: Transform - type: Transform
anchored: true anchored: true
- type: Airtight - type: Airtight

View File

@@ -57,8 +57,6 @@
key: walls key: walls
mode: NoSprite mode: NoSprite
- type: Occluder - type: Occluder
sizeX: 32
sizeY: 32
- type: entity - type: entity
id: MetalDoor id: MetalDoor

View File

@@ -24,8 +24,6 @@
- !type:DoActsBehavior - !type:DoActsBehavior
acts: ["Destruction"] acts: ["Destruction"]
- type: Occluder - type: Occluder
sizeX: 32
sizeY: 32
- type: Airtight - type: Airtight
- type: Fixtures - type: Fixtures
fixtures: fixtures:

View File

@@ -42,8 +42,6 @@
- WallLayer - WallLayer
density: 1000 density: 1000
- type: Occluder - type: Occluder
sizeX: 32
sizeY: 32
- type: Airtight - type: Airtight
- type: StaticPrice - type: StaticPrice
price: 75 price: 75

View File

@@ -67,8 +67,6 @@
graph: Window graph: Window
node: tintedWindow node: tintedWindow
- type: Occluder - type: Occluder
sizeX: 32
sizeY: 32
- type: StaticPrice - type: StaticPrice
price: 0.75 price: 0.75

View File

@@ -62,8 +62,6 @@
- Opaque - Opaque
- MidImpassable - MidImpassable
- type: Occluder - type: Occluder
sizeX: 32
sizeY: 32
- type: entity - type: entity
id: PlasticFlapsAirtightClear id: PlasticFlapsAirtightClear