Add all safe helper function from lua_api.txt#507
Open
Lejo1 wants to merge 2 commits into
Open
Conversation
Desour
reviewed
Mar 30, 2020
Desour
reviewed
Mar 30, 2020
Contributor
Author
|
Would vector = table.copy(vector) work?
EDIT: Tested it, worked!
… Am 30.03.2020 um 13:39 schrieb DS ***@***.***>:
@Desour commented on this pull request.
In mesecons_luacontroller/init.lua:
> + minetest = {
+ wrap_text = minetest.wrap_text,
+ pos_to_string = minetest.pos_to_string,
+ string_to_pos = minetest.string_to_pos,
+ string_to_area = minetest.string_to_area,
+ formspec_escape = minetest.formspec_escape,
+ is_yes = minetest.is_yes,
+ is_nan = minetest.is_nan,
+ get_us_time = minetest.get_us_time,
+ parse_json = minetest.parse_json,
+ write_json = minetest.write_json,
+ rgba = minetest.rgba,
+ encode_base64 = minetest.encode_base64,
+ decode_base64 = minetest.decode_base64,
+ },
+ vector = vector,
Can I do for math and table also just like for vector math = math? Do I need to list them all separately?
If you do this, the player can modify the vector table. This here is not a deep copy, you just copy the reference.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Contributor
Author
|
Is it possible to allow nonplain string.format for the dump and wrap_text function? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Includes #500
Just need to be checked if there are any needing an safe implementation(Didn't found any).
PS: Can I do for math and table also just like for vector math = math? Do I need to list them all separately?
Discussion: Shall I implement get_us_time? There are extra blocks in mesecons + diglines to get the time so they would get useless...