diff --git a/addons/quentincaffeino/array-utils/src/Collection.gd b/addons/quentincaffeino/array-utils/src/Collection.gd index 3049d94..8692e85 100644 --- a/addons/quentincaffeino/array-utils/src/Collection.gd +++ b/addons/quentincaffeino/array-utils/src/Collection.gd @@ -195,7 +195,7 @@ func fill(value = null, startIndex = 0, length = null): # @returns Collection func map(callback): for key in self: - self._collection[key] = callback.call([self._collection[key], key, self._collection]) + self._collection[key] = callback.invoke_call([self._collection[key], key, self._collection]) self.first() return self @@ -214,7 +214,7 @@ func filter(callback = null): var key = new_collection.get_keys()[i] var value = new_collection.get(key) - call = callback.call([key, value, i, new_collection]) + call = callback.invoke_call([key, value, i, new_collection]) if !call: new_collection.remove_by_index(i) diff --git a/addons/quentincaffeino/callback/README.md b/addons/quentincaffeino/callback/README.md index dd574b0..1bcd019 100644 --- a/addons/quentincaffeino/callback/README.md +++ b/addons/quentincaffeino/callback/README.md @@ -22,13 +22,13 @@ func _ready(): # void var func_cb = CallbackBuilder.new(self).set_name("callable_function").build() var funcref_cb = CallbackBuilder.new(funcref(self, "callable_function")).build() - print(prop_cb.call()) # Prints: Hello world! + print(prop_cb.invoke_call()) # Prints: Hello world! - print(func_cb.call(["Hello, sam!"])) # Prints: [Reference...] - print(prop_cb.call()) # Prints: Hello, sam! + print(func_cb.invoke_call(["Hello, sam!"])) # Prints: [Reference...] + print(prop_cb.invoke_call()) # Prints: Hello, sam! - print(funcref_cb.call(["Hello, peter!"])) # Prints: [Reference...] - print(prop_cb.call()) # Prints: Hello, peter! + print(funcref_cb.invoke_call(["Hello, peter!"])) # Prints: [Reference...] + print(prop_cb.invoke_call()) # Prints: Hello, peter! ``` ## License diff --git a/addons/quentincaffeino/callback/src/AbstractCallback.gd b/addons/quentincaffeino/callback/src/AbstractCallback.gd index 649e35a..f71096e 100755 --- a/addons/quentincaffeino/callback/src/AbstractCallback.gd +++ b/addons/quentincaffeino/callback/src/AbstractCallback.gd @@ -48,7 +48,7 @@ func bind(argv = []): # @param Variant[] argv # @returns Variant -func call(argv = []): +func invoke_call(argv = []): pass diff --git a/addons/quentincaffeino/callback/src/CallableCallback.gd b/addons/quentincaffeino/callback/src/CallableCallback.gd index 3d08bf4..397685f 100644 --- a/addons/quentincaffeino/callback/src/CallableCallback.gd +++ b/addons/quentincaffeino/callback/src/CallableCallback.gd @@ -15,7 +15,7 @@ func ensure(): # @param Variant[] argv # @returns Variant -func call(argv = []): +func invoke_call(argv = []): # Ensure callback target still exists if !ensure(): print(errors["qc.callback.call.ensure_failed"] % [ self._target ]) diff --git a/addons/quentincaffeino/callback/src/Callback.gd b/addons/quentincaffeino/callback/src/Callback.gd index 2adb1f1..2601273 100644 --- a/addons/quentincaffeino/callback/src/Callback.gd +++ b/addons/quentincaffeino/callback/src/Callback.gd @@ -1,4 +1,3 @@ - extends "./AbstractCallback.gd" @@ -40,7 +39,7 @@ func ensure(): # @param Variant[] argv # @returns Variant -func call(argv = []): +func invoke_call(argv = []): # Ensure callback target still exists if !ensure(): print(errors["qc.callback.call.ensure_failed"] % [ self._target, self._name ]) diff --git a/addons/quentincaffeino/console/docs/generated/AbstractCallback.md b/addons/quentincaffeino/console/docs/generated/AbstractCallback.md index d837f03..2e303b3 100644 --- a/addons/quentincaffeino/console/docs/generated/AbstractCallback.md +++ b/addons/quentincaffeino/console/docs/generated/AbstractCallback.md @@ -58,7 +58,7 @@ void ### call ```gdscript -func call(argv: Variant[]) +func invoke_call(argv: Variant[]) ``` Variant \ No newline at end of file diff --git a/addons/quentincaffeino/console/docs/generated/Callback.md b/addons/quentincaffeino/console/docs/generated/Callback.md index 2ae8eb5..0a457d6 100644 --- a/addons/quentincaffeino/console/docs/generated/Callback.md +++ b/addons/quentincaffeino/console/docs/generated/Callback.md @@ -34,7 +34,7 @@ boolean ### call ```gdscript -func call(argv: Variant[]) +func invoke_call(argv: Variant[]) ``` Variant \ No newline at end of file diff --git a/addons/quentincaffeino/console/src/Command/Command.gd b/addons/quentincaffeino/console/src/Command/Command.gd index f007806..cdab8c7 100644 --- a/addons/quentincaffeino/console/src/Command/Command.gd +++ b/addons/quentincaffeino/console/src/Command/Command.gd @@ -69,7 +69,7 @@ func execute(inArgs = []): i += 1 # Execute command - return self._target.call(args) + return self._target.invoke_call(args) # @returns void