Merge branch 'dev' into flora
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (C)2018-2020 Aaron Suen <warr1024@gmail.com>
|
||||
Copyright (C)2018-2021 Aaron Suen <warr1024@gmail.com>
|
||||
Portions Copyright (C)2019-2020 LoneWolfHT <lonewolf04361@gmail.com>
|
||||
Portions Copyright (C)2019 Magik Eh
|
||||
Portions Copyright (C)2019 Terifo <terifo1590@gmail.com>
|
||||
|
@ -21,10 +21,6 @@ IDEAS: Possible future additions/improvements to the game
|
||||
- Combine with lux reaction?
|
||||
- Register nodes for extra check callbacks in area
|
||||
|
||||
- Can use FOV changing as a "camera shake" effect.
|
||||
- For damage
|
||||
- As visual indication of a sound out of view?
|
||||
|
||||
- High tier door ideas
|
||||
- Require higher-tier doors to operate higher-tier
|
||||
tools/heads?
|
||||
@ -39,8 +35,6 @@ IDEAS: Possible future additions/improvements to the game
|
||||
- Source of special materials like ash? Cheaper peat? Thatch?
|
||||
- Upconvert dirt to humus nearby?
|
||||
|
||||
- Buff lux fluid range to 2?
|
||||
|
||||
- Rework falling_node (or build alternative) with customizability
|
||||
- Allow lode rods, ladders to hang from ceilings?
|
||||
|
||||
@ -64,15 +58,6 @@ IDEAS: Possible future additions/improvements to the game
|
||||
invisible in old versions (graceful fallback).
|
||||
- An icon for each sound type.
|
||||
|
||||
- Separate air vs. node cursor?
|
||||
- Like the node vs. entity cursor, can we hide the cursor when
|
||||
pointing only at air?
|
||||
- Would server lag be too much?
|
||||
- This would integrate really well with a WAILA sort of thing.
|
||||
- Could totally revamp touchtips, and dynamic feel Lightning.
|
||||
- Use an image HUD so we can force mobile to display it too, so
|
||||
mobile players can use look dir too?
|
||||
|
||||
- Buff igniting
|
||||
- Make hot lode and other heated materials able to ignite
|
||||
- This was probably not already done just because we
|
||||
@ -186,10 +171,9 @@ IDEAS: Possible future additions/improvements to the game
|
||||
- Lode
|
||||
- Lux cobbl
|
||||
- Water sources.
|
||||
- Lava sources.
|
||||
- Sustainable but not renewable
|
||||
- Not sustainable
|
||||
- Lava sources.
|
||||
- Surround stone with lava to melt?
|
||||
- Lux stone (smooth)
|
||||
|
||||
- Threats
|
||||
|
@ -31,19 +31,12 @@ ISSUES-CODE: Issues related to code quality and APIs
|
||||
- Test nc_wield with items that have their own visual scale.
|
||||
|
||||
- Flammability ABM ordering. Always do extinguish check after ignite
|
||||
checks or vice versa, so suboptimal firestarting is consistent.
|
||||
|
||||
- Look into game default settings.
|
||||
- Change default ABM budget
|
||||
(https://github.com/minetest/minetest/pull/10290)
|
||||
checks or vice versa, so suboptimal firestarting is consiste
|
||||
|
||||
- Make door pusheability customizable
|
||||
- door_can_push or door_cannot_push groups/flags or something.
|
||||
- Allow override of standard falling_node check.
|
||||
|
||||
- Allow items to have a "drop" field that's honored when stacks are
|
||||
dug or items are pulled off shelves...?
|
||||
|
||||
- Overhaul player health to work entirely virtual
|
||||
- Raise max up a lot to make room for fine grained falling
|
||||
damage so we can raise threshold
|
||||
@ -77,10 +70,6 @@ ISSUES-CODE: Issues related to code quality and APIs
|
||||
- May need to test performance on a non-JIT build, where this is expected
|
||||
to have a larger impact, since JIT probably optimizes the difference away.
|
||||
|
||||
- Continue to chisel away at ABM perf issues.
|
||||
- Simplify or optimize existing ABMs
|
||||
- Convert things to DNTs.
|
||||
|
||||
- Some time-integral processes are not resetting when prereqs removed
|
||||
- Cooking resumes instead of resetting when fire removed.
|
||||
- Leaching resumes instead of resetting when water removed.
|
||||
@ -109,10 +98,6 @@ ISSUES-CODE: Issues related to code quality and APIs
|
||||
- Need this for amalgamation remelting.
|
||||
- Would it make sense to unify the item and falling_node ents?
|
||||
|
||||
- API for map-seed-deterministic scatter.
|
||||
- Given minp, maxp, seed and density, find all positions.
|
||||
- Use for sponges, lava/water springs, etc.
|
||||
|
||||
- Unify sponge growth logic so it can be used for mapgen, to ensure
|
||||
that spawned sponges match naturally-grown ones?
|
||||
|
||||
|
@ -9,17 +9,12 @@ ISSUES-GAME: Gameplay-affecting issues
|
||||
# # # # # # # # # # # #
|
||||
#### # #### # ###### ###### # # ####
|
||||
|
||||
- Change bandolier slot items back to upright_sprite
|
||||
|
||||
- We can reliably detect the zoom player control, make far-zoom only
|
||||
work while zooming, and add hints for it.
|
||||
|
||||
- Consider switching touchtips to waypoint HUDs now that hiding
|
||||
distance is an option.
|
||||
|
||||
- BUG: Torch light doesn't update if players are standing still when
|
||||
torch goes out.
|
||||
|
||||
- BUG: Players with very high lag are sometimes able to dig air,
|
||||
flux into their inventory, esp. with silk-touch tools.
|
||||
|
||||
@ -44,16 +39,6 @@ ISSUES-GAME: Gameplay-affecting issues
|
||||
basically softens all or nothing.
|
||||
- Can we smooth this out and make it less jarring?
|
||||
|
||||
- Buff wall scaling
|
||||
- Allow 1n lateral movement along wall
|
||||
- Makes outer wall corners navigable
|
||||
|
||||
- Silk Touch needs a review, possible nerf.
|
||||
- Review what materials are silk toucheable and which are not
|
||||
at this point, make adjustments if needed.
|
||||
- Maybe require some preparatory step, like a pummel into a
|
||||
prepped material before dig?
|
||||
|
||||
- Make a way to prevent crafting on place
|
||||
- Sneak? Aux?
|
||||
|
||||
@ -108,6 +93,16 @@ ISSUES-GAME: Gameplay-affecting issues
|
||||
- Don't allow looktip if the "above" node is below a certain
|
||||
light level
|
||||
- Consider separating wieldtips and punch/looktips again.
|
||||
- Separate air vs. node cursor?
|
||||
- Like the node vs. entity cursor, can we hide the cursor when
|
||||
pointing only at air?
|
||||
- Could have an API to check for pointability, e.g. bandolier
|
||||
slots from the back.
|
||||
- Would server lag be too much?
|
||||
- This would integrate really well with a WAILA sort of thing.
|
||||
- Could totally revamp touchtips, and dynamic feel Lightning.
|
||||
- Use an image HUD so we can force mobile to display it too, so
|
||||
mobile players can use look dir too?
|
||||
|
||||
- falling_node pillars settle out of order!
|
||||
- Also anectodal issues with falling nodes sometimes
|
||||
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
BIN
menu/header.png
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 16 KiB |
BIN
menu/icon.png
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.2 KiB |
@ -15,9 +15,11 @@ minetest.register_on_joinplayer(function(player)
|
||||
rejected[pname] = true
|
||||
minetest.kick_player(pname, "Outdated client, "
|
||||
.. minrelease .. " required")
|
||||
minetest.chat_send_all("*** " .. pname
|
||||
.. " rejected. (protocol version "
|
||||
.. (pinfo and pinfo.protocol_version or "unknown") .. ")")
|
||||
return minetest.after(0, function()
|
||||
return minetest.chat_send_all("*** " .. pname
|
||||
.. " rejected. (protocol version "
|
||||
.. (pinfo and pinfo.protocol_version or "unknown") .. ")")
|
||||
end)
|
||||
else
|
||||
rejected[pname] = nil
|
||||
end
|
||||
|
@ -107,11 +107,13 @@ include("fx_digparticles")
|
||||
|
||||
include("register_mods")
|
||||
include("register_entlabels")
|
||||
include("register_backfaces")
|
||||
|
||||
include("mapgen_limits")
|
||||
include("mapgen_shared")
|
||||
|
||||
include("item_on_register")
|
||||
include("item_diggable")
|
||||
include("item_drop_in_place")
|
||||
include("item_oldnames")
|
||||
include("item_tool_break")
|
||||
|
34
mods/nc_api/item_diggable.lua
Normal file
@ -0,0 +1,34 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local nodecore, pairs, type
|
||||
= nodecore, pairs, type
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local diggroups = {
|
||||
cracky = true,
|
||||
choppy = true,
|
||||
crumbly = true,
|
||||
snappy = true
|
||||
}
|
||||
|
||||
nodecore.register_on_register_item(function(_, def)
|
||||
if def.diggable ~= nil then return end
|
||||
|
||||
if def.pointable == false then
|
||||
def.diggable = false
|
||||
return
|
||||
end
|
||||
|
||||
if def.liquidtype ~= nil and def.liquidtype ~= "none" then
|
||||
def.diggable = false
|
||||
return
|
||||
end
|
||||
|
||||
if def.groups then
|
||||
for k in pairs(diggroups) do
|
||||
if type(def.groups[k]) == "number" and def.groups[k] > 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
def.diggable = false
|
||||
end)
|
@ -1,27 +1,9 @@
|
||||
# textdomain: nc_api
|
||||
(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2020 por Aaron Suen <warr1024@@gmail.com>
|
||||
(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2021 por Aaron Suen <warr1024@@gmail.com>
|
||||
(and 1 more hint)=(y una pista más)
|
||||
(and @1 more hints)=(y @1 pistas más)
|
||||
- "Furnaces" are not a thing; discover smelting with open flames.=- No hay hornos en Nodecore; fundir con llamas abiertas.
|
||||
- Can't dig trees or grass? Search for sticks in the canopy.=[REMOVIDO].
|
||||
- Crafting is done by building recipes in-world.=[REMOVIDO].
|
||||
- DONE: @1=- LISTO: @1
|
||||
- Do not use F5 debug info; it will mislead you!=[REMOVIDO]!
|
||||
- Drop items onto ground to create stack nodes. They do not decay.=[REMOVED].
|
||||
- Hold/repeat right-click on walls/ceilings barehanded to climb.=[REMOVED].
|
||||
- If a recipe exists, you will see a special particle effect.=[REMOVED].
|
||||
- Items picked up try to fit into the current selected slot first.=[REMOVED].
|
||||
- Larger recipes are usually more symmetrical.=[REMOVED].
|
||||
- Order and specific face of placement may matter for crafting.=[REMOVED].
|
||||
- Ores may be hidden, but revealed by subtle clues in terrain.=[REMOVED].
|
||||
- Recipes are time-based, punching faster does not speed up.=[REMOVED].
|
||||
- Sneak+drop to count out single items from stack.=[REMOVIDO].
|
||||
- Some recipes require "pummeling" a node.=[REMOVIDO].
|
||||
- Some recipes use a 3x3 "grid", laid out flat on the ground.=[REMOVIDO].
|
||||
- Stacks may be pummeled, exact item count may matter.=[REMOVIDO].
|
||||
- The game is challenging by design, sometimes frustrating. DON'T GIVE UP!=[REMOVIDO]!
|
||||
- There is NO inventory screen.=[REMOVIDO].
|
||||
- To pummel, punch a node repeatedly, WITHOUT digging.=[REMOVIDO].
|
||||
- Trouble lighting a fire? Try using longer sticks, more tinder.=¿Problemas para encender un fuego? Intente usar palos más largos, más hojas.
|
||||
- Wielded item, target face, and surrounding nodes may matter.=importantes.
|
||||
- You do not have to punch very fast (about 1 per second).=No es necesario golpear muy rápido (aproximadamente 1 golpe por segundo).
|
||||
@ -89,6 +71,7 @@ Cobble=Adoquín
|
||||
Cobble Hinged Panel=Panel de Adoquín con Bisagras
|
||||
Cobble Panel=Panel de Adoquín
|
||||
Crude Glass=Vidrio Crudo
|
||||
DEVELOPMENT VERSION=VERSIÓN DE DESARROLLO
|
||||
Dirt=Tierra
|
||||
Fire=Fuego
|
||||
Float Glass=Vidrio Flotado
|
||||
|
@ -1,27 +1,9 @@
|
||||
# textdomain: nc_api
|
||||
(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2020 por Aaron Suen <warr1024@@gmail.com>
|
||||
(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2021 por Aaron Suen <warr1024@@gmail.com>
|
||||
(and 1 more hint)=(y una pista más)
|
||||
(and @1 more hints)=(y @1 pistas más)
|
||||
- "Furnaces" are not a thing; discover smelting with open flames.=- No hay hornos en Nodecore; fundir con llamas abiertas.
|
||||
- Can't dig trees or grass? Search for sticks in the canopy.=[REMOVIDO].
|
||||
- Crafting is done by building recipes in-world.=[REMOVIDO].
|
||||
- DONE: @1=- LISTO: @1
|
||||
- Do not use F5 debug info; it will mislead you!=[REMOVIDO]!
|
||||
- Drop items onto ground to create stack nodes. They do not decay.=[REMOVED].
|
||||
- Hold/repeat right-click on walls/ceilings barehanded to climb.=[REMOVED].
|
||||
- If a recipe exists, you will see a special particle effect.=[REMOVED].
|
||||
- Items picked up try to fit into the current selected slot first.=[REMOVED].
|
||||
- Larger recipes are usually more symmetrical.=[REMOVED].
|
||||
- Order and specific face of placement may matter for crafting.=[REMOVED].
|
||||
- Ores may be hidden, but revealed by subtle clues in terrain.=[REMOVED].
|
||||
- Recipes are time-based, punching faster does not speed up.=[REMOVED].
|
||||
- Sneak+drop to count out single items from stack.=[REMOVIDO].
|
||||
- Some recipes require "pummeling" a node.=[REMOVIDO].
|
||||
- Some recipes use a 3x3 "grid", laid out flat on the ground.=[REMOVIDO].
|
||||
- Stacks may be pummeled, exact item count may matter.=[REMOVIDO].
|
||||
- The game is challenging by design, sometimes frustrating. DON'T GIVE UP!=[REMOVIDO]!
|
||||
- There is NO inventory screen.=[REMOVIDO].
|
||||
- To pummel, punch a node repeatedly, WITHOUT digging.=[REMOVIDO].
|
||||
- Trouble lighting a fire? Try using longer sticks, more tinder.=¿Problemas para encender un fuego? Intente usar palos más largos, más hojas.
|
||||
- Wielded item, target face, and surrounding nodes may matter.=importantes.
|
||||
- You do not have to punch very fast (about 1 per second).=No es necesario golpear muy rápido (aproximadamente 1 golpe por segundo).
|
||||
@ -89,6 +71,7 @@ Cobble=Adoquín
|
||||
Cobble Hinged Panel=Panel de Adoquín con Bisagras
|
||||
Cobble Panel=Panel de Adoquín
|
||||
Crude Glass=Vidrio Crudo
|
||||
DEVELOPMENT VERSION=VERSIÓN DE DESARROLLO
|
||||
Dirt=Tierra
|
||||
Fire=Fuego
|
||||
Float Glass=Vidrio Flotado
|
||||
|
@ -1,4 +1,4 @@
|
||||
# textdomain: nc_api
|
||||
(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2020 から Aaron Suen <warr1024@@gmail.com>
|
||||
(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2021 から Aaron Suen <warr1024@@gmail.com>
|
||||
(and 1 more hint)=(さらに1つのヒント)
|
||||
(and @1 more hints)=(さらに@1つのヒント)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# textdomain: nc_api
|
||||
(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2020 por Aaron Suen <war1024@@gmail.com>
|
||||
(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2021 por Aaron Suen <war1024@@gmail.com>
|
||||
(and 1 more hint)=( e mais 1 dica)
|
||||
(and @1 more hints)=(e mais @1 dicas)
|
||||
- "Furnaces" are not a thing; discover smelting with open flames.=-"Fornalhas" não existem; descubra como cozinhar com chamas à céu aberto.
|
||||
@ -76,6 +76,7 @@ Cobble=Pedregulho
|
||||
Cobble Hinged Panel=Painel de Pedregulho Articulado
|
||||
Cobble Panel=Painel de Pedregulho
|
||||
Crude Glass=Vidro Bruto
|
||||
DEVELOPMENT VERSION=VERSÃO EM DESENVOLVIMENTO
|
||||
Dirt=Terra
|
||||
Eggcorn=Semente de Carvalho
|
||||
Fire=Fogo
|
||||
|
@ -1,5 +1,4 @@
|
||||
# textdomain: nc_api
|
||||
(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2020 por Aaron Suen <war1024@@gmail.com>
|
||||
(and 1 more hint)=(e mais 1 dica)
|
||||
(and @1 more hints)=(e mais @1 dica)
|
||||
- "Furnaces" are not a thing; discover smelting with open flames.=-"Fornalhas" não existem; descubra como cozinhar com chamas à céu aberto.
|
||||
@ -76,6 +75,7 @@ Cobble=Pedregulho
|
||||
Cobble Hinged Panel=Painel de Pedregulho Articulado
|
||||
Cobble Panel=Painel de Pedregulho
|
||||
Crude Glass=Vidro Bruto
|
||||
DEVELOPMENT VERSION=VERSÃO EM DESENVOLVIMENTO
|
||||
Dirt=Terra
|
||||
Eggcorn=Semente de Carvalho
|
||||
Fire=Fogo
|
||||
|
@ -1,5 +1,5 @@
|
||||
# textdomain: nc_api
|
||||
(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2020 Аарон Суэн <warr1024@@gmail.com>
|
||||
(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>=(C)2018-2021 Аарон Суэн <warr1024@@gmail.com>
|
||||
(and 1 more hint)=(и еще 1 подсказка)
|
||||
(and @1 more hints)=(и еще @1 подсказок)
|
||||
- "Furnaces" are not a thing; discover smelting with open flames.=- "Печек" тут нет; откройте для себя плавку открытым огнём.
|
||||
@ -55,6 +55,7 @@ Cobble=Булыжник
|
||||
Cobble Hinged Panel=Прикрепленная Булыжниковая Панель
|
||||
Cobble Panel=Булыжниковая Панель
|
||||
Crude Glass=Сырое стекло
|
||||
DEVELOPMENT VERSION=ВЕРСИЯ ДЛЯ РАЗРАБОТКИ
|
||||
Dirt=Грязь
|
||||
Eggcorn=Яйцезерно
|
||||
Fire=Огонь
|
||||
@ -161,7 +162,6 @@ Unknown Item=Неизвестный Предмет
|
||||
Water=Вода
|
||||
Wet Aggregate=Влажный Цемент
|
||||
Wet Sponge=Влажная Губка
|
||||
Wooden Adze=[УДАЛЕНО]
|
||||
Wooden Frame=Деревянный Каркас
|
||||
Wooden Hatchet=Деревянный Топорик
|
||||
Wooden Hatchet Head=Деревянный Обух Топорика
|
||||
|
@ -1,5 +1,5 @@
|
||||
msgid "(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgid "(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>"
|
||||
|
||||
msgid "(and 1 more hint)"
|
||||
msgstr "(and 1 more hint)"
|
||||
@ -388,8 +388,8 @@ msgstr "Cobble Panel"
|
||||
msgid "Crude Glass"
|
||||
msgstr "Crude Glass"
|
||||
|
||||
msgid "DEVELOPMENT/CONTENTDB VERSION"
|
||||
msgstr "DEVELOPMENT/CONTENTDB VERSION"
|
||||
msgid "DEVELOPMENT VERSION"
|
||||
msgstr "DEVELOPMENT VERSION"
|
||||
|
||||
msgid "Dirt"
|
||||
msgstr "Dirt"
|
||||
|
@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2020-11-20 17:39+0000\n"
|
||||
"Last-Translator: Elon_Satoshi <none1@example.org>\n"
|
||||
"PO-Revision-Date: 2021-03-11 15:03+0000\n"
|
||||
"Last-Translator: Warr1024 <warr1024@gmail.com>\n"
|
||||
"Language-Team: Spanish (American) <http://nodecore.mine.nu/trans/projects/"
|
||||
"nodecore/core/es_US/>\n"
|
||||
"Language: es_US\n"
|
||||
@ -45,9 +45,6 @@ msgid "- Trouble lighting a fire? Try using longer sticks, more tinder."
|
||||
msgstr ""
|
||||
"¿Problemas para encender un fuego? Intente usar palos más largos, más hojas."
|
||||
|
||||
msgid "- To pummel, punch a node repeatedly, WITHOUT digging."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- @1"
|
||||
msgstr "- @1"
|
||||
|
||||
@ -324,72 +321,9 @@ msgstr "Piedra con un patrón llamado \"Bricky\""
|
||||
msgid "Bricky Sandstone"
|
||||
msgstr "Arenisca con un patrón llamado \"Bricky\""
|
||||
|
||||
msgid "- Drop items onto ground to create stack nodes. They do not decay."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Do not use F5 debug info; it will mislead you!"
|
||||
msgstr "[REMOVIDO]!"
|
||||
|
||||
msgid "- Crafting is done by building recipes in-world."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Can't dig trees or grass? Search for sticks in the canopy."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- "Furnaces" are not a thing; discover smelting with open flames."
|
||||
msgstr "- No hay hornos en Nodecore; fundir con llamas abiertas."
|
||||
|
||||
msgid "(C)2018-2019 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "[REMOVIDO]"
|
||||
|
||||
msgid "- Sneak+drop to count out single items from stack."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Some recipes require "pummeling" a node."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Some recipes use a 3x3 "grid", laid out flat on the ground."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Stacks may be pummeled, exact item count may matter."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Stuck in a pit? Hold right-click on surfaces barehanded to climb."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Stuck in a pit? Pummel surfaces barehanded to find places to climb."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- The game is challenging by design, sometimes frustrating. DON'T GIVE UP!"
|
||||
msgstr "[REMOVIDO]!"
|
||||
|
||||
msgid "- There is NO inventory screen."
|
||||
msgstr "[REMOVIDO]."
|
||||
|
||||
msgid "- Recipes are time-based, punching faster does not speed up."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Ores may be hidden, but revealed by subtle clues in terrain."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Order and specific face of placement may matter for crafting."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Larger recipes are usually more symmetrical."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Items picked up try to fit into the current selected slot first."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- If a recipe exists, you will see a special particle effect."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Hold/repeat right-click on walls/ceilings barehanded to climb."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Drop items onto ground to create stack nodes. They do not decay."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- DONE: @1"
|
||||
msgstr "- LISTO: @1"
|
||||
|
||||
@ -677,3 +611,6 @@ msgstr "Cabeza de Hacha de Madera"
|
||||
|
||||
msgid "Wooden Hatchet"
|
||||
msgstr "Hacha de Madera"
|
||||
|
||||
msgid "(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2021 por Aaron Suen <warr1024@@gmail.com>"
|
||||
|
@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2020-01-12 16:26+0000\n"
|
||||
"Last-Translator: Weblate Admin <warr1024@gmail.com>\n"
|
||||
"PO-Revision-Date: 2021-03-11 15:03+0000\n"
|
||||
"Last-Translator: Warr1024 <warr1024@gmail.com>\n"
|
||||
"Language-Team: Japanese <http://nodecore.mine.nu/trans/projects/nodecore/"
|
||||
"core/ja/>\n"
|
||||
"Language: ja\n"
|
||||
@ -9,7 +9,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 3.8\n"
|
||||
"X-Generator: Weblate 4.0.4\n"
|
||||
|
||||
msgid "(and @1 more hints)"
|
||||
msgstr "(さらに@1つのヒント)"
|
||||
@ -22,3 +22,6 @@ msgstr "(C)2018-2019 から Aaron Suen <warr1024@@gmail.com>"
|
||||
|
||||
msgid "(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2020 から Aaron Suen <warr1024@@gmail.com>"
|
||||
|
||||
msgid "(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2021 から Aaron Suen <warr1024@@gmail.com>"
|
||||
|
@ -3,8 +3,8 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-09-12 14:44+0000\n"
|
||||
"PO-Revision-Date: 2020-04-21 13:55+0000\n"
|
||||
"Last-Translator: Weblate Admin <warr1024@gmail.com>\n"
|
||||
"PO-Revision-Date: 2021-03-11 15:03+0000\n"
|
||||
"Last-Translator: Warr1024 <warr1024@gmail.com>\n"
|
||||
"Language-Team: Portuguese <http://nodecore.mine.nu/trans/projects/nodecore/"
|
||||
"core/pt/>\n"
|
||||
"Language: pt\n"
|
||||
@ -12,7 +12,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 3.8\n"
|
||||
"X-Generator: Weblate 4.0.4\n"
|
||||
|
||||
msgid "(C)2018-2019 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2019 por Aaron Suen <war1024@@gmail.com>"
|
||||
@ -632,14 +632,11 @@ msgstr "(e mais @1 dicas)"
|
||||
msgid "(and 1 more hint)"
|
||||
msgstr "( e mais 1 dica)"
|
||||
|
||||
msgid "pack leaves into peat"
|
||||
msgstr "[REMOVED]"
|
||||
|
||||
msgid "- Stuck in a pit? Pummel surfaces barehanded to find places to climb."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "Adze"
|
||||
msgstr "Enxó"
|
||||
|
||||
msgid "(C)2018-2020 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2020 por Aaron Suen <war1024@@gmail.com>"
|
||||
|
||||
msgid "(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2021 por Aaron Suen <war1024@@gmail.com>"
|
||||
|
@ -630,9 +630,6 @@ msgid "- The game is challenging by design, sometimes frustrating. DON'T GIVE UP
|
||||
msgstr ""
|
||||
"- O jogo é feito para ser desafiante, algumas fezes frustrante. NÃO DESISTA!"
|
||||
|
||||
msgid "- Stuck in a pit? Pummel surfaces barehanded to find places to climb."
|
||||
msgstr "[REMOVED]."
|
||||
|
||||
msgid "- Ores may be hidden, but revealed by subtle clues in terrain."
|
||||
msgstr ""
|
||||
"- Minérios talvez estejam escondidos, mas podem ser revelados por dicas "
|
||||
@ -942,12 +939,6 @@ msgstr ""
|
||||
msgid "chop a lode rod back into bars"
|
||||
msgstr "martele uma haste de veio mineral de volta em barras"
|
||||
|
||||
msgid "pack leaves into peat"
|
||||
msgstr "[REMOVED]"
|
||||
|
||||
msgid "chop lode a rod back into bars"
|
||||
msgstr "[REMOVED]"
|
||||
|
||||
msgid "Adze"
|
||||
msgstr "Enxó"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2020-10-18 16:25+0000\n"
|
||||
"PO-Revision-Date: 2021-03-11 15:03+0000\n"
|
||||
"Last-Translator: Warr1024 <warr1024@gmail.com>\n"
|
||||
"Language-Team: Russian <http://nodecore.mine.nu/trans/projects/nodecore/core/"
|
||||
"ru/>\n"
|
||||
@ -174,42 +174,6 @@ msgstr "Активная Линза"
|
||||
msgid "About"
|
||||
msgstr "Об игре"
|
||||
|
||||
msgid "...have you broken cobble into chips yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you bashed a plank into sticks yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled an annealed lode tote handle yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled an adze out of sticks yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled a wooden tool yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled a wooden shelf yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled a wooden ladder yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled a wooden frame yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you assembled a staff from sticks yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you activated a lens yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...and @1 more hints..."
|
||||
msgstr "[УДАЛЕНО]."
|
||||
|
||||
msgid "...and 1 more hint..."
|
||||
msgstr "[УДАЛЕНО]."
|
||||
|
||||
msgid "- You do not have to punch very fast (about 1 per second)."
|
||||
msgstr "- Ударять нужно не так часто (около 1 удара в секунду)."
|
||||
|
||||
@ -229,9 +193,6 @@ msgstr "- Экрана инвентаря НЕТ."
|
||||
msgid "- The game is challenging by design, sometimes frustrating. DON'T GIVE UP!"
|
||||
msgstr "- Игра сложная по задумке, иногда разочаровывает. НЕ СДАВАЙТЕСЬ!"
|
||||
|
||||
msgid "- Stuck in a pit? Pummel surfaces barehanded to find places to climb."
|
||||
msgstr "[УДАЛЕНО]."
|
||||
|
||||
msgid "- Stuck in a pit? Hold right-click on surfaces barehanded to climb."
|
||||
msgstr ""
|
||||
"- Застряли? Удерживайте ПКМ на поверхностях с голыми руками чтобы лазать."
|
||||
@ -265,9 +226,6 @@ msgstr "- Если рецепт существует, вы увидите спе
|
||||
msgid "- Drop items onto ground to create stack nodes. They do not decay."
|
||||
msgstr "- Бросайте вещи на землю чтобы создать стак-ноды. Они не исчезают."
|
||||
|
||||
msgid "- Drop items onto ground to create stack nodes. They do not decay."
|
||||
msgstr "[УДАЛЕНО]."
|
||||
|
||||
msgid "- DONE: @1"
|
||||
msgstr "- ЗАВЕРШЕНО: @1"
|
||||
|
||||
@ -292,165 +250,24 @@ msgstr "(и еще 1 подсказка)"
|
||||
msgid "(C)2018-2019 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2019 Аарон Суэн <warr1024@@gmail.com>"
|
||||
|
||||
msgid "...have you carved a wooden plank completely yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you carved wooden tool heads from planks yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you chipped chromatic glass into prisms yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you chopped a lode cube into prills yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you chopped chromatic glass into lenses yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you made fire by rubbing sticks together yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you chopped up charcoal yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you put a stone tip onto a tool yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you cold-forged an annealed lode tool head yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you cold-forged lode down completely yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "Loose Humus"
|
||||
msgstr "Рыхлый Гумус"
|
||||
|
||||
msgid "...have you cooled molten glass into crude glass yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "Loose Lode Cobble"
|
||||
msgstr "Рыхлый Булыжник с Металлом"
|
||||
|
||||
msgid "MIT License (http://www.opensource.org/licenses/MIT)"
|
||||
msgstr "Лицензия MIT (http://www.opensource.org/licenses/MIT)"
|
||||
|
||||
msgid "...have you cut down a tree yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "Not all game content is covered by hints. Explore!"
|
||||
msgstr "Не вся игра покрыта подсказками. Исследуйте!"
|
||||
|
||||
msgid "...have you dug up a tree stump yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you dug up dirt yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you dug up gravel yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you dug up lode ore yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you dug up sand yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you dug up stone yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found a lode stratum yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found ash yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found charcoal yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found deep stone strata yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found dry leaves yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found eggcorns yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found lode ore yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found molten rock yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found sponges yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you found sticks yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you melted down lode metal yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you melted sand into glass yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you molded molten glass into clear glass yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you packed high-quality charcoal yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you packed stone chips back into cobble yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you planted an eggcorn yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you produced light from a lens yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you quenched molten glass into chromatic glass yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you sintered glowing lode into a cube yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you split a tree trunk into planks yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you tempered a lode anvil yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you tempered a lode tool head yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "...have you welded a lode pick and spade together yet?"
|
||||
msgstr "[УДАЛЕНО]?"
|
||||
|
||||
msgid "Discord: https://discord.gg/SHq2tkb"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "GitLab: https://gitlab.com/sztest/nodecore"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Glowing Lode Hatchet"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Glowing Lode Mallet"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Gated Prism"
|
||||
msgstr "Призма-Вентиль"
|
||||
|
||||
msgid "Eggcorn"
|
||||
msgstr "Яйцезерно"
|
||||
|
||||
msgid "Glowing Lode Mattock"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Glowing Lode Pick"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Burn"
|
||||
msgstr "Ожог"
|
||||
|
||||
@ -463,9 +280,6 @@ msgstr "GitLab: https://gitlab.com/sztest/nodecore"
|
||||
msgid "DEVELOPMENT VERSION"
|
||||
msgstr "ВЕРСИЯ ДЛЯ РАЗРАБОТКИ"
|
||||
|
||||
msgid "Glowing Lode Spade"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Infused Annealed Lode Pick"
|
||||
msgstr "Заряженная Обожжённая Металлическая Кирка"
|
||||
|
||||
@ -481,9 +295,6 @@ msgstr "Заряжённая Закалённая Металлическая К
|
||||
msgid "See included LICENSE file for full details and credits"
|
||||
msgstr "См. детали и кредиты в файле LICENSE"
|
||||
|
||||
msgid "Teleport to get unstuck (but you can't bring your items)"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Tempered Lode Hatchet Head"
|
||||
msgstr "Закалённый Металлический Обух Топорика"
|
||||
|
||||
@ -629,18 +440,12 @@ msgstr "Булыжник с Люксом"
|
||||
msgid "Lux Flow"
|
||||
msgstr "Поток Люкса"
|
||||
|
||||
msgid "MIT License: http://www.opensource.org/licenses/MIT"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Molten Glass"
|
||||
msgstr "Расплавленное Стекло"
|
||||
|
||||
msgid "Molten Rock"
|
||||
msgstr "Расплавленный Камень"
|
||||
|
||||
msgid "Not all game content is covered by hints. Explore!"
|
||||
msgstr "[УДАЛЕНО]!"
|
||||
|
||||
msgid "Peat"
|
||||
msgstr "Торф"
|
||||
|
||||
@ -761,9 +566,6 @@ msgstr "Рукоять Сумки"
|
||||
msgid "Tree Trunk"
|
||||
msgstr "Ствол Дерева"
|
||||
|
||||
msgid "Version"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Water"
|
||||
msgstr "Вода"
|
||||
|
||||
@ -773,9 +575,6 @@ msgstr "Влажный Цемент"
|
||||
msgid "Wet Sponge"
|
||||
msgstr "Влажная Губка"
|
||||
|
||||
msgid "Wooden Adze"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "Wooden Frame"
|
||||
msgstr "Деревянный Каркас"
|
||||
|
||||
@ -869,9 +668,6 @@ msgstr "выкуйте холодный металл до конца"
|
||||
msgid "cool molten glass into crude glass"
|
||||
msgstr "остудите расплавленное стекло в рыхлое стекло"
|
||||
|
||||
msgid "chop lode a rod back into bars"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "craft a torch from staff and coal lump"
|
||||
msgstr "скрафтите факел из жезла и кусочка угля"
|
||||
|
||||
@ -971,9 +767,6 @@ msgstr "наблюдайте критичность люкса"
|
||||
msgid "pack high-quality charcoal"
|
||||
msgstr "соберите высококачественный уголь"
|
||||
|
||||
msgid "pack leaves into peat"
|
||||
msgstr "[УДАЛЕНО]"
|
||||
|
||||
msgid "plant an eggcorn"
|
||||
msgstr "посадите яйцезерно"
|
||||
|
||||
@ -1131,3 +924,30 @@ msgstr ""
|
||||
msgid "- Do not use F5 debug info; it will mislead you!"
|
||||
msgstr ""
|
||||
"- Не используйте отладочную информацию F5; Она введет вас в заблуждение!"
|
||||
|
||||
msgid "- If it takes more than 5 seconds to dig, you don't have the right tool."
|
||||
msgstr ""
|
||||
|
||||
msgid "Adobe Mix"
|
||||
msgstr ""
|
||||
|
||||
msgid "Annealed Lode Adze"
|
||||
msgstr ""
|
||||
|
||||
msgid "Annealed Lode Rake"
|
||||
msgstr ""
|
||||
|
||||
msgid "Adobe"
|
||||
msgstr ""
|
||||
|
||||
msgid "Adobe Bricks"
|
||||
msgstr ""
|
||||
|
||||
msgid "@1 ....."
|
||||
msgstr ""
|
||||
|
||||
msgid "Bindy"
|
||||
msgstr ""
|
||||
|
||||
msgid "(C)2018-2021 by Aaron Suen <warr1024@@gmail.com>"
|
||||
msgstr "(C)2018-2021 Аарон Суэн <warr1024@@gmail.com>"
|
||||
|
20
mods/nc_api/register_backfaces.lua
Normal file
@ -0,0 +1,20 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, pairs, type
|
||||
= minetest, pairs, type
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local oldreg = minetest.register_item
|
||||
function minetest.register_item(name, def, ...)
|
||||
if def.backface_culling == nil or not def.tiles then
|
||||
return oldreg(name, def, ...)
|
||||
end
|
||||
local t = {}
|
||||
for k, v in pairs(def.tiles) do
|
||||
t[k] = (type(v) == "string") and {
|
||||
name = v,
|
||||
backface_culling = def.backface_culling
|
||||
} or v
|
||||
end
|
||||
def.tiles = t
|
||||
return oldreg(name, def, ...)
|
||||
end
|
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 85 B |
@ -6,11 +6,13 @@ local math_ceil
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local function getphealth(player)
|
||||
if not (player and player.is_player and player:is_player()) then return 0 end
|
||||
return player:get_hp() + player:get_meta():get_float("dhp")
|
||||
end
|
||||
nodecore.getphealth = getphealth
|
||||
|
||||
local function setphealth(player, hp, reason, minwhole)
|
||||
if not (player and player.is_player and player:is_player()) then return end
|
||||
local hpmax = player:get_properties().hp_max
|
||||
if hp > hpmax then hp = hpmax end
|
||||
if hp < 0 then hp = 0 end
|
||||
|
@ -1,8 +1,6 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local ItemStack, getmetatable, math, minetest, nodecore, pairs, string,
|
||||
vector
|
||||
= ItemStack, getmetatable, math, minetest, nodecore, pairs, string,
|
||||
vector
|
||||
local ItemStack, math, minetest, nodecore, pairs, string, vector
|
||||
= ItemStack, math, minetest, nodecore, pairs, string, vector
|
||||
local math_cos, math_floor, math_pi, math_random, math_sin,
|
||||
string_format
|
||||
= math.cos, math.floor, math.pi, math.random, math.sin,
|
||||
@ -219,32 +217,3 @@ function nodecore.inventory_dump(player)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local keeppriv = "keepinv"
|
||||
minetest.register_privilege(keeppriv, {
|
||||
description = "Allow player to keep inventory on teleport",
|
||||
give_to_singleplayer = false,
|
||||
give_to_admin = false
|
||||
})
|
||||
|
||||
local telefunc = minetest.registered_chatcommands.teleport
|
||||
telefunc = telefunc and telefunc.func
|
||||
if telefunc then
|
||||
minetest.registered_chatcommands.teleport.func = function(...)
|
||||
local anyplayer = minetest.get_connected_players()[1]
|
||||
local meta = anyplayer and getmetatable(anyplayer)
|
||||
local oldsetpos = meta and meta.set_pos
|
||||
if not oldsetpos then return telefunc(...) end
|
||||
meta.set_pos = function(player, ...)
|
||||
if not minetest.check_player_privs(player, keeppriv) then
|
||||
nodecore.inventory_dump(player)
|
||||
end
|
||||
return oldsetpos(player, ...)
|
||||
end
|
||||
local function helper(...)
|
||||
meta.set_pos = oldsetpos
|
||||
return ...
|
||||
end
|
||||
return helper(telefunc(...))
|
||||
end
|
||||
end
|
||||
|
@ -16,10 +16,14 @@ minetest.register_on_mods_loaded(function() loadtimeover = true end)
|
||||
local prefix = minetest.translate(modname, "x")
|
||||
prefix = prefix:sub(1, prefix:find(modname) - 1)
|
||||
|
||||
local passthru = "@1"
|
||||
|
||||
function nodecore.translate_inform(str)
|
||||
if (not str) or (type(str) ~= "string") or (not string_match(str, "%S"))
|
||||
or (str:sub(1, #prefix) == prefix) then return end
|
||||
|
||||
if str == passthru then return true end
|
||||
|
||||
if not strings[str] then
|
||||
if loadtimeover then
|
||||
nodecore.log("warning", string_format(
|
||||
@ -38,6 +42,10 @@ function nodecore.translate(str, ...)
|
||||
return minetest.translate(modname, str, ...)
|
||||
end
|
||||
|
||||
function nodecore.notranslate(str)
|
||||
return nodecore.translate(passthru, str)
|
||||
end
|
||||
|
||||
if nodecore.infodump() then
|
||||
nodecore.register_globalstep("translate templates", function()
|
||||
if not strings_dirty then return end
|
||||
|
63
mods/nc_api_active/abminvert.lua
Normal file
@ -0,0 +1,63 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local ipairs, math, minetest, nodecore, pairs
|
||||
= ipairs, math, minetest, nodecore, pairs
|
||||
local math_random
|
||||
= math.random
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local queue
|
||||
local function process()
|
||||
local expire = minetest.get_us_time() * 200000
|
||||
local batch = {}
|
||||
for _, v in pairs(queue) do batch[#batch + 1] = v end
|
||||
queue = nil
|
||||
for i = #batch, 2, -1 do
|
||||
local j = math_random(1, i)
|
||||
if j ~= i then
|
||||
local x = batch[i]
|
||||
batch[i] = batch[j]
|
||||
batch[j] = x
|
||||
end
|
||||
end
|
||||
for i = 1, #batch do
|
||||
if minetest.get_us_time() > expire then
|
||||
nodecore.log("warning", "skipping " .. (#batch - i + 1)
|
||||
.. " inverted ABM actions due to time budget")
|
||||
return
|
||||
end
|
||||
local v = batch[i]
|
||||
local nnode = minetest.get_node(v.pos)
|
||||
if nnode.name == v.node.name then
|
||||
v.action(v.pos, nnode)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local hash = minetest.hash_node_position
|
||||
|
||||
local oldreg = minetest.register_abm
|
||||
function minetest.register_abm(def, ...)
|
||||
if not def.neighbors_invert then return oldreg(def, ...) end
|
||||
|
||||
local nnames = def.nodenames
|
||||
def.nodenames = def.neighbors
|
||||
def.neighbors = nnames
|
||||
|
||||
local oldact = def.action
|
||||
|
||||
function def.action(pos)
|
||||
if not queue then
|
||||
queue = {}
|
||||
minetest.after(0, process)
|
||||
end
|
||||
for _, npos in ipairs(nodecore.find_nodes_around(pos, nnames, 1)) do
|
||||
queue[hash(pos)] = {
|
||||
pos = npos,
|
||||
node = minetest.get_node(npos),
|
||||
action = oldact
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return oldreg(def, ...)
|
||||
end
|
@ -1,8 +1,8 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, pairs, rawset, table
|
||||
= minetest, nodecore, pairs, rawset, table
|
||||
local table_concat
|
||||
= table.concat
|
||||
local minetest, nodecore, pairs, rawset, string, table
|
||||
= minetest, nodecore, pairs, rawset, string, table
|
||||
local string_format, table_concat
|
||||
= string.format, table.concat
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local muxdefs = {}
|
||||
@ -37,6 +37,33 @@ local muxidx = nodecore.item_matching_index(muxdefs,
|
||||
function(n, i) return i.muxkey .. n end
|
||||
)
|
||||
|
||||
local nodes = 0
|
||||
local actions = 0
|
||||
local players = 0
|
||||
local started = minetest.get_us_time() / 1000000
|
||||
local function statistics()
|
||||
local now = minetest.get_us_time() / 1000000
|
||||
local elapsed = now - started
|
||||
started = now
|
||||
if actions > 0 then
|
||||
nodecore.log("action", string_format("ABM average"
|
||||
.. " %0.2f actions for %0.2f nodes"
|
||||
.. " with %0.2f players per second",
|
||||
actions / elapsed, nodes / elapsed,
|
||||
players / elapsed))
|
||||
end
|
||||
nodes = 0
|
||||
actions = 0
|
||||
players = 0
|
||||
minetest.after(300, statistics)
|
||||
end
|
||||
minetest.after(300, statistics)
|
||||
local function pcount()
|
||||
players = players + #minetest.get_connected_players()
|
||||
minetest.after(1, pcount)
|
||||
end
|
||||
minetest.after(1, pcount)
|
||||
|
||||
local oldreg = minetest.register_abm
|
||||
function minetest.register_abm(def)
|
||||
local rawkey = table_concat({
|
||||
@ -72,13 +99,16 @@ function minetest.register_abm(def)
|
||||
neighbors = def.neighbors,
|
||||
nodenames = {"group:abmmux_" .. muxkey},
|
||||
action = function(pos, node, ...)
|
||||
nodes = nodes + 1
|
||||
local oldname = node.name
|
||||
local found = muxidx[muxkey .. oldname]
|
||||
if not found then return warnunused(oldname) end
|
||||
actions = actions + 1
|
||||
found[1].action(pos, node, ...)
|
||||
if #found <= 1 then return end
|
||||
for i = 2, #found do
|
||||
if minetest.get_node(pos).name ~= oldname then return end
|
||||
actions = actions + 1
|
||||
found[i].action(pos, node, ...)
|
||||
end
|
||||
end
|
||||
|
@ -63,30 +63,33 @@ local function dntsave(pos, meta, data)
|
||||
local min
|
||||
local run = {}
|
||||
local reg = nodecore.registered_dnts
|
||||
local any
|
||||
for k, v in pairs(data) do
|
||||
if k then
|
||||
v = v - el
|
||||
if v < 0 then
|
||||
local def = reg[k]
|
||||
if def then
|
||||
local def = reg[k]
|
||||
if not def then
|
||||
-- clear deprecated dnts
|
||||
data[k] = nil
|
||||
else
|
||||
if v < 0 then
|
||||
if def.ignore_stasis or not nodecore.stasis then
|
||||
run[def] = true
|
||||
v = def.loop and def.time or nil
|
||||
else
|
||||
-- auto-defer while on stasis
|
||||
v = def.time and (def.time < 1) and def.time or 1
|
||||
end
|
||||
data[k] = v
|
||||
if (not min) or (min < v) then min = v end
|
||||
end
|
||||
else
|
||||
data[k] = v
|
||||
if (not min) or (min < v) then min = v end
|
||||
any = any or v
|
||||
if v and ((not min) or (min < v)) then min = v end
|
||||
end
|
||||
end
|
||||
end
|
||||
data[false] = now
|
||||
|
||||
meta:set_string(dntkey, minetest.serialize(data))
|
||||
meta:set_string(dntkey, any and minetest.serialize(data) or "")
|
||||
if min then minetest.get_node_timer(pos):start(min) end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
|
@ -139,9 +139,14 @@ end
|
||||
|
||||
local function player_wield_light(player)
|
||||
local glow = 0
|
||||
for _, stack in pairs(player:get_inventory():get_list("main")) do
|
||||
local srcidx, srcstack
|
||||
for idx, stack in pairs(player:get_inventory():get_list("main")) do
|
||||
local src = lightsrc(stack)
|
||||
if src > glow then glow = src end
|
||||
if src > glow then
|
||||
glow = src
|
||||
srcidx = idx
|
||||
srcstack = stack:get_name()
|
||||
end
|
||||
end
|
||||
if glow < 1 then return end
|
||||
local pos = player:get_pos()
|
||||
@ -153,7 +158,9 @@ local function player_wield_light(player)
|
||||
if not pl then return end
|
||||
local pp = pl:get_pos()
|
||||
pp.y = pp.y + pl:get_properties().eye_height
|
||||
return vector.equals(pos, vector.round(pp))
|
||||
if not vector.equals(pos, vector.round(pp)) then return end
|
||||
return pl:get_inventory():get_stack("main", srcidx)
|
||||
:get_name() == srcstack
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -8,6 +8,7 @@ nodecore.amcoremod()
|
||||
nodecore.register_limited_abm = function(...) return minetest.register_abm(...) end
|
||||
|
||||
include("abmmux")
|
||||
include("abminvert")
|
||||
include("stasis")
|
||||
include("dnts")
|
||||
include("aism")
|
||||
|
@ -93,6 +93,14 @@ minetest.register_entity(":__builtin:falling_node", {
|
||||
return
|
||||
end
|
||||
|
||||
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||
local node = minetest.get_node(below)
|
||||
local def = minetest.registered_nodes[node.name] or {}
|
||||
if def.groups and def.groups.is_stack_only then
|
||||
minetest.dig_node(below)
|
||||
return
|
||||
end
|
||||
|
||||
displace_check(pos)
|
||||
|
||||
nodecore.set_loud(pos, self.node)
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 300 B |
@ -1,6 +1,6 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, pairs, type
|
||||
= minetest, nodecore, pairs, type
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
nodecore.amcoremod()
|
||||
@ -60,12 +60,7 @@ nodecore.register_on_register_item(function(_, def)
|
||||
def.drawtype = "mesh"
|
||||
def.visual_scale = nodecore.z_fight_ratio
|
||||
def.mesh = def.mesh or modname .. "_box.obj"
|
||||
local t = def.tiles or {}
|
||||
for k, v in pairs(t) do
|
||||
if type(v) == "string" then
|
||||
t[k] = {name = v, backface_culling = true}
|
||||
end
|
||||
end
|
||||
def.backface_culling = true
|
||||
def.use_texture_alpha = def.use_texture_alpha or "clip"
|
||||
end
|
||||
|
||||
|
@ -1,91 +1,86 @@
|
||||
# Blender v2.79 (sub 0) OBJ File: 'nc_api_storebox_box.blend'
|
||||
# www.blender.org
|
||||
mtllib nc_api_storebox_box.mtl
|
||||
o Cube
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.437500
|
||||
v 0.500000 -0.500000 0.437500
|
||||
v -0.500000 -0.500000 0.437500
|
||||
v -0.500000 -0.500000 -0.437500
|
||||
v 0.500000 0.500000 -0.437500
|
||||
v 0.500000 0.500000 0.437500
|
||||
v -0.500000 0.500000 0.437500
|
||||
v -0.500000 0.500000 -0.437500
|
||||
v 0.437500 -0.500000 -0.500000
|
||||
v 0.437500 -0.500000 0.500000
|
||||
v -0.437500 -0.500000 0.500000
|
||||
v -0.437500 -0.500000 -0.500000
|
||||
v 0.437500 0.500000 -0.500000
|
||||
v 0.437500 0.500000 0.500000
|
||||
v -0.437500 0.500000 0.500000
|
||||
v -0.437500 0.500000 -0.500000
|
||||
v 0.500000 -0.437500 -0.500000
|
||||
v 0.500000 -0.437500 0.500000
|
||||
v -0.500000 -0.437500 0.500000
|
||||
v -0.500000 -0.437500 -0.500000
|
||||
v 0.500000 0.437500 -0.500000
|
||||
v 0.500000 0.437500 0.500000
|
||||
v -0.500000 0.437500 0.500000
|
||||
v -0.500000 0.437500 -0.500000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 -0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
g Cube_Cube_sides
|
||||
usemtl sides
|
||||
v 0.5 -0.5 -0.5
|
||||
v 0.5 -0.5 0.5
|
||||
v -0.5 -0.5 0.5
|
||||
v -0.5 -0.5 -0.5
|
||||
v 0.5 0.5 -0.5
|
||||
v 0.5 0.5 0.5
|
||||
v -0.5 0.5 0.5
|
||||
v -0.5 0.5 -0.5
|
||||
v 0.5 -0.5 -0.4375
|
||||
v 0.5 -0.5 0.4375
|
||||
v -0.5 -0.5 0.4375
|
||||
v -0.5 -0.5 -0.4375
|
||||
v 0.5 0.5 -0.4375
|
||||
v 0.5 0.5 0.4375
|
||||
v -0.5 0.5 0.4375
|
||||
v -0.5 0.5 -0.4375
|
||||
v 0.4375 -0.5 -0.5
|
||||
v 0.4375 -0.5 0.5
|
||||
v -0.4375 -0.5 0.5
|
||||
v -0.4375 -0.5 -0.5
|
||||
v 0.4375 0.5 -0.5
|
||||
v 0.4375 0.5 0.5
|
||||
v -0.4375 0.5 0.5
|
||||
v -0.4375 0.5 -0.5
|
||||
v 0.5 -0.4375 -0.5
|
||||
v 0.5 -0.4375 0.5
|
||||
v -0.5 -0.4375 0.5
|
||||
v -0.5 -0.4375 -0.5
|
||||
v 0.5 0.4375 -0.5
|
||||
v 0.5 0.4375 0.5
|
||||
v -0.5 0.4375 0.5
|
||||
v -0.5 0.4375 -0.5
|
||||
vt 1 0
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vt 0 0
|
||||
vt 1 0
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vt 0 0
|
||||
vt 1 0
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vt 0 0
|
||||
vt 0 1
|
||||
vt 0 0
|
||||
vt 1 0
|
||||
vt 1 1
|
||||
vt 1 0
|
||||
vt 0 0
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 1 0
|
||||
vt 0 0
|
||||
vt 1 0
|
||||
vt 0 0
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 1 0
|
||||
vt 0 0
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 1 0
|
||||
vt 0 0
|
||||
vt 0 0
|
||||
vt 1 0
|
||||
vt 0 0
|
||||
vt 0 1
|
||||
vt 1 1
|
||||
vt 1 0
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 0 -1
|
||||
vn 0 -1 0
|
||||
vn 0 1 0
|
||||
g 1
|
||||
s off
|
||||
f 1/1/1 5/2/1 6/3/1 2/4/1
|
||||
f 2/5/2 6/6/2 7/7/2 3/8/2
|
||||
@ -95,11 +90,9 @@ f 10/17/4 11/18/4 15/19/4 14/20/4
|
||||
f 13/21/2 16/22/2 12/23/2 9/24/2
|
||||
f 17/25/3 18/26/3 22/27/3 21/28/3
|
||||
f 19/29/1 20/30/1 24/31/1 23/32/1
|
||||
g Cube_Cube_bottom
|
||||
usemtl bottom
|
||||
g 2
|
||||
f 1/33/5 2/4/5 3/9/5 4/34/5
|
||||
f 25/35/6 28/36/6 27/37/6 26/38/6
|
||||
g Cube_Cube_top
|
||||
usemtl top
|
||||
g 3
|
||||
f 5/39/6 8/40/6 7/10/6 6/3/6
|
||||
f 29/41/5 30/42/5 31/43/5 32/44/5
|
||||
|
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 89 B |
@ -1,6 +1,8 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore, pairs, vector
|
||||
= minetest, nodecore, pairs, vector
|
||||
local math, minetest, nodecore, pairs, vector
|
||||
= math, minetest, nodecore, pairs, vector
|
||||
local math_random
|
||||
= math.random
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
nodecore.amcoremod()
|
||||
@ -86,6 +88,24 @@ minetest.register_entity(entname, {
|
||||
itemcheck = itemcheck
|
||||
})
|
||||
|
||||
local check_retry
|
||||
local function check_retry_add(key, val)
|
||||
if not check_retry then
|
||||
check_retry = {}
|
||||
minetest.after(1 + math_random(), function()
|
||||
local total = 0
|
||||
for k, v in pairs(check_retry) do
|
||||
total = total + 1
|
||||
check_queue[k] = v
|
||||
end
|
||||
check_queue_dirty = true
|
||||
check_retry = nil
|
||||
nodecore.log("warning", "visinv entity retry: " .. total)
|
||||
end)
|
||||
end
|
||||
check_retry[key] = val
|
||||
end
|
||||
|
||||
nodecore.register_globalstep("visinv check", function()
|
||||
if not check_queue_dirty then return end
|
||||
local batch = check_queue
|
||||
@ -117,6 +137,8 @@ nodecore.register_globalstep("visinv check", function()
|
||||
ent.is_stack = true
|
||||
ent.poskey = poskey
|
||||
itemcheck(ent)
|
||||
else
|
||||
check_retry_add(poskey, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -155,6 +177,14 @@ nodecore.register_lbm({
|
||||
action = function(...) return nodecore.visinv_update_ents(...) end
|
||||
})
|
||||
|
||||
nodecore.register_abm({
|
||||
label = "visinv check",
|
||||
interval = 2,
|
||||
chance = 1,
|
||||
nodenames = {"group:visinv"},
|
||||
action = function(...) return nodecore.visinv_update_ents(...) end
|
||||
})
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- DIG INVENTORY
|
||||
|
||||
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 135 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 77 B |
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 147 B |
@ -75,7 +75,7 @@ nodecore.register_globalstep("door conveyance", function()
|
||||
if not nonheads[k] then
|
||||
local seg = {}
|
||||
local u = v
|
||||
while u do
|
||||
while u and not seg[u] do
|
||||
seg[u] = true
|
||||
u = conveytrace(okay, seg, u, collide)
|
||||
end
|
||||
|
@ -37,12 +37,14 @@ function nodecore.register_door(basemod, basenode, desc, pin, lv)
|
||||
end)
|
||||
|
||||
local doorname = modname .. ":door_" .. basenode
|
||||
local groups = nodecore.underride({door_panel = lv}, basedef.groups)
|
||||
local paneldef = nodecore.underride({}, {
|
||||
name = modname .. ":panel_" .. basenode,
|
||||
description = (desc or basedef.description) .. " Panel",
|
||||
tiles = tiles,
|
||||
paramtype2 = "facedir",
|
||||
silktouch = false,
|
||||
groups = groups,
|
||||
on_rightclick = function(pos, node, clicker, stack, pointed, ...)
|
||||
if nodecore.protection_test(pos, clicker) then return end
|
||||
stack = stack and ItemStack(stack)
|
||||
@ -78,7 +80,7 @@ function nodecore.register_door(basemod, basenode, desc, pin, lv)
|
||||
.. "_mask.png^[transform" .. v.tran .. ")"
|
||||
end
|
||||
|
||||
local groups = nodecore.underride({door = lv}, basedef.groups)
|
||||
groups = nodecore.underride({door = lv}, basedef.groups)
|
||||
local doordef = nodecore.underride({
|
||||
name = doorname,
|
||||
description = (desc or basedef.description) .. " Hinged Panel",
|
||||
@ -118,7 +120,8 @@ nodecore.register_door("nc_woodwork", "plank", "Wooden", "nc_woodwork:staff", 2)
|
||||
nodecore.register_door("nc_terrain", "cobble", "Cobble", "nc_lode:rod_tempered", 3)
|
||||
|
||||
for k, v in pairs(minetest.registered_nodes) do
|
||||
if v.groups and v.groups.stone_bricks == 2 then
|
||||
if v.groups and v.groups.stone_bricks == 2
|
||||
and not (v.groups.door or v.groups.door_panel) then
|
||||
nodecore.register_door(
|
||||
k:gsub(":.*", ""),
|
||||
k:gsub(".*:", ""),
|
||||
|
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 109 B |
@ -1,29 +1,20 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local ipairs, math, minetest, nodecore, pairs, string, vector
|
||||
= ipairs, math, minetest, nodecore, pairs, string, vector
|
||||
local math_random, string_format
|
||||
= math.random, string.format
|
||||
local ipairs, math, minetest, nodecore, pairs, vector
|
||||
= ipairs, math, minetest, nodecore, pairs, vector
|
||||
local math_random
|
||||
= math.random
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
do
|
||||
local flamedirs = nodecore.dirs()
|
||||
local embers = {}
|
||||
minetest.after(0, function()
|
||||
for k, v in pairs(minetest.registered_items) do
|
||||
if v.groups.ember then
|
||||
embers[k] = true
|
||||
end
|
||||
end
|
||||
end)
|
||||
nodecore.register_limited_abm({
|
||||
label = "fire consume",
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
nodenames = {modname .. ":fire"},
|
||||
action = function(pos)
|
||||
if math_random(1, 5) == 1 then
|
||||
local sparks = {}
|
||||
local sparkqty = 0
|
||||
local sparkmax = 50
|
||||
nodecore.register_globalstep("fire sparks", function()
|
||||
if sparkqty < 1 then return end
|
||||
for i = 1, #sparks do
|
||||
local pos = sparks[i]
|
||||
minetest.after(math_random(), function()
|
||||
minetest.add_particlespawner({
|
||||
amount = math_random(1, 3),
|
||||
time = 1,
|
||||
@ -42,6 +33,36 @@ do
|
||||
texture = "nc_fire_spark.png",
|
||||
glow = math_random(5, 9)
|
||||
})
|
||||
end)
|
||||
end
|
||||
sparks = {}
|
||||
sparkqty = 0
|
||||
end)
|
||||
|
||||
do
|
||||
local flamedirs = nodecore.dirs()
|
||||
local embers = {}
|
||||
minetest.after(0, function()
|
||||
for k, v in pairs(minetest.registered_items) do
|
||||
if v.groups.ember then
|
||||
embers[k] = true
|
||||
end
|
||||
end
|
||||
end)
|
||||
nodecore.register_limited_abm({
|
||||
label = "fire consume",
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
nodenames = {modname .. ":fire"},
|
||||
action = function(pos)
|
||||
sparkqty = sparkqty + 1
|
||||
if sparkqty > sparkmax then
|
||||
local sparkid = math_random(1, sparkqty)
|
||||
if sparkid <= sparkmax then
|
||||
sparks[sparkid] = pos
|
||||
end
|
||||
else
|
||||
sparks[sparkqty] = pos
|
||||
end
|
||||
|
||||
local found = {}
|
||||
@ -61,54 +82,20 @@ do
|
||||
})
|
||||
end
|
||||
|
||||
local poshash = minetest.hash_node_position
|
||||
local ignitemax = 250
|
||||
local ignition
|
||||
nodecore.register_globalstep("fire ignition", function()
|
||||
if not ignition then return end
|
||||
nodecore.log("info", string_format("fire ignition: %d (%d/%d)",
|
||||
ignition.qty, #ignition.queue, ignitemax))
|
||||
for _, pos in ipairs(ignition.queue) do
|
||||
nodecore.fire_check_ignite(pos)
|
||||
end
|
||||
ignition = nil
|
||||
end)
|
||||
nodecore.register_limited_abm({
|
||||
label = "flammables ignite",
|
||||
interval = 5,
|
||||
chance = 1,
|
||||
nodenames = {"group:igniter"},
|
||||
neighbors = {"group:flammable"},
|
||||
nodenames = {"group:flammable"},
|
||||
neighbors = {"group:igniter"},
|
||||
neighbors_invert = true,
|
||||
action = function(pos)
|
||||
for _, p in pairs(nodecore.find_nodes_around(pos, "group:flammable")) do
|
||||
local key = poshash(p)
|
||||
if not ignition then
|
||||
ignition = {
|
||||
queue = {},
|
||||
seen = {},
|
||||
qty = 0
|
||||
}
|
||||
end
|
||||
local seen = ignition.seen
|
||||
if not seen[key] then
|
||||
seen[key] = true
|
||||
local qty = ignition.qty + 1
|
||||
ignition.qty = qty
|
||||
if qty > ignitemax then
|
||||
local i = math_random(1, qty)
|
||||
if i <= ignitemax then
|
||||
ignition.queue[i] = p
|
||||
end
|
||||
else
|
||||
ignition.queue[qty] = p
|
||||
end
|
||||
end
|
||||
end
|
||||
nodecore.fire_check_ignite(pos)
|
||||
end
|
||||
})
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "ember consume",
|
||||
label = "ember snuff/flames",
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
nodenames = {"group:ember"},
|
||||
|
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 486 B |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 598 B |
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 69 B |
@ -20,45 +20,31 @@ minetest.after(0, function()
|
||||
end
|
||||
end)
|
||||
|
||||
local queue = {}
|
||||
|
||||
local function process(pos)
|
||||
local water = #nodecore.find_nodes_around(pos, "group:water")
|
||||
local lux = #nodecore.find_nodes_around(pos, "group:lux_fluid")
|
||||
if water == lux then return end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
node.name = (water > lux and harden_to or soften_to)[node.name]
|
||||
if not node.name then return end
|
||||
|
||||
local lava = #nodecore.find_nodes_around(pos, "group:lava")
|
||||
if lava < 1 then return end
|
||||
|
||||
local fluid = water > lux and (water - lux) or (lux - water)
|
||||
local chance = harden_idx[node.name] - (fluid > lava and fluid or lava) / 8
|
||||
if (chance > 0) and (math_random() > (1/3) ^ chance) then return end
|
||||
nodecore.log("action", (water > lux and "hardened" or "softened")
|
||||
.. " to " .. node.name .. " at " .. minetest.pos_to_string(pos))
|
||||
nodecore.witness(pos, "stone " .. (water > lux and "hardened" or "softened"))
|
||||
return nodecore.set_loud(pos, node)
|
||||
end
|
||||
|
||||
nodecore.register_globalstep("stone hardening", function()
|
||||
for _, p in pairs(queue) do process(p) end
|
||||
queue = {}
|
||||
end)
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "stone hardening",
|
||||
nodenames = {"group:lava"},
|
||||
neighbors = {"group:stone"},
|
||||
nodenames = {"group:stone"},
|
||||
neighbors = {"group:lava"},
|
||||
neighbors_invert = true,
|
||||
interval = 10,
|
||||
chance = 50,
|
||||
action = function(pos)
|
||||
if not minetest.find_node_near(pos, 2,
|
||||
{"group:water", "group:lux_fluid"}) then return end
|
||||
for _, p in pairs(nodecore.find_nodes_around(pos, "group:stone")) do
|
||||
queue[minetest.hash_node_position(p)] = p
|
||||
end
|
||||
local water = #nodecore.find_nodes_around(pos, "group:water")
|
||||
local lux = #nodecore.find_nodes_around(pos, "group:lux_fluid")
|
||||
if water == lux then return end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
node.name = (water > lux and harden_to or soften_to)[node.name]
|
||||
if not node.name then return end
|
||||
|
||||
local lava = #nodecore.find_nodes_around(pos, "group:lava")
|
||||
if lava < 1 then return end
|
||||
|
||||
local fluid = water > lux and (water - lux) or (lux - water)
|
||||
local chance = harden_idx[node.name] - (fluid > lava and fluid or lava) / 8
|
||||
if (chance > 0) and (math_random() > (1/3) ^ chance) then return end
|
||||
nodecore.log("action", (water > lux and "hardened" or "softened")
|
||||
.. " to " .. node.name .. " at " .. minetest.pos_to_string(pos))
|
||||
nodecore.witness(pos, "stone " .. (water > lux and "hardened" or "softened"))
|
||||
return nodecore.set_loud(pos, node)
|
||||
end
|
||||
})
|
||||
|
@ -24,3 +24,8 @@ nodecore.register_hint("weaken stone by soaking",
|
||||
"stone softened",
|
||||
"group:lava"
|
||||
)
|
||||
|
||||
nodecore.register_hint("melt stone into pumwater",
|
||||
"stone melted",
|
||||
"group:lava"
|
||||
)
|
||||
|
@ -5,7 +5,8 @@ local include, nodecore
|
||||
|
||||
nodecore.amcoremod()
|
||||
|
||||
include('amalgam')
|
||||
include('pumice')
|
||||
include("amalgam")
|
||||
include("pumice")
|
||||
include("harden")
|
||||
include("hints")
|
||||
include("renew")
|
||||
|
35
mods/nc_igneous/renew.lua
Normal file
@ -0,0 +1,35 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local math, minetest, nodecore, pairs, string, vector
|
||||
= math, minetest, nodecore, pairs, string, vector
|
||||
local math_pow, math_random, string_format
|
||||
= math.pow, math.random, string.format
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local lavaname = "nc_terrain:lava_source"
|
||||
local stonename = "nc_terrain:stone"
|
||||
|
||||
nodecore.register_limited_abm({
|
||||
label = "stone melting",
|
||||
nodenames = {stonename},
|
||||
neighbors = {lavaname},
|
||||
neighbors_invert = true,
|
||||
interval = 10,
|
||||
chance = 125,
|
||||
action = function(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name ~= stonename then return end
|
||||
|
||||
local lavas = 0
|
||||
for _, dir in pairs(nodecore.dirs()) do
|
||||
if minetest.get_node(vector.add(pos, dir)) == lavaname then
|
||||
lavas = lavas + 1
|
||||
end
|
||||
end
|
||||
if (lavas < 4) or (math_random() > math_pow(1.5, lavas - 4) / 3) then return end
|
||||
|
||||
nodecore.log("action", string_format("%s melted to %s at %s (%d sources)",
|
||||
stonename, lavaname, minetest.pos_to_string(pos), lavas))
|
||||
nodecore.witness(pos, "stone melted")
|
||||
return nodecore.set_loud(pos, {name = lavaname})
|
||||
end
|
||||
})
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 298 B |
@ -12,6 +12,7 @@ if nodecore.loaded_mods().nc_fire then
|
||||
chance = 1,
|
||||
nodenames = {modname .. ":stack"},
|
||||
neighbors = {"group:igniter"},
|
||||
neighbors_invert = true,
|
||||
action = function(pos)
|
||||
local stack = nodecore.stack_get(pos)
|
||||
return nodecore.fire_check_ignite(pos, {
|
||||
|
@ -130,6 +130,25 @@ function minetest.item_drop(item, player, ...)
|
||||
return helper(olddrop(item, player, ...))
|
||||
end
|
||||
|
||||
local oldfallcheck = minetest.check_single_for_falling
|
||||
function minetest.check_single_for_falling(pos, ...)
|
||||
local function helper(...)
|
||||
if minetest.get_node(pos).name ~= modname .. ":stack" then return ... end
|
||||
local stack = nodecore.stack_get(pos)
|
||||
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||
if minetest.get_node(below).name == modname .. ":stack" then
|
||||
stack = nodecore.stack_add(below, stack)
|
||||
if stack:is_empty() then
|
||||
minetest.remove_node(pos)
|
||||
else
|
||||
nodecore.stack_set(pos, stack)
|
||||
end
|
||||
return ...
|
||||
end
|
||||
end
|
||||
return helper(oldfallcheck(pos, ...))
|
||||
end
|
||||
|
||||
local oldlog = minetest.log
|
||||
function minetest.log(...)
|
||||
local args = {...}
|
||||
|
@ -13,3 +13,4 @@ include('burnup')
|
||||
include('pulverize')
|
||||
include('throw_inertia')
|
||||
include('hints')
|
||||
include('protect')
|
||||
|
19
mods/nc_items/protect.lua
Normal file
@ -0,0 +1,19 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, nodecore
|
||||
= minetest, nodecore
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
function nodecore.protection_exempt(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
return node.name == modname .. ":stack"
|
||||
end
|
||||
|
||||
minetest.after(0, function()
|
||||
local prot = minetest.is_protected
|
||||
function minetest.is_protected(pos, name, ...)
|
||||
if nodecore.protection_exempt(pos, name) then return false end
|
||||
return prot(pos, name, ...)
|
||||
end
|
||||
end)
|
@ -43,6 +43,7 @@ local ore = reg("Ore", {
|
||||
tiles = {"nc_terrain_stone.png^" .. oretile},
|
||||
drop_in_place = modname .. ":cobble",
|
||||
groups = {stone = 1},
|
||||
silktouch = false,
|
||||
strata = stratore
|
||||
})
|
||||
stratore[1] = ore
|
||||
|
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 91 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 98 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 102 B |
@ -5,6 +5,8 @@ local math_floor, math_log
|
||||
= math.floor, math.log
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
nodecore.amcoremod()
|
||||
|
||||
local loottable = include("loottable")
|
||||
|
||||
local mapperlin
|
||||
|