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="Junction Box"
|
||||
category="Electrical"
|
||||
linkable="true"
|
||||
pickdistance="150"
|
||||
|
||||
description="Serves as a hub for power distribution and relaying signals between devices.">
|
||||
|
||||
<Sprite texture="junctionbox.png" depth="0.8" canflipx="false"/>
|
||||
@@ -40,7 +40,7 @@
|
||||
name="Battery"
|
||||
category="Electrical"
|
||||
linkable="true"
|
||||
pickdistance="150"
|
||||
|
||||
description="Generally used for storing backup power in case of a reactor failure.">
|
||||
|
||||
<Sprite texture ="battery.png" depth="0.8"/>
|
||||
@@ -68,7 +68,7 @@
|
||||
name="Supercapacitor"
|
||||
category="Electrical"
|
||||
linkable="true"
|
||||
pickdistance="150"
|
||||
|
||||
description="Can deliver charge much faster than batteries.">
|
||||
|
||||
<Sprite texture ="supercapacitor.png" depth="0.8"/>
|
||||
|
||||
Reference in New Issue
Block a user