Adds crowbar function to force-open doors...
***except the Door component ignores the damn requireditem and allows bare fukken hands to open it goddamnit***
This commit is contained in:
@@ -13,7 +13,7 @@ using Barotrauma.Lights;
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
partial class Door : ItemComponent, IDrawableComponent, IServerSerializable
|
||||
partial class Door : Pickable, IDrawableComponent, IServerSerializable
|
||||
{
|
||||
private Gap linkedGap;
|
||||
|
||||
@@ -203,12 +203,10 @@ namespace Barotrauma.Items.Components
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
public override bool Pick(Character picker)
|
||||
public override bool OnPicked(Character picker)
|
||||
{
|
||||
isOpen = !isOpen;
|
||||
|
||||
return true;
|
||||
SetState(predictedState == null ? !isOpen : !predictedState.Value, false, true); //crowbar function
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Select(Character character)
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnPicked(Character picker)
|
||||
public override bool OnPicked(Character picker)
|
||||
{
|
||||
if (base.OnPicked(picker))
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool OnPicked(Character picker)
|
||||
public virtual bool OnPicked(Character picker)
|
||||
{
|
||||
if (picker.Inventory.TryPutItem(item, picker, allowedSlots))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user