Skip to content

Commit

Permalink
[MIRROR] Changes required for component tree engine PR (space-wizards#38
Browse files Browse the repository at this point in the history
)

* Changes required for component tree engine PR (space-wizards#13109)

* Changes required for component tree engine PR

Co-authored-by: Leon Friedrich <[email protected]>
Co-authored-by: lunar-crater-ex <[email protected]>
  • Loading branch information
3 people authored Dec 27, 2022
1 parent 4767f64 commit 81065cf
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 15 deletions.
5 changes: 3 additions & 2 deletions Content.Shared/Doors/Systems/SharedDoorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public abstract class SharedDoorSystem : EntitySystem
[Dependency] protected readonly SharedAudioSystem Audio = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly OccluderSystem _occluder = default!;

/// <summary>
/// A body must have an intersection percentage larger than this in order to be considered as colliding with a
Expand Down Expand Up @@ -390,8 +391,8 @@ protected virtual void SetCollidable(EntityUid uid, bool collidable,
if (!collidable)
door.CurrentlyCrushing.Clear();

if (door.Occludes && Resolve(uid, ref occluder, false))
occluder.Enabled = collidable;
if (door.Occludes)
_occluder.SetEnabled(uid, collidable);
}

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/Examine/ExamineSystemShared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ public static bool InRangeUnOccluded<TState>(MapCoordinates origin, MapCoordinat
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))
{
Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Effects/chemistry_effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@
mask:
- WallLayer
- type: Occluder
sizeX: 32
sizeY: 32
- type: Transform
anchored: true
- type: Airtight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
key: walls
mode: NoSprite
- type: Occluder
sizeX: 32
sizeY: 32

- type: entity
id: MetalDoor
Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Structures/Walls/asteroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Occluder
sizeX: 32
sizeY: 32
- type: Airtight
- type: Fixtures
fixtures:
Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Structures/Walls/walls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
- WallLayer
density: 1000
- type: Occluder
sizeX: 32
sizeY: 32
- type: Airtight
- type: StaticPrice
price: 75
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
graph: Window
node: tintedWindow
- type: Occluder
sizeX: 32
sizeY: 32
- type: StaticPrice
price: 0.75

Expand Down
2 changes: 0 additions & 2 deletions Resources/Prototypes/Entities/Structures/plastic_flaps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
- Opaque
- MidImpassable
- type: Occluder
sizeX: 32
sizeY: 32

- type: entity
id: PlasticFlapsAirtightClear
Expand Down

0 comments on commit 81065cf

Please sign in to comment.