Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
- # * Eshra Upgradable Equipment + Falcao Mana Stone Compatiblity Patch\
- # Author: Eshra
- # Date: 11 Dec 2012
- # Dependencies: 1.) Tsuki_CustomDataManager
- # 2.) Ra Custom DM add-on
- #
- #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
- # This is a compatibility patch for the upgradable equipment script and Falcao's
- # Mana stone script. Just place this script under the materials section and above
- # main and be sure to mark all items that can have mana stones placed on them
- # with this notetag:
- #
- # <Unique>
- #
- # That notetag, in combination with this patch will fix the bug in the mana stone
- # script which causes all items of the same type to be treated as if they have
- # the same mana stones.
- #-------------------------------------------------------------------------------
- ($imported||={})["Ra Upg Mana Stone Comptability"] = 0.1
- raise "Ra Upg Mana Stone Compatibility requires Ra Custom DM add-on
- " if !$imported["Ra Custom DM add-on"]
- class RPG::EquipItem < RPG::BaseItem
- # Overwrite
- def manaslots; @mana_stone_data ||= []; end
- end # RPG::EquipItem
- class Game_System
- # Overwrite dataslots_ini, param: operand is no longer used
- def dataslots_ini(operand, item)
- for kind in item
- next if kind.nil?
- kind.init_mana_stones(kind.given_sl) if kind.given_sl != nil
- end
- end
- end # Game_System
- class RPG::EquipItem < RPG::BaseItem
- attr_accessor :mana_stone_data
- def init_mana_stones(size)
- return if !size
- @mana_stone_data = Array.new(size)
- end
- def reset_stone_data
- (@mana_stone_data||=[]).each{ |i| @mana_stone_data[i] = nil }
- end
- def mana_stone_data=(arr); @mana_stone_data = arr; end
- end # RPG::EquipItem
- # End of File
Advertisement
Add Comment
Please, Sign In to add comment