Updated and refactored how items and characters are chosen for interactions in the world. The new system has more precision, with items under the cursor taking priority (this helps with small items which are in front of large items). A new method CanInteractWith(Item) has been added to the Character class which does all validation of interaction with items, including new distance calculations based on bounding boxes. This gives more consistency in selecting and interacting with all sizes and shapes of items. Because of this pickdistance (not interactdistance) has been removed from all item configurations (in their XML config files) and the default InteractDistance for all items is now 120.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
name="Welding Tool"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="100"
|
||||
description="One of the most crucial tools on board the submarine. Also works underwater.">
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
name="Plasma Cutter"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="100"
|
||||
description="Cuts through various materials using a jet of ionized oxygen.">
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
name="Welding Fuel Tank"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="150"
|
||||
|
||||
price="50">
|
||||
|
||||
<Deconstruct time="10">
|
||||
@@ -127,7 +127,7 @@
|
||||
name="Fire Extinguisher"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="100"
|
||||
description="A handheld carbon dioxide extinguisher.">
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
name="Screwdriver"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,58,31,6" depth="0.55"/>
|
||||
@@ -171,7 +171,7 @@
|
||||
name="Wrench"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="0,50,26,7" depth="0.55"/>
|
||||
@@ -188,7 +188,7 @@
|
||||
name="Handheld Sonar"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="10">
|
||||
|
||||
<Sprite texture ="tools.png" sourcerect="42,0,22,9" depth="0.55"/>
|
||||
@@ -218,7 +218,7 @@
|
||||
name="Flashlight"
|
||||
category="Equipment"
|
||||
Tags="smallitem"
|
||||
pickdistance="200"
|
||||
|
||||
price="10">
|
||||
|
||||
<Deconstruct time="15">
|
||||
@@ -249,7 +249,7 @@
|
||||
<Item
|
||||
name="Flare"
|
||||
category="Equipment"
|
||||
pickdistance="150"
|
||||
|
||||
price="5"
|
||||
spritecolor="1.0,0.0,0.0,1.0"
|
||||
tags="smallitem">
|
||||
|
||||
Reference in New Issue
Block a user