LuaAPI: Update GetVisualGearType and GetGearType
authorWuzzy
Tue, 21 Aug 2018 21:09:17 +0100
changeset 1513 18582093d894
parent 1512 06e3cd099d4b
child 1514 f9f99f1cf286
LuaAPI: Update GetVisualGearType and GetGearType
LuaAPI.wiki
--- a/LuaAPI.wiki	Tue Aug 21 21:04:40 2018 +0100
+++ b/LuaAPI.wiki	Tue Aug 21 21:09:17 2018 +0100
@@ -472,10 +472,10 @@
 == Functions to get gear properties ==
 
 === <tt>!GetGearType(gearUid)</tt> ===
-This function returns the [GearTypes gear type] for the specified gear.
+This function returns the [GearTypes gear type] for the specified gear, if it exists.  If it doesn't exist, `nil` is returned.
 
 === <tt>!GetVisualGearType(vgUid)</tt> (0.9.23) ===
-This function returns the [VisualGearTypes visual gear type] for the specified visual gear.
+This function returns the [VisualGearTypes visual gear type] for the specified visual gear, if it exists.  If it doesn't exist, `nil` is returned.
 
 === <tt>!GetGearPosition(gearUid)</tt> ===
 Returns x,y coordinates for the specified gear. Not to be confused with `GetGearPos`.
@@ -679,7 +679,7 @@
      HideHog(gear) -- Hide the newly created gear.</code>
 
 === <tt>!RestoreHog(gearUid)</tt> ===
-Restores a previously hidden hedgehog.
+Restores a previously hidden hedgehog.  Nothing happens if the hedgehog does not exist or is not hidden.
 
 Example: 
 
@@ -688,7 +688,7 @@
      RestoreHog(gear) -- Restore the newly hidden gear.</code>
 
 === <tt>!DeleteGear(gearUid)</tt> ===
-Deletes a gear.
+Deletes a gear.  If the specified gear did not exist, nothing happens.
 
 Example:
 
@@ -696,7 +696,11 @@
     DeleteGear(gear) -- Delete the newly created gear.</code>
 
 === <tt>!DeleteVisualGear(vgUid)</tt> ===
-Deletes a visual gear. Note, most visual gears delete themselves.
+Deletes a visual gear.  If it does not exist, nothing happens. 
+
+Note, most visual gears delete themselves after a while.
+
+
 
 Example: