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())
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
mass: 150
|
||||
layer:
|
||||
- SmallImpassable
|
||||
mask:
|
||||
- VaultImpassable
|
||||
- type: Nuke
|
||||
diskSlot:
|
||||
name: Disk
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
mass: 5
|
||||
mask:
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
restitution: 0.3 # fite me
|
||||
friction: 0.2
|
||||
- type: Sprite
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
mass: 50
|
||||
mask:
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
- type: Damageable
|
||||
damageContainer: Inorganic
|
||||
damageModifierSet: Metallic
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
radius: 0.2
|
||||
mask:
|
||||
- Impassable
|
||||
- SmallImpassable
|
||||
- VaultImpassable
|
||||
mass: 10
|
||||
- type: Sprite
|
||||
sprite: Structures/Furniture/chairs.rsi
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
mass: 70
|
||||
mask:
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
layer:
|
||||
- Opaque
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
mass: 25
|
||||
mask:
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
layer:
|
||||
- Opaque
|
||||
@@ -93,7 +92,6 @@
|
||||
mass: 25
|
||||
mask:
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
layer:
|
||||
- Opaque
|
||||
|
||||
@@ -624,7 +624,6 @@
|
||||
mass: 75
|
||||
mask:
|
||||
- Impassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
layer:
|
||||
- Opaque
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
mass: 100
|
||||
mask:
|
||||
- Impassable
|
||||
- MobImpassable
|
||||
- VaultImpassable
|
||||
- SmallImpassable
|
||||
layer:
|
||||
- Opaque
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
bounds: "-0.45,-0.45,0.45,0.45"
|
||||
mass: 50
|
||||
layer:
|
||||
- SmallImpassable
|
||||
- VaultImpassable
|
||||
mask:
|
||||
- Impassable
|
||||
- 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:
|
||||
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
|
||||
|
||||
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