assigning jobs when a round starts, crew tab in multiplayer, repairtool particles light & sounds, attachable buttons, increased repairtool range & limbdamage, captain's uniform, wearable sprite bugfixes
This commit is contained in:
@@ -14,8 +14,6 @@ namespace Subsurface.Items.Components
|
||||
|
||||
string prevMsg;
|
||||
|
||||
//protected Character picker;
|
||||
|
||||
//the distance from the holding characters elbow to center of the physics body of the item
|
||||
protected Vector2 holdPos;
|
||||
|
||||
@@ -23,8 +21,7 @@ namespace Subsurface.Items.Components
|
||||
|
||||
protected bool aimable;
|
||||
|
||||
private bool attachable;
|
||||
private bool attached;
|
||||
private bool attachable, attached, attachedByDefault;
|
||||
private PhysicsBody body;
|
||||
|
||||
//the angle in which the character holds the item
|
||||
@@ -51,6 +48,13 @@ namespace Subsurface.Items.Components
|
||||
set { attachable = value; }
|
||||
}
|
||||
|
||||
[HasDefaultValue(false, false)]
|
||||
public bool AttachedByDefault
|
||||
{
|
||||
get { return attachedByDefault; }
|
||||
set { attachedByDefault = value; }
|
||||
}
|
||||
|
||||
[HasDefaultValue("0.0,0.0", false)]
|
||||
public string HoldPos
|
||||
{
|
||||
@@ -97,6 +101,8 @@ namespace Subsurface.Items.Components
|
||||
Msg = "";
|
||||
}
|
||||
|
||||
if (attachedByDefault) Use(1.0f);
|
||||
|
||||
|
||||
//holdAngle = ToolBox.GetAttributeFloat(element, "holdangle", 0.0f);
|
||||
//holdAngle = MathHelper.ToRadians(holdAngle);
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace Subsurface.Items.Components
|
||||
|
||||
Vector2 barrelPos;
|
||||
|
||||
private string particles;
|
||||
|
||||
float structureFixAmount, limbFixAmount;
|
||||
|
||||
[HasDefaultValue(0.0f, false)]
|
||||
@@ -42,6 +44,13 @@ namespace Subsurface.Items.Components
|
||||
set { limbFixAmount = value; }
|
||||
}
|
||||
|
||||
[HasDefaultValue("", false)]
|
||||
public string Particles
|
||||
{
|
||||
get { return particles; }
|
||||
set { particles = value; }
|
||||
}
|
||||
|
||||
[HasDefaultValue("0.0,0.0", false)]
|
||||
public string BarrelPos
|
||||
{
|
||||
@@ -178,12 +187,17 @@ namespace Subsurface.Items.Components
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
Vector2 particleSpeed = new Vector2(
|
||||
(float)Math.Cos(item.body.Rotation),
|
||||
(float)Math.Sin(item.body.Rotation)) *item.body.Dir * 5.0f;
|
||||
//Vector2 particleSpeed = new Vector2(
|
||||
// (float)Math.Cos(item.body.Rotation),
|
||||
// (float)Math.Sin(item.body.Rotation)) *item.body.Dir * 0.1f;
|
||||
|
||||
Game1.ParticleManager.CreateParticle("weld", TransformedBarrelPos, particleSpeed);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(particles))
|
||||
{
|
||||
Game1.ParticleManager.CreateParticle(particles, TransformedBarrelPos,
|
||||
-item.body.Rotation + ((item.body.Dir>0.0f) ? 0.0f : MathHelper.Pi), 0.0f);
|
||||
}
|
||||
|
||||
//Vector2 startPos = ConvertUnits.ToDisplayUnits(item.body.Position);
|
||||
//Vector2 endPos = ConvertUnits.ToDisplayUnits(pickedPosition);
|
||||
//endPos = new Vector2(endPos.X + Game1.localRandom.Next(-2, 2), endPos.Y + Game1.localRandom.Next(-2, 2));
|
||||
|
||||
Reference in New Issue
Block a user