93 ScriptAmmoLoadout : shortstring; |
93 ScriptAmmoLoadout : shortstring; |
94 ScriptAmmoProbability : shortstring; |
94 ScriptAmmoProbability : shortstring; |
95 ScriptAmmoDelay : shortstring; |
95 ScriptAmmoDelay : shortstring; |
96 ScriptAmmoReinforcement : shortstring; |
96 ScriptAmmoReinforcement : shortstring; |
97 ScriptLoaded : boolean; |
97 ScriptLoaded : boolean; |
|
98 mapDims : boolean; |
98 |
99 |
99 procedure ScriptPrepareAmmoStore; forward; |
100 procedure ScriptPrepareAmmoStore; forward; |
100 procedure ScriptApplyAmmoStore; forward; |
101 procedure ScriptApplyAmmoStore; forward; |
101 procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); forward; |
102 procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); forward; |
102 |
103 |
2063 end; |
2064 end; |
2064 ScriptApplyAmmoStore |
2065 ScriptApplyAmmoStore |
2065 end; |
2066 end; |
2066 |
2067 |
2067 ScriptSetInteger('ClansCount', ClansCount); |
2068 ScriptSetInteger('ClansCount', ClansCount); |
2068 ScriptSetInteger('TeamsCount', TeamsCount) |
2069 ScriptSetInteger('TeamsCount', TeamsCount); |
|
2070 mapDims:= false |
2069 end; |
2071 end; |
2070 |
2072 |
2071 |
2073 |
2072 // Update values of screen dimensions and allow script to react to resolution change |
2074 // Update values of screen dimensions and allow script to react to resolution change |
2073 procedure ScriptOnScreenResize(); |
2075 procedure ScriptOnScreenResize(); |
2120 begin |
2122 begin |
2121 ScriptSetInteger('TurnTimeLeft', TurnTimeLeft); |
2123 ScriptSetInteger('TurnTimeLeft', TurnTimeLeft); |
2122 ScriptSetInteger('GameTime', GameTicks); |
2124 ScriptSetInteger('GameTime', GameTicks); |
2123 ScriptSetInteger('TotalRounds', TotalRounds); |
2125 ScriptSetInteger('TotalRounds', TotalRounds); |
2124 ScriptSetInteger('WaterLine', cWaterLine); |
2126 ScriptSetInteger('WaterLine', cWaterLine); |
2125 if GameTicks = 0 then |
2127 if not mapDims then |
2126 begin |
2128 begin |
|
2129 mapDims:= true; |
2127 ScriptSetInteger('LAND_WIDTH', LAND_WIDTH); |
2130 ScriptSetInteger('LAND_WIDTH', LAND_WIDTH); |
2128 ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT); |
2131 ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT); |
2129 ScriptSetInteger('LeftX', leftX); |
2132 ScriptSetInteger('LeftX', leftX); |
2130 ScriptSetInteger('RightX', rightX); |
2133 ScriptSetInteger('RightX', rightX); |
2131 ScriptSetInteger('TopY', topY) |
2134 ScriptSetInteger('TopY', topY) |