Updates for the netcode refactor. (#69)

* Updates for the netcode refactor.

* Change HandsGui to control.

Why? No idea but drawing of it works again.

* Fix hand change sync.

* Update submodule
This commit is contained in:
Pieter-Jan Briers
2018-05-13 11:54:21 +02:00
committed by GitHub
parent 20cf3a6a9b
commit 85b4be3ff4
5 changed files with 15 additions and 32 deletions

View File

@@ -45,7 +45,7 @@ namespace Content.Server.GameObjects
/// <returns></returns>
bool Remove(IEntity toremove)
{
if(storage.Remove(toremove))
if (storage.Remove(toremove))
{
StorageUsed -= toremove.GetComponent<StoreableComponent>().ObjectSize;
UpdateClientInventory();
@@ -61,7 +61,7 @@ namespace Content.Server.GameObjects
/// <returns></returns>
bool Insert(IEntity toinsert)
{
if(CanInsert(toinsert) && storage.Insert(toinsert))
if (CanInsert(toinsert) && storage.Insert(toinsert))
{
StorageUsed += toinsert.GetComponent<StoreableComponent>().ObjectSize;
UpdateClientInventory();
@@ -77,7 +77,7 @@ namespace Content.Server.GameObjects
/// <returns></returns>
bool CanInsert(IEntity toinsert)
{
if(toinsert.TryGetComponent(out StoreableComponent store))
if (toinsert.TryGetComponent(out StoreableComponent store))
{
if (store.ObjectSize <= (StorageCapacityMax - StorageUsed))
return true;
@@ -95,7 +95,7 @@ namespace Content.Server.GameObjects
{
var hands = user.GetComponent<HandsComponent>();
//Check that we can drop the item from our hands first otherwise we obviously cant put it inside
if(hands.Drop(hands.ActiveIndex))
if (hands.Drop(hands.ActiveIndex))
{
var inserted = Insert(attackwith);
if (inserted)