Lights, colored items (only used for wires atm)
This commit is contained in:
@@ -173,7 +173,7 @@ namespace Subsurface.Items.Components
|
||||
voltage = 0.0f;
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch)
|
||||
public override void Draw(SpriteBatch spriteBatch, bool editing)
|
||||
{
|
||||
base.Draw(spriteBatch);
|
||||
|
||||
|
||||
@@ -53,11 +53,6 @@ namespace Subsurface.Items.Components
|
||||
"power", fullPower / Math.Max(fullLoad, 1.0f));
|
||||
if (-pt.currPowerConsumption > pt.powerLoad * 2.0f) pt.item.Condition = 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//p.Power = fullPower;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@ namespace Subsurface.Items.Components
|
||||
|
||||
public override void ReceiveSignal(string signal, Connection connection, Item sender, float power)
|
||||
{
|
||||
if (connection.Name=="power_in") voltage = power;
|
||||
if (currPowerConsumption == 0.0f) voltage = 0.0f;
|
||||
if (connection.Name == "power_in" || connection.Name == "power") voltage = power;
|
||||
}
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
|
||||
Reference in New Issue
Block a user