2015-08-29 01:09:09 +02:00
|
|
|
package ellpeck.actuallyadditions.inventory.gui.booklet;
|
2015-08-28 21:17:09 +02:00
|
|
|
|
|
|
|
import ellpeck.actuallyadditions.util.ModUtil;
|
|
|
|
import ellpeck.actuallyadditions.util.StringUtil;
|
|
|
|
|
|
|
|
public class BookletChapter{
|
|
|
|
|
|
|
|
public final IBookletPage[] pages;
|
|
|
|
private final String unlocalizedName;
|
|
|
|
public final BookletIndexEntry entry;
|
|
|
|
|
|
|
|
public BookletChapter(String unlocalizedName, BookletIndexEntry entry, IBookletPage... pages){
|
|
|
|
this.pages = pages.clone();
|
2015-08-29 10:59:03 +02:00
|
|
|
|
2015-08-28 21:17:09 +02:00
|
|
|
this.unlocalizedName = unlocalizedName;
|
|
|
|
entry.addChapter(this);
|
|
|
|
this.entry = entry;
|
|
|
|
|
|
|
|
for(IBookletPage page : this.pages){
|
|
|
|
page.setChapter(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUnlocalizedName(){
|
|
|
|
return this.unlocalizedName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getLocalizedName(){
|
|
|
|
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name");
|
|
|
|
}
|
|
|
|
}
|