From a5c27e2bcd9d58c9d096bd8a1ac737b1eeb206f1 Mon Sep 17 00:00:00 2001 From: Vanni <103026931+ImVanni@users.noreply.github.com> Date: Sat, 19 Oct 2024 00:31:54 +0200 Subject: [PATCH 1/3] Add method Instance:ResetPropertyToDefault --- .../reference/engine/classes/Instance.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content/en-us/reference/engine/classes/Instance.yaml b/content/en-us/reference/engine/classes/Instance.yaml index 5ad4d4c56..f6efc6508 100644 --- a/content/en-us/reference/engine/classes/Instance.yaml +++ b/content/en-us/reference/engine/classes/Instance.yaml @@ -1237,6 +1237,29 @@ methods: thread_safety: Unsafe capabilities: [] writeCapabilities: [] + - name: Instance:ResetPropertyToDefault + summary: | + Resets the given property value back to its default value. + description: | + This method will reset the value of the given property back to its default value, + as defined after being created via `Datatype.Instance.new()`. + Providing an invalid property or a read-only one will result in an error. + code-samples: + parameters: + - name: name + type: string + default: + summary: | + The name of the property to be reset. + returns: + - type: void + summary: '' + tags: [] + deprecation-message: '' + security: None + thread_safety: Unsafe + capabilities: [] + writeCapabilities: [] - name: Instance:SetAttribute summary: | Sets the attribute with the given name to the given value. From ffd3b8b51ecf4b85133129b880946f5611c99a7b Mon Sep 17 00:00:00 2001 From: Vanni <103026931+ImVanni@users.noreply.github.com> Date: Sat, 19 Oct 2024 00:33:08 +0200 Subject: [PATCH 2/3] Fix leading space --- content/en-us/reference/engine/classes/Instance.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en-us/reference/engine/classes/Instance.yaml b/content/en-us/reference/engine/classes/Instance.yaml index f6efc6508..d566f612f 100644 --- a/content/en-us/reference/engine/classes/Instance.yaml +++ b/content/en-us/reference/engine/classes/Instance.yaml @@ -1237,7 +1237,7 @@ methods: thread_safety: Unsafe capabilities: [] writeCapabilities: [] - - name: Instance:ResetPropertyToDefault + - name: Instance:ResetPropertyToDefault summary: | Resets the given property value back to its default value. description: | From f6a765082230ff17a4ce6151abde392c90b6eeeb Mon Sep 17 00:00:00 2001 From: Vanni <103026931+ImVanni@users.noreply.github.com> Date: Sat, 19 Oct 2024 00:47:46 +0200 Subject: [PATCH 3/3] Fix missing code-samples --- content/en-us/reference/engine/classes/Instance.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en-us/reference/engine/classes/Instance.yaml b/content/en-us/reference/engine/classes/Instance.yaml index d566f612f..3631fb6ba 100644 --- a/content/en-us/reference/engine/classes/Instance.yaml +++ b/content/en-us/reference/engine/classes/Instance.yaml @@ -1244,7 +1244,7 @@ methods: This method will reset the value of the given property back to its default value, as defined after being created via `Datatype.Instance.new()`. Providing an invalid property or a read-only one will result in an error. - code-samples: + code-samples: [] parameters: - name: name type: string