diff --git a/Content.Shared/Climbing/SharedClimbingComponent.cs b/Content.Shared/Climbing/SharedClimbingComponent.cs index cbf09437f7..5a48ad08e8 100644 --- a/Content.Shared/Climbing/SharedClimbingComponent.cs +++ b/Content.Shared/Climbing/SharedClimbingComponent.cs @@ -23,7 +23,7 @@ namespace Content.Shared.Climbing foreach (var entity in physicsComponent.GetBodiesIntersecting()) { - if ((entity.CollisionLayer & (int) CollisionGroup.SmallImpassable) != 0) return true; + if ((entity.CollisionLayer & (int) CollisionGroup.VaultImpassable) != 0) return true; } return false; @@ -83,11 +83,11 @@ namespace Content.Shared.Climbing { if (value) { - fixture.CollisionMask &= ~(int) CollisionGroup.SmallImpassable; + fixture.CollisionMask &= ~(int) CollisionGroup.VaultImpassable; } else { - fixture.CollisionMask |= (int) CollisionGroup.SmallImpassable; + fixture.CollisionMask |= (int) CollisionGroup.VaultImpassable; } } } diff --git a/Content.Shared/Standing/StandingStateSystem.cs b/Content.Shared/Standing/StandingStateSystem.cs index 74e464ea53..b77c1ed736 100644 --- a/Content.Shared/Standing/StandingStateSystem.cs +++ b/Content.Shared/Standing/StandingStateSystem.cs @@ -7,6 +7,8 @@ using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Player; using Robust.Shared.Timing; +using Robust.Shared.Physics; +using Content.Shared.Physics; namespace Content.Shared.Standing { @@ -62,6 +64,14 @@ namespace Content.Shared.Standing // Seemed like the best place to put it appearance?.SetData(RotationVisuals.RotationState, RotationState.Horizontal); + if (TryComp(uid, out FixturesComponent? fixtureComponent)) + { + foreach (var fixture in fixtureComponent.Fixtures.Values) + { + fixture.CollisionMask &= ~(int) CollisionGroup.VaultImpassable; + } + } + // Currently shit is only downed by server but when it's predicted we can probably only play this on server / client // > no longer true with door crushing. There just needs to be a better way to handle audio prediction. if (playSound) @@ -97,6 +107,15 @@ namespace Content.Shared.Standing RaiseLocalEvent(uid, new StoodEvent(), false); appearance?.SetData(RotationVisuals.RotationState, RotationState.Vertical); + + if (TryComp(uid, out FixturesComponent? fixtureComponent)) + { + foreach (var fixture in fixtureComponent.Fixtures.Values) + { + fixture.CollisionMask |= (int) CollisionGroup.VaultImpassable; + } + } + return true; } } diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index f14c8e0765..fae687c9e8 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -26,7 +26,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -72,7 +71,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -250,7 +248,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -298,7 +295,6 @@ mask: - Impassable - MobImpassable - - VaultImpassable - SmallImpassable layer: - Opaque @@ -353,7 +349,6 @@ mask: - Impassable - MobImpassable #Bullets!? - - VaultImpassable - SmallImpassable layer: - Opaque @@ -462,7 +457,6 @@ mask: - Impassable - MobImpassable - - VaultImpassable - SmallImpassable layer: - Opaque @@ -501,7 +495,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -618,7 +611,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -722,7 +714,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -765,7 +756,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -809,7 +799,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -849,7 +838,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -889,7 +877,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -934,7 +921,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml index e53aa51d0c..8fbaf4589b 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml @@ -23,7 +23,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -200,7 +199,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque @@ -322,7 +320,6 @@ mask: - Impassable - MobImpassable #Bullets?! - - VaultImpassable - SmallImpassable layer: - Opaque diff --git a/Resources/Prototypes/Entities/Objects/Devices/nuke.yml b/Resources/Prototypes/Entities/Objects/Devices/nuke.yml index 8ed9ca6a4a..9f8205a5b1 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/nuke.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/nuke.yml @@ -20,8 +20,6 @@ mass: 150 layer: - SmallImpassable - mask: - - VaultImpassable - type: Nuke diskSlot: name: Disk diff --git a/Resources/Prototypes/Entities/Objects/base_item.yml b/Resources/Prototypes/Entities/Objects/base_item.yml index 60128bee9a..a55b296db9 100644 --- a/Resources/Prototypes/Entities/Objects/base_item.yml +++ b/Resources/Prototypes/Entities/Objects/base_item.yml @@ -28,7 +28,7 @@ mass: 5 mask: - Impassable - - VaultImpassable + - SmallImpassable restitution: 0.3 # fite me friction: 0.2 - type: Sprite diff --git a/Resources/Prototypes/Entities/Structures/Furniture/Tables/base_structuretables.yml b/Resources/Prototypes/Entities/Structures/Furniture/Tables/base_structuretables.yml index ba727db529..b20f4eeb08 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/Tables/base_structuretables.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/Tables/base_structuretables.yml @@ -9,6 +9,17 @@ damageContainer: Inorganic damageModifierSet: Metallic - type: PlaceableSurface + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.45,-0.45,0.45,0.45" + mass: 50 + layer: + - VaultImpassable + mask: + - Impassable + - SmallImpassable - type: Sprite netsync: false - type: Icon diff --git a/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml b/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml index 3c137e1bce..983bcaca83 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml @@ -17,7 +17,7 @@ mass: 50 mask: - Impassable - - VaultImpassable + - SmallImpassable - type: Damageable damageContainer: Inorganic damageModifierSet: Metallic diff --git a/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml b/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml index d35011825d..8ff2870af6 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml @@ -17,7 +17,7 @@ radius: 0.2 mask: - Impassable - - SmallImpassable + - VaultImpassable mass: 10 - type: Sprite sprite: Structures/Furniture/chairs.rsi diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml index ab7bce4241..df1bbae7a6 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/base_structureclosets.yml @@ -35,7 +35,6 @@ mass: 70 mask: - Impassable - - VaultImpassable - SmallImpassable layer: - Opaque diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml index b8a74a5f73..d3c8e427eb 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml @@ -28,7 +28,6 @@ mass: 25 mask: - Impassable - - VaultImpassable - SmallImpassable layer: - Opaque @@ -93,7 +92,6 @@ mass: 25 mask: - Impassable - - VaultImpassable - SmallImpassable layer: - Opaque diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml index 1585c2418b..bdbf8db105 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml @@ -624,7 +624,6 @@ mass: 75 mask: - Impassable - - VaultImpassable - SmallImpassable layer: - Opaque diff --git a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml index bf1cd78171..bf69407612 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml @@ -17,8 +17,6 @@ mass: 100 mask: - Impassable - - MobImpassable - - VaultImpassable - SmallImpassable layer: - Opaque diff --git a/Resources/Prototypes/Entities/Structures/base_structure.yml b/Resources/Prototypes/Entities/Structures/base_structure.yml index 2d90cfc849..e451d7dd5f 100644 --- a/Resources/Prototypes/Entities/Structures/base_structure.yml +++ b/Resources/Prototypes/Entities/Structures/base_structure.yml @@ -16,7 +16,7 @@ bounds: "-0.45,-0.45,0.45,0.45" mass: 50 layer: - - SmallImpassable + - VaultImpassable mask: - Impassable - type: Pullable diff --git a/Resources/Prototypes/Entities/Structures/plastic_flaps.yml b/Resources/Prototypes/Entities/Structures/plastic_flaps.yml new file mode 100644 index 0000000000..c4f3cff2c9 --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/plastic_flaps.yml @@ -0,0 +1,66 @@ +- type: entity + id: PlasticFlapsClear + parent: BaseStructureDynamic + name: plastic flaps + suffix: Clear + description: Heavy duty, plastic flaps. Definitely can't get past those. No way. + placement: + mode: SnapgridCenter + components: + - type: Sprite + netsync: false + sprite: Structures/plastic_flaps.rsi + state: plasticflaps + drawdepth: Mobs + - type: Physics + - type: Transform + anchored: true + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,0.49" + mass: 100 + layer: + - VaultImpassable + mask: + - Impassable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - type: IconSmooth + key: walls + mode: NoSprite + - type: Construction + graph: PlasticFlapsGraph + node: plasticFlaps + +- type: entity + id: PlasticFlapsOpaque + parent: PlasticFlapsClear + name: plastic flaps + suffix: Opaque + description: Heavy duty, plastic flaps. Definitely can't get past those. No way. + components: + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,0.49" + mass: 100 + layer: + - Opaque + - VaultImpassable + mask: + - Impassable + - type: Occluder + sizeX: 32 + sizeY: 32 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/plastic_flaps.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/plastic_flaps.yml new file mode 100644 index 0000000000..9f8497ac98 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/plastic_flaps.yml @@ -0,0 +1,26 @@ +- type: constructionGraph + id: PlasticFlapsGraph + start: start + graph: + - node: start + actions: + - !type:DestroyEntity {} + edges: + - to: plasticFlaps + completed: + - !type:SnapToGrid { } + steps: + - material: Plastic + amount: 5 + doAfter: 10 + - node: plasticFlaps + entity: PlasticFlapsClear + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: SheetPlastic + amount: 5 + steps: + - tool: Anchoring + doAfter: 10 diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 316eb1bf34..1a9bc18398 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -450,7 +450,7 @@ conditions: # Same here. - 20kdc - !type:TileNotBlocked - + - type: construction name: ground light post id: LightGroundFixture @@ -672,5 +672,20 @@ icon: sprite: Structures/Doors/MineralDoors/paper_door.rsi state: closed + +- type: construction + name: airtight plastic flaps + id: PlasticFlapsClear + graph: PlasticFlapsGraph + startNode: start + targetNode: plasticFlaps + category: Structures + placementMode: SnapgridCenter + description: A plastic flap to let items through and keep people out. + objectType: Structure + canBuildInImpassable: false + icon: + sprite: Structures/plastic_flaps.rsi + state: plasticflaps conditions: - !type:TileNotBlocked diff --git a/Resources/Textures/Structures/plastic_flaps.rsi/meta.json b/Resources/Textures/Structures/plastic_flaps.rsi/meta.json new file mode 100644 index 0000000000..14aa3ce996 --- /dev/null +++ b/Resources/Textures/Structures/plastic_flaps.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from Tgstation https://github.com/tgstation/tgstation/commit/f72bc7781be5198ee9c8475267d32cb4dbb07286", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "plasticflaps" + } + ] +} diff --git a/Resources/Textures/Structures/plastic_flaps.rsi/plasticflaps.png b/Resources/Textures/Structures/plastic_flaps.rsi/plasticflaps.png new file mode 100644 index 0000000000..c6441b6c9e Binary files /dev/null and b/Resources/Textures/Structures/plastic_flaps.rsi/plasticflaps.png differ