Subversion Repositories spk

Rev

Rev 213 | Rev 216 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 213 Rev 214
Line 76... Line 76...
76
	Utils::WString first = line.token(L" ", 1);
76
	Utils::WString first = line.token(L" ", 1);
77
	Utils::WString rest  = line.tokens(L" ", 2);
77
	Utils::WString rest  = line.tokens(L" ", 2);
78
 
78
 
79
	if ( first == L"AnotherMod:" )
79
	if ( first == L"AnotherMod:" )
80
	{
80
	{
81
		m_sOtherAuthor = rest.token(L"|", 1).toString();
81
		m_sOtherAuthor = rest.token(L"|", 1);
82
		m_sOtherName = rest.tokens(L"|", 2).toString();
82
		m_sOtherName = rest.tokens(L"|", 2);
83
	}
83
	}
84
	else if ( line == L"CustomStart" )
84
	else if ( line == L"CustomStart" )
85
		m_iPackageType = PACKAGETYPE_CUSTOMSTART;
85
		m_iPackageType = PACKAGETYPE_CUSTOMSTART;
86
	else if ( line == L"PackageUpdate" )
86
	else if ( line == L"PackageUpdate" )
87
		m_iPackageType = PACKAGETYPE_UPDATE;
87
		m_iPackageType = PACKAGETYPE_UPDATE;
Line 90... Line 90...
90
	else if ( line == L"ForceProfile" )
90
	else if ( line == L"ForceProfile" )
91
		m_bForceProfile = true;
91
		m_bForceProfile = true;
92
	else if ( line == L"Signed" )
92
	else if ( line == L"Signed" )
93
		m_bSigned = true;
93
		m_bSigned = true;
94
	else if ( first == L"ScriptType:" )
94
	else if ( first == L"ScriptType:" )
95
		m_sScriptType = rest.toString();
95
		m_sScriptType = rest;
96
	else if ( first == L"ScriptTypeNew:" )
96
	else if ( first == L"ScriptTypeNew:" )
97
		m_iScriptType = rest;
97
		m_iScriptType = rest;
98
	else if ( first == L"PackageType:" )
98
	else if ( first == L"PackageType:" )
99
		m_iPackageType = rest;
99
		m_iPackageType = rest;
100
	else if ( first == L"Ware:" )
100
	else if ( first == L"Ware:" )
101
		AddWare ( rest.toString() );
101
		AddWare ( rest.toString() );
102
	else if ( (first == L"WareText:") && (m_pLastWare) )
102
	else if ( (first == L"WareText:") && (m_pLastWare) )
103
		addWareText ( rest );
103
		addWareText ( rest );
104
	else if ( first == L"Setting:" )
104
	else if ( first == L"Setting:" )
105
	{
105
	{
106
		SSettingType *t = AddSetting(rest.token(L"|", 2).toString(), rest.token(L"|", 1));
106
		SSettingType *t = addSetting(rest.token(L"|", 2), rest.token(L"|", 1));
107
		ConvertSetting ( t, rest.tokens(L"|", 3).toString());
107
		convertSetting(t, rest.tokens(L"|", 3));
108
	}
108
	}
109
	else
109
	else
110
		return CBaseFile::parseValueLine ( line );
110
		return CBaseFile::parseValueLine ( line );
111
 
111
 
112
	return true;
112
	return true;
