Reflected Visibility
Ships are now more visible in lit areas (depending on cross section stat in Reflector behavior) Refactored all behaviors to remove context & entity references (can get them from equipped item reference if needed) Fixed crash when enemy dies of heatstroke while targeted Exponential decay for visibility now uses correct time-independent formula Refactored item inspection in properties panel (now consistent between equipped items vs. inventory and store items, shows effect of heat on stats) Reordered item properties and added spacing between groups
This commit is contained in:
parent
b0b2717294
commit
a51c402fc5
59 changed files with 557 additions and 1405 deletions
|
|
@ -14,30 +14,24 @@ public class WearData : BehaviorData
|
|||
[InspectableTemperature, JsonProperty("perSecond"), Key(1)]
|
||||
public bool PerSecond = true;
|
||||
|
||||
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
|
||||
public override IBehavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Wear(context, this, entity, item);
|
||||
return new Wear(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class Wear : IBehavior
|
||||
{
|
||||
private WearData _data;
|
||||
private EquippableItemData _itemData;
|
||||
|
||||
public Entity Entity { get; }
|
||||
public EquippedItem Item { get; }
|
||||
public ItemManager Context { get; }
|
||||
|
||||
public BehaviorData Data => _data;
|
||||
|
||||
public Wear(ItemManager context, WearData data, Entity entity, EquippedItem item)
|
||||
public Wear(WearData data, EquippedItem item)
|
||||
{
|
||||
Context = context;
|
||||
_data = data;
|
||||
Entity = entity;
|
||||
Item = item;
|
||||
_itemData = context.GetData(item.EquippableItem);
|
||||
}
|
||||
|
||||
public bool Execute(float delta)
|
||||
|
|
|
|||
Loading…
Reference in a new issue