- new tool sprites

- when clicking the order icon next to a character, the character is selected in the command menu
This commit is contained in:
Regalis
2016-01-25 00:50:56 +02:00
parent 278371638e
commit 89405d786b
8 changed files with 48 additions and 14 deletions

View File

@@ -474,6 +474,9 @@
<Content Include="Content\Items\Tools\extinguisher.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Items\Tools\tools.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Items\Weapons\explosives.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -8,14 +8,14 @@
price="100"
description="One of the most crucial tools on board the submarine. Also works underwater.">
<Sprite texture ="weldingtool.png" depth="0.5"/>
<Sprite texture ="tools.png" sourcerect="0,17,41,17" depth="0.5"/>
<!-- physics body -->
<Body width="39" height="18" density="5"/>
<Body width="41" height="17" density="5"/>
<!-- the character will hold the item 50 pixels in front of him, with his hands at the handle1 and handle2 positions -->
<Holdable slots="Any,RightHand+LeftHand" controlpose="true"
aimpos="50,0" handle1="-17,0" handle2="8,0"/>
aimpos="50,0" handle1="-17,0" handle2="10,0"/>
<RepairTool structurefixamount="5.0" limbfixamount="-0.5" range="100" barrelpos="19,8" particles="weld">
<!-- the item must contain a welding fuel tank for it to work -->
@@ -56,14 +56,14 @@
price="100"
description="Cuts through various materials using a jet of ionized oxygen.">
<Sprite texture ="plasmacutter.png" depth="0.5"/>
<Sprite texture ="tools.png" sourcerect="0,0,41,16" depth="0.5"/>
<Body width="39" height="18" density="5"/>
<Body width="41" height="16" density="5"/>
<Holdable slots="Any,RightHand+LeftHand" controlpose="true"
aimpos="50,0" handle1="-12,4"/>
<RepairTool structurefixamount="-2.0" limbfixamount="-0.5" range="100" barrelpos="19,8" particles="plasma">
<RepairTool structurefixamount="-2.0" limbfixamount="-0.5" range="100" barrelpos="28,8" particles="plasma">
<RequiredItems name="Oxygen Tank" type="Contained" msg="Oxygen tank required"/>
<StatusEffect type="OnUse" target="Contained" targetnames="Oxygen Tank" Condition="-0.7"/>
<StatusEffect type="OnUse" target="UseTarget" targetnames="Door,Windowed Door" Stuck="-20.0" Condition="-3.0"/>
@@ -136,12 +136,12 @@
pickdistance="200"
price="10">
<Sprite texture ="screwdriver.png" depth="0.5"/>
<Sprite texture ="tools.png" sourcerect="0,58,31,6" depth="0.5"/>
<Body width="30" height="8" density="20"/>
<Body width="31" height="6" density="20"/>
<Holdable slots="Any,RightHand,LeftHand"
holdangle="30" handle1="-5,0"/>
holdangle="30" handle1="-10,0"/>
</Item>
@@ -152,12 +152,12 @@
pickdistance="200"
price="10">
<Sprite texture ="wrench.png" depth="0.5"/>
<Sprite texture ="tools.png" sourcerect="0,50,26,7" depth="0.5"/>
<Body width="30" height="8" density="20"/>
<Body width="30" height="7" density="20"/>
<MeleeWeapon slots="Any,RightHand,LeftHand"
aimpos="50,0" handle1="0,0" holdangle="30" reload="1.0">
aimpos="50,0" handle1="-5,0" holdangle="30" reload="1.0">
<Attack damage="5" stun="0.2" damagetype="Blunt" sound="Content/Items/Weapons/smack.ogg"/>
</MeleeWeapon>
</Item>

View File

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.3.0.0")]
[assembly: AssemblyFileVersion("0.3.0.0")]
[assembly: AssemblyVersion("0.3.0.1")]
[assembly: AssemblyFileVersion("0.3.0.1")]

View File

@@ -216,6 +216,15 @@ namespace Barotrauma
}
}
public void SelectCharacter(Character character)
{
var characterButton = frame.FindChild(character) as GUIButton;
if (characterButton == null) return;
characterButton.Selected = true;
}
private bool SetOrder(GUIButton button, object userData)
{
Order order = userData as Order;

View File

@@ -106,6 +106,14 @@ namespace Barotrauma
{
GameMain.GameSession.CrewManager.commander.ToggleGUIFrame();
int orderIndex = orderListBox.children.IndexOf(component);
if (orderIndex<0 || orderIndex >= listBox.children.Count) return false;
var characterFrame = listBox.children[orderIndex];
if (characterFrame == null) return false;
GameMain.GameSession.CrewManager.commander.SelectCharacter(characterFrame.UserData as Character);
return false;
}

View File

@@ -1,4 +1,18 @@
---------------------------------------------------------------------------------------------------------
v0.3.0.1
---------------------------------------------------------------------------------------------------------
- fixed inventory not being visible when using character mode in the editor
- adding hulls and gaps works properly when switching to editor after a round has been started
- fixed item selecting when switching to character mode after a round has been started
- fixed a bug that made it impossible to fix broken walls after saving and reloading
- fixed crashing when trying to place ladders when no submarine has been loaded
- trying to generate waypoints for an empty sub won't crash the game anymore
- when opening the crew commander menu for the first time, there's a text notifying about the hotkey for
opening/closing the menu
---------------------------------------------------------------------------------------------------------
v0.3
---------------------------------------------------------------------------------------------------------

Binary file not shown.