Line 120... Line 120...
120
Utils::WString CSpkFile::createValuesLine () const
120
Utils::WString CSpkFile::createValuesLine () const
121
{
121
{
122
	Utils::WString values = CBaseFile::createValuesLine ();
122
	Utils::WString values = CBaseFile::createValuesLine ();
123
	// combine all values together
123
	// combine all values together
124
	if ( (!m_sOtherAuthor.empty()) && (!m_sOtherName.empty()) )
124
	if ( (!m_sOtherAuthor.empty()) && (!m_sOtherName.empty()) )
125
		values += L"AnotherMod: " + m_sOtherAuthor.toWString() + L"|" + m_sOtherName.toWString() + L"\n";
125
		values += L"AnotherMod: " + m_sOtherAuthor + L"|" + m_sOtherName + L"\n";
126
	if ( m_bForceProfile )
126
	if ( m_bForceProfile )
127
		values += L"ForceProfile\n";
127
		values += L"ForceProfile\n";
128
	if ( !m_sScriptType.empty() )
128
	if ( !m_sScriptType.empty() )
129
		values += L"ScriptType: " + m_sScriptType.toWString() + L"\n";
129
		values += L"ScriptType: " + m_sScriptType + L"\n";
130
	values += Utils::WString(L"PackageType: ") + (long)m_iPackageType + L"\n";
130
	values += Utils::WString(L"PackageType: ") + (long)m_iPackageType + L"\n";
131
	values += Utils::WString(L"ScriptTypeNew: ") + (long)m_iScriptType + L"\n";
131
	values += Utils::WString(L"ScriptTypeNew: ") + (long)m_iScriptType + L"\n";
132
 
132
 
133
	for ( CListNode<SSettingType> *node = m_lSettings.Front(); node; node = node->next() )
133
	for ( CListNode<SSettingType> *node = m_lSettings.Front(); node; node = node->next() )
134
		values += Utils::WString(L"Setting: ") + (long)node->Data()->iType + L"|" + node->Data()->sKey.toWString() + L";|" + GetSetting(node->Data()).toWString() + L"\n";
134
		values += Utils::WString(L"Setting: ") + (long)node->Data()->iType + L"|" + node->Data()->sKey + L";|" + getSetting(node->Data()) + L"\n";
135
 
135
 
136
	for ( CListNode<SWares> *wNode = m_lWares.Front(); wNode; wNode = wNode->next() ) {
136
	for ( CListNode<SWares> *wNode = m_lWares.Front(); wNode; wNode = wNode->next() ) {
137
		SWares *ware = wNode->Data();
137
		SWares *ware = wNode->Data();
138
		if ( wNode->Data()->iTextID > 0 )
138
		if ( wNode->Data()->iTextID > 0 )
139
			values += Utils::WString(L"Ware: ") + Utils::WString(ware->cType) + L":" + ware->iPrice + L":" + (long)ware->iSize + L":" + (long)ware->iVolumn + L":" + ware->sID + L":" + (long)ware->iNotority + L":" + (long)ware->iTextID + L"," + (long)ware->iTextPage + L"\n";
139
			values += Utils::WString(L"Ware: ") + Utils::WString(ware->cType) + L":" + ware->iPrice + L":" + (long)ware->iSize + L":" + (long)ware->iVolumn + L":" + ware->sID + L":" + (long)ware->iNotority + L":" + (long)ware->iTextID + L"," + (long)ware->iTextPage + L"\n";
Line 144... Line 144...
144
	}
144
	}
145
 
145
 
146
	return values;
146
	return values;
147
}
147
}
148
 
148
 
149
Utils::String CSpkFile::GetCustomScriptType (int lang) const
149
Utils::WString CSpkFile::customScriptType(int lang) const
150
{
150
{
151
	if ( !m_sScriptType.empty() )
151
	if ( !m_sScriptType.empty() )
152
	{
152
	{
153
		int max;
153
		std::vector<Utils::WString> split;
154
		Utils::String *split = m_sScriptType.tokenise("&lt;br>;";, &max);
154
		if(m_sScriptType.tokenise(L"&lt;br>;";, split))
155
		if ( max && split )
-
 
156
		{
155
		{
157
			for ( int i = 1; i <; max; i++ )
156
			for (size_t i = 1; i <; split.size(); i++)
158
			{
157
			{
159
				Utils::String str = split[i];
158
				Utils::WString str = split[i];
160
				int num = str.token(":", 1);
159
				int num = str.token(L":", 1);
161
				Utils::String name = str.tokens(":", 2);
160
				Utils::WString name = str.tokens(L":", 2);
162
 
161
 
163
				if ( num == lang )
162
				if ( num == lang )
164
				{
-
 
165
					CLEANSPLIT(split, max)
-
 
166
					return name;
163
					return name;
167
				}
-
 
168
			}
164
			}
169
 
165
 
170
			Utils::String ret = split[0];
-
 
171
			CLEANSPLIT(split, max)
-
 
172
 
-
 
173
			return ret;
166
			return split[0];
174
		}
167
		}
175
		CLEANSPLIT(split, max)
-
 
176
	}
168
	}
177
	return m_sScriptType;
169
	return m_sScriptType;
178
}
170
}
179
 
