Switch to Barotrauma & too many misc changes to remember
This commit is contained in:
@@ -6,9 +6,9 @@ using FarseerPhysics.Dynamics;
|
||||
using FarseerPhysics.Factories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Subsurface.Lights;
|
||||
using Barotrauma.Lights;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Door : ItemComponent
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Holdable : Pickable
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using FarseerPhysics.Dynamics.Contacts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class MeleeWeapon : Holdable
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace Subsurface.Items.Components
|
||||
hitting = true;
|
||||
|
||||
IsActive = true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Drop(Character dropper)
|
||||
@@ -187,6 +187,8 @@ namespace Subsurface.Items.Components
|
||||
RestoreCollision();
|
||||
hitting = false;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnUse, 1.0f, picker);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Pickable : ItemComponent
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using FarseerPhysics;
|
||||
using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class RangedWeapon : ItemComponent
|
||||
{
|
||||
|
||||
@@ -5,9 +5,9 @@ using FarseerPhysics;
|
||||
using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Subsurface.Particles;
|
||||
using Barotrauma.Particles;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class RepairTool : ItemComponent
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Throwable : Holdable
|
||||
{
|
||||
|
||||
@@ -6,11 +6,11 @@ using System.Xml.Linq;
|
||||
using Lidgren.Network;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Subsurface.Networking;
|
||||
using Barotrauma.Networking;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class ItemSound
|
||||
{
|
||||
@@ -644,7 +644,7 @@ namespace Subsurface.Items.Components
|
||||
try
|
||||
{
|
||||
// Get the type of a specified class.
|
||||
t = Type.GetType("Subsurface.Items.Components." + type + "", false, true);
|
||||
t = Type.GetType("Barotrauma.Items.Components." + type + "", false, true);
|
||||
if (t == null)
|
||||
{
|
||||
if (errorMessages) DebugConsole.ThrowError("Could not find the component ''" + type + "'' (" + file + ")");
|
||||
|
||||
@@ -5,7 +5,7 @@ using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class ItemContainer : ItemComponent
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Xml.Linq;
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class ItemLabel : ItemComponent
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Ladder : ItemComponent
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using FarseerPhysics;
|
||||
using FarseerPhysics.Dynamics.Joints;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
struct LimbPos
|
||||
{
|
||||
@@ -163,15 +163,6 @@ namespace Subsurface.Items.Components
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//foreach (MapEntity e in item.linkedTo)
|
||||
//{
|
||||
// Item linkedItem = e as Item;
|
||||
// if (linkedItem == null) continue;
|
||||
// linkedItem.SecondaryUse(deltaTime, character);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override bool Pick(Character picker)
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Engine : Powered
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class FabricableItem
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Xml.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class MiniMap : Powered
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class OxygenGenerator : Powered
|
||||
{
|
||||
@@ -60,6 +60,8 @@ namespace Subsurface.Items.Components
|
||||
powerDownTimer = 0.0f;
|
||||
}
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
running = true;
|
||||
|
||||
CurrFlow = Math.Min(voltage, 1.0f) * 50000.0f;
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Pump : Powered
|
||||
{
|
||||
@@ -78,6 +78,8 @@ namespace Subsurface.Items.Components
|
||||
|
||||
if (voltage < minVoltage) return;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
if (hull2 == null && hull1 == null) return;
|
||||
|
||||
float powerFactor = (currPowerConsumption==0.0f) ? 1.0f : voltage;
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Radar : Powered
|
||||
{
|
||||
|
||||
@@ -4,9 +4,9 @@ using System.Xml.Linq;
|
||||
using Lidgren.Network;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Subsurface.Networking;
|
||||
using Barotrauma.Networking;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Reactor : Powered
|
||||
{
|
||||
@@ -106,6 +106,7 @@ namespace Subsurface.Items.Components
|
||||
public bool AutoTemp
|
||||
{
|
||||
get { return autoTemp; }
|
||||
set { autoTemp = value; }
|
||||
}
|
||||
|
||||
public float ExtraCooling { get; set; }
|
||||
@@ -115,7 +116,7 @@ namespace Subsurface.Items.Components
|
||||
public float ShutDownTemp
|
||||
{
|
||||
get { return shutDownTemp; }
|
||||
private set { shutDownTemp = MathHelper.Clamp(value, 0.0f, 10000.0f); }
|
||||
set { shutDownTemp = MathHelper.Clamp(value, 0.0f, 10000.0f); }
|
||||
}
|
||||
|
||||
public Reactor(Item item, XElement element)
|
||||
@@ -137,7 +138,7 @@ namespace Subsurface.Items.Components
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
//ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
fissionRate = Math.Min(fissionRate, AvailableFuel);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Steering : Powered
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Vent : ItemComponent
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Xml.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class PowerContainer : Powered
|
||||
{
|
||||
@@ -92,9 +92,6 @@ namespace Subsurface.Items.Components
|
||||
|
||||
//if (item.linkedTo.Count == 0) return;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
|
||||
foreach (Connection c in item.Connections)
|
||||
{
|
||||
foreach (Connection c2 in c.Recipients)
|
||||
@@ -106,23 +103,14 @@ namespace Subsurface.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
//foreach (MapEntity e in item.linkedTo)
|
||||
//{
|
||||
// Item it = e as Item;
|
||||
// if (it == null) continue;
|
||||
|
||||
// PowerTransfer pt = it.GetComponent<PowerTransfer>();
|
||||
// if (pt==null) continue;
|
||||
// //gridPower -= pt.PowerConsumption;
|
||||
// gridLoad += pt.PowerLoad;
|
||||
|
||||
// //gridPower = -jb.PowerConsumption;
|
||||
// //gridLoad = jb.load;
|
||||
// break;
|
||||
//}
|
||||
|
||||
float gridRate = voltage;
|
||||
|
||||
if (gridRate>minVoltage)
|
||||
{
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
}
|
||||
|
||||
//recharge
|
||||
if (gridRate >= chargeRate)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class PowerTransfer : Powered
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Powered : ItemComponent
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using FarseerPhysics.Dynamics.Contacts;
|
||||
using FarseerPhysics.Dynamics.Joints;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Projectile : ItemComponent
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ using FarseerPhysics.Factories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Rope : ItemComponent
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class AndComponent : ItemComponent
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
|
||||
class Connection
|
||||
|
||||
@@ -4,7 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class ConnectionPanel : ItemComponent
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Subsurface.Lights;
|
||||
using Barotrauma.Lights;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class LightComponent : Powered
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class NotComponent : ItemComponent
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class OrComponent : AndComponent
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class OxygenDetector : ItemComponent
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Xml.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class RegExFindComponent : ItemComponent
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class SignalCheckComponent : ItemComponent
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class WifiComponent : ItemComponent
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Wire : ItemComponent
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using FarseerPhysics;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class Turret : Powered
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class WearableSprite
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user