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 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
#---
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