171
 
180
bool CSpkFile::readWares(int iLang, CLinkList<SWareEntry> &list, const Utils::String &empWares)
172
bool CSpkFile::readWares(int iLang, CLinkList<SWareEntry> &list, const Utils::String &empWares)
Line 272... Line 264...
272
 
264
 
273
	return false;
265
	return false;
274
}
266
}
275
 
267
 
276
void CSpkFile::ClearWares()
268
void CSpkFile::ClearWares()
277
{
269
{
278
	for ( CListNode<SWares> *node = m_lWares.Front(); node; node = node->next() ) {
270
	for ( CListNode<SWares> *node = m_lWares.Front(); node; node = node->next() ) {
279
		node->Data()->lText.clear(true);
271
		node->Data()->lText.clear(true);
280
		node->DeleteData();
272
		node->DeleteData();
281
	}
273
	}
282
	_changed();
274
	_changed();
283
	m_lWares.clear(true);
275
	m_lWares.clear(true);
Line 344... Line 336...
344
 
336
 
345
void CSpkFile::ClearWareText(const Utils::String &id)
337
void CSpkFile::ClearWareText(const Utils::String &id)
346
{
338
{
347
	SWares *w = FindWare(id);
339
	SWares *w = FindWare(id);
348
	ClearWareText(w);
340
	ClearWareText(w);
349
}
341
}
350
 
342
 
351
void CSpkFile::ClearWareText(SWares *w)
343
void CSpkFile::ClearWareText(SWares *w)
352
{
344
{
353
	if ( !w ) return;
345
	if ( !w ) return;
354
 
346
 
355
	w->lText.clear(true);
347
	w->lText.clear(true);
Line 399... Line 391...
399
		return false;
391
		return false;
400
 
392
 
401
	return CBaseFile::computeSigned(updateFiles);
393
	return CBaseFile::computeSigned(updateFiles);
402
}
394
}
403
 
395
 
404
SSettingType *CSpkFile::AddSetting(const Utils::String &key, int type )
396
SSettingType *CSpkFile::addSetting(const Utils::WString &key, int type)
405
{
397
{
406
	Utils::String sKey = key.remove('|');
398
	Utils::WString sKey = key.remove('|');
407
 
399
 
408
	SSettingType *t;
400
	SSettingType *t;
409
	for ( t = m_lSettings.First(); t; t = m_lSettings.Next() )
401
	for ( t = m_lSettings.First(); t; t = m_lSettings.Next() )
410
	{
402
	{
411
		if ( t->sKey.Compare(sKey) )
403
		if ( t->sKey.Compare(sKey) )
Line 417... Line 409...
417
		case SETTING_STRING:
409
		case SETTING_STRING:
418
			t = new SSettingString;
410
			t = new SSettingString;
419
			break;
411
			break;
420
		case SETTING_INTEGER:
412
		case SETTING_INTEGER:
421
			t = new SSettingInteger;
413
			t = new SSettingInteger;
422
			break;
414
			break;
423
		case SETTING_CHECK:
415
		case SETTING_CHECK:
424
			t = new SSettingCheck;
416
			t = new SSettingCheck;
425
			break;
417
			break;
426
	}
418
	}
427
 
419
 
428
	if ( !t )
420
	if ( !t )
429
		return NULL;
421
		return NULL;
430
 
422
 
431
	t->sKey = sKey;
423
	t->sKey = sKey;
432
	t->iType = type;
424
	t->iType = type;
433
 
425
 
434
	m_lSettings.push_back ( t );
426
	m_lSettings.push_back ( t );
435
	_changed();
427
	_changed();
436
 
428
 
437
	return t;
429
	return t;
438
}
430
}
439
 
431
 
440
void CSpkFile::ConvertSetting ( SSettingType *t, const Utils::String &set ) const
432
void CSpkFile::convertSetting(SSettingType *t, const Utils::WString &set) const
441
{
433
{
442
	if ( !t )
434
	if ( !t )
443
		return;
435
		return;
444
 
436
 
445
	switch ( t->iType )
437
	switch ( t->iType )
446
	{
438
	{
447
		case SETTING_STRING:
439
		case SETTING_STRING:
Line 453... Line 445...
453
		case SETTING_CHECK:
445
		case SETTING_CHECK:
454
			((SSettingCheck *)t)->bValue = set;
446
			((SSettingCheck *)t)->bValue = set;
455
			break;
447
			break;
456
	}
448
	}
457
}
449
}
458
Utils::String CSpkFile::GetSetting ( SSettingType *t ) const
450
Utils::WString CSpkFile::getSetting(SSettingType *t) const
459
{
451
{
460
	if ( !t )
452
	if ( !t )
461
		return "";
453
		return L"";
462
 
454
 
463
	switch ( t->iType )
455
	switch ( t->iType )
464
	{
456
	{
465
		case SETTING_STRING:
457
		case SETTING_STRING:
466
			return ((SSettingString *)t)->sValue;
458
			return ((SSettingString *)t)->sValue;
467
		case SETTING_INTEGER:
459
		case SETTING_INTEGER:
468
			return Utils::String::Number(((SSettingInteger *)t)->iValue);
460
			return Utils::String::Number(((SSettingInteger *)t)->iValue);
469
		case SETTING_CHECK:
461
		case SETTING_CHECK:
470
			return (((SSettingInteger *)t)->iValue) ? "1" : "0";
462
			return (((SSettingInteger *)t)->iValue) ? L"1" : L"0";
471
	}
463
	}
472
 
464
 
473
	return "";
465
	return L"";
474
}
466
}
475
 
467
 
476
void CSpkFile::ClearSettings ()
468
void CSpkFile::clearSettings ()
477
{
469
{
478
	m_lSettings.clear(true);
470
	m_lSettings.clear(true);
479
	_changed();
471
	_changed();
480
}
472
}
481
 
473
 
Line 496... Line 488...
496
			return true;
488
			return true;
497
	}
489
	}
498
	return false;
490
	return false;
499
}
491
}
500
 
492
 
501
Utils::String CSpkFile::GetScriptTypeString(int lang) const
493
Utils::WString CSpkFile::scriptTypeString(int lang) const
502
{
494
{
503
	int iType = m_iScriptType;
495
	int iType = m_iScriptType;
504
 
496
 
505
	if ( this->IsLibrary() )
497
	if ( this->IsLibrary() )
506
		return "Library";
498
		return "Library";
Line 510... Line 502...
510
		return "Custom Start";
502
		return "Custom Start";
511
	else if ( this->IsPatch() )
503
	else if ( this->IsPatch() )
512
		return "Patch";
504
		return "Patch";
513
	else if ( m_iScriptType == SCRIPTTYPE_CUSTOM )
505
	else if ( m_iScriptType == SCRIPTTYPE_CUSTOM )
514
	{
506
	{
515
		Utils::String type = this->GetCustomScriptType(lang);
507
		Utils::WString type = this->customScriptType(lang);
516
		if ( !type.empty() )
508
		if ( !type.empty() )
517
			return type;
509
			return type;
518
		iType = -1;
510
		iType = -1;
519
	}
511
	}
520
 
512
 
Line 522... Line 514...
522
	{
514
	{
523
		if ( this->IsFakePatch() )
515
		if ( this->IsFakePatch() )
524
			return "Fake Patch";
516
			return "Fake Patch";
525
	}
517
	}
526
 
518
 
527
	Utils::String sType = CSpkFile::GetScriptTypeStringStatic(m_iScriptType);
519
	Utils::WString sType = CSpkFile::GetScriptTypeStringStatic(m_iScriptType);
528
 
520
 
529
	if ( sType.empty() )
521
	if ( sType.empty() )
530
		return "Other";
522
		return "Other";
531
 
523
 
532
	return sType;	
524
	return sType.toString();
533
}
525
}
534
 
526
 
