# HG changeset patch # User Wuzzy # Date 1492879017 -7200 # Node ID 46e1e25fec5e4f6b0dd8632479e0b7bcef2f8d65 # Parent 6486a012987e4563e2246c8129a721be3bf48020 Lua variable: AmmoTypeMax (maximum ammo type ID for iterating) diff -r 6486a012987e -r 46e1e25fec5e ChangeLog.txt --- a/ChangeLog.txt Sat Apr 22 18:12:58 2017 +0200 +++ b/ChangeLog.txt Sat Apr 22 18:36:57 2017 +0200 @@ -238,6 +238,7 @@ + New hook: onUsedAmmo(ammoType) -- called when ammo has been finished using (e.g. after both shotgun shots) + New variable: AirMinesNum -- Number of air mines being placed on a medium-sized map + New variable: WorldEdge -- World edge type (weNone, weWrap, weBounce, weSea) + + New variable: AmmoTypeMax -- Maximum ammo type ID (useful to iterate through all ammo types, starting by 0) + Locale library: loc_noop -- Mark string for translation but don't translate it + Animate library: AnimInit([startAnimating]) -- New parameter startAnimating: if true, will start game in cinematic mode with most controls disabled. Must play an animation after that * Removed call: SetAmmoStore -- Old undocumented function of questional use, has never been used diff -r 6486a012987e -r 46e1e25fec5e hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sat Apr 22 18:12:58 2017 +0200 +++ b/hedgewars/uScript.pas Sat Apr 22 18:36:57 2017 +0200 @@ -2866,6 +2866,7 @@ ScriptSetInteger('WaterRise', cWaterRise); ScriptSetInteger('HealthDecrease', cHealthDecrease); ScriptSetInteger('GetAwayTime', cGetAwayTime); +ScriptSetInteger('AmmoTypeMax', Ord(High(TAmmoType))); ScriptSetString('Map', cMapName); ScriptSetString('Theme', Theme); ScriptSetString('Goals', '');