mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Add opaque group
This commit is contained in:
parent
3bf5dfa0f8
commit
d9a61e826a
2 changed files with 7 additions and 1 deletions
|
@ -67,7 +67,8 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
|
||||||
### Declarative groups
|
### Declarative groups
|
||||||
These groups are used mostly for informational purposes
|
These groups are used mostly for informational purposes
|
||||||
|
|
||||||
* `solid=1`: Solid block (automatically assigned)
|
* `solid=1`: Solid full-cube block (automatically assigned)
|
||||||
|
* `opaque=1`: Opaque block (automatically assigned)
|
||||||
* `not_solid=1`: Block is sold (only assign this group for nodes which are automatically detected as “solid” in error
|
* `not_solid=1`: Block is sold (only assign this group for nodes which are automatically detected as “solid” in error
|
||||||
* `water=1`: Water
|
* `water=1`: Water
|
||||||
* `lava=1`: Lava
|
* `lava=1`: Lava
|
||||||
|
|
|
@ -82,6 +82,11 @@ local overwrite = function()
|
||||||
newgroups.solid = 1
|
newgroups.solid = 1
|
||||||
groups_changed = true
|
groups_changed = true
|
||||||
end
|
end
|
||||||
|
-- Automatically assign the “opaque” group for opaque nodes
|
||||||
|
if not (ndef.paramtype == "light" or ndef.sunlight_propagates) then
|
||||||
|
newgroups.opaque = 1
|
||||||
|
groups_changed = true
|
||||||
|
end
|
||||||
|
|
||||||
local function calculate_group(hardness, material, diggroup, newgroups, actual_rating, expected_rating)
|
local function calculate_group(hardness, material, diggroup, newgroups, actual_rating, expected_rating)
|
||||||
local time, validity_factor
|
local time, validity_factor
|
||||||
|
|
Loading…
Reference in a new issue