| Line 57... |
Line 57... |
| 57 |
|
57 |
|
| 58 |
CBaseFile::Delete ();
|
58 |
CBaseFile::Delete ();
|
| 59 |
}
|
59 |
}
|
| 60 |
|
60 |
|
| 61 |
|
61 |
|
| 62 |
bool CSpkFile::_checkHeader(const Utils::String header) const
|
62 |
bool CSpkFile::_checkHeader(const Utils::WString &header) const
|
| 63 |
{
|
63 |
{
|
| 64 |
if ( header.Compare("SPKCycrow") )
|
64 |
if ( header.Compare(L"SPKCycrow") )
|
| 65 |
return true;
|
65 |
return true;
|
| 66 |
return false;
|
66 |
return false;
|
| 67 |
}
|
67 |
}
|
| 68 |
/*
|
68 |
/*
|
| 69 |
Func: ParseValueLine
|
69 |
Func: ParseValueLine
|
| Line 687... |
Line 687... |
| 687 |
return false;
|
687 |
return false;
|
| 688 |
|
688 |
|
| 689 |
return true;
|
689 |
return true;
|
| 690 |
}
|
690 |
}
|
| 691 |
|
691 |
|
| 692 |
bool CSpkFile::GeneratePackagerScript(bool wildcard, Utils::CStringList *list, int game, const Utils::CStringList &gameAddons, bool datafile)
|
692 |
bool CSpkFile::GeneratePackagerScript(bool wildcard, Utils::WStringList *list, int game, const Utils::WStringList &gameAddons, bool datafile)
|
| 693 |
{
|
693 |
{
|
| 694 |
if ( !CBaseFile::GeneratePackagerScript(wildcard, list, game, gameAddons, datafile) )
|
694 |
if ( !CBaseFile::GeneratePackagerScript(wildcard, list, game, gameAddons, datafile) )
|
| 695 |
return false;
|
695 |
return false;
|
| 696 |
|
696 |
|
| 697 |
list->pushBack("# File Type, Script or Ship");
|
697 |
list->pushBack(L"# File Type, Script or Ship");
|
| 698 |
list->pushBack("FileType: Script");
|
698 |
list->pushBack(L"FileType: Script");
|
| 699 |
list->pushBack("");
|
699 |
list->pushBack(L"");
|
| 700 |
|
700 |
|
| 701 |
list->pushBack("# Script Type, the type of package file, some are special types, others are just for show");
|
701 |
list->pushBack(L"# Script Type, the type of package file, some are special types, others are just for show");
|
| 702 |
if ( this->IsLibrary() )
|
702 |
if ( this->IsLibrary() )
|
| 703 |
list->pushBack("ScriptType: Library");
|
703 |
list->pushBack(L"ScriptType: Library");
|
| 704 |
else if ( this->IsPackageUpdate() )
|
704 |
else if ( this->IsPackageUpdate() )
|
| 705 |
list->pushBack("ScriptType: Package Update");
|
705 |
list->pushBack(L"ScriptType: Package Update");
|
| 706 |
else if ( this->IsCustomStart() )
|
706 |
else if ( this->IsCustomStart() )
|
| 707 |
list->pushBack("ScriptType: Custom Start");
|
707 |
list->pushBack(L"ScriptType: Custom Start");
|
| 708 |
else if ( this->IsPatch() )
|
708 |
else if ( this->IsPatch() )
|
| 709 |
list->pushBack("ScriptType: Patch");
|
709 |
list->pushBack(L"ScriptType: Patch");
|
| 710 |
else
|
710 |
else
|
| 711 |
list->pushBack("ScriptType: " + this->GetScriptTypeString(44));
|
711 |
list->pushBack(L"ScriptType: " + this->GetScriptTypeString(44).toWString());
|
| 712 |
list->pushBack("");
|
712 |
list->pushBack(L"");
|
| 713 |
|
713 |
|
| 714 |
if ( this->IsAnotherMod() )
|
714 |
if ( this->IsAnotherMod() )
|
| 715 |
{
|
715 |
{
|
| 716 |
list->pushBack("# For another mod/package, this is a child package");
|
716 |
list->pushBack(L"# For another mod/package, this is a child package");
|
| 717 |
list->pushBack("AnotherMod: " + m_sOtherName + "|" + m_sOtherAuthor);
|
717 |
list->pushBack(L"AnotherMod: " + m_sOtherName.toWString() + L"|" + m_sOtherAuthor.toWString());
|
| 718 |
list->pushBack("");
|
718 |
list->pushBack(L"");
|
| 719 |
}
|
719 |
}
|
| 720 |
|
720 |
|
| 721 |
if ( !m_lWares.empty() )
|
721 |
if ( !m_lWares.empty() )
|
| 722 |
{
|
722 |
{
|
| 723 |
list->pushBack("# Custom Wares, Ware<type>: <id> <price> <size> <volumn> <notority>");
|
723 |
list->pushBack(L"# Custom Wares, Ware<type>: <id> <price> <size> <volumn> <notority>");
|
| 724 |
for ( CListNode<SWares> *node = m_lWares.Front(); node; node = node->next() )
|
724 |
for ( CListNode<SWares> *node = m_lWares.Front(); node; node = node->next() )
|
| 725 |
{
|
725 |
{
|
| 726 |
SWares *w = node->Data();
|
726 |
SWares *w = node->Data();
|
| 727 |
if ( w->iTextID > 0 )
|
727 |
if ( w->iTextID > 0 )
|
| 728 |
list->pushBack(Utils::String("Ware") + (char)w->cType + ": " + w->sID.toString() + " " + (long)w->iPrice + " " + (long)w->iSize + " " + (long)w->iVolumn + " " + (long)w->iNotority + " " + (long)w->iTextPage + "," + (long)w->iTextID);
|
728 |
list->pushBack(Utils::WString(L"Ware") + Utils::WString(w->cType) + L": " + w->sID + L" " + (long)w->iPrice + L" " + (long)w->iSize + L" " + (long)w->iVolumn + L" " + (long)w->iNotority + L" " + (long)w->iTextPage + L"," + (long)w->iTextID);
|
| 729 |
else
|
729 |
else
|
| 730 |
list->pushBack(Utils::String("Ware") + (char)w->cType + ": " + w->sID.toString() + " " + (long)w->iPrice + " " + (long)w->iSize + " " + (long)w->iVolumn + " " + (long)w->iNotority);
|
730 |
list->pushBack(Utils::WString(L"Ware") + Utils::WString(w->cType) + L": " + w->sID + L" " + (long)w->iPrice + L" " + (long)w->iSize + L" " + (long)w->iVolumn + L" " + (long)w->iNotority);
|
| 731 |
for ( CListNode<SWaresText> *wNode = w->lText.Front(); wNode; wNode = wNode->next() )
|
731 |
for ( CListNode<SWaresText> *wNode = w->lText.Front(); wNode; wNode = wNode->next() )
|
| 732 |
{
|
732 |
{
|
| 733 |
SWaresText *wt = wNode->Data();
|
733 |
SWaresText *wt = wNode->Data();
|
| 734 |
if ( !wt->sName.empty() )
|
734 |
if ( !wt->sName.empty() )
|
| 735 |
list->pushBack("WareName: " + w->sID.toString() + " " + (long)wt->iLang + " " + wt->sName.toString());
|
735 |
list->pushBack(L"WareName: " + w->sID + L" " + (long)wt->iLang + L" " + wt->sName);
|
| 736 |
if ( !wt->sDesc.empty() )
|
736 |
if ( !wt->sDesc.empty() )
|
| 737 |
list->pushBack("WareDesc: " + w->sID.toString() + " " + (long)wt->iLang + " " + wt->sDesc.toString());
|
737 |
list->pushBack(L"WareDesc: " + w->sID + L" " + (long)wt->iLang + L" " + wt->sDesc);
|
| 738 |
}
|
738 |
}
|
| 739 |
list->pushBack("");
|
739 |
list->pushBack(L"");
|
| 740 |
}
|
740 |
}
|
| 741 |
}
|
741 |
}
|
| 742 |
|
742 |
|
| 743 |
if ( !datafile )
|
743 |
if ( !datafile )
|
| 744 |
{
|
744 |
{
|