<p>Floor items are the representation of an item that spawns in the environment, drops from opponents, and can be picked up. They are technically tangible entities. <br></p>
<br>
<h2>structure </h2>
<p><ul>
<li>Node2D - $ThreeLeafClover (floor_item.gd, inherits from tangible.gd)</li>
<ul><li>Node2D - $Body (tangibleBody.gd, inherits from mobileBody.gd)</li>
<li>ITEM_SCENE_NAME, a constant reference to the <a href="/blessfrey-gdd/base-item">base item</a>'s path within the folder </li>
<li>item_scene, the base item's scene, loaded from ITEM_SCENE_NAME </li>
<li>item, the <a href="/blessfrey-gdd/base-item">base item</a>. It's instanced from item_scene and added as a child of the floor item.
<li>display_name, the name seen in the <a href="/blessfrey-gdd/highlight">highlight</a> label, <a href="/blessfrey-gdd/inventory">inventory</a> listings, etc. </li>
<p>An item changes its form depending on its context. <br></p>
<br>
<p>Base items are the purest form of an item, maintaining its continuity and containing its essential data. Other items hold the base item as a child or generates one if one doesn't already exist. <br></p>
<p><a href="/blessfrey-gdd/base-item">Base items</a> are the purest form of an item, maintaining its continuity and containing its essential data. Other items hold the base item as a child or generates one if one doesn't already exist. <br></p>
<br>
<p>Floor items are the representation of an item that spawns in the environment, drops from opponents, and can be picked up. They are technically tangible entities. <br></p>
<p><a href="/blessfrey-gdd/floor-item">Floor items</a> are the representation of an item that spawns in the environment, drops from opponents, and can be picked up. They are technically tangible entities. <br></p>
<br>
<p>Inventory items appear in the inventory window. They are technically control nodes. <br></p>
<br>
@ -15,16 +15,17 @@
<h2>move to pick up item </h2>
<p>Items can only be picked up by the player. They can be picked up via item targeting or through selecting 'pick up' on the <a href="/blessfrey-gdd/inspect">inspect menu</a>. <br></p>
<br>
<p>Item pickup is triggered when a floor item is targeted, that is, a 'target' (left-click) triggers a $Item/Body/Sprite/Sprite.gd/_on_input_event. If 'no_move_to_target' (shift) is held while targeting, the item will be targeted without initiating pickup. Otherwise, floor_item.gd/target_event(viewport,event,shape_idx) is called to set the target and handle the input before prompting the player to consider pickup. <br></p>
<p>Item pickup is triggered when a <a href="/blessfrey-gdd/floor-item">floor item</a> is targeted, that is, a 'target' (left-click) triggers a $Item/Body/Sprite/Sprite.gd/_on_input_event. If 'no_move_to_target' (shift) is held while targeting, the item will be targeted without initiating pickup. Otherwise, floor_item.gd/target_event(viewport,event,shape_idx) is called to set the target and handle the input before prompting the player to consider pickup. <br></p>
<br>
<p>Item pickup is also an option on the floor items' <a href="/blessfrey-gdd/inspect">inspect menu</a>. Choosing it triggers that floor item's id_pressed(id), which calls the associated method from its inspect_options dictionary: floor_item.gd/move_player_then_pickup(), prompting the player to consider pickup. <br></p>
<p>Item pickup is also an option on the <a href="/blessfrey-gdd/floor-item">floor items</a>' <a href="/blessfrey-gdd/inspect">inspect menu</a>. Choosing it triggers that <a href="/blessfrey-gdd/floor-item">floor item</a>'s id_pressed(id), which calls the associated method from its inspect_options dictionary: floor_item.gd/move_player_then_pickup(), prompting the player to consider pickup. <br></p>
<br>
<p>Character.gd/consider_pickup(item) passes to UserControl/pickup(item). The next branch depends on a distance check. <br></p>
<br>
<p>If the item is within the player's <a href="/blessfrey-gdd/proxemics">intimate distance</a>, the character will be prompted to pick up the item.
<br>
<p>Otherwise, <a href="/blessfrey-gdd/pathfinding">pathfinding</a> begins towards the floor item. Upon arrival, it calls floor_item.pick_up().pick_up(). The floor item's pick_up removes itself from the room and returns the base item, then the <a href="/blessfrey-gdd/inventory">inventory system</a> takes care of the rest. <br></p>
<p>Otherwise, <a href="/blessfrey-gdd/pathfinding">pathfinding</a> begins towards the <a href="/blessfrey-gdd/floor-item">floor item</a>. Upon arrival, it calls floor_item.pick_up().pick_up(). The <a href="/blessfrey-gdd/floor-item">floor item</a>'s pick_up removes itself from the room and returns the base item, then the <a href="/blessfrey-gdd/inventory">inventory system</a> takes care of the rest. <br></p>
% for i in ["achievements","cast","controls","credits","ID","inspect menu", "inventory","item","job","keyword","mechanics","Mercur","milestones","pathfinding","proxemics","setting","skill","story","style guide","terms","vibe","website"]:
% for i in ["achievements","cast","controls","credits","highlight","ID","inspect menu", "inventory","item","job","keyword","mechanics","Mercur","milestones","pathfinding","proxemics","setting","skill","story","style guide","terms","vibe","website"]: