Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** EquipmentEnhancements
- #
- # * Author: Szyu
- # * Version: 1.2
- # * Pastebin: http://adf.ly/4920670/equipmentenhancements
- # * Description:
- # This script allows to enhance weapons and armors with defined
- # "Enhancement Items".
- #
- # * How To Use:
- # 1. Create Items which will be used as "Enhancement Items"
- # 2. Flag the created items as enhancement with beginning tag
- # "<enhancement_item>" (Without "")
- # 3. Flag end of definition in item notes with
- # "</enhancement_item>"
- # 4. Set the type the enhancement is for (weapon or armor)
- # "type: w"
- # "type: a"
- # 5. You can set prefix and suffix for enhanced equipment with
- # "prefix: """
- # "suffix: """
- # 6. Add parameter or feature enhancements to this item with
- # "p: attr val"
- # -> p indicates that a parameter will be enhanced
- # -> attr indicates which parameter will be enhanced:
- # str - strength def - defense agi - agility
- # mat - magic attack mdf - magic defense luk - luck
- # hp - max hp mp - max mp
- # -> val indicates the value the parameter will be enhanced by
- #
- # "f: code data val"
- # -> f indicates that a feature will be added
- # -> code indicates which feature will be added (since it will be declared
- # as an integer, you should that a look an the features which can be
- # added to an equipment item. The number is designed as xy, where x
- # is the index of the tab and y is the index of the parameter.
- # i.e. code = 22 would be tab "parameters" with feature "ex-parameter")
- # -> data indicates the id of the dropdown list in the database features
- # i.e. with code = 22, data = 6 would be parameter mrf
- # -> val indicates the value like it would be stated in the database features.
- # if a state would be added, this number has to be 0
- # if a skill would be added, this number has to be 1
- # (With features which do not allow number input in the database, you
- # will have to test if the stated number would work. But it will either
- # be 0 or 1!)
- #
- #
- # * Exclude equipment from enhancement list:
- # <no_enhancing> in equipments notes
- #
- #
- # * Create Diminish Item Example:
- # Use an item just like for enhancement_item, but with following syntax:
- #
- # <enhancement_item>
- # diminish
- # type: w or type: a
- # </enhancement_item>
- #
- #
- #------------------------------------------------------------------------------
- #
- # * Example of an Enhancement Item's note:
- #
- # <enhancement_item>
- # type: w
- # suffix: " [Enh]"
- # p: str 5
- # p: hp 200
- # f: 43 28 1
- # </enhancement_item>
- #
- #
- # This example would enhance a weapon with
- # +5 strength,
- # +200 max hp and
- # the feature: Tab "skills", Data "Add Skill", Value: Skill[28]
- #
- #------------------------------------------------------------------------------
- #
- # * Changelog:
- # - Weapons and Armors are now ordered by name
- # - Added Diminishing Items
- # - Added Possibility of exlcuding equipment from enhancing list
- # - Fixed a bug where prefix and suffix are always lowercase
- #
- #
- #==============================================================================
- $imported = {} if $imported.nil?
- $imported["Szyu_EquipmentEnhancements"] = true
- #==============================================================================
- # ** Configuration
- #==============================================================================
- SIE_CONFIG = {
- # Allows the player to access enhancer menu from main menu
- :show_in_menu => false,
- # Term shown in main menu
- :menu_term => "EQ Enhancing",
- # mapping for notes to param [do not change!]
- :param_map => { :hp => 0, :mp => 1, :str => 2, :def => 3, :mat => 4, :mdf => 5, :agi => 6, :luk => 7},
- }
- #==============================================================================
- # ** DataManager
- #==============================================================================
- class << DataManager
- alias sie_make_save_contents make_save_contents
- alias sie_extract_save_contents extract_save_contents
- #--------------------------------------------------------------------------
- # * Create Save Contents
- #--------------------------------------------------------------------------
- def make_save_contents
- contents = sie_make_save_contents
- contents[:see_db] = db_enhancement_difference
- contents
- end
- #--------------------------------------------------------------------------
- # * Extract Save Contents
- #--------------------------------------------------------------------------
- def extract_save_contents(contents)
- sie_extract_save_contents(contents)
- extract_enhancement_db(contents[:see_db])
- end
- #--------------------------------------------------------------------------
- # * Create Enhancement Database
- #--------------------------------------------------------------------------
- def create_save_database(index)
- File.open(sprintf("SEEDB%02d.rvdata2", index + 1), "wb") do |file|
- Marshal.dump(db_enhancement_difference, file)
- end
- end
- #--------------------------------------------------------------------------
- # * Load Enhancement Database
- #--------------------------------------------------------------------------
- def load_save_database(index)
- File.open(sprintf("SEEDB%02d.rvdata2", index + 1), "rb") do |file|
- extract_enhancement_db(Marshal.load(file))
- end
- end
- #--------------------------------------------------------------------------
- # * Create Database Differences
- #--------------------------------------------------------------------------
- def db_enhancement_difference
- tmp_weapons = load_data("Data/Weapons.rvdata2")
- tmp_armors = load_data("Data/Armors.rvdata2")
- w = sie_diff(tmp_weapons, $data_weapons)
- a = sie_diff(tmp_armors, $data_armors)
- dif = {:weapons => w, :armors => a}
- return dif
- end
- #--------------------------------------------------------------------------
- # * Create Array Differences
- #--------------------------------------------------------------------------
- def sie_diff(x,y)
- r = []
- for i in x.size..y.size-1
- r.push(y[i])
- end
- r.uniq.sort_by{|o| o.id}
- return r
- end
- #--------------------------------------------------------------------------
- # * Extrace Enhancement Database
- #--------------------------------------------------------------------------
- def extract_enhancement_db(contents)
- $data_weapons = ($data_weapons+contents[:weapons]).uniq.sort{|a,b|( a and b ) ? a.id <=> b.id : ( a ? 1 : -1 ) }
- $data_armors = ($data_armors+contents[:armors]).uniq.sort{|a,b|( a and b ) ? a.id <=> b.id : ( a ? 1 : -1 ) }
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** RPG::Item
- #==============================================================================
- class RPG::Item < RPG::UsableItem
- #--------------------------------------------------------------------------
- # * Return Enhancements from Notes
- #--------------------------------------------------------------------------
- def enhancements
- enhs = { :type => :none, :suffix => "", :prefix => "", :data => [], :diminish => false}
- @note.each_line do |line|
- if line =~ /<enhancement_item>/i
- @scan_enh = true
- elsif line =~ /<\/enhancement_item>/i
- @scan_enh = false
- elsif line =~ /diminish/i
- enhs[:diminish] = true
- elsif line =~ /type:\s*(\w)/i
- enhs[:type] = $1.to_sym
- elsif line =~ /suffix:\s*"([\w\W]+)"/i
- enhs[:suffix] = $1.to_s
- elsif line =~ /prefix:\s*"([\w\W]+)"/i
- enhs[:prefix] = $1.to_s
- elsif @scan_enh
- enh = scan_enh_param_line(line) || scan_enh_feat_line(line)
- enhs[:data].push(enh) if enh != nil
- end
- end
- @scan_enh = nil
- return enhs[:type] != :none && (enhs[:data].size > 0 || enhs[:diminish]) ? enhs : nil
- end
- #--------------------------------------------------------------------------
- # * Scan Enhancement Parameter Line
- #--------------------------------------------------------------------------
- def scan_enh_param_line(line)
- return nil unless line =~ /(p):\s*(\w+)\s*(\d+)/i
- enh = [$1.to_sym, $2.to_sym, $3.to_i]
- return enh
- end
- #--------------------------------------------------------------------------
- # * Scan Enhancement Feature Line
- #--------------------------------------------------------------------------
- def scan_enh_feat_line(line)
- return nil unless line =~ /(f):\s*(\d+)\s*(\d+)\s*(\d+[.]\d+|\d+)/i
- enh = [$1.to_sym, $2.to_i, $3.to_i, $4.to_f]
- return enh
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** RPG:EquipItem
- #==============================================================================
- class RPG::EquipItem < RPG::BaseItem
- attr_accessor :enhanced_with
- attr_accessor :original_id
- #--------------------------------------------------------------------------
- # * no_enhancing
- #--------------------------------------------------------------------------
- def no_enhancing
- @note.downcase.each_line do |line|
- return true if line =~ /<no_enhancing>/i
- end
- return false
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** Scene_Menu
- #==============================================================================
- class Scene_Menu < Scene_MenuBase
- alias sie_create_command_window create_command_window
- #--------------------------------------------------------------------------
- # * Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- sie_create_command_window
- @command_window.set_handler(:equipment_enhancer, method(:on_equipment_enhancer))
- end
- #--------------------------------------------------------------------------
- # * On Equipment Enhancer
- #--------------------------------------------------------------------------
- def on_equipment_enhancer
- SceneManager.call(Scene_EquipmentEnhancement)
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** Scene_EquipmentEnhancement
- #==============================================================================
- class Scene_EquipmentEnhancement < Scene_Item
- #--------------------------------------------------------------------------
- # * Start Processing
- #--------------------------------------------------------------------------
- def start
- super
- create_help_window
- create_category_window
- create_item_window
- create_enhancement_window
- end
- #--------------------------------------------------------------------------
- # * Create Category Window
- #--------------------------------------------------------------------------
- def create_category_window
- @category_window = Window_EquipmentEnhancement_Category.new
- @category_window.viewport = @viewport
- @category_window.help_window = @help_window
- @category_window.y = @help_window.height
- @category_window.set_handler(:ok, method(:on_category_ok))
- @category_window.set_handler(:cancel, method(:return_scene))
- end
- #--------------------------------------------------------------------------
- # * Create Item Window
- #--------------------------------------------------------------------------
- def create_item_window
- wy = @category_window.y + @category_window.height
- wh = Graphics.height - wy
- @item_window = Window_EquipmentEnhancement_List.new(0, wy, Graphics.width/2, wh)
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.set_handler(:ok, method(:on_item_ok))
- @item_window.set_handler(:cancel, method(:on_item_cancel))
- @category_window.item_window = @item_window
- end
- #--------------------------------------------------------------------------
- # * Create Enhancement Window
- #--------------------------------------------------------------------------
- def create_enhancement_window
- wx = @item_window.width
- wy = @category_window.y + @category_window.height
- ww = Graphics.width - wx
- wh = Graphics.height - wy
- @enhancement_list_window = Window_EnhancementItem_List.new(wx,wy,ww,wh)
- @enhancement_list_window.viewport = @viewport
- @enhancement_list_window.help_window = @help_window
- @enhancement_list_window.set_handler(:ok, method(:on_enhancement_ok))
- @enhancement_list_window.set_handler(:cancel, method(:on_enhancement_cancel))
- @item_window.enhancement_window = @enhancement_list_window
- @enhancement_list_window.item_window = @item_window
- end
- #--------------------------------------------------------------------------
- # * Category [OK]
- #--------------------------------------------------------------------------
- def on_category_ok
- @item_window.activate
- @item_window.select_last
- end
- #--------------------------------------------------------------------------
- # * Item [Cancel]
- #--------------------------------------------------------------------------
- def on_item_cancel
- @item_window.unselect
- @category_window.activate
- end
- #--------------------------------------------------------------------------
- # * Enhancement [Cancel]
- #--------------------------------------------------------------------------
- def on_enhancement_cancel
- @enhancement_list_window.unselect
- @item_window.activate
- end
- #--------------------------------------------------------------------------
- # * Play SE When Using Item
- #--------------------------------------------------------------------------
- def play_se_for_item
- Sound.play_use_item
- end
- #--------------------------------------------------------------------------
- # * Use Item
- #--------------------------------------------------------------------------
- def use_item
- super
- @item_window.redraw_current_item
- end
- #--------------------------------------------------------------------------
- # * Item [OK]
- #--------------------------------------------------------------------------
- def on_item_ok
- @enhancement_list_window.activate.select(0)
- end
- #--------------------------------------------------------------------------
- # * Enhancement [OK]
- #--------------------------------------------------------------------------
- def on_enhancement_ok
- ehancement_item = @enhancement_list_window.item
- if (ehancement_item.enhancements[:diminish] == false)
- enhance_item(@item_window.item, ehancement_item)
- else
- diminish_item(@item_window.item, ehancement_item)
- end
- @enhancement_list_window.refresh
- @enhancement_list_window.unselect
- @item_window.refresh
- @item_window.activate
- end
- #--------------------------------------------------------------------------
- # * Enhance Item
- #--------------------------------------------------------------------------
- def enhance_item(item, enh_item)
- return if item.original_id
- db = item.is_a?(RPG::Weapon) ? $data_weapons : $data_armors
- eid = check_item_existence(item, enh_item, db)
- if eid == 0
- new_item = Marshal.load(Marshal.dump(item))
- new_item.original_id = item.original_id || item.id
- new_item.id = db.size
- new_item.name = enh_item.enhancements[:prefix]+item.name+@enhancement_list_window.item.enhancements[:suffix]
- apply_enhancements(new_item, enh_item)
- db.push(new_item)
- else
- new_item = db[eid]
- end
- $game_party.lose_item(enh_item, 1)
- $game_party.gain_item(new_item,1)
- $game_party.gain_item(@item_window.item,-1)
- end
- #--------------------------------------------------------------------------
- # * Diminish Item
- #--------------------------------------------------------------------------
- def diminish_item(item, enh_item)
- return unless item.original_id
- db = item.is_a?(RPG::Weapon) ? $data_weapons : $data_armors
- $game_party.gain_item(db[item.original_id], 1)
- $game_party.gain_item(item,-1)
- $game_party.lose_item(enh_item, 1)
- end
- #--------------------------------------------------------------------------
- # * Apply Diminishing
- #--------------------------------------------------------------------------
- def apply_enhancements(item, enhancement_item)
- enhancement_item.enhancements[:data].each do |enh|
- case enh[0]
- when :p
- item.params[SIE_CONFIG[:param_map][enh[1]]] = enh[2]
- when :f
- item.features.push(RPG::BaseItem::Feature.new(enh[1], enh[2], enh[3]))
- end
- end
- item.enhanced_with = enhancement_item.id
- return item
- end
- #--------------------------------------------------------------------------
- # * Check if enhanced item already exists
- #--------------------------------------------------------------------------
- def check_item_existence(item, enhanced_with, db)
- for i in 1..db.size-1
- return i if db[i].enhanced_with == enhanced_with.id && db[i].name == enhanced_with.enhancements[:prefix]+item.name+enhanced_with.enhancements[:suffix]
- end
- return 0
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** Window_MenuCommand
- #==============================================================================
- class Window_MenuCommand < Window_Command
- alias sie_add_original_commands add_original_commands
- #--------------------------------------------------------------------------
- # * add_original_commands
- #--------------------------------------------------------------------------
- def add_original_commands
- sie_add_original_commands
- add_command(SIE_CONFIG[:menu_term], :equipment_enhancer, main_commands_enabled) if SIE_CONFIG[:show_in_menu]
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** Window_ItemEnhancement_Category
- #==============================================================================
- class Window_EquipmentEnhancement_Category < Window_HorzCommand
- #--------------------------------------------------------------------------
- # * Public Instance Variables
- #--------------------------------------------------------------------------
- attr_reader :item_window
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0)
- end
- #--------------------------------------------------------------------------
- # * Get Window Width
- #--------------------------------------------------------------------------
- def window_width
- Graphics.width
- end
- #--------------------------------------------------------------------------
- # * Get Digit Count
- #--------------------------------------------------------------------------
- def col_max
- return 2
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super
- @item_window.category = current_symbol if @item_window
- end
- #--------------------------------------------------------------------------
- # * Create Command List
- #--------------------------------------------------------------------------
- def make_command_list
- add_command(Vocab::weapon, :weapon)
- add_command(Vocab::armor, :armor)
- end
- #--------------------------------------------------------------------------
- # * Set Item Window
- #--------------------------------------------------------------------------
- def item_window=(item_window)
- @item_window = item_window
- update
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** Window_ItemEnhancement_List
- #==============================================================================
- class Window_EquipmentEnhancement_List < Window_Selectable
- attr_reader :enhancement_window
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize(x, y, width, height)
- super
- @category = :none
- @data = []
- end
- #--------------------------------------------------------------------------
- # * Enhancement Window setter
- #--------------------------------------------------------------------------
- def enhancement_window=(ew)
- @enhancement_window = ew
- update
- end
- #--------------------------------------------------------------------------
- # * Update
- #--------------------------------------------------------------------------
- def update
- super
- @enhancement_window.category = @category if @enhancement_window
- end
- #--------------------------------------------------------------------------
- # * Set Category
- #--------------------------------------------------------------------------
- def category=(category)
- return if @category == category
- @category = category
- refresh
- self.oy = 0
- end
- #--------------------------------------------------------------------------
- # * Get Number of Items
- #--------------------------------------------------------------------------
- def item_max
- @data ? @data.size : 1
- end
- #--------------------------------------------------------------------------
- # * Get Item
- #--------------------------------------------------------------------------
- def item
- @data && index >= 0 ? @data[index] : nil
- end
- #--------------------------------------------------------------------------
- # * Get Activation State of Selection Item
- #--------------------------------------------------------------------------
- def current_item_enabled?
- return @data[index] != nil
- end
- #--------------------------------------------------------------------------
- # * Include in Item List?
- #--------------------------------------------------------------------------
- def include?(item)
- case @category
- when :item
- item.is_a?(RPG::Item) && !item.key_item?
- when :weapon
- item.is_a?(RPG::Weapon)
- when :armor
- item.is_a?(RPG::Armor)
- when :key_item
- item.is_a?(RPG::Item) && item.key_item?
- else
- false
- end
- end
- #--------------------------------------------------------------------------
- # * Display in Enabled State?
- #--------------------------------------------------------------------------
- def enable?(item)
- item != nil
- end
- #--------------------------------------------------------------------------
- # * Create Item List
- #--------------------------------------------------------------------------
- def make_item_list
- @data = $game_party.all_items.select {|item| include?(item) && !item.no_enhancing }
- @data.push(nil) if include?(nil)
- @data.sort! {|x,y| x.name <=> y.name }
- end
- #--------------------------------------------------------------------------
- # * Restore Previous Selection Position
- #--------------------------------------------------------------------------
- def select_last
- select(@data.index($game_party.last_item.object) || 0)
- end
- #--------------------------------------------------------------------------
- # * Draw Item
- #--------------------------------------------------------------------------
- def draw_item(index)
- item = @data[index]
- if item
- rect = item_rect(index)
- rect.width -= 4
- draw_item_name(item, rect.x, rect.y, enable?(item))
- draw_item_number(rect, item)
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Number of Items
- #--------------------------------------------------------------------------
- def draw_item_number(rect, item)
- draw_text(rect, sprintf(":%2d", $game_party.item_number(item)), 2)
- end
- #--------------------------------------------------------------------------
- # * Update Help Text
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_item(item)
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- make_item_list
- create_contents
- draw_all_items
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #==============================================================================
- # ** Window_Enhancement_List
- #==============================================================================
- class Window_EnhancementItem_List < Window_Selectable
- attr_reader :item_window
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize(x, y, width, height)
- super
- @category = :none
- @data = []
- end
- #--------------------------------------------------------------------------
- # * Set Category
- #--------------------------------------------------------------------------
- def category=(category)
- return if @category == category
- @category = category
- refresh
- self.oy = 0
- end
- #--------------------------------------------------------------------------
- # * Set Item window
- #--------------------------------------------------------------------------
- def item_window=(item_window)
- @item_window = item_window
- end
- #--------------------------------------------------------------------------
- # * Get Number of Items
- #--------------------------------------------------------------------------
- def item_max
- @data ? @data.size : 1
- end
- #--------------------------------------------------------------------------
- # * Get Item
- #--------------------------------------------------------------------------
- def item
- @data && index >= 0 ? @data[index] : nil
- end
- #--------------------------------------------------------------------------
- # * Get Activation State of Selection Item
- #--------------------------------------------------------------------------
- def current_item_enabled?
- return false if @data[index] == nil
- return false if @item_window == nil
- enh = item.enhancements
- return true if enh[:diminish] == false && @item_window.item.original_id == nil
- return true if enh[:diminish] && @item_window.item.original_id != nil
- end
- #--------------------------------------------------------------------------
- # * Display in Enabled State?
- #--------------------------------------------------------------------------
- def enable?(item)
- $game_party.usable?(item)
- end
- #--------------------------------------------------------------------------
- # * Create Item List
- #--------------------------------------------------------------------------
- def make_item_list
- @data = $game_party.all_items.select {|item| item.is_a?(RPG::Item) && enhancement_cat(item) }
- @data.push(nil) if @data.size == 0
- end
- #--------------------------------------------------------------------------
- # * Enhancement Category
- #--------------------------------------------------------------------------
- def enhancement_cat(item)
- enh = item.enhancements
- return false if enh == nil
- case @category
- when :weapon; return enh[:type] == :w
- when :armor; return enh[:type] == :a
- else; return false
- end
- end
- #--------------------------------------------------------------------------
- # * Restore Previous Selection Position
- #--------------------------------------------------------------------------
- def select_last
- select(@data.index($game_party.last_item.object) || 0)
- end
- #--------------------------------------------------------------------------
- # * Draw Item
- #--------------------------------------------------------------------------
- def draw_item(index)
- item = @data[index]
- if item
- rect = item_rect(index)
- rect.width -= 4
- draw_item_name(item, rect.x, rect.y)
- draw_item_number(rect, item)
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Number of Items
- #--------------------------------------------------------------------------
- def draw_item_number(rect, item)
- draw_text(rect, sprintf(":%2d", $game_party.item_number(item)), 2)
- end
- #--------------------------------------------------------------------------
- # * Update Help Text
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_item(item)
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- make_item_list
- create_contents
- draw_all_items
- end
- #--------------------------------------------------------------------------
- # * Processing When OK Button Is Pressed
- #--------------------------------------------------------------------------
- def process_ok
- if current_item_enabled?
- Sound.play_use_item
- Input.update
- deactivate
- call_ok_handler
- else
- Sound.play_buzzer
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement