Interaction Features (#101)
Various minor interaction features. There is no concept of gravity in the game yet, so items drift through space or the hallways of a station until they are stopped. Thrown items do not collide with walls because making them collidable makes them collide with EVERYTHING, including the player. We need collision groups in the physics system. Because of the previous problems the velocity things are throw at is set quite low, it can be tweaked after the other mentioned issues are resolved.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
cd4442b81e
commit
ed39649721
@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects
|
||||
/// <summary>
|
||||
/// Storage component for containing entities within this one, matches a UI on the client which shows stored entities
|
||||
/// </summary>
|
||||
public class ServerStorageComponent : SharedStorageComponent, IAttackby, IUse
|
||||
public class ServerStorageComponent : SharedStorageComponent, IAttackby, IUse, IActivate
|
||||
{
|
||||
private Container storage;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Content.Server.GameObjects
|
||||
Logger.DebugS("Storage", "Storage (UID {0}) attacked by user (UID {1}) with entity (UID {2}).", Owner.Uid, user.Uid, attackwith.Uid);
|
||||
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, null))
|
||||
{
|
||||
var inserted = Insert(attackwith);
|
||||
if (inserted)
|
||||
@@ -240,5 +240,11 @@ namespace Content.Server.GameObjects
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
void IActivate.Activate(IEntity user)
|
||||
{
|
||||
((IUse) this).UseEntity(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user