Module: GamePlay::BagMixin

Included in:
Bag
Defined in:
scripts/01450 Systems/00103 Bag/00003 GamePlay/00000 BagMixin.rb

Overview

Module defining the IO of the bag scene so user know what to expect

This mixin should also be used to check if the bag scene is right:

Examples:

Check the current scene is the bag
  GamePlay.current_scene.is_a?(GamePlay.bag_mixin)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#battle_item_wrapperPFM::ItemDescriptor::Wrapper?

Wrapper of the choosen item in battle



14
15
16
# File 'scripts/01450 Systems/00103 Bag/00003 GamePlay/00000 BagMixin.rb', line 14

def battle_item_wrapper
  @battle_item_wrapper
end

#modeSymbol (readonly)

Get the mode in which the bag was started

Returns:

  • (Symbol)


17
18
19
# File 'scripts/01450 Systems/00103 Bag/00003 GamePlay/00000 BagMixin.rb', line 17

def mode
  @mode
end

#return_dataSymbol, Integer

ID of the item selected

Returns:



11
12
13
# File 'scripts/01450 Systems/00103 Bag/00003 GamePlay/00000 BagMixin.rb', line 11

def return_data
  @return_data
end

Instance Method Details

#selected_item_db_symbolSymbol

Get the selected item db_symbol

Returns:

  • (Symbol)


21
22
23
24
25
# File 'scripts/01450 Systems/00103 Bag/00003 GamePlay/00000 BagMixin.rb', line 21

def selected_item_db_symbol
  return :__undef__ if return_data == -1

  return data_item(return_data).db_symbol
end