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:
@@ -3,7 +3,7 @@
|
||||
<Item
|
||||
name="Fabricator"
|
||||
linkable="true"
|
||||
pickdistance="150"
|
||||
|
||||
category="Machine"
|
||||
description="A machine capable of manufacturing a wide range of items out of basic raw materials.">
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<Item
|
||||
name="Medical Fabricator"
|
||||
linkable="true"
|
||||
pickdistance="150"
|
||||
|
||||
category="Machine"
|
||||
description="A machine that can be used to manufacture various medicines.">
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
<Item
|
||||
name="Deconstructor"
|
||||
linkable="true"
|
||||
pickdistance="150"
|
||||
|
||||
category="Machine"
|
||||
description="Disassembles and breaks down items to reusable components and material bars.">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user