535
int CSpkFile::ConvertScriptType(const Utils::String &sType)
527
int CSpkFile::ConvertScriptType(const Utils::WString &sType)
536
{
528
{
537
	for ( int i = 0; i < SCRIPTTYPE_MAX; i++ )
529
	for ( int i = 0; i < SCRIPTTYPE_MAX; i++ )
538
	{
530
	{
539
		if ( sType.Compare(CSpkFile::GetScriptTypeStringStatic(i)) )
531
		if ( sType.Compare(CSpkFile::GetScriptTypeStringStatic(i)) )
540
			return i;
532
			return i;
541
	}
533
	}
542
 
534
 
543
	return -1;
535
	return -1;
544
}
536
}
545
 
537
 
546
Utils::String CSpkFile::GetScriptTypeStringStatic(int type)
538
Utils::WString CSpkFile::GetScriptTypeStringStatic(int type)
547
{
539
{
548
	switch ( type )
540
	switch ( type )
549
	{
541
	{
550
		case SCRIPTTYPE_CUSTOM:
542
		case SCRIPTTYPE_CUSTOM:
551
			return "Custom";
543
			return L"Custom";
552
		case SCRIPTTYPE_NAVIGATION:
544
		case SCRIPTTYPE_NAVIGATION:
553
			return "Navigation";
545
			return L"Navigation";
554
		case SCRIPTTYPE_COMBAT:
546
		case SCRIPTTYPE_COMBAT:
555
			return "Combat";
547
			return L"Combat";
556
		case SCRIPTTYPE_MISSION:
548
		case SCRIPTTYPE_MISSION:
557
			return "Mission";
549
			return L"Mission";
558
		case SCRIPTTYPE_ALPLUGIN:
550
		case SCRIPTTYPE_ALPLUGIN:
559
			return "AL Plugin";
551
			return L"AL Plugin";
560
		case SCRIPTTYPE_HOTKEY:
552
		case SCRIPTTYPE_HOTKEY:
561
			return "Hotkey";
553
			return L"Hotkey";
562
		case SCRIPTTYPE_SHIPUPGRADE:
554
		case SCRIPTTYPE_SHIPUPGRADE:
563
			return "Ship Upgrade";
555
			return L"Ship Upgrade";
564
		case SCRIPTTYPE_SHIPCOMMAND:
556
		case SCRIPTTYPE_SHIPCOMMAND:
565
			return "Ship Command";
557
			return L"Ship Command";
566
		case SCRIPTTYPE_STATIONCOMMAND:
558
		case SCRIPTTYPE_STATIONCOMMAND:
567
			return "Station Command";
559
			return L"Station Command";
568
		case SCRIPTTYPE_FLEET:
560
		case SCRIPTTYPE_FLEET:
569
			return "Fleet Management";
561
			return L"Fleet Management";
570
		case SCRIPTTYPE_TRADE:
562
		case SCRIPTTYPE_TRADE:
571
			return "Trade";
563
			return L"Trade";
572
		case SCRIPTTYPE_PIRACY:
564
		case SCRIPTTYPE_PIRACY:
573
			return "Piracy";
565
			return L"Piracy";
574
		case SCRIPTTYPE_CHEAT:
566
		case SCRIPTTYPE_CHEAT:
575
			return "Cheat";
567
			return L"Cheat";
576
		case SCRIPTTYPE_EXTENSION:
568
		case SCRIPTTYPE_EXTENSION:
577
			return "Extension Mods";
569
			return L"Extension Mods";
578
		case SCRIPTTYPE_REBALANCE:
570
		case SCRIPTTYPE_REBALANCE:
579
			return "Rebalance";
571
			return L"Rebalance";
580
		case SCRIPTTYPE_FIX:
572
		case SCRIPTTYPE_FIX:
581
			return "Vanilla Fix";
573
			return L"Vanilla Fix";
582
		case SCRIPTTYPE_GENERALMOD:
574
		case SCRIPTTYPE_GENERALMOD:
583
			return "General Mod";
575
			return L"General Mod";
584
		case SCRIPTTYPE_TOTAL:
576
		case SCRIPTTYPE_TOTAL:
585
			return "Totel Conversion";
577
			return L"Totel Conversion";
586
		case SCRIPTTYPE_WINGCOMMAND:
578
		case SCRIPTTYPE_WINGCOMMAND:
587
			return "Wing Command";
579
			return L"Wing Command";
588
	}
580
	}
589
 
581
 
590
	return "Other";
582
	return L"Other";
591
}
583
}
592
 
