Item.FindHull changes, added depth charges and flashlights to default subs
This commit is contained in:
@@ -12,16 +12,10 @@
|
||||
|
||||
<Turret canbeselected = "true" linkable="true" barrelpos="23, 76"
|
||||
rotationlimits="90,90"
|
||||
powerconsumption="0.0">
|
||||
<StatusEffect type="OnUse" target="This" sound="Content/Items/Weapons/railgun.ogg">
|
||||
<Explosion range="1000.0" structuredamage="0" force="0.01" camerashake="10.0"/>
|
||||
</StatusEffect>
|
||||
</Turret>
|
||||
powerconsumption="0.0"/>
|
||||
|
||||
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
|
||||
<requireditem name="Screwdriver,Wire" type="Equipped"/>
|
||||
<input name="power_in"/>
|
||||
<input name="position_in"/>
|
||||
<input name="trigger_in"/>
|
||||
</ConnectionPanel>
|
||||
</Item>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<Item file="Content/Items/Pump/pump.xml" />
|
||||
<Item file="Content/Items/Reactor/reactor.xml" />
|
||||
<Item file="Content/Items/Tools/tools.xml" />
|
||||
<Item file="Content/Items/Weapons/depthcharge.xml" />
|
||||
<Item file="Content/Items/Weapons/explosives.xml" />
|
||||
<Item file="Content/Items/Weapons/railgun.xml" />
|
||||
<Item file="Content/Items/Weapons/weapons.xml" />
|
||||
|
||||
@@ -503,20 +503,30 @@ namespace Barotrauma
|
||||
|
||||
public virtual Hull FindHull()
|
||||
{
|
||||
if (parentInventory != null && (parentInventory.Owner as Character) != null)
|
||||
if (parentInventory != null && parentInventory.Owner != null)
|
||||
{
|
||||
CurrentHull = (parentInventory.Owner as Character).AnimController.CurrentHull;
|
||||
body.Submarine = (parentInventory.Owner as Character).Submarine;
|
||||
if (parentInventory.Owner is Character)
|
||||
{
|
||||
CurrentHull = (parentInventory.Owner as Character).AnimController.CurrentHull;
|
||||
}
|
||||
else if (parentInventory.Owner is Item)
|
||||
{
|
||||
CurrentHull = (parentInventory.Owner as Item).CurrentHull;
|
||||
}
|
||||
|
||||
Submarine = parentInventory.Owner.Submarine;
|
||||
if (body != null) body.Submarine = Submarine;
|
||||
|
||||
return CurrentHull;
|
||||
}
|
||||
|
||||
CurrentHull = Hull.FindHull(WorldPosition, CurrentHull);
|
||||
|
||||
if (body!=null)
|
||||
if (body != null)
|
||||
{
|
||||
Submarine = CurrentHull == null ? null : Submarine.Loaded;
|
||||
body.Submarine = Submarine;
|
||||
}
|
||||
|
||||
return CurrentHull;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user