Add PlaceCentered bool to PlaceableSurfaceComponent (#2771)

* Added bool _placeCentered to check if an entity must be placed at mouse position or center of the PlaceableSurface (+ offset) when dropped.

* private variables formatted to camel case

* Use EqualsApprox in the setter for PositionOffset

* -Changed client-side SurfaceComponent to camelCase
-Added placeCentered and positionOffset to PlaceableSurfaceComponentState
-Getter and setters for placeCentered and positionOffset client-side

* Update Content.Client/GameObjects/Components/PlaceableSurfaceComponent.cs

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>

* Add "_" to private vars name

* Made YAML properties camelCase

* Add "_" to private vars name

* Call Dirty() when IsPlaceable,PlaceCentered and PositionOffset are changed.

* Removed Dirty() from client.

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
Morshu32
2021-01-10 13:07:33 +01:00
committed by GitHub
parent 7bf80fd4b8
commit 7bfdf30268
4 changed files with 91 additions and 6 deletions

View File

@@ -38,6 +38,7 @@
- SmallImpassable
- type: EntityStorage
- type: PlaceableSurface
placeCentered: true
- type: Damageable
resistances: metallicResistances
- type: Destructible