Renamed liquid manager to fluid manager for correctness.

This commit is contained in:
JoshuaNavarro 2019-09-23 17:33:28 -07:00
parent d8b144eac9
commit a33a39a785
2 changed files with 121 additions and 116 deletions

View File

@ -8,23 +8,23 @@ using Microsoft.Xna.Framework;
namespace Revitalize.Framework.Managers namespace Revitalize.Framework.Managers
{ {
/// <summary> /// <summary>
/// A liquid used for various mod purposes. /// A Fluid used for various mod purposes.
/// </summary> /// </summary>
public class Liquid public class Fluid
{ {
/// <summary> /// <summary>
/// The name of the liquid. /// The name of the Fluid.
/// </summary> /// </summary>
public string name; public string name;
/// <summary> /// <summary>
/// The color for the liquid. /// The color for the Fluid.
/// </summary> /// </summary>
public Color color; public Color color;
/// <summary> /// <summary>
/// Constructor. /// Constructor.
/// </summary> /// </summary>
public Liquid() public Fluid()
{ {
} }
@ -33,46 +33,46 @@ namespace Revitalize.Framework.Managers
/// Constructor. /// Constructor.
/// </summary> /// </summary>
/// <param name="Name"></param> /// <param name="Name"></param>
/// <param name="LiquidColor"></param> /// <param name="FluidColor"></param>
public Liquid(string Name, Color LiquidColor) public Fluid(string Name, Color FluidColor)
{ {
this.name = Name; this.name = Name;
this.color = LiquidColor; this.color = FluidColor;
} }
/// <summary> /// <summary>
/// Liquid comparison check to see if two liquids are the same. /// Fluid comparison check to see if two Fluids are the same.
/// </summary> /// </summary>
/// <param name="Other"></param> /// <param name="Other"></param>
/// <returns></returns> /// <returns></returns>
public bool isLiquidHomogenous(Liquid Other) public bool isFluidHomogenous(Fluid Other)
{ {
if (this.name.Equals(Other.name)) return true; if (this.name.Equals(Other.name)) return true;
return false; return false;
} }
/// <summary> /// <summary>
/// Copys over the liquid. /// Copys over the Fluid.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public Liquid Copy() public Fluid Copy()
{ {
return new Liquid(this.name, this.color); return new Fluid(this.name, this.color);
} }
} }
public class MachineLiquidTank public class MachineFluidTank
{ {
/// <summary> /// <summary>
/// The liquid inside of the tank. /// The Fluid inside of the tank.
/// </summary> /// </summary>
public Liquid liquid; public Fluid fluid;
/// <summary> /// <summary>
/// How much liquid is inside the tank currently. /// How much Fluid is inside the tank currently.
/// </summary> /// </summary>
public int amount; public int amount;
/// <summary> /// <summary>
/// How much liquid the tank can hold. /// How much Fluid the tank can hold.
/// </summary> /// </summary>
public int capacity; public int capacity;
@ -112,7 +112,7 @@ namespace Revitalize.Framework.Managers
/// <summary> /// <summary>
/// Constructor. /// Constructor.
/// </summary> /// </summary>
public MachineLiquidTank() public MachineFluidTank()
{ {
} }
@ -121,11 +121,11 @@ namespace Revitalize.Framework.Managers
/// Constructor. /// Constructor.
/// </summary> /// </summary>
/// <param name="Capacity"></param> /// <param name="Capacity"></param>
public MachineLiquidTank(int Capacity) public MachineFluidTank(int Capacity)
{ {
this.capacity = Capacity; this.capacity = Capacity;
this.amount = 0; this.amount = 0;
this.liquid = null; this.fluid = null;
} }
/// <summary> /// <summary>
@ -133,38 +133,38 @@ namespace Revitalize.Framework.Managers
/// </summary> /// </summary>
/// <param name="Capacity"></param> /// <param name="Capacity"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
/// <param name="Liquid"></param> /// <param name="Fluid"></param>
public MachineLiquidTank(int Capacity, int Amount, Liquid Liquid) public MachineFluidTank(int Capacity, int Amount, Fluid Fluid)
{ {
this.capacity = Capacity; this.capacity = Capacity;
this.amount = Amount; this.amount = Amount;
this.liquid = Liquid; this.fluid = Fluid;
} }
/// <summary> /// <summary>
/// Checks to see if this tank can recieve this liquid. /// Checks to see if this tank can recieve this Fluid.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <returns></returns> /// <returns></returns>
public bool CanRecieveThisLiquid(Liquid L) public bool CanRecieveThisFluid(Fluid L)
{ {
if (this.IsFull) return false; if (this.IsFull) return false;
if (this.liquid == null) return true; if (this.fluid == null) return true;
if (this.liquid.isLiquidHomogenous(L)) return true; if (this.fluid.isFluidHomogenous(L)) return true;
if (this.IsEmpty) return true; if (this.IsEmpty) return true;
else return false; else return false;
} }
/// <summary> /// <summary>
/// Takes in liquid into this tank. /// Takes in Fluid into this tank.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
public void intakeLiquid(Liquid L, int Amount) public void intakeFluid(Fluid L, int Amount)
{ {
if (this.CanRecieveThisLiquid(L)) if (this.CanRecieveThisFluid(L))
{ {
if (this.liquid == null) this.liquid = L.Copy(); if (this.fluid == null) this.fluid = L.Copy();
else else
{ {
int intakeAmount=Math.Min(this.remainingCapacity, Amount); int intakeAmount=Math.Min(this.remainingCapacity, Amount);
@ -174,16 +174,16 @@ namespace Revitalize.Framework.Managers
else return; else return;
} }
/// <summary> /// <summary>
/// Consumes, aka reduces the internal liquid on this tank by the amount given or the amount remaining in the tank. /// Consumes, aka reduces the internal Fluid on this tank by the amount given or the amount remaining in the tank.
/// </summary> /// </summary>
/// <param name="Amount"></param> /// <param name="Amount"></param>
public void consumeLiquid(int Amount) public void consumeFluid(int Amount)
{ {
if (this.IsEmpty) return; if (this.IsEmpty) return;
if (this.liquid == null) return; if (this.fluid == null) return;
int consumeAmount = Math.Min(this.amount, Amount); int consumeAmount = Math.Min(this.amount, Amount);
this.amount = this.amount - consumeAmount; this.amount = this.amount - consumeAmount;
if (this.amount <= 0) this.liquid = null; if (this.amount <= 0) this.fluid = null;
} }
/// <summary> /// <summary>
@ -192,9 +192,9 @@ namespace Revitalize.Framework.Managers
/// <param name="L"></param> /// <param name="L"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
/// <returns></returns> /// <returns></returns>
public bool DoesThisTankHaveEnoughLiquid(Liquid L, int Amount) public bool DoesThisTankHaveEnoughFluid(Fluid L, int Amount)
{ {
if (this.GetAmountOfLiquidInThisTank(L) >= Amount) return true; if (this.GetAmountOfFluidInThisTank(L) >= Amount) return true;
return false; return false;
} }
@ -203,52 +203,52 @@ namespace Revitalize.Framework.Managers
/// </summary> /// </summary>
public void emptyTank() public void emptyTank()
{ {
this.liquid = null; this.fluid = null;
this.amount = 0; this.amount = 0;
} }
/// <summary> /// <summary>
/// Gets the amount of liquid in this tank for the given liquid. /// Gets the amount of Fluid in this tank for the given Fluid.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <returns> Returns 0 if the tank doesn't contain liquid of the same type. Otherwise returns the amount stored in the tank.</returns> /// <returns> Returns 0 if the tank doesn't contain Fluid of the same type. Otherwise returns the amount stored in the tank.</returns>
public int GetAmountOfLiquidInThisTank(Liquid L) public int GetAmountOfFluidInThisTank(Fluid L)
{ {
if (this.liquid == null) return 0; if (this.fluid == null) return 0;
if (this.liquid.isLiquidHomogenous(L)) return this.amount; if (this.fluid.isFluidHomogenous(L)) return this.amount;
return 0; return 0;
} }
/// <summary> /// <summary>
/// Gets the amount of liquid this take can take in in acordance with the parameter liquid. /// Gets the amount of Fluid this take can take in in acordance with the parameter Fluid.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <returns></returns> /// <returns></returns>
public int GetAmountOfLiquidThisTankCanReceieve(Liquid L) public int GetAmountOfFluidThisTankCanReceieve(Fluid L)
{ {
if (this.liquid == null) return this.capacity; if (this.fluid == null) return this.capacity;
if (this.liquid.isLiquidHomogenous(L)) return this.remainingCapacity; if (this.fluid.isFluidHomogenous(L)) return this.remainingCapacity;
return 0; return 0;
} }
/// <summary> /// <summary>
/// Checks to see if this tank contains this liquid at all. /// Checks to see if this tank contains this Fluid at all.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <returns></returns> /// <returns></returns>
public bool DoesTankContainThisLiquid(Liquid L) public bool DoesTankContainThisFluid(Fluid L)
{ {
if (this.liquid == null) return false; if (this.fluid == null) return false;
if (this.liquid.isLiquidHomogenous(L)) return true; if (this.fluid.isFluidHomogenous(L)) return true;
return false; return false;
} }
} }
public class LiquidManagerV2 public class FluidManagerV2
{ {
public MachineLiquidTank inputTank1; public MachineFluidTank inputTank1;
public MachineLiquidTank inputTank2; public MachineFluidTank inputTank2;
public MachineLiquidTank outputTank; public MachineFluidTank outputTank;
public bool needsUpdate; public bool needsUpdate;
@ -257,11 +257,11 @@ namespace Revitalize.Framework.Managers
/// </summary> /// </summary>
public bool allowDoubleInput; public bool allowDoubleInput;
public LiquidManagerV2() public FluidManagerV2()
{ {
this.inputTank1 = new MachineLiquidTank(0); this.inputTank1 = new MachineFluidTank(0);
this.inputTank2 = new MachineLiquidTank(0); this.inputTank2 = new MachineFluidTank(0);
this.outputTank = new MachineLiquidTank(0); this.outputTank = new MachineFluidTank(0);
this.needsUpdate = false; this.needsUpdate = false;
} }
@ -270,60 +270,60 @@ namespace Revitalize.Framework.Managers
/// </summary> /// </summary>
/// <param name="Capacity"></param> /// <param name="Capacity"></param>
/// <param name="OnlyOutput"></param> /// <param name="OnlyOutput"></param>
/// <param name="AllowDoubleInput">Can both input tanks store the same liquid?</param> /// <param name="AllowDoubleInput">Can both input tanks store the same Fluid?</param>
public LiquidManagerV2(int Capacity, bool OnlyOutput, bool AllowDoubleInput=false) public FluidManagerV2(int Capacity, bool OnlyOutput, bool AllowDoubleInput=false)
{ {
if (OnlyOutput) if (OnlyOutput)
{ {
this.outputTank = new MachineLiquidTank(Capacity); this.outputTank = new MachineFluidTank(Capacity);
this.inputTank1 = new MachineLiquidTank(0); this.inputTank1 = new MachineFluidTank(0);
this.inputTank2 = new MachineLiquidTank(0); this.inputTank2 = new MachineFluidTank(0);
} }
else else
{ {
this.outputTank = new MachineLiquidTank(Capacity); this.outputTank = new MachineFluidTank(Capacity);
this.inputTank1 = new MachineLiquidTank(Capacity); this.inputTank1 = new MachineFluidTank(Capacity);
this.inputTank2 = new MachineLiquidTank(Capacity); this.inputTank2 = new MachineFluidTank(Capacity);
} }
this.allowDoubleInput = AllowDoubleInput; this.allowDoubleInput = AllowDoubleInput;
this.needsUpdate = false; this.needsUpdate = false;
} }
/// <summary> /// <summary>
/// Produces a given amount of liquid and puts it into the output tank for this liquid manager. /// Produces a given amount of Fluid and puts it into the output tank for this Fluid manager.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
public void produceLiquid(Liquid L, int Amount) public void produceFluid(Fluid L, int Amount)
{ {
if (this.outputTank.CanRecieveThisLiquid(L)) if (this.outputTank.CanRecieveThisFluid(L))
{ {
this.outputTank.intakeLiquid(L, Amount); this.outputTank.intakeFluid(L, Amount);
this.needsUpdate = true; this.needsUpdate = true;
} }
} }
/// <summary> /// <summary>
/// Intakes liquid into the input takes on this liquid manager. /// Intakes Fluid into the input takes on this Fluid manager.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
public void intakeLiquid(Liquid L, int Amount) public void intakeFluid(Fluid L, int Amount)
{ {
int remainingAmount = Amount; int remainingAmount = Amount;
if (this.allowDoubleInput) if (this.allowDoubleInput)
{ {
if (this.inputTank1.CanRecieveThisLiquid(L) && remainingAmount>0) if (this.inputTank1.CanRecieveThisFluid(L) && remainingAmount>0)
{ {
int allowedAmount = this.inputTank1.remainingCapacity; int allowedAmount = this.inputTank1.remainingCapacity;
this.inputTank1.intakeLiquid(L, remainingAmount); this.inputTank1.intakeFluid(L, remainingAmount);
remainingAmount -= allowedAmount; remainingAmount -= allowedAmount;
} }
if (this.inputTank2.CanRecieveThisLiquid(L)&& remainingAmount>0) if (this.inputTank2.CanRecieveThisFluid(L)&& remainingAmount>0)
{ {
int allowedAmount = this.inputTank2.remainingCapacity; int allowedAmount = this.inputTank2.remainingCapacity;
this.inputTank2.intakeLiquid(L, remainingAmount); this.inputTank2.intakeFluid(L, remainingAmount);
remainingAmount -= allowedAmount; remainingAmount -= allowedAmount;
} }
this.needsUpdate = true; this.needsUpdate = true;
@ -331,18 +331,18 @@ namespace Revitalize.Framework.Managers
else else
{ {
if (this.inputTank1.CanRecieveThisLiquid(L) && remainingAmount > 0 && this.inputTank2.DoesTankContainThisLiquid(L)==false) if (this.inputTank1.CanRecieveThisFluid(L) && remainingAmount > 0 && this.inputTank2.DoesTankContainThisFluid(L)==false)
{ {
int allowedAmount = this.inputTank1.remainingCapacity; int allowedAmount = this.inputTank1.remainingCapacity;
this.inputTank1.intakeLiquid(L, remainingAmount); this.inputTank1.intakeFluid(L, remainingAmount);
remainingAmount -= allowedAmount; remainingAmount -= allowedAmount;
this.needsUpdate = true; this.needsUpdate = true;
return; return;
} }
if (this.inputTank2.CanRecieveThisLiquid(L) && remainingAmount > 0 && this.inputTank1.DoesTankContainThisLiquid(L) == false) if (this.inputTank2.CanRecieveThisFluid(L) && remainingAmount > 0 && this.inputTank1.DoesTankContainThisFluid(L) == false)
{ {
int allowedAmount = this.inputTank2.remainingCapacity; int allowedAmount = this.inputTank2.remainingCapacity;
this.inputTank2.intakeLiquid(L, remainingAmount); this.inputTank2.intakeFluid(L, remainingAmount);
remainingAmount -= allowedAmount; remainingAmount -= allowedAmount;
this.needsUpdate = true; this.needsUpdate = true;
return; return;
@ -352,103 +352,103 @@ namespace Revitalize.Framework.Managers
} }
/// <summary> /// <summary>
/// Consumes the liquid in the input tanks. Mainly used for machine processing but shouldn't be drained outwards. /// Consumes the Fluid in the input tanks. Mainly used for machine processing but shouldn't be drained outwards.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
public void consumeLiquid(Liquid L, int Amount) public void consumeFluid(Fluid L, int Amount)
{ {
if (this.doTheInputTanksHaveEnoughLiquid(L, Amount) == false) return; if (this.doTheInputTanksHaveEnoughFluid(L, Amount) == false) return;
int requiredAmount = Amount; int requiredAmount = Amount;
int tank1Amount = this.inputTank1.GetAmountOfLiquidInThisTank(L); int tank1Amount = this.inputTank1.GetAmountOfFluidInThisTank(L);
int tank2Amount= this.inputTank2.GetAmountOfLiquidInThisTank(L); int tank2Amount= this.inputTank2.GetAmountOfFluidInThisTank(L);
if (tank1Amount > 0 && requiredAmount>0) if (tank1Amount > 0 && requiredAmount>0)
{ {
this.inputTank1.consumeLiquid(requiredAmount); this.inputTank1.consumeFluid(requiredAmount);
requiredAmount -= tank1Amount; requiredAmount -= tank1Amount;
this.needsUpdate = true; this.needsUpdate = true;
} }
if(tank2Amount>0 && requiredAmount > 0) if(tank2Amount>0 && requiredAmount > 0)
{ {
this.inputTank2.consumeLiquid(requiredAmount); this.inputTank2.consumeFluid(requiredAmount);
requiredAmount -= tank2Amount; requiredAmount -= tank2Amount;
this.needsUpdate = true; this.needsUpdate = true;
} }
//Consumes liquid from both tanks if double input is enabled. Otherwise it only drains from the appropriate tank. //Consumes Fluid from both tanks if double input is enabled. Otherwise it only drains from the appropriate tank.
} }
public void drainOutputTank(int Amount) public void drainOutputTank(int Amount)
{ {
this.outputTank.consumeLiquid(Amount); this.outputTank.consumeFluid(Amount);
if (this.outputTank.IsEmpty) this.outputTank.liquid = null; if (this.outputTank.IsEmpty) this.outputTank.fluid = null;
this.needsUpdate = true; this.needsUpdate = true;
} }
/// <summary> /// <summary>
/// Checks to see if the input tanks have enough liquid combined to process the request. /// Checks to see if the input tanks have enough Fluid combined to process the request.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <param name="Amount"></param> /// <param name="Amount"></param>
/// <returns></returns> /// <returns></returns>
public bool doTheInputTanksHaveEnoughLiquid(Liquid L, int Amount) public bool doTheInputTanksHaveEnoughFluid(Fluid L, int Amount)
{ {
int tankTotals = this.inputTank1.GetAmountOfLiquidInThisTank(L) + this.inputTank2.GetAmountOfLiquidInThisTank(L); int tankTotals = this.inputTank1.GetAmountOfFluidInThisTank(L) + this.inputTank2.GetAmountOfFluidInThisTank(L);
if (tankTotals >= Amount) return true; if (tankTotals >= Amount) return true;
else return false; else return false;
} }
/// <summary> /// <summary>
/// Gets the total amount of liquid that the input tanks can recieve /// Gets the total amount of Fluid that the input tanks can recieve
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <returns></returns> /// <returns></returns>
public int getMaxAmountOfLiquidIntakePossible(Liquid L) public int getMaxAmountOfFluidIntakePossible(Fluid L)
{ {
if (this.allowDoubleInput) if (this.allowDoubleInput)
{ {
int amount = 0; int amount = 0;
amount += this.inputTank1.GetAmountOfLiquidThisTankCanReceieve(L); amount += this.inputTank1.GetAmountOfFluidThisTankCanReceieve(L);
amount += this.inputTank2.GetAmountOfLiquidThisTankCanReceieve(L); amount += this.inputTank2.GetAmountOfFluidThisTankCanReceieve(L);
} }
else else
{ {
if(this.inputTank1.CanRecieveThisLiquid(L) && this.inputTank2.DoesTankContainThisLiquid(L) == false) if(this.inputTank1.CanRecieveThisFluid(L) && this.inputTank2.DoesTankContainThisFluid(L) == false)
{ {
return this.inputTank1.GetAmountOfLiquidThisTankCanReceieve(L); return this.inputTank1.GetAmountOfFluidThisTankCanReceieve(L);
} }
if (this.inputTank1.CanRecieveThisLiquid(L) && this.inputTank2.DoesTankContainThisLiquid(L) == false) if (this.inputTank1.CanRecieveThisFluid(L) && this.inputTank2.DoesTankContainThisFluid(L) == false)
{ {
return this.inputTank2.GetAmountOfLiquidThisTankCanReceieve(L); return this.inputTank2.GetAmountOfFluidThisTankCanReceieve(L);
} }
} }
return 0; return 0;
} }
/// <summary> /// <summary>
/// Checks to see if the input tanks on this liquid manager have the capacity to take in this liquid at all. /// Checks to see if the input tanks on this Fluid manager have the capacity to take in this Fluid at all.
/// </summary> /// </summary>
/// <param name="L"></param> /// <param name="L"></param>
/// <returns></returns> /// <returns></returns>
public bool canRecieveThisLiquid(Liquid L) public bool canRecieveThisFluid(Fluid L)
{ {
if (L == null) return false; if (L == null) return false;
if (this.allowDoubleInput) if (this.allowDoubleInput)
{ {
if (this.inputTank1.CanRecieveThisLiquid(L) || this.inputTank2.CanRecieveThisLiquid(L)) if (this.inputTank1.CanRecieveThisFluid(L) || this.inputTank2.CanRecieveThisFluid(L))
{ {
return true; return true;
} }
} }
else else
{ {
if (this.inputTank1.CanRecieveThisLiquid(L) && this.inputTank2.DoesTankContainThisLiquid(L) == false) if (this.inputTank1.CanRecieveThisFluid(L) && this.inputTank2.DoesTankContainThisFluid(L) == false)
{ {
return false; return false;
} }
if (this.inputTank2.CanRecieveThisLiquid(L) && this.inputTank1.DoesTankContainThisLiquid(L) == false) if (this.inputTank2.CanRecieveThisFluid(L) && this.inputTank1.DoesTankContainThisFluid(L) == false)
{ {
return true; return true;
} }
@ -458,16 +458,16 @@ namespace Revitalize.Framework.Managers
} }
/// <summary> /// <summary>
/// Takes the fluid in this output tank and tries to transfer it to another liquid manager who has an tank available. /// Takes the fluid in this output tank and tries to transfer it to another Fluid manager who has an tank available.
/// </summary> /// </summary>
/// <param name="Other"></param> /// <param name="Other"></param>
public void outputLiquidToOtherSources(LiquidManagerV2 Other) public void outputFluidToOtherSources(FluidManagerV2 Other)
{ {
if (this.outputTank.liquid == null) return; if (this.outputTank.fluid == null) return;
if (Other.canRecieveThisLiquid(this.outputTank.liquid)) if (Other.canRecieveThisFluid(this.outputTank.fluid))
{ {
int actualAmount = Math.Min(this.outputTank.amount, Other.getMaxAmountOfLiquidIntakePossible(this.outputTank.liquid)); int actualAmount = Math.Min(this.outputTank.amount, Other.getMaxAmountOfFluidIntakePossible(this.outputTank.fluid));
Other.intakeLiquid(this.outputTank.liquid,actualAmount); Other.intakeFluid(this.outputTank.fluid,actualAmount);
this.drainOutputTank(actualAmount); this.drainOutputTank(actualAmount);
} }
} }

View File

@ -352,7 +352,7 @@ namespace Revitalize.Framework.Objects
} }
public ColorManager _colorManager; private ColorManager _colorManager;
public ColorManager ColorManager public ColorManager ColorManager
{ {
@ -367,6 +367,9 @@ namespace Revitalize.Framework.Objects
} }
} }
public LiquidManagerV2 fluidManager;
[JsonIgnore] [JsonIgnore]
public bool requiresUpdate; public bool requiresUpdate;
public BasicItemInformation() public BasicItemInformation()
@ -392,9 +395,10 @@ namespace Revitalize.Framework.Objects
this.EnergyManager = new Energy.EnergyManager(); this.EnergyManager = new Energy.EnergyManager();
this._alwaysDrawAbovePlayer = false; this._alwaysDrawAbovePlayer = false;
this.ColorManager = new ColorManager(Enums.DyeBlendMode.Blend, 0.5f); this.ColorManager = new ColorManager(Enums.DyeBlendMode.Blend, 0.5f);
this.fluidManager = new LiquidManagerV2();
} }
public BasicItemInformation(string name, string id, string description, string categoryName, Color categoryColor,int edibility, int fragility, bool isLamp, int price, bool canBeSetOutdoors, bool canBeSetIndoors, Texture2D texture, AnimationManager animationManager, Color drawColor, bool ignoreBoundingBox, InventoryManager Inventory, LightManager Lights,Energy.EnergyManager EnergyManager=null,bool AlwaysDrawAbovePlayer=false,NamedColor DyedColor=null, ColorManager ColorManager=null) public BasicItemInformation(string name, string id, string description, string categoryName, Color categoryColor,int edibility, int fragility, bool isLamp, int price, bool canBeSetOutdoors, bool canBeSetIndoors, Texture2D texture, AnimationManager animationManager, Color drawColor, bool ignoreBoundingBox, InventoryManager Inventory, LightManager Lights,Energy.EnergyManager EnergyManager=null,bool AlwaysDrawAbovePlayer=false,NamedColor DyedColor=null, ColorManager ColorManager=null,LiquidManagerV2 LiquidManager=null)
{ {
this.name = name; this.name = name;
this.id = id; this.id = id;
@ -429,6 +433,7 @@ namespace Revitalize.Framework.Objects
this.DyedColor = DyedColor ?? new NamedColor("", new Color(0, 0, 0, 0)); this.DyedColor = DyedColor ?? new NamedColor("", new Color(0, 0, 0, 0));
this.ColorManager = ColorManager ?? new ColorManager(Enums.DyeBlendMode.Blend, 0.5f); this.ColorManager = ColorManager ?? new ColorManager(Enums.DyeBlendMode.Blend, 0.5f);
this.fluidManager = LiquidManager ?? new LiquidManagerV2();
} }
/// <summary> /// <summary>