# HG changeset patch
# User nemo
# Date 1291340430 18000
# Node ID 15a483b2558a8e45df418af0fa85d49d9dac4ab5
# Parent  258945553b18209482c330aeb2287637cece8f09
add visual gear registration

diff -r 258945553b18 -r 15a483b2558a hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Thu Dec 02 20:29:46 2010 -0500
+++ b/hedgewars/uScript.pas	Thu Dec 02 20:40:30 2010 -0500
@@ -1215,6 +1215,7 @@
 
 procedure initModule;
 var at : TGearType;
+    vgt: TVisualGearType;
     am : TAmmoType;
     st : TSound;
     he: THogEffect;
@@ -1285,6 +1286,9 @@
 for at:= Low(TGearType) to High(TGearType) do
     ScriptSetInteger(EnumToStr(at), ord(at));
 
+for vgt:= Low(TVisualGearType) to High(TVisualGearType) do
+    ScriptSetInteger(EnumToStr(vgt), ord(vgt));
+
 // register sounds
 for st:= Low(TSound) to High(TSound) do
     ScriptSetInteger(EnumToStr(st), ord(st));
diff -r 258945553b18 -r 15a483b2558a hedgewars/uUtils.pas
--- a/hedgewars/uUtils.pas	Thu Dec 02 20:29:46 2010 -0500
+++ b/hedgewars/uUtils.pas	Thu Dec 02 20:40:30 2010 -0500
@@ -8,6 +8,7 @@
 procedure SplitByChar(var a, b: ansistring; c: char);
 
 function  EnumToStr(const en : TGearType) : shortstring; overload;
+function  EnumToStr(const en : TVisualGearType) : shortstring; overload;
 function  EnumToStr(const en : TSound) : shortstring; overload;
 function  EnumToStr(const en : TAmmoType) : shortstring; overload;
 function  EnumToStr(const en : THogEffect) : shortstring; overload;
@@ -83,6 +84,10 @@
 begin
 EnumToStr:= GetEnumName(TypeInfo(TGearType), ord(en))
 end;
+function EnumToStr(const en : TVisualGearType) : shortstring; overload;
+begin
+EnumToStr:= GetEnumName(TypeInfo(TVisualGearType), ord(en))
+end;
 
 function EnumToStr(const en : TSound) : shortstring; overload;
 begin
@@ -340,4 +345,4 @@
 {$ENDIF}
 end;
 
-end.
\ No newline at end of file
+end.