Properly setting serverlog scrollbar size, clown gear
This commit is contained in:
@@ -436,6 +436,15 @@
|
|||||||
<Content Include="Content\Items\Clothes\captainTorso.png">
|
<Content Include="Content\Items\Clothes\captainTorso.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="Content\Items\Clothes\clownmask.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Content\Items\Clothes\clownpants.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Content\Items\Clothes\clownshirt.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Content\Items\Clothes\engigear.png">
|
<Content Include="Content\Items\Clothes\engigear.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -1031,6 +1040,9 @@
|
|||||||
<None Include="Content\Items\Weapons\harpoon2.ogg">
|
<None Include="Content\Items\Weapons\harpoon2.ogg">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Content\Items\Weapons\honk.ogg">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Include="Content\Items\Weapons\railgun.ogg">
|
<None Include="Content\Items\Weapons\railgun.ogg">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|||||||
@@ -150,5 +150,56 @@
|
|||||||
<Containable name="smallitem"/>
|
<Containable name="smallitem"/>
|
||||||
</ItemContainer>
|
</ItemContainer>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Item
|
||||||
|
name="Clown Mask"
|
||||||
|
category="Equipment"
|
||||||
|
pickdistance="150"
|
||||||
|
tags="smallitem"
|
||||||
|
description="Praise the honkmother.">
|
||||||
|
|
||||||
|
<Sprite texture ="clownmask.png" depth="0.6"/>
|
||||||
|
|
||||||
|
<Body radius="8" density="5"/>
|
||||||
|
|
||||||
|
<Wearable limbtype="Head" slots="Any,Head">
|
||||||
|
<sprite texture="clownmask.png" limb="Head" origin="0.5,0.5"/>
|
||||||
|
</Wearable>
|
||||||
|
</Item>
|
||||||
|
|
||||||
|
<Item
|
||||||
|
name="Clown Costume"
|
||||||
|
category="Equipment"
|
||||||
|
pickdistance="150"
|
||||||
|
tags="smallitem"
|
||||||
|
description="Praise the honkmother.">
|
||||||
|
|
||||||
|
<Sprite texture ="clownpants.png" sourcerect="0,62,53,18" depth="0.6"/>
|
||||||
|
|
||||||
|
<Body width="53" height="18"/>
|
||||||
|
|
||||||
|
<Wearable slots="Any,Torso+Legs">
|
||||||
|
<sprite texture="clownshirt.png" limb="Torso" sourcerect="0,3,30,58" origin="0.5,0.48" depth="0.02"/>
|
||||||
|
|
||||||
|
<sprite texture="clownshirt.png" limb="RightHand" sourcerect="47,0,15,39" origin="0.45,0.6" hidelimb="true"/>
|
||||||
|
<sprite texture="clownshirt.png" limb="LeftHand" sourcerect="47,0,15,39" origin="0.45,0.6" depth="0.14" hidelimb="true"/>
|
||||||
|
|
||||||
|
<sprite texture="clownshirt.png" limb="RightArm" sourcerect="30,0,17,42" origin="0.5,0.5" depth="0.005" hidelimb="true"/>
|
||||||
|
<sprite texture="clownshirt.png" limb="LeftArm" sourcerect="30,0,17,42" origin="0.5,0.5" depth="0.13" hidelimb="true"/>
|
||||||
|
|
||||||
|
<sprite texture="clownpants.png" limb="Waist" sourcerect="0,0,1,1" origin="0.5,0.5" hidelimb="true"/>
|
||||||
|
<sprite texture="clownpants.png" limb="RightThigh" sourcerect="0,0,38,50" origin="0.5,0.5" depth="0.01" hidelimb="true"/>
|
||||||
|
<sprite texture="clownpants.png" limb="LeftThigh" sourcerect="0,0,38,50" origin="0.5,0.5" depth="0.14" hidelimb="true"/>
|
||||||
|
|
||||||
|
<sprite texture="clownpants.png" limb="RightLeg" sourcerect="37,0,28,52" origin="0.5,0.5" depth="0.11" hidelimb="true"/>
|
||||||
|
<sprite texture="clownpants.png" limb="LeftLeg" sourcerect="37,0,28,52" origin="0.5,0.5" depth="0.15" hidelimb="true"/>
|
||||||
|
|
||||||
|
<sprite texture="clownpants.png" limb="RightFoot" sourcerect="65,41,15,39" origin="0.5,0.3" depth="0.11" hidelimb="true"/>
|
||||||
|
<sprite texture="clownpants.png" limb="LeftFoot" sourcerect="65,41,15,39" origin="0.5,0.3" depth="0.15" hidelimb="true"/>
|
||||||
|
|
||||||
|
</Wearable>
|
||||||
|
</Item>
|
||||||
</Items>
|
</Items>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
@@ -164,7 +164,27 @@
|
|||||||
<Body width="20" height="9" density="15"/>
|
<Body width="20" height="9" density="15"/>
|
||||||
|
|
||||||
<Pickable slots="Any,RightHand,LeftHand"/>
|
<Pickable slots="Any,RightHand,LeftHand"/>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
||||||
|
<Item
|
||||||
|
name="Bike Horn"
|
||||||
|
category="Equipment"
|
||||||
|
pickdistance="200"
|
||||||
|
price="500"
|
||||||
|
tags="weapon"
|
||||||
|
description="HONK">
|
||||||
|
|
||||||
|
<Sprite texture="Content/Items/Clothes/clownshirt.png" sourcerect="32,50,32,14" depth="0.5"/>
|
||||||
|
|
||||||
|
<Body width="30" height="10" density="10"/>
|
||||||
|
|
||||||
|
<Holdable slots="Any,RightHand,LeftHand" aimpos="100,0" handle1="-5,0"/>
|
||||||
|
|
||||||
|
<RangedWeapon reload="2">
|
||||||
|
<Sound file="honk.ogg" type="OnUse"/>
|
||||||
|
</RangedWeapon>
|
||||||
|
|
||||||
|
</Item>
|
||||||
</Items>
|
</Items>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
CrewManager.Draw(spriteBatch);
|
CrewManager.Draw(spriteBatch);
|
||||||
|
|
||||||
|
if (Submarine.Loaded == null) return;
|
||||||
|
|
||||||
if (Submarine.Loaded.AtEndPosition)
|
if (Submarine.Loaded.AtEndPosition)
|
||||||
{
|
{
|
||||||
endShiftButton.Text = "Enter " + Map.SelectedLocation.Name;
|
endShiftButton.Text = "Enter " + Map.SelectedLocation.Name;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
class RangedWeapon : ItemComponent
|
class RangedWeapon : ItemComponent
|
||||||
{
|
{
|
||||||
private float reload;
|
private float reload, reloadTimer;
|
||||||
|
|
||||||
private Vector2 barrelPos;
|
private Vector2 barrelPos;
|
||||||
|
|
||||||
@@ -21,6 +21,13 @@ namespace Barotrauma.Items.Components
|
|||||||
set { barrelPos = ConvertUnits.ToSimUnits(ToolBox.ParseToVector2(value)); }
|
set { barrelPos = ConvertUnits.ToSimUnits(ToolBox.ParseToVector2(value)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HasDefaultValue(1.0f, false)]
|
||||||
|
public float Reload
|
||||||
|
{
|
||||||
|
get { return reload; }
|
||||||
|
set { reload = Math.Max(value, 0.0f); }
|
||||||
|
}
|
||||||
|
|
||||||
public Vector2 TransformedBarrelPos
|
public Vector2 TransformedBarrelPos
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -41,11 +48,11 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
public override void Update(float deltaTime, Camera cam)
|
public override void Update(float deltaTime, Camera cam)
|
||||||
{
|
{
|
||||||
reload -= deltaTime;
|
reloadTimer -= deltaTime;
|
||||||
|
|
||||||
if (reload < 0.0f)
|
if (reloadTimer < 0.0f)
|
||||||
{
|
{
|
||||||
reload = 0.0f;
|
reloadTimer = 0.0f;
|
||||||
IsActive = false;
|
IsActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,9 +60,9 @@ namespace Barotrauma.Items.Components
|
|||||||
public override bool Use(float deltaTime, Character character = null)
|
public override bool Use(float deltaTime, Character character = null)
|
||||||
{
|
{
|
||||||
if (character == null) return false;
|
if (character == null) return false;
|
||||||
if (!character.IsKeyDown(InputType.Aim) || reload > 0.0f) return false;
|
if (!character.IsKeyDown(InputType.Aim) || reloadTimer > 0.0f) return false;
|
||||||
IsActive = true;
|
IsActive = true;
|
||||||
reload = 1.0f;
|
reloadTimer = reload;
|
||||||
|
|
||||||
List<Body> limbBodies = new List<Body>();
|
List<Body> limbBodies = new List<Body>();
|
||||||
foreach (Limb l in character.AnimController.Limbs)
|
foreach (Limb l in character.AnimController.Limbs)
|
||||||
@@ -63,9 +70,6 @@ namespace Barotrauma.Items.Components
|
|||||||
limbBodies.Add(l.body.FarseerBody);
|
limbBodies.Add(l.body.FarseerBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
Item[] containedItems = item.ContainedItems;
|
|
||||||
if (containedItems == null || !containedItems.Any()) return false;
|
|
||||||
|
|
||||||
float degreeOfFailure = (100.0f - DegreeOfSuccess(character))/100.0f;
|
float degreeOfFailure = (100.0f - DegreeOfSuccess(character))/100.0f;
|
||||||
|
|
||||||
degreeOfFailure *= degreeOfFailure;
|
degreeOfFailure *= degreeOfFailure;
|
||||||
@@ -75,41 +79,47 @@ namespace Barotrauma.Items.Components
|
|||||||
ApplyStatusEffects(ActionType.OnFailure, 1.0f, character);
|
ApplyStatusEffects(ActionType.OnFailure, 1.0f, character);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Item projectile in containedItems)
|
Item[] containedItems = item.ContainedItems;
|
||||||
|
if (containedItems != null)
|
||||||
{
|
{
|
||||||
if (projectile == null) continue;
|
foreach (Item projectile in containedItems)
|
||||||
//find the projectile-itemcomponent of the projectile,
|
{
|
||||||
//and add the limbs of the shooter to the list of bodies to be ignored
|
if (projectile == null) continue;
|
||||||
//so that the player can't shoot himself
|
//find the projectile-itemcomponent of the projectile,
|
||||||
Projectile projectileComponent= projectile.GetComponent<Projectile>();
|
//and add the limbs of the shooter to the list of bodies to be ignored
|
||||||
if (projectileComponent == null) continue;
|
//so that the player can't shoot himself
|
||||||
|
Projectile projectileComponent= projectile.GetComponent<Projectile>();
|
||||||
|
if (projectileComponent == null) continue;
|
||||||
|
|
||||||
projectile.body.ResetDynamics();
|
projectile.body.ResetDynamics();
|
||||||
projectile.SetTransform(TransformedBarrelPos,
|
projectile.SetTransform(TransformedBarrelPos,
|
||||||
((item.body.Dir == 1.0f) ? item.body.Rotation : item.body.Rotation - MathHelper.Pi)
|
((item.body.Dir == 1.0f) ? item.body.Rotation : item.body.Rotation - MathHelper.Pi)
|
||||||
+ Rand.Range(-degreeOfFailure, degreeOfFailure));
|
+ Rand.Range(-degreeOfFailure, degreeOfFailure));
|
||||||
|
|
||||||
projectile.Use(deltaTime);
|
projectile.Use(deltaTime);
|
||||||
projectileComponent.User = character;
|
projectileComponent.User = character;
|
||||||
|
|
||||||
projectile.body.ApplyTorque(projectile.body.Mass * degreeOfFailure * Rand.Range(-10.0f, 10.0f));
|
projectile.body.ApplyTorque(projectile.body.Mass * degreeOfFailure * Rand.Range(-10.0f, 10.0f));
|
||||||
|
|
||||||
//recoil
|
//recoil
|
||||||
item.body.ApplyLinearImpulse(
|
item.body.ApplyLinearImpulse(
|
||||||
new Vector2((float)Math.Cos(projectile.body.Rotation), (float)Math.Sin(projectile.body.Rotation)) * item.body.Mass * -50.0f);
|
new Vector2((float)Math.Cos(projectile.body.Rotation), (float)Math.Sin(projectile.body.Rotation)) * item.body.Mass * -50.0f);
|
||||||
|
|
||||||
projectileComponent.ignoredBodies = limbBodies;
|
projectileComponent.ignoredBodies = limbBodies;
|
||||||
|
|
||||||
item.RemoveContained(projectile);
|
item.RemoveContained(projectile);
|
||||||
|
|
||||||
Rope rope = item.GetComponent<Rope>();
|
Rope rope = item.GetComponent<Rope>();
|
||||||
if (rope != null) rope.Attach(projectile);
|
if (rope != null) rope.Attach(projectile);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return false;
|
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ namespace Barotrauma.Networking
|
|||||||
if (LogFrame != null)
|
if (LogFrame != null)
|
||||||
{
|
{
|
||||||
AddLine(newText);
|
AddLine(newText);
|
||||||
|
|
||||||
|
listBox.UpdateScrollBarSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lines.Count >= LinesPerFile)
|
if (lines.Count >= LinesPerFile)
|
||||||
@@ -64,6 +66,8 @@ namespace Barotrauma.Networking
|
|||||||
AddLine(line);
|
AddLine(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listBox.UpdateScrollBarSize();
|
||||||
|
|
||||||
if (listBox.BarScroll==0.0f || listBox.BarScroll==1.0f) listBox.BarScroll = 1.0f;
|
if (listBox.BarScroll==0.0f || listBox.BarScroll==1.0f) listBox.BarScroll = 1.0f;
|
||||||
|
|
||||||
GUIButton closeButton = new GUIButton(new Rectangle(0,0,100, 15), "Close", Alignment.BottomRight, GUI.Style, innerFrame);
|
GUIButton closeButton = new GUIButton(new Rectangle(0,0,100, 15), "Close", Alignment.BottomRight, GUI.Style, innerFrame);
|
||||||
@@ -77,7 +81,7 @@ namespace Barotrauma.Networking
|
|||||||
private void AddLine(ColoredText line)
|
private void AddLine(ColoredText line)
|
||||||
{
|
{
|
||||||
var textBlock = new GUITextBlock(new Rectangle(0, 0, 0, 0), line.Text, GUI.Style, Alignment.TopLeft, Alignment.TopLeft, listBox, true, GUI.SmallFont);
|
var textBlock = new GUITextBlock(new Rectangle(0, 0, 0, 0), line.Text, GUI.Style, Alignment.TopLeft, Alignment.TopLeft, listBox, true, GUI.SmallFont);
|
||||||
//textBlock.Rect = new Rectangle(textBlock.Rect.X, textBlock.Rect.Y, textBlock.Rect.Width, (line.Text.Count(c => c == '\n') + 1) * 15);
|
textBlock.Rect = new Rectangle(textBlock.Rect.X, textBlock.Rect.Y, textBlock.Rect.Width, Math.Max(13, textBlock.Rect.Height));
|
||||||
|
|
||||||
textBlock.TextColor = line.Color;
|
textBlock.TextColor = line.Color;
|
||||||
textBlock.CanBeFocused = false;
|
textBlock.CanBeFocused = false;
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
v0.3.2.3
|
||||||
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- clearing the server log after saving!
|
||||||
|
- saving the log after every round (even if it isn't full)
|
||||||
|
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
v0.3.2.2
|
v0.3.2.2
|
||||||
---------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user