Change namespace minetest. -> core..

This commit is contained in:
Alexander Chibrikin
2026-01-21 11:01:25 +03:00
parent 52c171aced
commit 71832e5838
16 changed files with 433 additions and 431 deletions

View File

@@ -79,11 +79,11 @@ function InvRef:contains_item(list_name, stack, match_meta) end
---
--- @return ItemStack
function InvRef:remove_item(list_name, stack, match_meta) end
--- returns a location compatible to `minetest.get_inventory(location)`. e.g.
--- returns a location compatible to `core.get_inventory(location)`. e.g.
--- * `{type="player", name="celeron55"}`
--- * `{type="node", pos={x=, y=, z=}}`
--- * `{type="detached", name="creative"}`
--- returns `{type="undefined"}` in case location is not known.
--- @see minetest.get_inventory
--- @see core.get_inventory
--- @return table
function InvRef:get_location() end

View File

@@ -2,7 +2,7 @@
--- Node metadata: reference extra data and functionality stored in a node.
--- Can be obtained via `minetest.get_meta(pos)`.
--- Can be obtained via `core.get_meta(pos)`.
---
--- @class NodeMetaRef: MetaDataRef
NodeMetaRef = {}

View File

@@ -1,5 +1,5 @@
--- Mod metadata: per mod metadata, saved automatically.
--- Can be obtained via `minetest.get_mod_storage()` during load time.
--- Can be obtained via `core.get_mod_storage()` during load time.
---
--- WARNING: This storage backend is incapable of saving raw binary data due
--- to restrictions of JSON.

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
---@class Entity: ObjectRef

View File

@@ -3,11 +3,11 @@
--- An interface to read config files in the format of `minetest.conf`.
---
--- `minetest.settings` is a `Settings` instance that can be used to access the
--- `core.settings` is a `Settings` instance that can be used to access the
--- main config file (`minetest.conf`). Instances for other config files can be
--- created via `Settings(filename)`.
---
--- Engine settings on the `minetest.settings` object have internal defaults that
--- Engine settings on the `core.settings` object have internal defaults that
--- will be returned if a setting is unset.
--- The engine does *not* (yet) read `settingtypes.txt` for this purpose. This
--- means that no defaults will be returned for mod settings.
@@ -50,7 +50,7 @@ function Settings:get_np_group(key) end
function Settings:get_flags(key) end
--- * Setting names can't contain whitespace or any of `="{}#`.
--- * Setting values can't contain the sequence `\n"""`.
--- * Setting names starting with "secure." can't be set on the main settings object (`minetest.settings`).
--- * Setting names starting with "secure." can't be set on the main settings object (`core.settings`).
--- @param key string
--- @param value string
function Settings:set(key, value) end
@@ -73,7 +73,7 @@ function Settings:get_names() end
--- * Returns a boolean indicating whether `key` exists.
--- * In contrast to the various getter functions, `has()` doesn't consider any default values.
--- * This means that on the main settings object (`minetest.settings`), `get(key)` might return a value even if `has(key)` returns `false`.
--- * This means that on the main settings object (`core.settings`), `get(key)` might return a value even if `has(key)` returns `false`.
--- @param key string
--- @return boolean
function Settings:has(key) end

View File

@@ -16,7 +16,7 @@ function VoxelManip:read_from_map(position1, position2) end
--- * if `light` is `true`, then lighting is automatically recalculated.
--- The default value is `true`.
--- If `light` is `false`, no light calculations happen, and you should correct
--- all modified blocks with `minetest.fix_light()` as soon as possible.
--- all modified blocks with `core.fix_light()` as soon as possible.
--- Keep in mind that modifying the map where light is incorrect can cause more lighting bugs.
--- @param light boolean? Default: `true`
function VoxelManip:write_to_map(light) end
@@ -50,7 +50,7 @@ function VoxelManip:set_data(data) end
--- function VoxelManip:update_map() end
--- Set the lighting within the `VoxelManip` to a uniform value.
--- * `light` is a table, `{day=<0...15>, night=<0...15>}`
--- * To be used only by a `VoxelManip` object from `minetest.get_mapgen_object`.
--- * To be used only by a `VoxelManip` object from `core.get_mapgen_object`.
--- * (`p1`, `p2`) is the area in which lighting is set, defaults to the whole area if left out.
function VoxelManip:set_lighting(light, p1, p2) end
@@ -83,7 +83,7 @@ function VoxelManip:set_param2_data(param2_data) end
--- Calculate lighting within the `VoxelManip`.
--- * To be used only by a `VoxelManip` object from
--- `minetest.get_mapgen_object`.
--- `core.get_mapgen_object`.
--- * (`p1`, `p2`) is the area in which lighting is set, defaults to the whole
--- area if left out or nil. For almost all uses these should be left out
--- or nil to use the default.
@@ -102,7 +102,7 @@ function VoxelManip:calc_lighting(p1, p2, propagate_shadow) end
function VoxelManip:update_liquids() end
--- Returns `true` or `false` if the data in the voxel
--- manipulator had been modified since the last read from map, due to a call to
--- `minetest.set_data()` on the loaded area elsewhere.
--- `core.set_data()` on the loaded area elsewhere.
--- @return boolean
function VoxelManip:was_modified() end