diff --git a/BarotraumaClient/Source/Characters/Character.cs b/BarotraumaClient/Source/Characters/Character.cs
index 03e2756e4..f2b9e99e0 100644
--- a/BarotraumaClient/Source/Characters/Character.cs
+++ b/BarotraumaClient/Source/Characters/Character.cs
@@ -81,7 +81,7 @@ namespace Barotrauma
}
}
- private void UpdateControlled(float deltaTime)
+ partial void UpdateControlled(float deltaTime)
{
if (controlled == this)
{
@@ -239,7 +239,7 @@ namespace Barotrauma
selectedSound.Sound.Play(1.0f, selectedSound.Range, AnimController.WorldPosition);
}
- private void ImplodeFX()
+ partial void ImplodeFX()
{
Vector2 centerOfMass = AnimController.GetCenterOfMass();
diff --git a/BarotraumaClient/Source/GameSettings.cs b/BarotraumaClient/Source/GameSettings.cs
index 653301a2c..598933a88 100644
--- a/BarotraumaClient/Source/GameSettings.cs
+++ b/BarotraumaClient/Source/GameSettings.cs
@@ -110,7 +110,7 @@ namespace Barotrauma
}
}
- private void InitProjSpecific(XDocument doc)
+ partial void InitProjSpecific(XDocument doc)
{
if (doc == null)
{
diff --git a/BarotraumaClient/Source/Items/CharacterInventory.cs b/BarotraumaClient/Source/Items/CharacterInventory.cs
index 6bb0dc064..cebb34a89 100644
--- a/BarotraumaClient/Source/Items/CharacterInventory.cs
+++ b/BarotraumaClient/Source/Items/CharacterInventory.cs
@@ -18,7 +18,7 @@ namespace Barotrauma
private GUIButton[] useOnSelfButton;
- void InitProjSpecific()
+ partial void InitProjSpecific()
{
useOnSelfButton = new GUIButton[2];
diff --git a/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs b/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs
index 13b712125..b6f7d3dcb 100644
--- a/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs
+++ b/BarotraumaClient/Source/Items/Components/Machines/Fabricator.cs
@@ -19,7 +19,7 @@ namespace Barotrauma.Items.Components
private GUIProgressBar progressBar;
private GUIButton activateButton;
- private void InitProjSpecific()
+ partial void InitProjSpecific()
{
GuiFrame.Padding = new Vector4(20.0f, 20.0f, 20.0f, 20.0f);
diff --git a/BarotraumaClient/Source/Items/Components/Machines/Pump.cs b/BarotraumaClient/Source/Items/Components/Machines/Pump.cs
index 18c8b59fa..8080b4b8c 100644
--- a/BarotraumaClient/Source/Items/Components/Machines/Pump.cs
+++ b/BarotraumaClient/Source/Items/Components/Machines/Pump.cs
@@ -12,7 +12,7 @@ namespace Barotrauma.Items.Components
{
private GUITickBox isActiveTickBox;
- private void InitProjSpecific()
+ partial void InitProjSpecific()
{
isActiveTickBox = new GUITickBox(new Rectangle(0, 0, 20, 20), "Running", Alignment.TopLeft, GuiFrame);
isActiveTickBox.OnSelected = (GUITickBox box) =>
diff --git a/BarotraumaClient/Source/Items/Components/Machines/Reactor.cs b/BarotraumaClient/Source/Items/Components/Machines/Reactor.cs
index 8c97ad85e..3f9d63446 100644
--- a/BarotraumaClient/Source/Items/Components/Machines/Reactor.cs
+++ b/BarotraumaClient/Source/Items/Components/Machines/Reactor.cs
@@ -12,7 +12,7 @@ namespace Barotrauma.Items.Components
{
private GUITickBox autoTempTickBox;
- private void InitProjSpecific()
+ partial void InitProjSpecific()
{
var button = new GUIButton(new Rectangle(410, 70, 40, 40), "-", "", GuiFrame);
button.OnPressed = () =>
diff --git a/BarotraumaClient/Source/Items/Components/Machines/Steering.cs b/BarotraumaClient/Source/Items/Components/Machines/Steering.cs
index c2ec43737..4915421a8 100644
--- a/BarotraumaClient/Source/Items/Components/Machines/Steering.cs
+++ b/BarotraumaClient/Source/Items/Components/Machines/Steering.cs
@@ -35,7 +35,7 @@ namespace Barotrauma.Items.Components
set { maintainPosTickBox.Selected = value; }
}
- private void InitProjSpecific()
+ partial void InitProjSpecific()
{
autopilotTickBox = new GUITickBox(new Rectangle(0, 25, 20, 20), "Autopilot", Alignment.TopLeft, GuiFrame);
autopilotTickBox.OnSelected = (GUITickBox box) =>
diff --git a/BarotraumaClient/Source/Items/Components/Power/PowerContainer.cs b/BarotraumaClient/Source/Items/Components/Power/PowerContainer.cs
index e7dfcf9fe..3865d26f8 100644
--- a/BarotraumaClient/Source/Items/Components/Power/PowerContainer.cs
+++ b/BarotraumaClient/Source/Items/Components/Power/PowerContainer.cs
@@ -9,7 +9,7 @@ namespace Barotrauma.Items.Components
{
partial class PowerContainer : Powered, IDrawableComponent, IServerSerializable, IClientSerializable
{
- private void InitProjSpecific()
+ partial void InitProjSpecific()
{
if (canBeSelected)
{
diff --git a/BarotraumaClient/Source/Map/Explosion.cs b/BarotraumaClient/Source/Map/Explosion.cs
index 66c14c608..364a357b4 100644
--- a/BarotraumaClient/Source/Map/Explosion.cs
+++ b/BarotraumaClient/Source/Map/Explosion.cs
@@ -10,7 +10,7 @@ namespace Barotrauma
{
partial class Explosion
{
- private void ExplodeProjSpecific(Vector2 worldPosition,Hull hull)
+ partial void ExplodeProjSpecific(Vector2 worldPosition,Hull hull)
{
if (shockwave)
diff --git a/BarotraumaClient/Source/Map/FireSource.cs b/BarotraumaClient/Source/Map/FireSource.cs
index 3e9f8568d..8ae3b14d6 100644
--- a/BarotraumaClient/Source/Map/FireSource.cs
+++ b/BarotraumaClient/Source/Map/FireSource.cs
@@ -14,7 +14,7 @@ namespace Barotrauma
private LightSource lightSource;
- private void UpdateProjSpecific(float growModifier)
+ partial void UpdateProjSpecific(float growModifier)
{
if (hull.FireSources.Any(fs => fs != this && fs.size.X > size.X))
{
diff --git a/BarotraumaClient/Source/Physics/PhysicsBody.cs b/BarotraumaClient/Source/Physics/PhysicsBody.cs
index e3fecd26f..e78b244e3 100644
--- a/BarotraumaClient/Source/Physics/PhysicsBody.cs
+++ b/BarotraumaClient/Source/Physics/PhysicsBody.cs
@@ -95,7 +95,7 @@ namespace Barotrauma
1.0f, SpriteEffects.None, 0.0f);
}
- private void DisposeProjSpecific()
+ partial void DisposeProjSpecific()
{
if (bodyShapeTexture != null)
{
diff --git a/BarotraumaClient/Source/Sprite/Sprite.cs b/BarotraumaClient/Source/Sprite/Sprite.cs
index d87686ea0..ce9146202 100644
--- a/BarotraumaClient/Source/Sprite/Sprite.cs
+++ b/BarotraumaClient/Source/Sprite/Sprite.cs
@@ -35,7 +35,7 @@ namespace Barotrauma
list.Add(this);
}
- private void LoadTexture(ref Vector4 sourceVector,ref bool shouldReturn)
+ partial void LoadTexture(ref Vector4 sourceVector,ref bool shouldReturn)
{
texture = LoadTexture(this.file);
@@ -49,7 +49,7 @@ namespace Barotrauma
if (sourceVector.W == 0.0f) sourceVector.W = texture.Height;
}
- private void CalculateSourceRect()
+ partial void CalculateSourceRect()
{
sourceRect = new Rectangle(0, 0, texture.Width, texture.Height);
}
@@ -261,7 +261,7 @@ namespace Barotrauma
}
}
- private void DisposeTexture()
+ partial void DisposeTexture()
{
//check if another sprite is using the same texture
foreach (Sprite s in list)
diff --git a/BarotraumaServer/BarotraumaServer.csproj b/BarotraumaServer/BarotraumaServer.csproj
index 7a52f44c8..1d4dd4973 100644
--- a/BarotraumaServer/BarotraumaServer.csproj
+++ b/BarotraumaServer/BarotraumaServer.csproj
@@ -67,27 +67,18 @@
-
-
-
-
-
-
-
-
-
diff --git a/BarotraumaServer/Source/Characters/Character.cs b/BarotraumaServer/Source/Characters/Character.cs
index aad3d127d..57ee761ee 100644
--- a/BarotraumaServer/Source/Characters/Character.cs
+++ b/BarotraumaServer/Source/Characters/Character.cs
@@ -28,15 +28,5 @@ namespace Barotrauma
{
keys = null;
}
-
- private void UpdateControlled(float deltaTime)
- {
- //do nothing
- }
-
- private void ImplodeFX()
- {
- //do nothing
- }
}
}
diff --git a/BarotraumaServer/Source/GameSettings.cs b/BarotraumaServer/Source/GameSettings.cs
index 09c70e14b..ccbabfb26 100644
--- a/BarotraumaServer/Source/GameSettings.cs
+++ b/BarotraumaServer/Source/GameSettings.cs
@@ -14,10 +14,6 @@ namespace Barotrauma
public partial class GameSettings
{
- private void InitProjSpecific(XDocument doc)
- {
- //do nothing
- }
public void Save(string filePath)
{
XDocument doc = new XDocument();
diff --git a/BarotraumaServer/Source/Items/CharacterInventory.cs b/BarotraumaServer/Source/Items/CharacterInventory.cs
deleted file mode 100644
index 5564c4108..000000000
--- a/BarotraumaServer/Source/Items/CharacterInventory.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Linq;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Barotrauma.Networking;
-using Lidgren.Network;
-using System.Collections.Generic;
-using Barotrauma.Items.Components;
-
-namespace Barotrauma
-{
- partial class CharacterInventory : Inventory
- {
- void InitProjSpecific()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Items/Components/Machines/Fabricator.cs b/BarotraumaServer/Source/Items/Components/Machines/Fabricator.cs
deleted file mode 100644
index 3bf123d06..000000000
--- a/BarotraumaServer/Source/Items/Components/Machines/Fabricator.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using Barotrauma.Networking;
-using Lidgren.Network;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Xml.Linq;
-
-namespace Barotrauma.Items.Components
-{
- partial class Fabricator : Powered, IServerSerializable, IClientSerializable
- {
- private void InitProjSpecific()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Items/Components/Machines/Pump.cs b/BarotraumaServer/Source/Items/Components/Machines/Pump.cs
deleted file mode 100644
index ed6d63ef8..000000000
--- a/BarotraumaServer/Source/Items/Components/Machines/Pump.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Barotrauma.Networking;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using System;
-using System.Collections.Specialized;
-using System.Globalization;
-using System.Xml.Linq;
-
-namespace Barotrauma.Items.Components
-{
- partial class Pump : Powered, IServerSerializable, IClientSerializable
- {
- private void InitProjSpecific()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Items/Components/Machines/Reactor.cs b/BarotraumaServer/Source/Items/Components/Machines/Reactor.cs
deleted file mode 100644
index 967fe573d..000000000
--- a/BarotraumaServer/Source/Items/Components/Machines/Reactor.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Xml.Linq;
-using Lidgren.Network;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Barotrauma.Networking;
-
-namespace Barotrauma.Items.Components
-{
- partial class Reactor : Powered, IDrawableComponent, IServerSerializable, IClientSerializable
- {
- private void InitProjSpecific()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Items/Components/Machines/Steering.cs b/BarotraumaServer/Source/Items/Components/Machines/Steering.cs
index 919340b15..bfc446b67 100644
--- a/BarotraumaServer/Source/Items/Components/Machines/Steering.cs
+++ b/BarotraumaServer/Source/Items/Components/Machines/Steering.cs
@@ -17,10 +17,5 @@ namespace Barotrauma.Items.Components
public bool MaintainPos;
public bool LevelStartSelected;
public bool LevelEndSelected;
-
- private void InitProjSpecific()
- {
- //do nothing
- }
}
}
diff --git a/BarotraumaServer/Source/Items/Components/Power/PowerContainer.cs b/BarotraumaServer/Source/Items/Components/Power/PowerContainer.cs
deleted file mode 100644
index ade106b5e..000000000
--- a/BarotraumaServer/Source/Items/Components/Power/PowerContainer.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Xml.Linq;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Barotrauma.Networking;
-using Lidgren.Network;
-
-namespace Barotrauma.Items.Components
-{
- partial class PowerContainer : Powered, IDrawableComponent, IServerSerializable, IClientSerializable
- {
- private void InitProjSpecific()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Map/Explosion.cs b/BarotraumaServer/Source/Map/Explosion.cs
deleted file mode 100644
index c7b7d5768..000000000
--- a/BarotraumaServer/Source/Map/Explosion.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Microsoft.Xna.Framework;
-using System;
-using System.Collections.Generic;
-using System.Xml.Linq;
-using Barotrauma.Networking;
-using FarseerPhysics;
-
-namespace Barotrauma
-{
- partial class Explosion
- {
- private void ExplodeProjSpecific(Vector2 worldPosition,Hull hull)
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Map/FireSource.cs b/BarotraumaServer/Source/Map/FireSource.cs
deleted file mode 100644
index ded4402ae..000000000
--- a/BarotraumaServer/Source/Map/FireSource.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Microsoft.Xna.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Barotrauma.Networking;
-
-namespace Barotrauma
-{
- partial class FireSource
- {
- private void UpdateProjSpecific(float growModifier)
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Physics/PhysicsBody.cs b/BarotraumaServer/Source/Physics/PhysicsBody.cs
deleted file mode 100644
index 625f435e5..000000000
--- a/BarotraumaServer/Source/Physics/PhysicsBody.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Barotrauma
-{
- partial class PhysicsBody
- {
- private void DisposeProjSpecific()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaServer/Source/Sprite/Sprite.cs b/BarotraumaServer/Source/Sprite/Sprite.cs
deleted file mode 100644
index 51f774941..000000000
--- a/BarotraumaServer/Source/Sprite/Sprite.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.Xna.Framework;
-
-namespace Barotrauma
-{
- public partial class Sprite
- {
- private void LoadTexture(ref Vector4 sourceVector, ref bool shouldReturn)
- {
- //do nothing
- }
-
- private void CalculateSourceRect()
- {
- //do nothing
- }
-
- private void DisposeTexture()
- {
- //do nothing
- }
- }
-}
diff --git a/BarotraumaShared/Source/Characters/Character.cs b/BarotraumaShared/Source/Characters/Character.cs
index ffc375016..33843c646 100644
--- a/BarotraumaShared/Source/Characters/Character.cs
+++ b/BarotraumaShared/Source/Characters/Character.cs
@@ -1442,6 +1442,8 @@ namespace Barotrauma
if (!IsDead) LockHands = false;
}
+ partial void UpdateControlled(float deltaTime);
+
private void UpdateOxygen(float deltaTime)
{
float prevOxygen = oxygen;
@@ -1617,6 +1619,8 @@ namespace Barotrauma
joint.LimitEnabled = false;
}
}
+
+ partial void ImplodeFX();
public void Kill(CauseOfDeath causeOfDeath, bool isNetworkMessage = false)
{
diff --git a/BarotraumaShared/Source/GameSettings.cs b/BarotraumaShared/Source/GameSettings.cs
index 0985b7e7d..d87980261 100644
--- a/BarotraumaShared/Source/GameSettings.cs
+++ b/BarotraumaShared/Source/GameSettings.cs
@@ -66,5 +66,6 @@ namespace Barotrauma
}
}
+ partial void InitProjSpecific(XDocument doc);
}
}
diff --git a/BarotraumaShared/Source/Items/CharacterInventory.cs b/BarotraumaShared/Source/Items/CharacterInventory.cs
index 1258ded3a..5d3372b7b 100644
--- a/BarotraumaShared/Source/Items/CharacterInventory.cs
+++ b/BarotraumaShared/Source/Items/CharacterInventory.cs
@@ -32,6 +32,8 @@ namespace Barotrauma
InitProjSpecific();
}
+ partial void InitProjSpecific();
+
private bool UseItemOnSelf(int slotIndex)
{
if (Items[slotIndex] == null) return false;
diff --git a/BarotraumaShared/Source/Items/Components/Machines/Fabricator.cs b/BarotraumaShared/Source/Items/Components/Machines/Fabricator.cs
index bacacb0fe..a98209b57 100644
--- a/BarotraumaShared/Source/Items/Components/Machines/Fabricator.cs
+++ b/BarotraumaShared/Source/Items/Components/Machines/Fabricator.cs
@@ -106,6 +106,8 @@ namespace Barotrauma.Items.Components
InitProjSpecific();
}
+ partial void InitProjSpecific();
+
public override bool Select(Character character)
{
CheckFabricableItems(character);
diff --git a/BarotraumaShared/Source/Items/Components/Machines/Pump.cs b/BarotraumaShared/Source/Items/Components/Machines/Pump.cs
index 49a03d417..53813ce67 100644
--- a/BarotraumaShared/Source/Items/Components/Machines/Pump.cs
+++ b/BarotraumaShared/Source/Items/Components/Machines/Pump.cs
@@ -70,6 +70,8 @@ namespace Barotrauma.Items.Components
InitProjSpecific();
}
+ partial void InitProjSpecific();
+
public override void Move(Vector2 amount)
{
base.Move(amount);
diff --git a/BarotraumaShared/Source/Items/Components/Machines/Reactor.cs b/BarotraumaShared/Source/Items/Components/Machines/Reactor.cs
index dca857bd9..c9de27add 100644
--- a/BarotraumaShared/Source/Items/Components/Machines/Reactor.cs
+++ b/BarotraumaShared/Source/Items/Components/Machines/Reactor.cs
@@ -166,6 +166,8 @@ namespace Barotrauma.Items.Components
InitProjSpecific();
}
+ partial void InitProjSpecific();
+
public override void Update(float deltaTime, Camera cam)
{
if (GameMain.Server != null && nextServerLogWriteTime != null)
diff --git a/BarotraumaShared/Source/Items/Components/Machines/Steering.cs b/BarotraumaShared/Source/Items/Components/Machines/Steering.cs
index 2ad9a9cf5..77d28cc5c 100644
--- a/BarotraumaShared/Source/Items/Components/Machines/Steering.cs
+++ b/BarotraumaShared/Source/Items/Components/Machines/Steering.cs
@@ -104,7 +104,9 @@ namespace Barotrauma.Items.Components
InitProjSpecific();
}
-
+
+ partial void InitProjSpecific();
+
public override void Update(float deltaTime, Camera cam)
{
if (unsentChanges)
diff --git a/BarotraumaShared/Source/Items/Components/Power/PowerContainer.cs b/BarotraumaShared/Source/Items/Components/Power/PowerContainer.cs
index b5f375a89..0e921f05b 100644
--- a/BarotraumaShared/Source/Items/Components/Power/PowerContainer.cs
+++ b/BarotraumaShared/Source/Items/Components/Power/PowerContainer.cs
@@ -95,6 +95,8 @@ namespace Barotrauma.Items.Components
InitProjSpecific();
}
+ partial void InitProjSpecific();
+
public override bool Pick(Character picker)
{
if (picker == null) return false;
diff --git a/BarotraumaShared/Source/Map/Explosion.cs b/BarotraumaShared/Source/Map/Explosion.cs
index 439dce2e6..a9558bc35 100644
--- a/BarotraumaShared/Source/Map/Explosion.cs
+++ b/BarotraumaShared/Source/Map/Explosion.cs
@@ -80,6 +80,8 @@ namespace Barotrauma
}
+ partial void ExplodeProjSpecific(Vector2 worldPosition, Hull hull);
+
private Vector2 ClampParticlePos(Vector2 particlePos, Hull hull)
{
if (hull == null) return particlePos;
diff --git a/BarotraumaShared/Source/Map/FireSource.cs b/BarotraumaShared/Source/Map/FireSource.cs
index b614e6045..887d98976 100644
--- a/BarotraumaShared/Source/Map/FireSource.cs
+++ b/BarotraumaShared/Source/Map/FireSource.cs
@@ -169,6 +169,8 @@ namespace Barotrauma
if (size.X < 1.0f) Remove();
}
+ partial void UpdateProjSpecific(float growModifier);
+
private void OnChangeHull(Vector2 pos, Hull particleHull)
{
if (particleHull == hull || particleHull==null) return;
diff --git a/BarotraumaShared/Source/Physics/PhysicsBody.cs b/BarotraumaShared/Source/Physics/PhysicsBody.cs
index 9764f2659..7535d41b5 100644
--- a/BarotraumaShared/Source/Physics/PhysicsBody.cs
+++ b/BarotraumaShared/Source/Physics/PhysicsBody.cs
@@ -535,5 +535,6 @@ namespace Barotrauma
DisposeProjSpecific();
}
+ partial void DisposeProjSpecific();
}
}
diff --git a/BarotraumaShared/Source/Sprite/Sprite.cs b/BarotraumaShared/Source/Sprite/Sprite.cs
index 87dd77bca..5ec850149 100644
--- a/BarotraumaShared/Source/Sprite/Sprite.cs
+++ b/BarotraumaShared/Source/Sprite/Sprite.cs
@@ -60,6 +60,9 @@ namespace Barotrauma
return FilePath + ": " + sourceRect;
}
+ partial void LoadTexture(ref Vector4 sourceVector, ref bool shouldReturn);
+ partial void CalculateSourceRect();
+
public Sprite(XElement element, string path = "", string file = "")
{
if (file == "")
@@ -157,6 +160,8 @@ namespace Barotrauma
DisposeTexture();
}
+
+ partial void DisposeTexture();
}
}