Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Game_Party < Game_Unit
- alias theo_item_bag_init initialize
- def initialize
- theo_item_bag_init
- init_all_bags
- end
- def init_all_bags
- @item_bags = []
- @weapon_bags = []
- @armor_bags = []
- end
- def secure_all_items(index)
- secure_items(index)
- secure_weapons(index)
- secure_armors(index)
- end
- def secure_items(index)
- @item_bags[index] = @items.clone
- @items.clear
- end
- def secure_weapons(index)
- @weapon_bags[index] = @weapons.clone
- @weapom.clear
- end
- def secure_armor(index)
- @armor_bags = @armors.clone
- @armors.clear
- end
- def get_all_items(index)
- get_items(index)
- get_weapons(index)
- get_armors(index)
- end
- def get_items(index)
- @item_bags[index]==nil ? @items = {} : @items = @item_bags[index].clone
- end
- def get_weapons(index)
- @weapon_bags[index]==nil ? @weapon = {} : @weapons = @weapon_bags[index].clone
- end
- def get_armors(index)
- @armor_bags[index]==nil ? @armors = {} : @armors = @armor_bags[index].clone
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment