Remove functions which are deprecated and which I do not recommend to use

Removing deprecated functionality can help to clean up the code a bit.

I remove the following deprecated functions and values:
* vector.zero
* vector.plane()
* vector.pos_to_string()
* vector.quickadd()
* vector.scalar()
* vector.get_data_from_pos()
* vector.set_data_to_pos()
* vector.set_data_to_pos_optional()
* vector.remove_data_from_pos()
* vector.get_data_pos_table()

Furthermore, I remove the unused, experimental vector_meta.lua file
and make luacheck linting more strict so that it can show accidental
uses of deprecated functions in the code of this mod if there are any.

This change can break compatility with old mods which use vector_extras.
This commit is contained in:
HybridDog
2024-08-27 16:57:03 +02:00
parent 63edf837d7
commit f400a91e90
5 changed files with 9 additions and 390 deletions

18
doc.md
View File

@ -134,21 +134,3 @@ See e.g. `minetest.line_of_sight`.
* If `time` is omitted, it uses the current time.
* This function does not yet support the moon;
at night it simply returns `nil`.
## Helpers which I don't recommend to use now
* `vector.pos_to_string(pos)`: returns a string
* It is similar to `minetest.pos_to_string`; it uses a different format:
`"("..pos.x.."|"..pos.y.."|"..pos.z..")"`
* `vector.zero`
* The zero vector `{x=0, y=0, z=0}`
* `vector.quickadd(pos, [z],[y],[x])`
* Adds values to the vector components in-place
## Deprecated helpers
* `vector.plane`
* should be removed soon; it should have done the same as vector.triangle