Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update_input
- if Input.trigger?(Input::C)
- if @windows["Inventory"].active
- Sound.play_decision
- act_inv_win_active(false)
- act_inv_visible(true)
- elsif @windows["MainInve"].active
- Sound.play_decision
- inv_win_active(false)
- inv_act_visible(true)
- elsif @windows["Act_To_Inventory"].active
- case @windows["Act_To_Inventory"].commands[@windows["Act_To_Inventory"].index]
- when IEX::ACTOR_INVENTORY::USE_ITEM
- Sound.play_decision
- use_actor_item
- when IEX::ACTOR_INVENTORY::SWITCH_TO_INVENTORY
- if @actor.is_a_merchant?
- Sound.play_buzzer
- else
- Sound.play_decision
- inv_win_active(true)
- act_inv_visible(false)
- end
- when IEX::ACTOR_INVENTORY::SEND_TO_INVENTORY
- unless @windows["Inventory"].item == nil
- if @actor.is_a_merchant?
- Sound.play_buzzer
- else
- Sound.play_decision
- @to_actor = false
- @to_inventory = true
- act_inv_visible(false)
- start_send_to_inventory
- end
- else
- Sound.play_buzzer
- @windows["MainHelp"].set_header("Item Invalid", 0, 0)
- end
- when IEX::ACTOR_INVENTORY::SEND_ALL_TO_INVENTORY
- if @actor.is_a_merchant?
- Sound.play_buzzer
- else
- unless @actor.inventory.empty?
- Sound.play_decision
- send_item_to_inventory(true)
- refresh_inventory
- else
- Sound.play_buzzer
- @windows["MainHelp"].set_header("No Items", 0, 0)
- end
- end
- when IEX::ACTOR_INVENTORY::CANCEL
- Sound.play_cancel
- act_inv_win_active(true)
- act_inv_visible(false)
- end
- elsif @windows["Inventory_To_Act"].active
- case @windows["Inventory_To_Act"].commands[@windows["Inventory_To_Act"].index]
- when IEX::ACTOR_INVENTORY::USE_ITEM
- Sound.play_decision
- use_inventory_item
- when IEX::ACTOR_INVENTORY::SWITCH_TO_ACTOR
- Sound.play_decision
- act_inv_win_active(true)
- inv_act_visible(false)
- when IEX::ACTOR_INVENTORY::SEND_TO_ACTOR
- unless @windows["MainInve"].item == nil
- Sound.play_decision
- @to_actor = true
- @to_inventory = false
- inv_act_visible(false)
- start_send_to_actor
- else
- Sound.play_buzzer
- @windows["MainHelp"].set_header("Item Invalid", 0, 0)
- end
- when IEX::ACTOR_INVENTORY::CANCEL
- Sound.play_cancel
- inv_win_active(true)
- inv_act_visible(false)
- end
- elsif @windows["Number"].active
- Sound.play_decision
- if @to_actor
- send_item_to_actor
- inv_win_active(true)
- #inv_act_visible(true)
- elsif @to_inventory
- send_item_to_inventory
- act_inv_win_active(true)
- #act_inv_visible(true)
- end
- refresh_inventory
- @to_actor = false
- @to_inventory = false
- number_visible(false)
- elsif @windows["Confirm"].active
- case @windows["Confirm"].commands[@windows["Confirm"].index]
- when IEX::ACTOR_INVENTORY::CONFIRM
- Sound.play_decision
- return_scene
- when IEX::ACTOR_INVENTORY::CANCEL
- Sound.play_cancel
- if @to_actor
- act_inv_win_active(true)
- elsif @to_inventory
- inv_win_active(true)
- end
- @to_actor = false
- @to_inventory = false
- confirm_visible(false)
- end
- end
- elsif Input.trigger?(Input::B)
- if @windows["Inventory"].active
- Sound.play_cancel
- @to_actor = true
- @to_inventory = false
- act_inv_win_active(false)
- confirm_visible(true)
- elsif @windows["MainInve"].active
- Sound.play_cancel
- @to_inventory = true
- @to_actor = false
- inv_win_active(false)
- confirm_visible(true)
- elsif @windows["Act_To_Inventory"].active
- Sound.play_cancel
- act_inv_win_active(true)
- act_inv_visible(false)
- elsif @windows["Inventory_To_Act"].active
- Sound.play_cancel
- inv_win_active(true)
- inv_act_visible(false)
- elsif @windows["Number"].active
- Sound.play_cancel
- if @to_actor
- inv_act_visible(true)
- number_visible(false)
- @to_actor = false
- elsif @to_inventory
- act_inv_visible(true)
- number_visible(false)
- @to_inventory = false
- end
- elsif @windows["Confirm"].active
- Sound.play_cancel
- if @to_actor
- act_inv_win_active(true)
- elsif @to_inventory
- inv_win_active(true)
- end
- @to_actor = false
- @to_inventory = false
- confirm_visible(false)
- end
- elsif Input.trigger?(Input::L)
- for i in 0..$game_party.members.size
- act = $game_party.members[i]
- next if act == nil
- if act.id == @actor.id
- act_index = (i - 1) % $game_party.members.size
- break
- else
- act_index = i
- end
- end
- $scene = IEX_Scene_Actor_Inventory.new($game_party.members[act_index])
- elsif Input.trigger?(Input::R)
- for i in 0..$game_party.members.size
- act = $game_party.members[i]
- next if act == nil
- if act.id == @actor.id
- act_index = (i + 1) % $game_party.members.size
- break
- else
- act_index = i
- end
- end
- $scene = IEX_Scene_Actor_Inventory.new($game_party.members[act_index])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment