Expose some stuff to sub editor, fix alien doors openable with use key, fixed some decon recipes

Beginnings of a Conditional system
This commit is contained in:
Alex Noir
2017-12-27 18:00:18 +03:00
parent 156ff292e3
commit f5e785df60
5 changed files with 123 additions and 17 deletions
@@ -207,7 +207,8 @@ namespace Barotrauma.Items.Components
{
if (item.Condition <= 0.0f) return true; //For repairing
return base.HasRequiredItems(character, addMessage);
//this is a bit pointless atm because if canBePicked is false it won't allow you to do Pick() anyway, however it's still good for future-proofing.
return requiredItems.Any() ? base.HasRequiredItems(character, addMessage) : canBePicked;
}
public override bool Pick(Character picker)
@@ -49,7 +49,7 @@ namespace Barotrauma.Items.Components
private string msg;
[Serialize(0.0f, false)]
[Editable, Serialize(0.0f, false)]
public float PickingTime
{
get;
@@ -105,7 +105,7 @@ namespace Barotrauma.Items.Components
}
}
[Serialize(false, false)]
[Editable, Serialize(false, false)] //Editable for doors to do their magic
public bool CanBePicked
{
get { return canBePicked; }
@@ -171,7 +171,7 @@ namespace Barotrauma.Items.Components
get { return name; }
}
[Serialize("", false)]
[Editable, Serialize("", false)]
public string Msg
{
get { return msg; }