You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.9 KiB
Plaintext

<h2>description </h2>
<p>The programmatic element facilitates picking up, collecting, and dropping items. The control element displays and offers relevant options. <br></p>
<br>
<h2>pickup: floor item -> inventory item </h2>
<p>Item pickup is initiated by MoveToDestination.gd/_on_item_arrived(floor_item) -> floor_item.pick_up().pick_up(). The base item's pick_up initiates character/pickup(base_item) and publishes "item_picked_up" and itself to the <a href="/blessfrey-gdd/achievements">MessageBus</a>. <br></p>
<br>
<p>character.gd/pickup(base_item) calls (programmatic)Inventory.gd/pickup and _pickup(base_item) which updates the phone inv app if it's currently open. <br></p>
<br>
<p>Inventory.gd/pickup(base_item) published "item_obtained" and the base item to the <a href="/blessfrey-gdd/achievements">MessageBus</a> then calls reverse_pickpocket(base_item). <br></p>
<br>
<p>Inventory.gd/reverse_pickpocket(base_item) appends the base item to the inventory and connects the depleted and dropped signals. <br></p>
<br>
<h2>opening the inventory app </h2>
<p>If you press the <a href="/blessfrey-gdd/controls">inventory key (I)</a>, UI/open_window(UI.open_inv_scene(),"inventory", Vector2(100,150)) is called. It opens a window at the Vector2, assigns "inventory" as its key, and fills it with the given scene. The UI will call open_app and provide the inventory app scene. <br></p>
<br>
<p>If you bring up the smartphone and tap the inventory app from the home screen, the inventory button is connected to 'open_app" on "pressed", sending the associated app. <br></p>
<br>
<p>Smartphone.gd/open_app(scene) sets is_open to true, the current_app to the scene,
<br>
<h2>challenges/known issues </h2>
<p> <br></p>
<br>
<h2>works for...</h2>
<ul>
<li>???✓ </li>
<li>???✗ </li>
</ul>