Moving deprecated stuffs to deprecated mod and fixing a license

This commit is contained in:
MoNTE48 2019-08-30 23:48:48 +02:00
parent 3f498eabf1
commit 1a3509e7e4
19 changed files with 104 additions and 3403 deletions

View File

@ -2,14 +2,14 @@ local specs = {
normal = {
offname = "mesecons_pistons:piston_normal_off",
onname = "mesecons_pistons:piston_normal_on",
pusher = "mesecons_pistons:piston_pusher_normal",
pusher = "mesecons_pistons:piston_pusher_normal"
},
sticky = {
offname = "mesecons_pistons:piston_sticky_off",
onname = "mesecons_pistons:piston_sticky_on",
pusher = "mesecons_pistons:piston_pusher_sticky",
sticky = true,
},
sticky = true
}
}
local function get_pistonspec_name(name, part)
@ -95,7 +95,7 @@ local piston_on = function(pos, node)
minetest.sound_play("piston_extend", {
pos = pos,
max_hear_distance = 20,
gain = 0.3,
gain = 0.3
})
mesecon.mvps_process_stack(stack)
mesecon.mvps_move_objects(pusher_pos, dir, oldstack)
@ -121,7 +121,7 @@ local orientations = {
[0] = { 4, 8},
{13, 17},
{10, 6},
{20, 15},
{20, 15}
}
local function piston_orientate(pos, placer)
@ -148,7 +148,7 @@ local rotations = {
{1, 5, 23, 9},
{3, 11, 21, 7},
{4, 13, 10, 19},
{6, 15, 8, 17},
{6, 15, 8, 17}
}
local function get_rotation(param2)
@ -246,16 +246,16 @@ local piston_pusher_box = {
type = "fixed",
fixed = {
{-2/16, -2/16, -.5 + pt, 2/16, 2/16, .5 + pt},
{-.5 , -.5 , -.5 , .5 , .5 , -.5 + pt},
},
{-.5 , -.5 , -.5 , .5 , .5 , -.5 + pt}
}
}
local piston_on_box = {
type = "fixed",
fixed = {
{-.5, -.5, -.5 + pt, .5, .5, .5}
},
}
}
-- Normal (non-sticky) Pistons:
@ -269,7 +269,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
"mesecons_piston_right.png",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front.png"
},
},
groups = {cracky = 3},
stack_max = 1,
paramtype2 = "facedir",
@ -281,7 +281,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
rules = piston_get_rules,
}},
on_rotate = piston_rotate,
on_blast = mesecon.on_blastnode,
on_blast = mesecon.on_blastnode
})
-- onstate
@ -294,7 +294,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
"mesecons_piston_right.png",
"mesecons_piston_back.png",
"mesecons_piston_on_front.png"
},
},
groups = {cracky = 3, not_in_creative_inventory = 1},
paramtype = "light",
paramtype2 = "facedir",
@ -309,7 +309,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
rules = piston_get_rules,
}},
on_rotate = piston_rotate_on,
on_blast = mesecon.on_blastnode,
on_blast = mesecon.on_blastnode
})
-- pusher
@ -322,7 +322,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
"mesecons_piston_right.png",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front.png"
},
},
groups = {not_in_creative_inventory = 1},
paramtype = "light",
paramtype2 = "facedir",
@ -332,7 +332,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
node_box = piston_pusher_box,
on_rotate = piston_rotate_pusher,
drop = "",
sounds = default.node_sound_wood_defaults(),
sounds = default.node_sound_wood_defaults()
})
-- Sticky ones
@ -346,7 +346,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
"mesecons_piston_right.png",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front_sticky.png"
},
},
groups = {cracky = 3},
stack_max = 1,
paramtype2 = "facedir",
@ -358,7 +358,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
rules = piston_get_rules,
}},
on_rotate = piston_rotate,
on_blast = mesecon.on_blastnode,
on_blast = mesecon.on_blastnode
})
-- onstate
@ -371,7 +371,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
"mesecons_piston_right.png",
"mesecons_piston_back.png",
"mesecons_piston_on_front.png"
},
},
groups = {cracky = 3, not_in_creative_inventory = 1},
paramtype = "light",
paramtype2 = "facedir",
@ -386,7 +386,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
rules = piston_get_rules,
}},
on_rotate = piston_rotate_on,
on_blast = mesecon.on_blastnode,
on_blast = mesecon.on_blastnode
})
-- pusher
@ -399,7 +399,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
"mesecons_piston_right.png",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front_sticky.png"
},
},
groups = {not_in_creative_inventory = 1},
paramtype = "light",
paramtype2 = "facedir",
@ -409,7 +409,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
node_box = piston_pusher_box,
on_rotate = piston_rotate_pusher,
drop = "",
sounds = default.node_sound_wood_defaults(),
sounds = default.node_sound_wood_defaults()
})
@ -477,7 +477,7 @@ minetest.register_craft({
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"default:cobble", "default:steel_ingot", "default:cobble"},
{"default:cobble", "mesecons:wire_00000000_off", "default:cobble"},
{"default:cobble", "mesecons:wire_00000000_off", "default:cobble"}
}
})
@ -485,10 +485,6 @@ minetest.register_craft({
output = "mesecons_pistons:piston_sticky_off",
recipe = {
{"mesecons_materials:glue"},
{"mesecons_pistons:piston_normal_off"},
{"mesecons_pistons:piston_normal_off"}
}
})
-- load legacy code
dofile(minetest.get_modpath("mesecons_pistons")..DIR_DELIM.."legacy.lua")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,2 @@
default
mesecons_pistons

