Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # common troop event pages
- # by Mithran
- # this allows you to set up pages that are in common with every troop
- # by using a single blank troop
- # place in materials
- class RPG::Troop
- PAGE_REFERRER = 50 # which event page should be copied onto all troop pages?
- alias pages_commonpage pages unless $@
- def pages
- extra_pages + pages_commonpage
- end
- def extra_pages
- return [] if self.id == PAGE_REFERRER
- troop = $data_troops[PAGE_REFERRER]
- return [] if troop.nil?
- troop.pages
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement