Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaShared/Content/Items/Engine/engine.xml
T
Joonas Rikkonen c7fd6818a4 Some tweaking to the item interaction logic:
- FindItemAtPosition uses the distance calculated in CanInteractWith to determine how close an item is to the character. Otherwise very large items (such as ladders) wouldn't be possible to select with aim assist unless the player happens to be holding the cursor close to the center of the item.
- The hull-parameter is taken into account in FindItemAtPosition.
- Characters are considered to be inside a trigger if either their lower or upper body is inside it.
- Added triggers to engines because they are often placed partially inside a wall, making it impossible to rewire them if the center is not inside the sub.
2017-07-05 20:15:02 +03:00

126 lines
4.4 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<Items>
<Item
name="Engine"
linkable="true"
category="Machine"
pickthroughwalls="true"
>
<Sprite texture ="engine.png" depth="0.8" sourcerect="0,0,373,113" canflipx="true"/>
<trigger x="20" y ="0" width="333" height="113"/>
<fixrequirement name="Mechanical repairs">
<skill name="Construction" level="40"/>
<item name="Welding Tool"/>
<item name="Wrench"/>
</fixrequirement>
<Engine minvoltage="0.5" powerconsumption="2000.0" maxforce="2000" canbeselected = "true">
<StatusEffect type="InWater" target="This" condition="-2.0"/>
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
<sound file="engine.ogg" type="OnActive" range="3000.0" volume="CurrentVolume" loop="true"/>
</Engine>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
<requireditem name="Screwdriver" type="Equipped"/>
<input name="power_in"/>
<input name="set_force"/>
</ConnectionPanel>
</Item>
<Item
name="Shuttle Engine"
linkable="true"
category="Machine"
pickthroughwalls="true"
>
<Sprite texture ="engine.png" depth="0.8" sourcerect="0,115,224,73" canflipx="true"/>
<trigger x="15" y ="0" width="194" height="73"/>
<fixrequirement name="Mechanical repairs">
<skill name="Construction" level="30"/>
<item name="Welding Tool"/>
<item name="Wrench"/>
</fixrequirement>
<Engine minvoltage="0.5" powerconsumption="500.0" maxforce="300" canbeselected = "true">
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
<sound file="engine.ogg" type="OnActive" range="3000.0" volume="CurrentVolume" loop="true"/>
</Engine>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
<requireditem name="Screwdriver" type="Equipped"/>
<input name="power_in"/>
<input name="set_force"/>
</ConnectionPanel>
</Item>
<Item
name="Navigation Terminal"
linkable="true"
category="Machine"
>
<Sprite texture="Content/Items/machines.png" depth="0.8" sourcerect="0,0,64,128"/>
<fixrequirement name="Electrical repairs">
<skill name="Electrical Engineering" level="40"/>
<item name="Wire"/>
<item name="Screwdriver"/>
</fixrequirement>
<Steering minvoltage="0.5" canbeselected = "true" powerconsumption="10">
<StatusEffect type="InWater" target="This" condition="-1.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI"/>
</Steering>
<Radar canbeselected = "true" powerconsumption="100" displaybordersize="0.2">
<sound file="radarPing.ogg" type="OnUse" range="4000.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI" color="0.0,0.0,0.0,0.0"/>
<PingCircle texture="Content/Items/Engine/pingCircle.png" origin="0.5,0.5"/>
<ScreenOverlay texture="Content/Items/Engine/radarOverlay.png" origin="0.5,0.5"/>
<Blip texture="Content/Items/Engine/radarBlip.png" origin="0.5,0.5"/>
</Radar>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
<requireditem name="Screwdriver" type="Equipped"/>
<input name="power_in"/>
<input name="velocity_in"/>
<output name="velocity_x_out"/>
<output name="velocity_y_out"/>
</ConnectionPanel>
</Item>
<Item
name="Sonar Monitor"
linkable="true"
category="Machine"
>
<Sprite texture="Content/Items/machines.png" depth="0.8" sourcerect="64,0,64,128"/>
<fixrequirement name="Electrical repairs">
<skill name="Electrical Engineering" level="40"/>
<item name="Wire"/>
<item name="Screwdriver"/>
</fixrequirement>
<Radar canbeselected = "true" powerconsumption="100" displaybordersize="0.2">
<StatusEffect type="InWater" target="This" condition="-1.0"/>
<GuiFrame rect="0,0,0.5,0.5" alignment="Center" style="ItemUI"/>
<PingCircle texture="Content/Items/Engine/pingCircle.png" origin="0.5,0.5"/>
<ScreenOverlay texture="Content/Items/Engine/radarOverlay.png" origin="0.5,0.5"/>
<Blip texture="Content/Items/Engine/radarBlip.png" origin="0.5,0.5"/>
</Radar>
<ConnectionPanel selectkey="Action" canbeselected = "true" msg="Rewire [Screwdriver]">
<requireditem name="Screwdriver" type="Equipped"/>
<input name="power_in"/>
</ConnectionPanel>
</Item>
</Items>