From 9af9e5d98f1c8761b58f86b198ee6293e4ad0b72 Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Sun, 11 Feb 2018 10:33:58 +0100 Subject: [PATCH] docs: removed obsolote Components entry and add IsEditor function --- docs/sdk/definition/defcore.xml | 5 ----- docs/sdk/script/fn/IsEditor.xml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 docs/sdk/script/fn/IsEditor.xml diff --git a/docs/sdk/definition/defcore.xml b/docs/sdk/definition/defcore.xml index 2028e7d52..f5e89be81 100644 --- a/docs/sdk/definition/defcore.xml +++ b/docs/sdk/definition/defcore.xml @@ -60,11 +60,6 @@ Integer Weight of the object. Rock 10, clonk 50, hut 1000, castle 10000. - - Components - ID list - Elements from which the object is composed. Uncompleted or half grown objects will only have the respective fraction of the components. - SolidMask 6 integers diff --git a/docs/sdk/script/fn/IsEditor.xml b/docs/sdk/script/fn/IsEditor.xml new file mode 100644 index 000000000..f51a1423e --- /dev/null +++ b/docs/sdk/script/fn/IsEditor.xml @@ -0,0 +1,24 @@ + + + + + + IsEditor + Global + 8.0 OC + bool + Returns whether the current game is an editor game. + + + public func InitializePlayer(int plr) + { + if (IsEditor()) + SetWealthfunclink>(plr, 10**4); + } + Gives the player a lot of wealth for testing purposes in editor mode. + + + + Maikel2018-02 +