Add buildable plastic flaps (#6583)
Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Content.Shared.Climbing
|
|||||||
|
|
||||||
foreach (var entity in physicsComponent.GetBodiesIntersecting())
|
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;
|
return false;
|
||||||
@@ -83,11 +83,11 @@ namespace Content.Shared.Climbing
|
|||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
fixture.CollisionMask &= ~(int) CollisionGroup.SmallImpassable;
|
fixture.CollisionMask &= ~(int) CollisionGroup.VaultImpassable;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fixture.CollisionMask |= (int) CollisionGroup.SmallImpassable;
|
fixture.CollisionMask |= (int) CollisionGroup.VaultImpassable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
using Robust.Shared.Physics;
|
||||||
|
using Content.Shared.Physics;
|
||||||
|
|
||||||
namespace Content.Shared.Standing
|
namespace Content.Shared.Standing
|
||||||
{
|
{
|
||||||
@@ -62,6 +64,14 @@ namespace Content.Shared.Standing
|
|||||||
// Seemed like the best place to put it
|
// Seemed like the best place to put it
|
||||||
appearance?.SetData(RotationVisuals.RotationState, RotationState.Horizontal);
|
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
|
// 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.
|
// > no longer true with door crushing. There just needs to be a better way to handle audio prediction.
|
||||||
if (playSound)
|
if (playSound)
|
||||||
@@ -97,6 +107,15 @@ namespace Content.Shared.Standing
|
|||||||
RaiseLocalEvent(uid, new StoodEvent(), false);
|
RaiseLocalEvent(uid, new StoodEvent(), false);
|
||||||
|
|
||||||
appearance?.SetData(RotationVisuals.RotationState, RotationState.Vertical);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -72,7 +71,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -250,7 +248,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -298,7 +295,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable
|
- MobImpassable
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -353,7 +349,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets!?
|
- MobImpassable #Bullets!?
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -462,7 +457,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable
|
- MobImpassable
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -501,7 +495,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -618,7 +611,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -722,7 +714,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -765,7 +756,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -809,7 +799,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -849,7 +838,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -889,7 +877,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -934,7 +921,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -200,7 +199,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -322,7 +320,6 @@
|
|||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable #Bullets?!
|
- MobImpassable #Bullets?!
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
mass: 150
|
mass: 150
|
||||||
layer:
|
layer:
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
mask:
|
|
||||||
- VaultImpassable
|
|
||||||
- type: Nuke
|
- type: Nuke
|
||||||
diskSlot:
|
diskSlot:
|
||||||
name: Disk
|
name: Disk
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
mass: 5
|
mass: 5
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
- SmallImpassable
|
||||||
restitution: 0.3 # fite me
|
restitution: 0.3 # fite me
|
||||||
friction: 0.2
|
friction: 0.2
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
@@ -9,6 +9,17 @@
|
|||||||
damageContainer: Inorganic
|
damageContainer: Inorganic
|
||||||
damageModifierSet: Metallic
|
damageModifierSet: Metallic
|
||||||
- type: PlaceableSurface
|
- 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
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
- type: Icon
|
- type: Icon
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
mass: 50
|
mass: 50
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
- SmallImpassable
|
||||||
- type: Damageable
|
- type: Damageable
|
||||||
damageContainer: Inorganic
|
damageContainer: Inorganic
|
||||||
damageModifierSet: Metallic
|
damageModifierSet: Metallic
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
radius: 0.2
|
radius: 0.2
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- SmallImpassable
|
- VaultImpassable
|
||||||
mass: 10
|
mass: 10
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Structures/Furniture/chairs.rsi
|
sprite: Structures/Furniture/chairs.rsi
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
mass: 70
|
mass: 70
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
mass: 25
|
mass: 25
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
@@ -93,7 +92,6 @@
|
|||||||
mass: 25
|
mass: 25
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
|
|||||||
@@ -624,7 +624,6 @@
|
|||||||
mass: 75
|
mass: 75
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
|
|||||||
@@ -17,8 +17,6 @@
|
|||||||
mass: 100
|
mass: 100
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- MobImpassable
|
|
||||||
- VaultImpassable
|
|
||||||
- SmallImpassable
|
- SmallImpassable
|
||||||
layer:
|
layer:
|
||||||
- Opaque
|
- Opaque
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
bounds: "-0.45,-0.45,0.45,0.45"
|
bounds: "-0.45,-0.45,0.45,0.45"
|
||||||
mass: 50
|
mass: 50
|
||||||
layer:
|
layer:
|
||||||
- SmallImpassable
|
- VaultImpassable
|
||||||
mask:
|
mask:
|
||||||
- Impassable
|
- Impassable
|
||||||
- type: Pullable
|
- type: Pullable
|
||||||
|
|||||||
66
Resources/Prototypes/Entities/Structures/plastic_flaps.yml
Normal file
66
Resources/Prototypes/Entities/Structures/plastic_flaps.yml
Normal file
@@ -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
|
||||||
@@ -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
|
||||||
@@ -672,5 +672,20 @@
|
|||||||
icon:
|
icon:
|
||||||
sprite: Structures/Doors/MineralDoors/paper_door.rsi
|
sprite: Structures/Doors/MineralDoors/paper_door.rsi
|
||||||
state: closed
|
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:
|
conditions:
|
||||||
- !type:TileNotBlocked
|
- !type:TileNotBlocked
|
||||||
|
|||||||
14
Resources/Textures/Structures/plastic_flaps.rsi/meta.json
Normal file
14
Resources/Textures/Structures/plastic_flaps.rsi/meta.json
Normal file
@@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
Resources/Textures/Structures/plastic_flaps.rsi/plasticflaps.png
Normal file
BIN
Resources/Textures/Structures/plastic_flaps.rsi/plasticflaps.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 280 B |
Reference in New Issue
Block a user