More physics tweaking (#3728)

* Anchors metal chairs

* Chairs now drop mats on breaking

* Some chairs are now unanchorable

* Ups default friction to .30, increases medical tile friction

* Updates gas canisters to use constructible base

* Updates computers to use constructible base

* Reanchors girder for now

* Vending Machines use base constructible

* Chemmaster and Disposals now has proper physics and use base constructible

* Computers now break properly and frames/unfinished drop metal

* Updates rnd stuff to new base constructible

* Applies reviews for gas cans, potted plants and computers
This commit is contained in:
Swept
2021-03-28 06:00:37 +00:00
committed by GitHub
parent 126b01fa41
commit 4a899fb16d
11 changed files with 162 additions and 194 deletions

View File

@@ -11,10 +11,13 @@
- shape:
!type:PhysShapeAabb
bounds: "-0.5, -0.2, 0.5, 0.2"
layer:
- SmallImpassable
mask:
- Impassable
- MobImpassable
layer:
- Opaque
- MobImpassable
- SmallImpassable
- VaultImpassable
- type: Sprite
sprite: Constructible/Misc/potted_plants.rsi
- type: PottedPlantHide

View File

@@ -6,8 +6,6 @@
placement:
mode: SnapgridCenter
components:
- type: Anchorable
snap: true
- type: Clickable
- type: InteractionOutline
- type: Physics
@@ -35,17 +33,22 @@
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound: /Audio/Effects/metalbreak.ogg
- type: entity
name: chair
id: Chair
parent: SeatBase
components:
- type: Anchorable
snap: true
- type: Rotatable
- type: Sprite
state: chair
color: "#8e9799"
- type: Physics
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
@@ -64,10 +67,13 @@
parent: SeatBase
description: Apply butt.
components:
- type: Anchorable
snap: true
- type: Sprite
state: stool_base
color: "#8e9799"
- type: Physics
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
@@ -85,9 +91,12 @@
id: StoolBar
parent: SeatBase
components:
- type: Anchorable
snap: true
- type: Sprite
state: bar_stool
- type: Physics
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
@@ -139,9 +148,12 @@
parent: SeatBase
description: It looks comfy.
components:
- type: Anchorable
snap: true
- type: Sprite
state: comfychair_preview
- type: Physics
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
@@ -174,3 +186,18 @@
- type: Construction
graph: seat
node: chairWood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 25
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound: /Audio/Effects/woodhit.ogg
- !type:SpawnEntitiesBehavior
spawn:
MaterialWoodPlank:
min: 1
max: 1

View File

@@ -1,16 +1,27 @@
- type: entity
abstract: true
id: GasCanisterBase
placement:
mode: SnapgridCenter
parent: BaseConstructibleDynamic
components:
- type: Clickable
- type: InteractionOutline
- type: Physics
- type: SnapGrid
offset: Center
- type: Sprite
- type: Damageable
- type: Physics
mass: 25
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mask:
- MobImpassable
layer:
- Opaque
- MobImpassable
- SmallImpassable
- VaultImpassable
- type: Destructible
thresholds:
- trigger:
@@ -20,8 +31,6 @@
- !type:DoActsBehavior
acts: ["Destruction"]
- type: GasCanister
- type: Anchorable
- type: Pullable
- type: UserInterface
- type: Appearance
@@ -48,23 +57,6 @@
interfaces:
- key: enum.GasCanisterUiKey.Key
type: GasCanisterBoundUserInterface
- type: Physics
mass: 25
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
mask:
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
- MobImpassable
- VaultImpassable
- SmallImpassable
- type: entity
parent: GasCanister

View File

@@ -1,9 +1,8 @@
- type: entity
id: ComputerFrame
parent: BaseConstructibleDynamic
name: computer frame
description: "A computer under construction. It needs a circuit board."
placement:
mode: SnapgridCenter
components:
- type: Physics
mass: 25
@@ -12,103 +11,77 @@
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Clickable
- MobImpassable
layer:
- Opaque
- MobImpassable
- SmallImpassable
- VaultImpassable
- type: InteractionOutline
- type: Anchorable
- type: Rotatable
- type: Pullable
- type: Construction
graph: computer
node: frameUnsecured
- type: Sprite
sprite: "Constructible/Misc/stock_parts.rsi"
state: "0"
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:PlaySoundCollectionBehavior
soundCollection: GlassBreak
- !type:ChangeConstructionNodeBehavior
node: monitorBroken
- !type:DoActsBehavior
acts: ["Destruction"]
- type: entity
id: ComputerBroken
parent: ComputerFrame
name: broken computer
description: "This computer has seen better days."
components:
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Clickable
- type: InteractionOutline
- type: Anchorable
- type: Construction
graph: computer
node: monitorBroken
- type: Sprite
sprite: "Constructible/Power/computers.rsi"
state: "broken"
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:PlaySoundBehavior
sound: /Audio/Effects/metalbreak.ogg
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: entity
id: ComputerBase
parent: ComputerFrame
name: computer
abstract: true
placement:
mode: SnapgridCenter
components:
- type: Clickable
- type: InteractionOutline
- type: Construction
graph: computer
node: computer
- type: Rotatable
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Computer
- type: PowerReceiver
- type: Anchorable
- type: Pullable
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: monitorBroken
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Sprite
sprite: Constructible/Power/computers.rsi
layers:

View File

@@ -1,12 +1,10 @@
# Vending machine descriptions are stored in vendingMachineInventory YAML files.
- type: entity
id: VendingMachine
parent: BaseConstructible
name: vending machine
abstract: true
placement:
mode: SnapgridCenter
components:
- type: Clickable
- type: InteractionOutline
- type: Sprite
sprite: Constructible/Power/VendingMachines/empty.rsi
@@ -24,8 +22,6 @@
layer:
- Opaque
- MobImpassable
- type: SnapGrid
offset: Center
- type: Damageable
resistances: metallicResistances
- type: Destructible
@@ -47,7 +43,7 @@
BoardName: "Vending Machine"
LayoutId: Vending
- type: Anchorable
- type: Pullable
snap: true
- type: entity
parent: VendingMachine

View File

@@ -1,47 +1,34 @@
- type: entity
id: ResearchAndDevelopmentServer
parent: BaseConstructibleDynamic
name: "R&D server"
description: 'Thats a R&D server.'
placement:
mode: SnapgridCenter
components:
- type: Sprite
sprite: Constructible/Power/server.rsi
state: server
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4, -0.45, 0.45, 0.45"
!type:PhysShapeAabb {}
mask:
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
- SmallImpassable
layer:
- Opaque
- MobImpassable
- VaultImpassable
- SmallImpassable
- type: SnapGrid
offset: Center
- Opaque
- MobImpassable
- type: ResearchServer
- type: TechnologyDatabase
- type: PowerReceiver
powerLoad: 200
priority: Low
- type: Pullable
- type: Anchorable
- type: entity
id: BaseResearchAndDevelopmentPointSource
parent: BaseConstructibleDynamic
name: "base R&D point source"
placement:
mode: SnapgridCenter
# We should make this abstract once there are actual point sources.
components:
- type: Sprite
@@ -51,7 +38,6 @@
- state: rndpointsource
shader: unshaded
map: ["enum.PowerDeviceVisualLayers.Powered"]
- type: Clickable
- type: InteractionOutline
- type: Physics
mass: 25
@@ -60,17 +46,10 @@
- shape:
!type:PhysShapeAabb {}
mask:
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
- SmallImpassable
layer:
- Opaque
- MobImpassable
- VaultImpassable
- SmallImpassable
- type: SnapGrid
offset: Center
- Opaque
- MobImpassable
- type: ResearchPointSource
pointspersecond: 1000
active: true
@@ -82,5 +61,3 @@
visuals:
- type: PowerDeviceVisualizer
- type: PowerReceiver
- type: Pullable
- type: Anchorable

View File

@@ -1,5 +1,6 @@
- type: entity
id: chem_master
parent: BaseConstructible
name: ChemMaster 4000
description: An industrial grade chemical manipulator with pill and bottle production included.
placement:
@@ -16,23 +17,21 @@
state: mixer_loaded
- type: ChemMaster
- type: PowerReceiver
- type: Clickable
- type: InteractionOutline
- type: Anchorable
snap: true
- type: Physics
mass: 25
bodyType: Static
mass: 25
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.25,0.4,0.25"
mask:
- SmallImpassable
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- type: SnapGrid
offset: Center
- type: Damageable
- type: Destructible
thresholds:
@@ -51,10 +50,10 @@
interfaces:
- key: enum.ChemMasterUiKey.Key
type: ChemMasterBoundUserInterface
- type: Pullable
- type: entity
id: chem_master_broken
parent: BaseConstructibleDynamic
name: ChemMaster 4000 [Broken]
description: "An industrial grade chemical manipulator with pill and bottle production included. It's broken."
abstract: true
@@ -68,23 +67,19 @@
- type: Icon
sprite: Constructible/Power/mixer.rsi
state: mixer_broken
- type: Clickable
- type: InteractionOutline
- type: Anchorable
- type: Physics
mass: 25
bodyType: Static
bodyType: Dynamic
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.4,-0.25,0.4,0.25"
mask:
- SmallImpassable
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- type: SnapGrid
offset: Center
- Opaque
- MobImpassable
- type: Damageable
- type: Destructible
thresholds:
@@ -103,4 +98,3 @@
interfaces:
- key: enum.ChemMasterUiKey.Key
type: ChemMasterBoundUserInterface
- type: Pullable

View File

@@ -111,6 +111,7 @@
- type: entity
id: DisposalUnit
parent: BaseConstructible
name: disposal unit
description: A pneumatic waste disposal unit
placement:
@@ -131,28 +132,20 @@
- type: PowerReceiver
- type: DisposalUnit
flushTime: 2
- type: Clickable
- type: InteractionOutline
- type: Physics
bodyType: Static
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.3,-0.35,0.3,0.35"
bounds: "-0.4,-0.25,0.4,0.25"
mask:
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- SmallImpassable
- type: SnapGrid
offset: Center
- type: Anchorable
snap: true
- type: Damageable
resistances: metallicResistances
- type: Destructible
@@ -163,6 +156,13 @@
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound: /Audio/Effects/metalbreak.ogg
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 1
- type: Appearance
visuals:
- type: DisposalUnitVisualizer
@@ -180,7 +180,6 @@
interfaces:
- key: enum.DisposalUnitUiKey.Key
type: DisposalUnitBoundUserInterface
- type: Pullable
- type: entity
id: DisposalRouter

View File

@@ -3,10 +3,17 @@
parent: BaseConstructibleDynamic
name: girder
description: A large structural assembly made out of metal; It requires a layer of metal before it can be considered a wall.
placement:
snap:
- Wall
components:
- type: Physics
bodyType: Static
mass: 50
fixtures:
- shape:
!type:PhysShapeAabb {}
layer:
- SmallImpassable
mask:
- VaultImpassable
- type: InteractionOutline
- type: Construction
graph: girder

View File

@@ -1,4 +1,4 @@
- type: tile
name: floor_dark
display_name: Dark floor
@@ -8,7 +8,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemDark
- type: tile
@@ -20,7 +20,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
- type: tile
name: floor_freezer
@@ -31,7 +31,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemFreezer
- type: tile
@@ -43,7 +43,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
- type: tile
name: floor_green_circuit
@@ -54,7 +54,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemGCircuit
- type: tile
@@ -66,7 +66,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemLino
- type: tile
@@ -78,7 +78,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemMono
- type: tile
@@ -90,7 +90,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemReinforced
- type: tile
@@ -102,7 +102,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemRock
- type: tile
@@ -114,7 +114,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds:
friction: 0.35
friction: 0.30
item_drop: FloorTileItemShowroom
- type: tile
@@ -126,7 +126,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemSteel
- type: tile
@@ -138,7 +138,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemDirty
- type: tile
@@ -150,7 +150,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.5
friction: 0.30
item_drop: FloorTileItemTechmaint
- type: tile
@@ -162,7 +162,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.1
friction: 0.25
item_drop: FloorTileItemWhite
- type: tile
@@ -174,7 +174,7 @@
is_subfloor: false
can_crowbar: false
footstep_sounds: footstep_asteroid
friction: 0.35
friction: 0.30
- type: tile
name: floor_asteroid_tile
@@ -185,7 +185,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_asteroid
friction: 0.35
friction: 0.30
item_drop: FloorTileItemAsteroid
- type: tile
@@ -197,7 +197,7 @@
is_subfloor: false
can_crowbar: false
footstep_sounds: footstep_asteroid
friction: 0.35
friction: 0.30
- type: tile
name: floor_asteroid_coarse_sand1
@@ -208,7 +208,7 @@
is_subfloor: false
can_crowbar: false
footstep_sounds: footstep_asteroid
friction: 0.35
friction: 0.30
- type: tile
name: floor_asteroid_coarse_sand2
@@ -219,7 +219,7 @@
is_subfloor: false
can_crowbar: false
footstep_sounds: footstep_asteroid
friction: 0.35
friction: 0.30
- type: tile
name: floor_asteroid_coarse_sand_dug
@@ -230,7 +230,7 @@
is_subfloor: false
can_crowbar: false
footstep_sounds: footstep_asteroid
friction: 0.35
friction: 0.30
- type: tile
name: floor_snow
@@ -241,7 +241,7 @@
is_subfloor: false
can_crowbar: false
footstep_sounds: footstep_snow
friction: 0.35
friction: 0.30
- type: tile
name: floor_gold
@@ -252,7 +252,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: FloorTileItemGold
- type: tile
@@ -264,7 +264,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: SheetGlass1
- type: tile
@@ -276,9 +276,9 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
item_drop: SheetRGlass1
- type: tile
name: floor_warning1
display_name: Warning Tile
@@ -288,7 +288,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
- type: tile
name: floor_warning2
@@ -299,7 +299,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
- type: tile
name: floor_white_warning1
@@ -310,7 +310,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
- type: tile
name: floor_white_warning2
@@ -321,7 +321,7 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30
- type: tile
name: floor_blue
@@ -332,4 +332,4 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_floor
friction: 0.35
friction: 0.30

View File

@@ -8,5 +8,5 @@
is_subfloor: false
can_crowbar: true
footstep_sounds: footstep_wood
friction: 0.35
friction: 0.30
item_drop: FloorTileItemWood