Launcher bugfixes, fixed submarine position syncing, previewing the sub after round ends, wiring bugfix, slower reactor overheat, itemlabel, wifi components

This commit is contained in:
Regalis
2015-08-21 20:21:22 +03:00
parent c044d27071
commit d8904eaa56
43 changed files with 546 additions and 228 deletions
@@ -140,7 +140,7 @@ namespace Subsurface.Items.Components
float heat = 100 * fissionRate * (AvailableFuel/2000.0f);
float heatDissipation = 50 * coolingRate + ExtraCooling;
float deltaTemp = (((heat - heatDissipation) * 5) - temperature) / 1000.0f;
float deltaTemp = (((heat - heatDissipation) * 5) - temperature) / 10000.0f;
Temperature = temperature + deltaTemp;
if (temperature > meltDownTemp)
@@ -155,8 +155,7 @@ namespace Subsurface.Items.Components
powerUpTask = new PropertyTask(item, IsRunning, 50.0f, "Power up the reactor");
}
}
item.Condition -= temperature * deltaTime * 0.00005f;
if (temperature > shutDownTemp)
@@ -201,8 +200,7 @@ namespace Subsurface.Items.Components
//fission rate can't be lowered below a certain amount if the core is too hot
FissionRate = Math.Max(fissionRate, heat / 200.0f);
//the power generated by the reactor is equal to the temperature
currPowerConsumption = -temperature*powerPerTemp;
@@ -216,6 +214,8 @@ namespace Subsurface.Items.Components
ExtraCooling = 0.0f;
AvailableFuel = 0.0f;
item.SendSignal(((int)temperature).ToString(), "temperature_out");
}
public override void UpdateBroken(float deltaTime, Camera cam)
@@ -402,6 +402,16 @@ namespace Subsurface.Items.Components
GUI.DrawLine(spriteBatch, prevPoint, lastPoint, Color.White);
}
public override void ReceiveSignal(string signal, Connection connection, Item sender, float power)
{
switch (connection.Name)
{
case "shutdown":
shutDownTemp = 0.0f;
break;
}
}
public override void FillNetworkData(NetworkEventType type, NetOutgoingMessage message)
{
message.Write(autoTemp);