This is a continuation of previous post.
Yanfly Ace Item Menu
Basically multiple items of the same category will create multiple replicate item categories. It does not cause any crashes, but it does make the menu pretty crowded for no reason.
Yanfly Ace Item Menu
Code:
class Window_ItemCommand < Window_Command
def make_command_list
for command in YEA::ITEM::COMMANDS
case command
#--- Default Commands ---
when :item
add_command(Vocab::item, :item) unless $game_party.items.empty?
when :weapon
add_command(Vocab::weapon, :weapon) unless $game_party.weapons.empty?
when :armor
add_command(Vocab::armor, :armor) unless $game_party.armors.empty?
when :key_item
add_command(Vocab::key_item, :key_item)
#--- Imported ---
when :gogototori
next unless $imported["KRX-AlchemicSynthesis"]
process_custom_command(command)
#--- Custom Commands ---
else
process_custom_command(command)
end
end
end
end
class Window_ItemType < Window_Command
def make_command_list
return if @type.nil?
#---
case @type
when :item
commands = YEA::ITEM::ITEM_TYPES
when :weapon
commands = YEA::ITEM::WEAPON_TYPES
else
commands = YEA::ITEM::ARMOUR_TYPES
end
#---
for command in commands
case command[0]
#---
when :types
case @type
when :weapon
for i in 1...$data_system.weapon_types.size
name = $data_system.weapon_types[i]
add_command(name, :w_type, true, i)
end
else
for i in 1...$data_system.armor_types.size
name = $data_system.armor_types[i]
add_command(name, :a_type, true, i)
end
end
#---
when :slots
if $imported["YEA-AceEquipEngine"]
maximum = 1
for key in YEA::EQUIP::TYPES
maximum = [maximum, key[0]].max
end
else
maximum = 4
end
for i in 1..maximum
name = Vocab::etype(i)
add_command(name, :e_type, true, i) if name != ""
end
#---
else
case @type
when :weapon
for i in 0..$game_party.weapons.size - 1
if $game_party.weapons[i].note.include?(command[1])
add_command(command[1], command[0], true, @type)
end
end
when :armor
for i in 0..$game_party.armors.size - 1
if $game_party.armors[i].note.include?(command[1])
add_command(command[1], command[0], true, @type)
end
end
when :item
for i in 0..$game_party.items.size - 1
if $game_party.items[i].note.include?(command[1])
add_command(command[1], command[0], true, @type)
end
end
end
add_command(command[1], command[0], true, @type) if command[0] == :all
end
end
end
end
Basically multiple items of the same category will create multiple replicate item categories. It does not cause any crashes, but it does make the menu pretty crowded for no reason.