inspect; item; pathfinding; terms
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<p>The inspect menu ("res://UI/InspectMenu/InspectMenu.tscn") is instanced at declaration and added as a child at ready in the UI singleton. <br></p>
|
||||
<br>
|
||||
<h2>logic </h2>
|
||||
<p>When tangible entity is right-clicked (@ $Body/Sprite/Clickable), the UI enters InspectMenu with its subject set. The "id_pressed" signal is reset for each subject. InspectMenu connects "about_to_show" the first time it's needed and keeps it forever. Before popup(), it resets, adds a label at an offset with the subject's display name, then adds a UI option for each inspect option. <br></p>
|
||||
<p>When tangible entity is right-clicked (@ $Body/Sprite/Clickable), the UI enters InspectMenu with its subject set. (The subject setter also sets the player's target.) The "id_pressed" signal is reset for each subject. InspectMenu connects "about_to_show" the first time it's needed and keeps it forever. Before popup(), it resets, adds a label at an offset with the subject's display name, then adds a UI option for each inspect option. <br></p>
|
||||
<br>
|
||||
<p>When a selection is made, the "id_pressed" signal calls "id_pressed" on the subject, which calls the method at its inspect_options[pressed_id][1]. So 'examine' calls 'examine,' which is in tangible.gd. Most related methods are on tangible.gd, though they may be at a more specific script. <br></p>
|
||||
<br>
|
||||
@@ -20,6 +20,10 @@
|
||||
<br>
|
||||
<p>Tangibles and inventory items both have inspect menus, but their code has to be separate. They are too different from each other. <br></p>
|
||||
<br>
|
||||
<p>I intend for the player to be able to pick up an item through the inspect menu without changing his current target. For now, InspectMenu.gd/set_subject(subject) sets the player target. MoveToDestination.gd/handle_moved_result tracks the user's current target using character/find_distance_to_target(). Instead, it would need to receive the relevant subject from the inspect menu or skill or attack target from the character and pass it through character/find_distance_to(target). <br></p>
|
||||
<br>
|
||||
<p>It doesn't close the inspect menu if pickup is chosen while item out of range, even after item is picked up. <br></p>
|
||||
<br>
|
||||
<h2>works for...</h2>
|
||||
<ul>
|
||||
<li>player✓ </li>
|
||||
|
||||
Reference in New Issue
Block a user