public ShieldLinearWantLinkUiComponent(ILinearShield self, ILinearShield other, Action <bool> fieldRenderOverride, Action buttonAction) { Self = self; Other = other; FieldRenderOverride = fieldRenderOverride; ButtonAction = buttonAction; var distance = self.Position.DistanceTo(other.Position); PowerNeeded = LinearShieldUtility.CellProtectionFactorCost(distance) * distance; Efficiency = LinearShieldUtility.CalculateFieldEfficiency(distance, self.EfficientRange, other.EfficientRange); }
public static void DrawFieldBetween(IntVec3 one, IntVec3 two, Map map, Color color) { DrawFieldBetween(LinearShieldUtility.CellsBetween(one, two).ToList(), map, color); }