1625 |
1625 |
1626 ScriptCall('onGameInit'); |
1626 ScriptCall('onGameInit'); |
1627 |
1627 |
1628 // pop game variables |
1628 // pop game variables |
1629 ParseCommand('seed ' + ScriptGetString('Seed'), true); |
1629 ParseCommand('seed ' + ScriptGetString('Seed'), true); |
1630 ParseCommand('template_filter ' + IntToStr(ScriptGetInteger('TemplateFilter')), true); |
1630 cTemplateFilter := ScriptGetInteger('TemplateFilter'); |
1631 ParseCommand('mapgen ' + IntToStr(ScriptGetInteger('MapGen')), true); |
1631 cMapGen := ScriptGetInteger('MapGen'); |
1632 ParseCommand('$gmflags ' + ScriptGetString('GameFlags'), true); |
1632 GameFlags := ScriptGetInteger('GameFlags'); |
1633 ParseCommand('$turntime ' + ScriptGetString('TurnTime'), true); |
1633 cHedgehogTurnTime:= ScriptGetInteger('TurnTime'); |
1634 ParseCommand('$casefreq ' + ScriptGetString('CaseFreq'), true); |
1634 cCaseFactor := ScriptGetInteger('CaseFreq'); |
1635 ParseCommand('$healthprob ' + ScriptGetString('HealthCaseProb'), true); |
1635 cHealthCaseProb := ScriptGetInteger('HealthCaseProb'); |
1636 ParseCommand('$hcaseamount ' + ScriptGetString('HealthCaseAmount'), true); |
1636 cHealthCaseAmount:= ScriptGetInteger('HealthCaseAmount'); |
1637 ParseCommand('$damagepct ' + ScriptGetString('DamagePercent'), true); |
1637 cDamagePercent := ScriptGetInteger('DamagePercent'); |
1638 ParseCommand('$minesnum ' + ScriptGetString('MinesNum'), true); |
1638 cLandMines := ScriptGetInteger('MinesNum'); |
1639 ParseCommand('$minestime ' + ScriptGetString('MinesTime'), true); |
1639 cMinesTime := ScriptGetInteger('MinesTime'); |
1640 ParseCommand('$minedudpct ' + ScriptGetString('MineDudPercent'), true); |
1640 cMineDudPercent := ScriptGetInteger('MineDudPercent'); |
1641 ParseCommand('$explosives ' + ScriptGetString('Explosives'), true); |
1641 cExplosives := ScriptGetInteger('Explosives'); |
1642 ParseCommand('$delay ' + ScriptGetString('Delay'), true); |
1642 cInactDelay := ScriptGetInteger('Delay'); |
1643 ParseCommand('$ready ' + ScriptGetString('Ready'), true); |
1643 cReadyDelay := ScriptGetInteger('Ready'); |
1644 ParseCommand('$sd_turns ' + ScriptGetString('SuddenDeathTurns'), true); |
1644 cSuddenDTurns := ScriptGetInteger('SuddenDeathTurns'); |
1645 ParseCommand('$waterrise ' + ScriptGetString('WaterRise'), true); |
1645 cWaterRise := ScriptGetInteger('WaterRise'); |
1646 ParseCommand('$healthdec ' + ScriptGetString('HealthDecrease'), true); |
1646 cHealthDecrease := ScriptGetInteger('HealthDecrease'); |
|
1647 |
1647 if ScriptGetString('Map') <> '' then |
1648 if ScriptGetString('Map') <> '' then |
1648 ParseCommand('map ' + ScriptGetString('Map'), true); |
1649 ParseCommand('map ' + ScriptGetString('Map'), true); |
1649 if ScriptGetString('Theme') <> '' then |
1650 if ScriptGetString('Theme') <> '' then |
1650 ParseCommand('theme ' + ScriptGetString('Theme'), true); |
1651 ParseCommand('theme ' + ScriptGetString('Theme'), true); |
1651 LuaGoals:= ScriptGetString('Goals'); |
1652 LuaGoals:= ScriptGetString('Goals'); |