--- a/hedgewars/uFLGameConfig.pas Thu Apr 02 21:09:56 2015 +0300
+++ b/hedgewars/uFLGameConfig.pas Wed Apr 08 23:39:18 2015 +0300
@@ -14,13 +14,14 @@
procedure setTheme(themeName: PChar); cdecl;
procedure setScript(scriptName: PChar); cdecl;
procedure setScheme(schemeName: PChar); cdecl;
+procedure setAmmo(ammoName: PChar); cdecl;
procedure tryAddTeam(teamName: PChar); cdecl;
procedure tryRemoveTeam(teamName: PChar); cdecl;
procedure changeTeamColor(teamName: PChar; dir: LongInt); cdecl;
implementation
-uses uFLIPC, hwengine, uFLUtils, uFLTeams, uFLData, uFLSChemes;
+uses uFLIPC, hwengine, uFLUtils, uFLTeams, uFLData, uFLSChemes, uFLAmmo;
var guiCallbackPointer: pointer;
guiCallbackFunction: TGUICallback;
@@ -35,6 +36,7 @@
theme: shortstring;
script: shortstring;
scheme: TScheme;
+ ammo: ansistring;
mapgen: Longint;
gameType: TGameType;
teams: array[0..7] of TTeam;
@@ -336,4 +338,13 @@
currentConfig.scheme:= scheme^
end;
+procedure setAmmo(ammoName: PChar); cdecl;
+var ammo: PAmmo;
+begin
+ ammo:= ammoByName(ammoName);
+
+ if ammo <> nil then
+ currentConfig.ammo:= ammo^.ammoStr
+end;
+
end.