nodes that aren't ground content (#16)

This commit is contained in:
Luke aka SwissalpS 2024-03-01 00:48:45 +01:00 committed by GitHub
parent 8102117572
commit 4b5e58331c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 21 additions and 2 deletions

View File

@ -24,6 +24,7 @@ minetest.register_node("computers:vanio", {
use_texture_alpha = "clip",
light_source = 4,
groups = {snappy=3},
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
@ -44,6 +45,7 @@ minetest.register_node("computers:vanio_off", {
paramtype2 = "facedir",
use_texture_alpha = "clip",
groups = {snappy=3, not_in_creative_inventory=1},
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
@ -81,6 +83,7 @@ minetest.register_node("computers:piepad", {
light_source = 8,
walkable = false,
groups = {oddly_breakable_by_hand=2},
is_ground_content = false,
selection_box = {type = "wallmounted"},
sounds = default and default.node_sound_wood_defaults() or nil
})
@ -125,6 +128,7 @@ minetest.register_node("computers:monitor", {
paramtype2 = "facedir",
walkable = false,
groups = {snappy=3},
is_ground_content = false,
selection_box = mo_sbox,
on_rightclick = function(pos, node, clicker, itemstack)
node.name = "computers:monitor_on"
@ -147,6 +151,7 @@ minetest.register_node("computers:monitor_on", {
light_source = 9,
walkable = false,
groups = {snappy=3, not_in_creative_inventory=1},
is_ground_content = false,
selection_box = mo_sbox,
drop = "computers:monitor",
on_rightclick = function(pos, node, clicker, itemstack)
@ -176,6 +181,7 @@ minetest.register_node("computers:router", {
use_texture_alpha = "clip",
walkable = false,
groups = {snappy=3},
is_ground_content = false,
sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "nodebox",
node_box = {
@ -204,6 +210,7 @@ minetest.register_node("computers:tower", {
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=3},
is_ground_content = false,
sound = default and default.node_sound_wood_defaults() or nil,
selection_box = pct_cbox,
collision_box = pct_cbox
@ -226,6 +233,7 @@ minetest.register_node("computers:server", {
paramtype2 = "facedir",
use_texture_alpha = "clip",
groups = {snappy=3},
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}
@ -266,6 +274,7 @@ minetest.register_node("computers:server_on", {
paramtype2 = "facedir",
use_texture_alpha = "clip",
groups = {snappy=3,not_in_creative_inventory=1},
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}
@ -295,6 +304,7 @@ minetest.register_node("computers:printer", {
use_texture_alpha = "clip",
walkable = true,
groups = {snappy=3},
is_ground_content = false,
sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "nodebox",
node_box = {

View File

@ -313,6 +313,7 @@ minetest.register_node("computers:tetris_arcade", {
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=3},
is_ground_content = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
selection_box = {
type = "fixed",

View File

@ -15,6 +15,7 @@ computers.register = function (name, def)
description = cdef.description,
inventory_image = cdef.inventory_image,
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
is_ground_content = false,
tiles = {
TEXPFX.."tp.png",
TEXPFX.."bt.png",
@ -40,6 +41,7 @@ computers.register = function (name, def)
paramtype2 = "facedir",
use_texture_alpha = "clip",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
is_ground_content = false,
tiles = {
(TEXPFX.."tp"..(cdef.tiles_off.top and "_off" or "")..".png"),
(TEXPFX.."bt"..(cdef.tiles_off.bottom and "_off" or "")..".png"),
@ -100,4 +102,4 @@ dofile(MODPATH.."/aliases.lua")
if minetest.get_modpath("default") and minetest.get_modpath("basic_materials") then
dofile(MODPATH.."/recipes.lua")
end
end

View File

@ -13,6 +13,7 @@ local function reg_simple(name, def)
paramtype = "light",
paramtype2 = "facedir",
groups = def.groups or {snappy=3},
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
@ -57,4 +58,4 @@ function home_vending_machines.register_machine(type, name, def)
reg_simple(name, def)
end
--TODO: add more complex machine type with formspec and selections
end
end

View File

@ -17,6 +17,7 @@ minetest.register_node("home_workshop_machines:3dprinter_bedflinger", {
paramtype = "light",
walkable = true,
groups = {snappy=3, ud_param2_colorable = 1},
is_ground_content = false,
sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "mesh",
mesh = "home_workshop_machines_3dprinter_bedflinger.obj",
@ -47,6 +48,7 @@ minetest.register_node("home_workshop_machines:3dprinter_corexy", {
paramtype = "light",
walkable = true,
groups = {snappy=3, ud_param2_colorable = 1},
is_ground_content = false,
sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "mesh",
mesh = "home_workshop_machines_3dprinter_corexy.obj",

View File

@ -19,6 +19,7 @@ minetest.register_node("home_workshop_misc:tool_cabinet", {
inventory_image = "home_workshop_misc_tool_cabinet_inv.png",
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
groups = { snappy=3 },
is_ground_content = false,
expand = { top="placeholder" },
inventory = {
size=24,
@ -37,6 +38,7 @@ minetest.register_node("home_workshop_misc:beer_tap", {
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy=3 },
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
@ -76,6 +78,7 @@ minetest.register_node("home_workshop_misc:beer_mug", {
paramtype = "light",
paramtype2 = "facedir",
groups = { snappy=3, oddly_breakable_by_hand=3 },
is_ground_content = false,
walkable = false,
sounds = default and default.node_sound_glass_defaults() or nil,
selection_box = beer_cbox,