584
 
593
bool CSpkFile::loadPackageData(const Utils::WString &sFirst, const Utils::WString &sRest, const Utils::WString &sMainGame, Utils::WStringList &otherGames, Utils::WStringList &gameAddons, CProgressInfo *progress)
585
bool CSpkFile::loadPackageData(const Utils::WString &sFirst, const Utils::WString &sRest, const Utils::WString &sMainGame, Utils::WStringList &otherGames, Utils::WStringList &gameAddons, CProgressInfo *progress)
594
{
586
{
595
	if ( sFirst.Compare(L"ScriptType") )
587
	if ( sFirst.Compare(L"ScriptType") )
Line 609... Line 601...
609
				m_iScriptType = check;
601
				m_iScriptType = check;
610
			else
602
			else
611
			{
603
			{
612
				m_iScriptType = CSpkFile::ConvertScriptType(sRest.toString());
604
				m_iScriptType = CSpkFile::ConvertScriptType(sRest.toString());
613
				if ( m_iScriptType == -1 )
605
				if ( m_iScriptType == -1 )
614
					m_sScriptType = sRest.toString();
606
					m_sScriptType = sRest;
615
			}
607
			}
616
		}
608
		}
617
	}
609
	}
618
	else if (sFirst.Compare(L"AnotherMod"))
610
	else if (sFirst.Compare(L"AnotherMod"))
619
	{
611
	{
620
		m_sOtherName = sRest.token(L"|", 1).toString();
612
		m_sOtherName = sRest.token(L"|", 1);
621
		m_sOtherAuthor = sRest.tokens(L"|", 2).toString();
613
		m_sOtherAuthor = sRest.tokens(L"|", 2);
622
	}
614
	}
623
	else if ( sFirst.Compare(L"WareName") || sFirst.Compare(L"WareDesc") )
615
	else if ( sFirst.Compare(L"WareName") || sFirst.Compare(L"WareDesc") )
624
	{
616
	{
625
		// find the ware to use
617
		// find the ware to use
626
		SWares *useWare = m_pLastWare;
618
		SWares *useWare = m_pLastWare;
Line 706... Line 698...
706
	else if ( this->IsCustomStart() )
698
	else if ( this->IsCustomStart() )
707
		list->pushBack(L"ScriptType: Custom Start");
699
		list->pushBack(L"ScriptType: Custom Start");
708
	else if ( this->IsPatch() )
700
	else if ( this->IsPatch() )
709
		list->pushBack(L"ScriptType: Patch");
701
		list->pushBack(L"ScriptType: Patch");
710
	else
702
	else
711
		list->pushBack(L"ScriptType: " + this->GetScriptTypeString(44).toWString());
703
		list->pushBack(L"ScriptType: " + this->scriptTypeString(44));
712
	list->pushBack(L"");
704
	list->pushBack(L"");
713
 
705
 
714
	if ( this->IsAnotherMod() )
706
	if ( this->IsAnotherMod() )
715
	{
707
	{
716
		list->pushBack(L"# For another mod/package, this is a child package");
708
		list->pushBack(L"# For another mod/package, this is a child package");
717
		list->pushBack(L"AnotherMod: " + m_sOtherName.toWString() + L"|" + m_sOtherAuthor.toWString());
709
		list->pushBack(L"AnotherMod: " + m_sOtherName + L"|" + m_sOtherAuthor);
718
		list->pushBack(L"");
710
		list->pushBack(L"");
719
	}
711
	}
720
 
712
 
721
	if ( !m_lWares.empty() )
713
	if ( !m_lWares.empty() )
722
	{
714
	{
Line 828... Line 820...
828
				this->AddWare(node->Data());
820
				this->AddWare(node->Data());
829
			spk->GetWaresList()->clear(); // remove wares so they aren't deleted
821
			spk->GetWaresList()->clear(); // remove wares so they aren't deleted
830
		}
822
		}
831
 
823
 
832
		// add any settings
824
		// add any settings
833
		if ( spk->AnySettings() )
825
		if ( spk->anySettings() )
834
		{
826
		{
835
			for ( CListNode<SSettingType> *node = spk->GetSettingsList()->Front(); node; node = node->next() )
827
			for ( CListNode<SSettingType> *node = spk->settingsList()->Front(); node; node = node->next() )
836
				this->AddSetting(node->Data()->sKey, node->Data()->iType);
828
				this->addSetting(node->Data()->sKey, node->Data()->iType);
837
		}
829
		}
838
 
830
 
839
		if ( !spk->GetOtherName().empty() )
831
		if ( !spk->otherName().empty() )
840
		{
832
		{
841
			m_sOtherName = spk->GetOtherName();
833
			m_sOtherName = spk->otherName();
842
			m_sOtherAuthor = spk->GetOtherAuthor();
834
			m_sOtherAuthor = spk->otherAuthor();
843
		}
835
		}
844
	}
836
	}
