Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna
Compare revisions
6d207c93d72413d17c7a952fb912d556d5bd4dbd to 6f95f465cd19a567851abd08293584b91970a1c0
"public/javascripts/app/git@git.tchncs.de:milan/diaspora.git" did not exist on "9fbc4b745a362fcc5f3314f0591cf624f50e0f1d"
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
Illuna-Minetest/illuna
Select target project
No results found
6f95f465cd19a567851abd08293584b91970a1c0
Select Git revision
Branches
master
Swap
Target
Illuna-Minetest/illuna
Select target project
Illuna-Minetest/illuna
1 result
6d207c93d72413d17c7a952fb912d556d5bd4dbd
Select Git revision
Branches
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
refactor watermechanics
· c1567b34
Milan
authored
8 years ago
only load water.lua if ethereal is not present
c1567b34
add stacking function for scaffolding mod
· 7a702f01
Milan
authored
8 years ago
7a702f01
merge upstream
· 6f95f465
Milan
authored
8 years ago
6f95f465
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
depends.txt
+1
-0
1 addition, 0 deletions
depends.txt
functions.lua
+40
-0
40 additions, 0 deletions
functions.lua
init.lua
+4
-114
4 additions, 114 deletions
init.lua
water.lua
+113
-0
113 additions, 0 deletions
water.lua
with
158 additions
and
114 deletions
depends.txt
View file @
6f95f465
...
...
@@ -4,6 +4,7 @@ farming ?
darkage ?
building_blocks ?
teleport_potion ?
scaffolding ?
moreores ?
mobs_animal ?
mobs_better_rat ?
...
...
This diff is collapsed.
Click to expand it.
functions.lua
0 → 100644
View file @
6f95f465
--[[ Nodestacking function by https://github.com/minetest-mods/gloopblocks ]]
local
nodes
=
{
"scaffolding:reinforced_iron_scaffolding"
,
"scaffolding:iron_scaffolding"
,
"scaffolding:scaffolding"
,
"scaffolding:reinforced_scaffolding"
}
for
i
=
1
,
4
do
local
nodes
=
nodes
[
i
]
minetest
.
override_item
(
nodes
,
{
on_rightclick
=
function
(
pos
,
node
,
clicker
,
itemstack
)
if
itemstack
and
itemstack
:
get_name
()
==
node
.
name
then
for
i
=
1
,
19
do
if
minetest
.
get_node
({
x
=
pos
.
x
,
z
=
pos
.
z
}).
name
==
nodes
and
scafffound
~=
0
and
scafffound
~=
1
then
local
scafffound
=
1
return
itemstack
else
break
end
end
for
i
=
1
,
19
do
if
minetest
.
get_node
({
x
=
pos
.
x
,
y
=
pos
.
y
+
i
,
z
=
pos
.
z
}).
name
==
"air"
and
scaffworked
~=
1
and
scaffworked
~=
0
then
minetest
.
set_node
({
x
=
pos
.
x
,
y
=
pos
.
y
+
i
,
z
=
pos
.
z
},
{
name
=
nodes
})
local
scaffworked
=
1
return
ItemStack
(
tostring
(
itemstack
:
get_name
()
..
" "
..
tostring
(
itemstack
:
get_count
()
-
1
)))
elseif
minetest
.
get_node
({
x
=
pos
.
x
,
y
=
pos
.
y
+
i
,
z
=
pos
.
z
}).
name
==
nodes
then
else
local
scaffworked
=
0
end
end
if
scaffworked
==
1
then
return
ItemStack
(
tostring
(
itemstack
:
get_name
()
..
" "
..
tostring
(
itemstack
:
get_count
()
-
1
)))
else
return
itemstack
end
else
return
itemstack
end
end
,
})
end
This diff is collapsed.
Click to expand it.
init.lua
View file @
6f95f465
...
...
@@ -5,122 +5,12 @@ dofile(minetest.get_modpath("illuna").."/crafting.lua")
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/commands.lua"
)
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/register.lua"
)
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/aliases.lua"
)
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/functions.lua"
)
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/craftitems.lua"
)
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/shop.lua"
)
if
minetest
.
get_modpath
(
"moreblocks"
)
then
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/moreblocks.lua"
)
end
-- Water mechanics from the ethereal mod
--
-- If Crystal Spike, Crystal Dirt, Snow near Water, change Water to Ice
minetest
.
register_abm
({
label
=
"Illuna freeze water"
,
nodenames
=
{
"default:snow"
,
"default:snowblock"
},
neighbors
=
{
"default:water_source"
,
"default:river_water_source"
},
interval
=
15
,
chance
=
4
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
local
near
=
minetest
.
find_node_near
(
pos
,
1
,
{
"default:water_source"
,
"default:river_water_source"
})
if
near
then
minetest
.
swap_node
(
near
,
{
name
=
"default:ice"
})
end
end
,
})
-- If Heat Source near Ice or Snow then melt
minetest
.
register_abm
({
label
=
"Ethereal melt snow/ice"
,
nodenames
=
{
"default:ice"
,
"default:snowblock"
,
"default:snow"
,
"default:dirt_with_snow"
},
neighbors
=
{
"fire:basic_fire"
,
"default:lava_source"
,
"default:lava_flowing"
,
"default:furnace_active"
,
"default:torch"
},
interval
=
5
,
chance
=
4
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
local
water_node
=
"default:water"
if
pos
.
y
>
2
then
water_node
=
"default:river_water"
end
if
node
.
name
==
"default:ice"
or
node
.
name
==
"default:snowblock"
or
node
.
name
==
"ethereal:icebrick"
or
node
.
name
==
"ethereal:snowbrick"
then
minetest
.
swap_node
(
pos
,
{
name
=
water_node
..
"_source"
})
elseif
node
.
name
==
"default:snow"
then
minetest
.
swap_node
(
pos
,
{
name
=
water_node
..
"_flowing"
})
elseif
node
.
name
==
"default:dirt_with_snow"
then
minetest
.
swap_node
(
pos
,
{
name
=
"default:dirt_with_grass"
})
end
nodeupdate
(
pos
)
end
,
})
-- If Water Source near Dry Dirt, change to normal Dirt
minetest
.
register_abm
({
label
=
"Ethereal wet dry dirt"
,
nodenames
=
{
"ethereal:dry_dirt"
,
"default:dirt_with_dry_grass"
},
neighbors
=
{
"group:water"
},
interval
=
15
,
chance
=
2
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
if
node
==
"ethereal:dry_dirt"
then
minetest
.
swap_node
(
pos
,
{
name
=
"default:dirt"
})
else
minetest
.
swap_node
(
pos
,
{
name
=
"ethereal:green_dirt"
})
end
end
,
})
-- If torch touching water then drop as item
minetest
.
register_abm
({
label
=
"Ethereal drop torch"
,
nodenames
=
{
"default:torch"
},
neighbors
=
{
"group:water"
},
interval
=
5
,
chance
=
1
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
local
num
=
#
minetest
.
find_nodes_in_area
(
{
x
=
pos
.
x
-
1
,
y
=
pos
.
y
,
z
=
pos
.
z
},
{
x
=
pos
.
x
+
1
,
y
=
pos
.
y
,
z
=
pos
.
z
},
{
"group:water"
})
num
=
num
+
#
minetest
.
find_nodes_in_area
(
{
x
=
pos
.
x
,
y
=
pos
.
y
,
z
=
pos
.
z
-
1
},
{
x
=
pos
.
x
,
y
=
pos
.
y
,
z
=
pos
.
z
+
1
},
{
"group:water"
})
num
=
num
+
#
minetest
.
find_nodes_in_area
(
{
x
=
pos
.
x
,
y
=
pos
.
y
+
1
,
z
=
pos
.
z
},
{
x
=
pos
.
x
,
y
=
pos
.
y
+
1
,
z
=
pos
.
z
},
{
"group:water"
})
if
num
>
0
then
minetest
.
swap_node
(
pos
,
{
name
=
"air"
})
minetest
.
add_item
(
pos
,
{
name
=
node
.
name
})
end
end
,
})
if
not
minetest
.
get_modpath
(
"ethereal"
)
then
dofile
(
minetest
.
get_modpath
(
"illuna"
)
..
"/water.lua"
end
This diff is collapsed.
Click to expand it.
water.lua
0 → 100644
View file @
6f95f465
-- Water mechanics from the ethereal mod
--
-- If Crystal Spike, Crystal Dirt, Snow near Water, change Water to Ice
minetest
.
register_abm
({
label
=
"Illuna freeze water"
,
nodenames
=
{
"default:snow"
,
"default:snowblock"
},
neighbors
=
{
"default:water_source"
,
"default:river_water_source"
},
interval
=
15
,
chance
=
4
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
local
near
=
minetest
.
find_node_near
(
pos
,
1
,
{
"default:water_source"
,
"default:river_water_source"
})
if
near
then
minetest
.
swap_node
(
near
,
{
name
=
"default:ice"
})
end
end
,
})
-- If Heat Source near Ice or Snow then melt
minetest
.
register_abm
({
label
=
"Ethereal melt snow/ice"
,
nodenames
=
{
"default:ice"
,
"default:snowblock"
,
"default:snow"
,
"default:dirt_with_snow"
},
neighbors
=
{
"fire:basic_fire"
,
"default:lava_source"
,
"default:lava_flowing"
,
"default:furnace_active"
,
"default:torch"
},
interval
=
5
,
chance
=
4
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
local
water_node
=
"default:water"
if
pos
.
y
>
2
then
water_node
=
"default:river_water"
end
if
node
.
name
==
"default:ice"
or
node
.
name
==
"default:snowblock"
or
node
.
name
==
"ethereal:icebrick"
or
node
.
name
==
"ethereal:snowbrick"
then
minetest
.
swap_node
(
pos
,
{
name
=
water_node
..
"_source"
})
elseif
node
.
name
==
"default:snow"
then
minetest
.
swap_node
(
pos
,
{
name
=
water_node
..
"_flowing"
})
elseif
node
.
name
==
"default:dirt_with_snow"
then
minetest
.
swap_node
(
pos
,
{
name
=
"default:dirt_with_grass"
})
end
nodeupdate
(
pos
)
end
,
})
-- If Water Source near Dry Dirt, change to normal Dirt
minetest
.
register_abm
({
label
=
"Ethereal wet dry dirt"
,
nodenames
=
{
"ethereal:dry_dirt"
,
"default:dirt_with_dry_grass"
},
neighbors
=
{
"group:water"
},
interval
=
15
,
chance
=
2
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
if
node
==
"ethereal:dry_dirt"
then
minetest
.
swap_node
(
pos
,
{
name
=
"default:dirt"
})
else
minetest
.
swap_node
(
pos
,
{
name
=
"ethereal:green_dirt"
})
end
end
,
})
-- If torch touching water then drop as item
minetest
.
register_abm
({
label
=
"Ethereal drop torch"
,
nodenames
=
{
"default:torch"
},
neighbors
=
{
"group:water"
},
interval
=
5
,
chance
=
1
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
local
num
=
#
minetest
.
find_nodes_in_area
(
{
x
=
pos
.
x
-
1
,
y
=
pos
.
y
,
z
=
pos
.
z
},
{
x
=
pos
.
x
+
1
,
y
=
pos
.
y
,
z
=
pos
.
z
},
{
"group:water"
})
num
=
num
+
#
minetest
.
find_nodes_in_area
(
{
x
=
pos
.
x
,
y
=
pos
.
y
,
z
=
pos
.
z
-
1
},
{
x
=
pos
.
x
,
y
=
pos
.
y
,
z
=
pos
.
z
+
1
},
{
"group:water"
})
num
=
num
+
#
minetest
.
find_nodes_in_area
(
{
x
=
pos
.
x
,
y
=
pos
.
y
+
1
,
z
=
pos
.
z
},
{
x
=
pos
.
x
,
y
=
pos
.
y
+
1
,
z
=
pos
.
z
},
{
"group:water"
})
if
num
>
0
then
minetest
.
swap_node
(
pos
,
{
name
=
"air"
})
minetest
.
add_item
(
pos
,
{
name
=
node
.
name
})
end
end
,
})
This diff is collapsed.
Click to expand it.