Fix all this

This commit is contained in:
jordan4ibanez 2024-04-17 04:44:20 -04:00
parent 5fbc51d901
commit dd2426fc7e
7 changed files with 30 additions and 22 deletions

View File

@ -10,9 +10,17 @@
"clazz", "clazz",
"databit", "databit",
"dofile", "dofile",
"drawtype",
"facedir",
"formspec",
"lowpart",
"minetest", "minetest",
"modname", "modname",
"modpath", "modpath",
"nodebox",
"Nodeboxtype",
"paramtype",
"Screenbg",
"userdata", "userdata",
"yslice" "yslice"
] ]

View File

@ -180,7 +180,7 @@ namespace glarp {
} }
minetest.register_node(":workbench", { utility.registerNode(":workbench", {
drawtype: Drawtype.normal, drawtype: Drawtype.normal,
tiles: [ tiles: [
"crafting_workbench_top.png", "crafting_workbench_top.png",

View File

@ -469,7 +469,7 @@ namespace blocks {
//? Implementation //? Implementation
minetest.register_node(":furnace", { utility.registerNode(":furnace", {
drawtype: utility.Drawtype.nodebox, drawtype: utility.Drawtype.nodebox,
paramtype2: utility.ParamType2.facedir, paramtype2: utility.ParamType2.facedir,
is_ground_content: false, is_ground_content: false,
@ -499,7 +499,7 @@ namespace blocks {
allow_metadata_inventory_move: allowMove allow_metadata_inventory_move: allowMove
}) })
minetest.register_node(":furnace_active", { utility.registerNode(":furnace_active", {
drawtype: utility.Drawtype.nodebox, drawtype: utility.Drawtype.nodebox,
paramtype2: utility.ParamType2.facedir, paramtype2: utility.ParamType2.facedir,
is_ground_content: false, is_ground_content: false,

View File

@ -23,7 +23,7 @@ namespace blocks {
pixel(size.z), pixel(size.y), pixel(size.z), pixel(size.z), pixel(size.y), pixel(size.z),
]] ]]
minetest.register_node(":tall_grass_" + i, { utility.registerNode(":tall_grass_" + i, {
drawtype: utility.Drawtype.plantlike, drawtype: utility.Drawtype.plantlike,
walkable: false, walkable: false,
waving: 1, waving: 1,

View File

@ -4,7 +4,7 @@ namespace blocks {
const ToolType = types.ToolType; const ToolType = types.ToolType;
const blockType = types.BlockType; const blockType = types.BlockType;
minetest.register_node(":stone", { utility.registerNode(":stone", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: ["default_stone.png"], tiles: ["default_stone.png"],
sounds: sounds.stone(), sounds: sounds.stone(),
@ -24,7 +24,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":cobblestone", { utility.registerNode(":cobblestone", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: ["default_cobble.png"], tiles: ["default_cobble.png"],
sounds: sounds.stone(), sounds: sounds.stone(),
@ -33,7 +33,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":dirt", { utility.registerNode(":dirt", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: ["default_dirt.png"], tiles: ["default_dirt.png"],
sounds: sounds.dirt(), sounds: sounds.dirt(),
@ -42,7 +42,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":grass", { utility.registerNode(":grass", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: [ tiles: [
"default_grass.png", "default_grass.png",
@ -56,7 +56,7 @@ namespace blocks {
drop: "dirt" drop: "dirt"
}) })
minetest.register_node(":sand", { utility.registerNode(":sand", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: ["default_sand.png"], tiles: ["default_sand.png"],
sounds: sounds.sand(), sounds: sounds.sand(),
@ -65,7 +65,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":gravel", { utility.registerNode(":gravel", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: ["default_gravel.png"], tiles: ["default_gravel.png"],
sounds: sounds.gravel(), sounds: sounds.gravel(),
@ -74,7 +74,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":oak_tree", { utility.registerNode(":oak_tree", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: [ tiles: [
"default_tree_top.png", "default_tree_top.png",
@ -88,7 +88,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":oak_leaves", { utility.registerNode(":oak_leaves", {
drawtype: utility.Drawtype.allfaces_optional, drawtype: utility.Drawtype.allfaces_optional,
paramtype: utility.ParamType1.light, paramtype: utility.ParamType1.light,
waving: 1, waving: 1,
@ -109,7 +109,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":oak_wood", { utility.registerNode(":oak_wood", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: [ tiles: [
"default_wood.png" "default_wood.png"
@ -142,7 +142,7 @@ namespace blocks {
"yellow" "yellow"
] ]
for (const color of dyes) { for (const color of dyes) {
minetest.register_node(":" + color + "_wool", { utility.registerNode(":" + color + "_wool", {
tiles: ["wool_" + color + ".png"], tiles: ["wool_" + color + ".png"],
sounds: sounds.wool(), sounds: sounds.wool(),
groups: { groups: {
@ -151,7 +151,7 @@ namespace blocks {
}) })
} }
minetest.register_node(":glass", { utility.registerNode(":glass", {
drawtype: utility.Drawtype.glasslike_framed_optional, drawtype: utility.Drawtype.glasslike_framed_optional,
tiles: [ tiles: [
"default_glass.png", "default_glass.png",

View File

@ -3,12 +3,12 @@ namespace blocks {
const generateDropRequirements = tools.generateDropRequirements; const generateDropRequirements = tools.generateDropRequirements;
const ToolType = types.ToolType; const ToolType = types.ToolType;
const blockType = types.BlockType; const blockType = types.BlockType;
function oreIt(oreTexture: string): string[] { function oreIt(oreTexture: string): string[] {
return ["default_stone.png^" + oreTexture] return ["default_stone.png^" + oreTexture]
} }
minetest.register_node(":coal_ore", { utility.registerNode(":coal_ore", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: oreIt("default_mineral_coal.png"), tiles: oreIt("default_mineral_coal.png"),
sounds: sounds.stone(), sounds: sounds.stone(),
@ -27,7 +27,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":iron_ore", { utility.registerNode(":iron_ore", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: oreIt("default_mineral_iron.png"), tiles: oreIt("default_mineral_iron.png"),
sounds: sounds.stone(), sounds: sounds.stone(),
@ -46,7 +46,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":gold_ore", { utility.registerNode(":gold_ore", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: oreIt("default_mineral_gold.png"), tiles: oreIt("default_mineral_gold.png"),
sounds: sounds.stone(), sounds: sounds.stone(),
@ -65,7 +65,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":diamond_ore", { utility.registerNode(":diamond_ore", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: oreIt("default_mineral_diamond.png"), tiles: oreIt("default_mineral_diamond.png"),
sounds: sounds.stone(), sounds: sounds.stone(),
@ -84,7 +84,7 @@ namespace blocks {
} }
}) })
minetest.register_node(":mese_ore", { utility.registerNode(":mese_ore", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: oreIt("default_mineral_mese.png"), tiles: oreIt("default_mineral_mese.png"),
sounds: sounds.stone(), sounds: sounds.stone(),

View File

@ -182,7 +182,7 @@ namespace blocks {
// } // }
minetest.register_node(":workbench", { utility.registerNode(":workbench", {
drawtype: utility.Drawtype.normal, drawtype: utility.Drawtype.normal,
tiles: [ tiles: [
"crafting_workbench_top.png", "crafting_workbench_top.png",