845
 
837
 
846
	// copy settings from base class
838
	// copy settings from base class
847
	_merge(base);
839
	_merge(base);
Line 1022... Line 1014...
1022
		this->SetCustomStart();
1014
		this->SetCustomStart();
1023
		CLog::logf(CLog::Log_EditPackage, 3, "\tPackage is a custom start!!" );
1015
		CLog::logf(CLog::Log_EditPackage, 3, "\tPackage is a custom start!!" );
1024
	}
1016
	}
1025
	else if ( sCmd == "AnotherMod:" )
1017
	else if ( sCmd == "AnotherMod:" )
1026
	{
1018
	{
1027
		this->SetAnotherMod(sRest.token("|", 1), sRest.tokens("|", 2));
1019
		this->setAnotherMod(sRest.token("|", 1), sRest.tokens("|", 2));
1028
		CLog::logf(CLog::Log_EditPackage, 3, "\tFor another Mod, Name: %s, Author: %s", this->GetOtherName().c_str(), this->GetOtherAuthor().c_str() );
1020
		CLog::logf(CLog::Log_EditPackage, 3, "\tFor another Mod, Name: %s, Author: %s", this->otherName().c_str(), this->otherAuthor().c_str() );
1029
	}
1021
	}
1030
	else if ( sCmd == "PATCH" )
1022
	else if ( sCmd == "PATCH" )
1031
	{
1023
	{
1032
		this->SetPatch();
1024
		this->SetPatch();
1033
		CLog::logf(CLog::Log_EditPackage, 3, "\tPackage is a Patch Mod!!" );
1025
		CLog::logf(CLog::Log_EditPackage, 3, "\tPackage is a Patch Mod!!" );
Line 1060... Line 1052...
1060
		this->addWebMirror(sRest);
1052
		this->addWebMirror(sRest);
1061
		CLog::logf(CLog::Log_EditPackage, 3, "\tWeb Mirror Address: %s", sRest.c_str() );
1053
		CLog::logf(CLog::Log_EditPackage, 3, "\tWeb Mirror Address: %s", sRest.c_str() );
1062
	}
1054
	}
1063
	
1055
	
1064
	else if ( sCmd == "ScriptType:" )
1056
	else if ( sCmd == "ScriptType:" )
1065
		this->SetScriptType (sRest);
1057
		this->setScriptType (sRest.toWString());
1066
	else if ( sCmd == "WebSite:" ) {
1058
	else if ( sCmd == "WebSite:" ) {
1067
		this->setWebSite ( sRest );
1059
		this->setWebSite ( sRest );
1068
		CLog::logf(CLog::Log_EditPackage, 3, "\tWeb Site: %s", sRest.c_str() );
1060
		CLog::logf(CLog::Log_EditPackage, 3, "\tWeb Site: %s", sRest.c_str() );
1069
	}
1061
	}
1070
	else if ( sCmd == "Email:" ) {
1062
	else if ( sCmd == "Email:" ) {