Add Buckling (#1155)

* Create BuckleableComponent.cs

* Add strap component and keybind to buckle targeted entity

* Remove buckle keybind, turn it into a verb

* Add moving and attaching the buckled entity to the strap

* Fix reality collapsing when clicking on a buckled entity

* Add strap position to buckle a mob in the standing or down position

* Add new default strap position that makes no change to the mob's standing state

* Add Strap component to office chairs and stools

* Add Strap component to the pilot chair

* Add buckled status effect icon

* Add status effect click behaviour

* Add buckling and unbuckling sounds

* Change Buckle verb to only appear when an entity can be currently buckled

* Rotate buckled entity in the direction of the seat

* Disable entity rotation when buckled

* Fix buckle rotation on beds

* Buckling now finds the closest strap to the buckleable entity

* Fix rotation when unbuckling an entity

* Move buckle verb to StrapComponent

* Added buckled entity unbuckle verb, range and interaction checks

* Add checks for currently occupied straps

* Add unbuckling entity if its respective strap component is removed

* Add Clickable, InteractionOutline and Collidable components to bed

* Add rotation property to strap component

* Rename Buckleable to Buckle

* Add Buckle and Strap sizes to buckle multiple entities in the same strap

* Remove out of range popup message from strap verb GetData

* Move BuckledTo setter logic to its methods

* Fix Strap BuckledEntities being public

* Fix not updating status when Buckle component is removed

* Change BuckleComponent.BuckledTo to be of type StrapComponent

* Fix NRE when unbuckling

* Add buckle perspective messages

* Fix not equals comparison in strap verb

* Add added check to Strap TryAdd

* Change buckle.ogg and unbuckle.ogg from stereo to mono

* Remove -2f volume on buckle and unbuckle sounds

* Add summary to Strap TryAdd and Remove methods

* Make buckled entities unable to fall

* Fix default strap position not rotating the buckled entity

* Add downing after unbuckling an entity if it is knocked down

* Prevent an entity from buckling onto itself

Fixes stack overflow error

* Disable recursive buckling

* Add buckling onto straps by clicking them with an empty hand

* Add recursive buckle check to the trybuckle method as well

* Fix being able to click on a different strap to unbuckle from the current one

* Merge TryUnbuckle and ForceUnbuckle with a force argument

* Remove explicit unimplemented status effect clicking cases

* Add documentation to EffectBlockerSystem and ActionBlockerSystem
This commit is contained in:
DrSmugleaf
2020-06-25 15:52:24 +02:00
committed by GitHub
parent f07cb9042b
commit 602dac393e
24 changed files with 798 additions and 34 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -12,6 +12,8 @@
- type: Icon
sprite: Buildings/furniture.rsi
state: stool_base
- type: Strap
position: Stand
- type: entity
name: bar stool
@@ -38,6 +40,8 @@
- type: Icon
sprite: Buildings/furniture.rsi
state: officechair_white
- type: Strap
position: Stand
- type: entity
name: dark office chair
@@ -53,6 +57,8 @@
- type: Icon
sprite: Buildings/furniture.rsi
state: officechair_dark
- type: Strap
position: Stand
- type: entity
name: chair
@@ -68,6 +74,8 @@
- type: Icon
sprite: Buildings/furniture.rsi
state: chair
- type: Strap
position: Stand
- type: entity
name: wooden chair
@@ -84,11 +92,17 @@
name: bed
id: Bed
components:
- type: Clickable
- type: InteractionOutline
- type: Collidable
- type: Sprite
sprite: Buildings/furniture.rsi
state: bed
- type: Icon
sprite: Buildings/furniture.rsi
state: bed
- type: Strap
position: Down
rotation: -90
placement:
mode: SnapgridCenter

View File

@@ -10,19 +10,16 @@
- type: Icon
sprite: Buildings/furniture.rsi
state: chair
- type: Collidable
- type: Clickable
- type: InteractionOutline
- type: EntityStorage
showContents: true
noDoor: true
- type: Damageable
- type: Destructible
thresholdvalue: 100
- type: Physics
- type: ShuttleController
- type: Strap
position: Stand

View File

@@ -1,5 +1,5 @@
# Both humans and NPCs inherit from this.
# Anything player specific (e.g. UI, input) goes under HumanMob_Content
# Anything human specific (e.g. UI, input) goes under HumanMob_Content
- type: entity
save: false
name: Urist McHands
@@ -127,12 +127,14 @@
- type: Appearance
visuals:
- type: SpeciesVisualizer2D
- type: BuckleVisualizer2D
- type: CombatMode
- type: Teleportable
- type: CharacterInfo
- type: FootstepSound
- type: HumanoidAppearance
- type: AnimationPlayer
- type: Buckle
- type: UnarmedCombat
range: 0.8
arcwidth: 30

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B