View File

@ -0,0 +1,7 @@
-- Media and code needed to upgrade to the new version.
-- Must be removed no earlier than 12 months after release.
local path = minetest.get_modpath("deprecated")
--== mesecons_pistons ==--
dofile(path .. "/mesecons_pistons.lua")

View File

@ -1,22 +1,26 @@
-- From mesecons_pistons mod
-- License and Readme here: https://github.com/MultiCraft/MultiCraft/tree/master/games/default/files/bluestone
-- Added 17 Jul 2019
local ground_dir = {
[0] = {x = 0, y = -1, z = 0},
{x = 0, y = 0, z = -1},
{x = 0, y = 0, z = 1},
{x = -1, y = 0, z = 0},
{x = 1, y = 0, z = 0},
{x = 0, y = 1, z = 0},
{x = 0, y = 1, z = 0}
}
minetest.register_lbm({
label = "Upgrade legacy pistons pointing up",
name = "mesecons_pistons:replace_legacy_piston_up",
name = ":mesecons_pistons:replace_legacy_piston_up",
nodenames = {
"mesecons_pistons:piston_up_normal_off",
"mesecons_pistons:piston_up_normal_on",
"mesecons_pistons:piston_up_pusher_normal",
"mesecons_pistons:piston_up_sticky_off",
"mesecons_pistons:piston_up_sticky_on",
"mesecons_pistons:piston_up_pusher_sticky",
"mesecons_pistons:piston_up_pusher_sticky"
},
run_at_every_load = false,
action = function(pos, node)
@ -24,19 +28,19 @@ minetest.register_lbm({
node.param2 = minetest.dir_to_facedir(dir, true)
node.name = node.name:sub(1, 24)..node.name:sub(28)
minetest.swap_node(pos, node)
end,
end
})
minetest.register_lbm({
label = "Upgrade legacy pistons pointing down",
name = "mesecons_pistons:replace_legacy_piston_down",
name = ":mesecons_pistons:replace_legacy_piston_down",
nodenames = {
"mesecons_pistons:piston_down_normal_off",
"mesecons_pistons:piston_down_normal_on",
"mesecons_pistons:piston_down_pusher_normal",
"mesecons_pistons:piston_down_sticky_off",
"mesecons_pistons:piston_down_sticky_on",
"mesecons_pistons:piston_down_pusher_sticky",
"mesecons_pistons:piston_down_pusher_sticky"
},
run_at_every_load = false,
action = function(pos, node)
@ -44,5 +48,5 @@ minetest.register_lbm({
node.param2 = minetest.dir_to_facedir(dir, true)
node.name = node.name:sub(1, 24)..node.name:sub(30)
minetest.swap_node(pos, node)
end,
end
})

View File

@ -0,0 +1,10 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
}

View File

@ -0,0 +1,10 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
}

View File

@ -0,0 +1,10 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
}

View File

@ -0,0 +1,10 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
}

View File

@ -0,0 +1,10 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
}

View File

@ -0,0 +1,10 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
}

View File

@ -4,6 +4,7 @@ License of source code
The MIT License (MIT)
Copyright (C) 2012-2016 Perttu Ahola (celeron55) <celeron55@gmail.com>
Copyright (C) 2012-2016 Various Minetest developers and contributors
Copyright (C) MultiCraft Development Team
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
@ -23,38 +24,3 @@ DEALINGS IN THE SOFTWARE.
For more details:
https://opensource.org/licenses/MIT
Licenses of media (textures)
----------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2012-2016 Perttu Ahola (celeron55) <celeron55@gmail.com>
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/

View File

@ -1,10 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
} // End of Root

View File

@ -1,10 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
} // End of Root

View File

@ -1,10 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
} // End of Root

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
} // End of Root

View File

@ -1,10 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
} // End of Root