diff --git a/src/blessfrey-gdd/achievements b/src/blessfrey-gdd/achievements new file mode 100644 index 0000000..de96b47 --- /dev/null +++ b/src/blessfrey-gdd/achievements @@ -0,0 +1,11 @@ +
pushing buttons and stuff
Tangibles and inventory items both have inspect menus, but their code has to be separate. They are too different from each other.
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).
It doesn't close the inspect menu if pickup is chosen while item out of range, even after item is picked up.
The programmatic element facilitates picking up, collecting, and dropping items. The control element displays and offers relevant options.
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 MessageBus.
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.
Inventory.gd/pickup(base_item) published "item_obtained" and the base item to the MessageBus then calls reverse_pickpocket(base_item).
Inventory.gd/reverse_pickpocket(base_item) appends the base item to the inventory and connects the depleted and dropped signals.
If you press the inventory key (I), 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.
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.
Smartphone.gd/open_app(scene) sets is_open to true, the current_app to the scene,
+
+
Items are objects that may be picked up, purchased, used, equipped, dropped, or sold. They include currency, quest items, equipment, consumables, readables, upgrades, keys, and trinkets.
Merchandise appears in store windows.
Items can only be picked up by the player. They can be picked up via item targeting or through selecting 'pick up' on the inspect menu.
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.
If the item is within the player's intimate distance, the character will be prompted to pick up the item.
-
Otherwise, pathfinding begins towards the floor item. Upon arrival, it calls item.pick_up().pick_up().
Otherwise, pathfinding 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 inventory system takes care of the rest.
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).
path_to_point calls cancel on the player and path_to_object(goal_target). Mobile.gd/path_to_object(goal_target) sets the floor item as the next then reassesses the path with each call. If there is no current_dot, dots are set between the user and the goal_target and the method ends. Otherwise, the last_dot is either the last dot or the current_dot. If the goal hasn't moved, the method ends. If the goal is further, the path is wholly or partially recalculated. If the goal is nearer, the path is recalculated between the last_dot and the goal.
choose_velocity() sets the entity's body's internal velocity to current_dot - current_pos. mobileBody.gd/_process(delta) sets its physics_body_node's move_and_collide to velocity (judged from internal velocity) * speed * delta * KnowledgeBase.logic_time, publishing "moved" and the entity to the MessageBus.
choose_velocity() sets the entity's body's internal velocity to current_dot - current_pos. mobileBody.gd/_process(delta) sets its physics_body_node's move_and_collide to velocity (judged from internal velocity) * speed * delta * KnowledgeBase.logic_time, publishing "moved" and the entity to the MessageBus.
The MessageBus's Moved.gd handler will judge progress and emit a signal. Since "reached", "arrived", etc are connected during MoveToDestination's Enter phase, handle_moved_result handles the package. If it is "arrived" and track is true, 'item_arrived' signal is emitted, the first waypoint is popped off, and the entity calls clear_movement.
The MessageBus's Moved.gd handler will judge progress and emit a signal. Since "reached", "arrived", etc are connected during MoveToDestination's Enter phase, handle_moved_result handles the package. If it is "arrived" and track is true, 'item_arrived' signal is emitted, the first waypoint is popped off, and the entity calls clear_movement.
MoveToDestination.gd/_on_item_arrived(floor_item) calls arrived to disconnect signals, set track to false, and clear the entity's movement. Then it calls item.pick_up().pick_up().
Navigation2D and get_simple_path will be removed in a future version of Godot.
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).
The vision for Blessfrey