Class: GamePlay::Bag

Overview

Scene responsive of displaying the bag

The bag has various modes :

- :menu : when opened from the menu
- :battle : when opened from the battle
- :berry : when opened to plant berry
- :hold : when opened to give an item to a Pokemon
- :shop : when opened to sell item
- :map : when an event request an item

Direct Known Subclasses

Battle_Bag

Constant Summary collapse

POCKET_NAMES =

List of pocket name

[nil.to_s, [:text_get, 15, 4], [:text_get, 15, 1], [:text_get, 15, 5], [:text_get, 15, 3], [:text_get, 15, 8], [:text_get, 15, 0], [:ext_text, 9000, 150], [:ext_text, 9000, 151]]
POCKETS_PER_MODE =

List of pocket index the player can see according to the modes

{menu: [1, 2, 6, 3, 5, 4, 8], battle: [1, 2, 6, 4], berry: [4], hold: [1, 2, 6, 4], shop: [1, 2, 6, 3, 4]}
FAVORITE_POCKET_ID =

ID of the favorite pocket (shortcut)

8
CTRL_TEXTS_PER_MODE =

List of button text according to the mode

{menu: [[:ext_text, 9000, 152], info = [:ext_text, 9000, 153], sort = [:ext_text, 9000, 154], [:ext_text, 9000, 115]], battle: [[:ext_text, 9000, 159], info, sort, cancel = [:ext_text, 9000, 17]], berry: [[:ext_text, 9000, 156], info, sort, cancel], hold: [[:ext_text, 9000, 157], info, sort, cancel], shop: [[:ext_text, 9000, 155], info, sort, cancel], map: [[:ext_text, 9000, 158], info, sort, cancel]}
CHOICE_MODE_A =

Constant that list all the choice method called when the player press A depending on the bag mode

{menu: :choice_a_menu, berry: :choice_a_berry, hold: :choice_a_hold, shop: :choice_a_shop, map: :choice_a_map, battle: :choice_a_battle}
CHOICE_MODE_Y =

Constant that list all the choice called when the player press Y depending on the bag mode

{menu: :choice_y_menu}
SEARCH_CHOICE_INDEX =

Index of the search choice when pressing Y

3
ACTIONS =

List of action the mouse can perform with ctrl button

%i[action_a action_x action_y action_b]
MOUSE_OVER_ENABLED =

Tell if the mouse over is enabled

false

Constants inherited from BaseCleanUpdate

GamePlay::BaseCleanUpdate::AIU_KEY2METHOD

Constants inherited from Base

GamePlay::Base::DEFAULT_TRANSITION, GamePlay::Base::DEFAULT_TRANSITION_PARAMETER

Constants included from Input

Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE

Constants included from DisplayMessage

DisplayMessage::MESSAGE_ERROR, DisplayMessage::MESSAGE_PROCESS_ERROR

Instance Attribute Summary

Attributes included from BagMixin

#battle_item_wrapper, #mode, #return_data

Attributes inherited from Base

#__last_scene, #__result_process, #running, #viewport

Attributes included from DisplayMessage

#message_window

Instance Method Summary collapse

Methods included from Util::Item

#util_item_on_use_sequence, #util_item_open_party_sequence, #util_item_useitem

Methods included from BagMixin

#selected_item_db_symbol

Methods inherited from GamePlay::BaseCleanUpdate::FrameBalanced

#update

Methods included from Graphics::FPSBalancer::Marker

#frame_balanced?

Methods inherited from BaseCleanUpdate

#automatic_input_update, #update

Methods inherited from Base

#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=

Methods included from Input

dir4, dir8, get_text, joy_axis_position, press?, register_events, released?, repeat?, swap_states, trigger?

Methods included from DisplayMessage

#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=

Constructor Details

#initialize(mode = :menu) ⇒ Bag

Create a new Bag Scene

Parameters:

  • mode (Symbol) (defaults to: :menu)

    mode of the bag scene allowing to choose the pocket to show



536
537
# File 'docs/4_Systems_103_Bag.rb', line 536

def initialize(mode = :menu)
end

Instance Method Details

#update_graphics

Update the bag graphics



562
563
# File 'docs/4_Systems_103_Bag.rb', line 562

def update_graphics
end

#update_inputs

Update the bag inputs



628
629
# File 'docs/4_Systems_103_Bag.rb', line 628

def update_inputs
end

#update_mouse(moved) ⇒ Boolean

Update the mouse interactions

Parameters:

  • moved (Boolean)

    if the mouse moved durring the frame

Returns:

  • (Boolean)

    if the thing after can update



765
766
# File 'docs/4_Systems_103_Bag.rb', line 765

def update_mouse(moved)
end