# HG changeset patch # User Wuzzy # Date 1539747182 -7200 # Node ID 429945a9b8db31679c40610c23529c2edcd31c36 # Parent 7bb60596c27ea7e8a4f0cc1f564e7cd0ce3dba8e Lua: Add PLATFORM global var to distinguish between desktop and mobile builds diff -r 7bb60596c27e -r 429945a9b8db ChangeLog.txt --- a/ChangeLog.txt Wed Oct 17 05:34:29 2018 +0300 +++ b/ChangeLog.txt Wed Oct 17 05:33:02 2018 +0200 @@ -169,6 +169,7 @@ + New global: MAX_HOG_HEALTH. Maximum possible hedgehog health + New global: MAX_TURN_TIME. Maximum possible turn time + New global: EXPLForceDraw. Flag for Explode function, forces land removal even with gfSolidLand on + + New global: PLATFORM. Platform type. "Desktop" for desktop builds, "Mobile" for mobile device builds + New globals: capcolDefault, capcolSetting: Default caption colors * Animate library: Remove defunct follow argument for AnimVisualGear * Changed global: lfCurrentHog becomes lfCurHogCrate diff -r 7bb60596c27e -r 429945a9b8db hedgewars/uScript.pas --- a/hedgewars/uScript.pas Wed Oct 17 05:34:29 2018 +0300 +++ b/hedgewars/uScript.pas Wed Oct 17 05:33:02 2018 +0200 @@ -3970,6 +3970,12 @@ // import some variables ScriptSetString(_S'LOCALE', cLocale); +{$IFDEF MOBILE} +ScriptSetString(_S'PLATFORM', 'Mobile'); +{$ELSE} +ScriptSetString(_S'PLATFORM', 'Desktop'); +{$ENDIF} + // Add aliases for amDuck and gtDuck because rubber duck was removed. // amDuck and gtDuck are deprecated and should be removed later. // TODO: Remove these aliases in a later version.