forked from oerkki/voxelands
added missing code for the reverse craft guide
Specifically, to make it retain its page number when closed and to make it work with bookshelves.
This commit is contained in:
parent
8dbf039eed
commit
26c9af1fdd
|
@ -2460,6 +2460,13 @@ bool ClosedBookNodeMetadata::import(NodeMetadata *meta)
|
|||
m_title = wide_to_narrow(cm->infoText());
|
||||
break;
|
||||
}
|
||||
case CONTENT_RCRAFT_BOOK_OPEN:
|
||||
{
|
||||
ReverseCraftGuideNodeMetadata *cm = (ReverseCraftGuideNodeMetadata*)meta;
|
||||
m_page = cm->getPage();
|
||||
m_title = wide_to_narrow(cm->infoText());
|
||||
break;
|
||||
}
|
||||
case CONTENT_DECRAFT_BOOK_OPEN:
|
||||
{
|
||||
DeCraftNodeMetadata *cm = (DeCraftNodeMetadata*)meta;
|
||||
|
@ -2507,6 +2514,7 @@ BookShelfNodeMetadata::BookShelfNodeMetadata()
|
|||
l->addAllowed(CONTENT_DECRAFT_BOOK);
|
||||
l->addAllowed(CONTENT_DIARY_BOOK);
|
||||
l->addAllowed(CONTENT_CRAFT_BOOK);
|
||||
l->addAllowed(CONTENT_RCRAFT_BOOK);
|
||||
}
|
||||
BookShelfNodeMetadata::~BookShelfNodeMetadata()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue