Add chess (and mostly just tabletop backend stuff) (#4429)

* Add draggable tabletop component

* Use EntityCoordinates instead

* Don't send coordinates every frame

* Add chessboard + verb WIP

* Add documentation, verb networking works now

* Work so far
Need PVS refactor before being able to continue
Current code is broken

* viewsubscriber magic

* yes

* Fix map creation

* Add chess pieces, attempt prediction

* Add chess sprites and yml

* Clamping + other stuff

* fix

* stuff

* StopDragging() StartDragging()

* add piece grabbing

* Refactor dragging player to seperate event

* 🤣 Who did this 🤣💯👌

* 📮 sussy 📮

* Update chessboard sprite, scale piece while dragging

* yes

* ye

* y

* Close tabletop window when player dies

* Make interaction check more sane

* Fix funny behaviour when stunned

* Add icon

* Fix rsi

* Make time passed check more accurate

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Use EyeManager.PixelsPerMeter

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Add missing import

* Move viewport properties to XAML

* Make shared system and component abstract

* Use built in EntityManager

* Use RaiseNetworkEvent instead of SendSystemNetworkMessage

* Cache ViewSubscriberSystem

* Move unnecessary code to prototype

* Delete map on component shutdown instead of round restart

* Make documentation match rest of codebase

* Use ComponentManager instead of TryGetComponent

* Use TryGetComponent instead of GetComponent

* Add nullspace check to ClampPositionToViewport()

* Set world pos instead of local pos

* Improve server side verification

* Use visualizer

* Add netsync: false to sprites using visualizer

* Close window when chessboard is picked up

* Update to master

* Fix bug when opening window while another is opened

* Use ComponentManager

* Use TryGetValue

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Visne
2021-09-13 11:58:44 +02:00
committed by GitHub
parent 19551047c8
commit 973926fc9a
41 changed files with 1287 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

View File

@@ -0,0 +1,47 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/3edffc96061f135b836bc353ee29ad9ab220fa54",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "w_pawn"
},
{
"name": "w_rook"
},
{
"name": "w_knight"
},
{
"name": "w_bishop"
},
{
"name": "w_king"
},
{
"name": "w_queen"
},
{
"name": "b_pawn"
},
{
"name": "b_rook"
},
{
"name": "b_knight"
},
{
"name": "b_bishop"
},
{
"name": "b_king"
},
{
"name": "b_queen"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Visne",
"size": {
"x": 18,
"y": 18
},
"states": [
{
"name": "chessboard"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Stanbery Trask#5343, Visne",
"size": {
"x": 274,
"y": 274
},
"states": [
{
"name": "chessboard_tabletop"
}
]
}