Split Machines ItemComponents
There's still a lot of work to do before we can get the server to compile
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
class ItemPrefab : MapEntityPrefab
|
||||
partial class ItemPrefab : MapEntityPrefab
|
||||
{
|
||||
//static string contentFolder = "Content/Items/";
|
||||
|
||||
@@ -190,45 +190,6 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
public override void DrawPlacing(SpriteBatch spriteBatch,Camera cam)
|
||||
{
|
||||
Vector2 position = Submarine.MouseToWorldGrid(cam, Submarine.MainSub);
|
||||
|
||||
if (PlayerInput.RightButtonClicked())
|
||||
{
|
||||
selected = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!resizeHorizontal && !resizeVertical)
|
||||
{
|
||||
sprite.Draw(spriteBatch, new Vector2(position.X + sprite.size.X / 2.0f, -position.Y + sprite.size.Y / 2.0f), SpriteColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 placeSize = size;
|
||||
|
||||
if (placePosition == Vector2.Zero)
|
||||
{
|
||||
if (PlayerInput.LeftButtonHeld()) placePosition = position;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (resizeHorizontal)
|
||||
placeSize.X = Math.Max(position.X - placePosition.X, size.X);
|
||||
if (resizeVertical)
|
||||
placeSize.Y = Math.Max(placePosition.Y - position.Y, size.Y);
|
||||
|
||||
position = placePosition;
|
||||
}
|
||||
|
||||
if (sprite != null) sprite.DrawTiled(spriteBatch, new Vector2(position.X, -position.Y), placeSize, SpriteColor);
|
||||
}
|
||||
|
||||
//if (PlayerInput.GetMouseState.RightButton == ButtonState.Pressed) selected = null;
|
||||
|
||||
}
|
||||
|
||||
public static void LoadAll(List<string> filePaths)
|
||||
{
|
||||
DebugConsole.Log("Loading item prefabs: ");
|
||||
|
||||
Reference in New Issue
Block a user