(fdc038d5d) Keymapping and UX test: - Map use to "E" and Select to "Left Mouse". - Introduce a dedicated key for deselecting ("Right Mouse"). - Introduce a dedicated key for shooting ("Left Mouse"). - Define certain objects as shootables, which simply means that they use the "Shoot" key instead of using the "Use" key. This required the least amount of refactoring the existing code. - TODO: don't register the "Select" input when aiming or when an interface is open -> should prevent interacting through UI elements. - TODO: sync the new input types with the server.
This commit is contained in:
@@ -235,6 +235,12 @@ namespace Barotrauma
|
||||
set { /*do nothing*/ }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should the item's Use method be called with the "Use" or with the "Shoot" key?
|
||||
/// </summary>
|
||||
[Serialize(false, false)]
|
||||
public bool IsShootable { get; set; }
|
||||
|
||||
public Color Color
|
||||
{
|
||||
get { return spriteColor; }
|
||||
@@ -1444,7 +1450,6 @@ namespace Barotrauma
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void Use(float deltaTime, Character character = null, Limb targetLimb = null)
|
||||
{
|
||||
if (condition == 0.0f) return;
|
||||
@@ -1590,8 +1595,6 @@ namespace Barotrauma
|
||||
GameMain.NetworkMember != null && (GameMain.NetworkMember.IsServer || Character.Controlled == dropper))
|
||||
{
|
||||
parentInventory.CreateNetworkEvent();
|
||||
//send frequent updates after the item has been dropped
|
||||
PositionUpdateInterval = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user