Admin can play in multiplayer, backgroundsprites, fixrequirement bugfix, the condition of the reactor won't detoriate when it's running
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Subsurface.Items.Components
|
||||
fissionRate = MathHelper.Clamp(value, 0.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public float CoolingRate
|
||||
{
|
||||
get { return coolingRate; }
|
||||
@@ -156,7 +156,7 @@ namespace Subsurface.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
item.Condition -= temperature * deltaTime * 0.00005f;
|
||||
//item.Condition -= temperature * deltaTime * 0.00005f;
|
||||
|
||||
if (temperature > shutDownTemp)
|
||||
{
|
||||
@@ -204,6 +204,11 @@ namespace Subsurface.Items.Components
|
||||
//the power generated by the reactor is equal to the temperature
|
||||
currPowerConsumption = -temperature*powerPerTemp;
|
||||
|
||||
//foreach (Item i in item.ContainedItems)
|
||||
//{
|
||||
// i.Condition = 5.0f;
|
||||
//}
|
||||
|
||||
if (item.CurrentHull != null)
|
||||
{
|
||||
//the sound can be heard from 20 000 display units away when everything running at 100%
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Subsurface
|
||||
}
|
||||
}
|
||||
|
||||
public bool Fix(Character character, GUIComponent reqFrame)
|
||||
public bool CanBeFixed(Character character, GUIComponent reqFrame)
|
||||
{
|
||||
bool success = true;
|
||||
foreach (string itemName in requiredItems)
|
||||
@@ -101,7 +101,8 @@ namespace Subsurface
|
||||
fixButton.OnClicked = FixButtonPressed;
|
||||
fixButton.UserData = requirement;
|
||||
|
||||
new GUITickBox(new Rectangle(70, 0, 20,20), requirement.name, Alignment.Left, reqFrame);
|
||||
var tickBox = new GUITickBox(new Rectangle(70, 0, 20,20), requirement.name, Alignment.Left, reqFrame);
|
||||
tickBox.Enabled = false;
|
||||
|
||||
int y2 = 20;
|
||||
foreach (string itemName in requirement.requiredItems)
|
||||
@@ -133,7 +134,10 @@ namespace Subsurface
|
||||
FixRequirement requirement = obj as FixRequirement;
|
||||
if (requirement == null) return false;
|
||||
|
||||
if (!requirement.CanBeFixed(Character.Controlled, button.Parent)) return true;
|
||||
|
||||
requirement.Fixed = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -152,7 +156,7 @@ namespace Subsurface
|
||||
}
|
||||
else
|
||||
{
|
||||
bool canBeFixed = requirement.Fix(character, child);
|
||||
bool canBeFixed = requirement.CanBeFixed(character, child);
|
||||
unfixedFound = true;
|
||||
//child.GetChild<GUITickBox>().Selected = canBeFixed;
|
||||
GUITickBox tickBox = child.GetChild<GUITickBox>();
|
||||
|
||||
Reference in New Issue
Block a user