add 2 mods
|
@ -0,0 +1,129 @@
|
|||
--[[Simple Machine Components]]
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:lever", {
|
||||
description = "Lever",
|
||||
inventory_image = "safr_simple_machines_lever.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:lever",
|
||||
recipe = {
|
||||
{"safr_simple_machines:inclined_plane"},
|
||||
{"default:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:wheel_and_axle", {
|
||||
description = "Wheel and Axle",
|
||||
inventory_image = "safr_simple_machines_wheel_and_axle.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:wheel_and_axle 4",
|
||||
recipe = {
|
||||
{"", "default:copper_ingot", ""},
|
||||
{"default:copper_ingot", "default:stick", "default:copper_ingot"},
|
||||
{"", "default:copper_ingot", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:pulley", {
|
||||
description = "Pulley",
|
||||
inventory_image = "safr_simple_machines_pulley.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:pulley 2",
|
||||
recipe = {
|
||||
{"safr_simple_machines:wheel_and_axle"},
|
||||
{"farming:string"},
|
||||
{"safr_simple_machines:wheel_and_axle"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:inclined_plane", {
|
||||
description = "Inclined Plane",
|
||||
inventory_image = "safr_simple_machines_inclined_plane.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:inclined_plane 3",
|
||||
recipe = {
|
||||
{"", "", "default:copper_ingot"},
|
||||
{"", "default:copper_ingot", ""},
|
||||
{"default:copper_ingot", "", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:wedge", {
|
||||
description = "Wedge",
|
||||
inventory_image = "safr_simple_machines_wedge.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:wedge 2",
|
||||
recipe = {
|
||||
{"safr_simple_machines:inclined_plane","safr_simple_machines:inclined_plane"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:screw", {
|
||||
description = "Screw",
|
||||
inventory_image = "safr_simple_machines_screw.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:screw 3",
|
||||
recipe = {
|
||||
{"default:copper_ingot", ""},
|
||||
{"", "default:copper_ingot"},
|
||||
{"default:copper_ingot", ""},
|
||||
},
|
||||
})
|
||||
|
||||
--[[Other Components]]
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:gear", {
|
||||
description = "Gear",
|
||||
inventory_image = "safr_simple_machines_gear.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:gear 5",
|
||||
recipe = {
|
||||
{"", "default:copper_ingot", ""},
|
||||
{"default:copper_ingot", "safr_simple_machines:wheel_and_axle", "default:copper_ingot"},
|
||||
{"", "default:copper_ingot", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:nut", {
|
||||
description = "Nut",
|
||||
inventory_image = "safr_simple_machines_nut.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:nut",
|
||||
recipe = {
|
||||
{"safr_simple_machines:screw"},
|
||||
{"default:copper_ingot"},
|
||||
},
|
||||
replacements = {
|
||||
{"safr_simple_machines:screw", "safr_simple_machines:screw"},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("safr_simple_machines:belt", {
|
||||
description = "Gear",
|
||||
inventory_image = "safr_simple_machines_belt.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "safr_simple_machines:belt 2",
|
||||
recipe = {
|
||||
{"farming:string", "default:paper", "farming:string"},
|
||||
{"safr_simple_machines:wheel_and_axle", "", "safr_simple_machines:wheel_and_axle"},
|
||||
{"farming:string", "default:paper", "farming:string"},
|
||||
},
|
||||
replacements = {
|
||||
{"safr_simple_machines:wheel_and_axle", "safr_simple_machines:wheel_and_axle"},
|
||||
})
|
|
@ -0,0 +1,2 @@
|
|||
default
|
||||
farming
|
|
@ -0,0 +1 @@
|
|||
dofile(minetest.get_modpath("safr_simple_machines").."/components.lua")
|
|
@ -0,0 +1,61 @@
|
|||
Lever
|
||||
Wheel/Axle
|
||||
Pulley
|
||||
Inclined Plane
|
||||
Wedge
|
||||
Screw
|
||||
Gear
|
||||
Nut
|
||||
Belt
|
||||
|
||||
copper = c
|
||||
stick = s
|
||||
string = r
|
||||
paper = P
|
||||
nothing = x
|
||||
|
||||
Lever (l)
|
||||
i
|
||||
c = l*2
|
||||
|
||||
Wheel/Axle (W)
|
||||
x c x
|
||||
c s c = W*4
|
||||
x c x
|
||||
|
||||
Pulley (p)
|
||||
W
|
||||
r = p*2
|
||||
W
|
||||
|
||||
Inclined Plane (i)
|
||||
x x c
|
||||
x c x = i*3
|
||||
c x x
|
||||
|
||||
Wedge (w)
|
||||
i i = w*2
|
||||
|
||||
Screw (S)
|
||||
c x
|
||||
x c = S*3
|
||||
c x
|
||||
|
||||
Gear (g)
|
||||
x c x
|
||||
c W c = W*5
|
||||
x c x
|
||||
|
||||
Nut (n)
|
||||
S
|
||||
c = n, return Screw
|
||||
|
||||
Belt (b)
|
||||
r P r
|
||||
W x W = b*2, return W
|
||||
r P r
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 305 B |
After Width: | Height: | Size: 244 B |
After Width: | Height: | Size: 357 B |
|
@ -0,0 +1,31 @@
|
|||
--GETTIME
|
||||
function round(num, idp)
|
||||
local mult = 10^(idp or 0)
|
||||
return math.floor(num * mult + 0.5) / mult
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("gettime", {
|
||||
params = "",
|
||||
description = "print current time of day",
|
||||
privs = {shout=true},
|
||||
func = function(name, param)
|
||||
minetest.chat_send_player(name, "It is " .. (round(minetest.env:get_timeofday() * 24,2)) .. " o'clock")
|
||||
end,
|
||||
})
|
||||
|
||||
--[[RESPAWN
|
||||
minetest.register_chatcommand("respawn", {
|
||||
params = "",
|
||||
privs = {},
|
||||
description = "Respawn",
|
||||
func = function(name, param)
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
if not player then
|
||||
return
|
||||
else
|
||||
minetest.chat_send_all(name.." respawned")
|
||||
player:set_hp(0)
|
||||
end
|
||||
end
|
||||
})
|
||||
]]
|
|
@ -0,0 +1,30 @@
|
|||
--[[DEATH NOTICE
|
||||
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
minetest.chat_send_all(player:get_player_name().." found god")
|
||||
end)
|
||||
]]
|
||||
|
||||
--DEATH NOTICE v2
|
||||
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.is_singleplayer() then
|
||||
player_name = "You"
|
||||
end
|
||||
-- Death by lava
|
||||
local nodename = minetest.get_node(player:getpos()).name
|
||||
if nodename == "default:lava_source" or nodename == "default:lava_flowing" then
|
||||
minetest.chat_send_all(player_name .. " met with Hephaestus.")
|
||||
-- Death by drowning
|
||||
elseif nodename == "default:water_source" or nodename == "default:water_flowing" then
|
||||
minetest.chat_send_all(player_name .. " met with Poseidon.")
|
||||
--Death by fire
|
||||
elseif nodename == "fire:basic_flame" then
|
||||
minetest.chat_send_all(player_name .. " met with Hephaestus.")
|
||||
--Death by something else
|
||||
else
|
||||
minetest.chat_send_all(player_name .. " met with Hades.")
|
||||
end
|
||||
|
||||
end)
|
|
@ -0,0 +1,38 @@
|
|||
dofile(minetest.get_modpath("safr_tweaks").."/chatcmnds.lua")
|
||||
dofile(minetest.get_modpath("safr_tweaks").."/deathnotice.lua")
|
||||
dofile(minetest.get_modpath("safr_tweaks").."/nodes.lua")
|
||||
|
||||
--[[timestop
|
||||
minetest.register_chatcommand("stoptime_noon", {
|
||||
params = "",
|
||||
description = "make day permanent",
|
||||
privs = {shout=true,settime=true},
|
||||
func = function()
|
||||
override_day_night_ratio(1)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("stoptime_night", {
|
||||
params = "",
|
||||
description = "make night permanent",
|
||||
privs = {shout=true,settime=true},
|
||||
func = function()
|
||||
override_day_night_ratio(0)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("starttime", {
|
||||
params = "",
|
||||
description = "return to the regular clock",
|
||||
privs = {shout=true,settime=true},
|
||||
func = function()
|
||||
override_day_night_ratio(nil)
|
||||
end,
|
||||
})
|
||||
]]
|
||||
--[[JOIN INFO
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
minetest.after(10, minetest.chat_send_player, player:get_player_name(), "Welcome to SAFR's server!")
|
||||
end)
|
||||
]]
|
|
@ -0,0 +1,30 @@
|
|||
--COMPRESSED COAL
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "safr_tweaks:compressed_carbon",
|
||||
burntime = 3350,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:diamond 4",
|
||||
recipe = "safr_tweaks:compressed_carbon",
|
||||
})
|
||||
|
||||
minetest.register_node("safr_tweaks:compressed_carbon", {
|
||||
description = "Compressed Carbon",
|
||||
tiles = {"safr_tweaks_compressed_carbon.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'safr_tweaks:compressed_carbon',
|
||||
recipe = {
|
||||
{'default:coalblock', 'default:coalblock', 'default:coalblock'},
|
||||
{'default:coalblock', 'default:coalblock', 'default:coalblock'},
|
||||
{'default:coalblock', 'default:coalblock', 'default:coalblock'},
|
||||
}
|
||||
})
|