From dd2426fc7e804b52bdab331ebbea98022713023c Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Wed, 17 Apr 2024 04:44:20 -0400 Subject: [PATCH] Fix all this --- .vscode/settings.json | 8 ++++++++ cool_workbench.txt | 2 +- source/blocks/furnace.ts | 4 ++-- source/blocks/init.ts | 2 +- source/blocks/normal.ts | 22 +++++++++++----------- source/blocks/ores.ts | 12 ++++++------ source/blocks/workbench.ts | 2 +- 7 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4d37267b..35956b28 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,9 +10,17 @@ "clazz", "databit", "dofile", + "drawtype", + "facedir", + "formspec", + "lowpart", "minetest", "modname", "modpath", + "nodebox", + "Nodeboxtype", + "paramtype", + "Screenbg", "userdata", "yslice" ] diff --git a/cool_workbench.txt b/cool_workbench.txt index 0ebe0616..b8abc37b 100644 --- a/cool_workbench.txt +++ b/cool_workbench.txt @@ -180,7 +180,7 @@ namespace glarp { } - minetest.register_node(":workbench", { + utility.registerNode(":workbench", { drawtype: Drawtype.normal, tiles: [ "crafting_workbench_top.png", diff --git a/source/blocks/furnace.ts b/source/blocks/furnace.ts index 2fe29cf6..c360ae05 100644 --- a/source/blocks/furnace.ts +++ b/source/blocks/furnace.ts @@ -469,7 +469,7 @@ namespace blocks { //? Implementation - minetest.register_node(":furnace", { + utility.registerNode(":furnace", { drawtype: utility.Drawtype.nodebox, paramtype2: utility.ParamType2.facedir, is_ground_content: false, @@ -499,7 +499,7 @@ namespace blocks { allow_metadata_inventory_move: allowMove }) - minetest.register_node(":furnace_active", { + utility.registerNode(":furnace_active", { drawtype: utility.Drawtype.nodebox, paramtype2: utility.ParamType2.facedir, is_ground_content: false, diff --git a/source/blocks/init.ts b/source/blocks/init.ts index da2fe019..701d7c8e 100644 --- a/source/blocks/init.ts +++ b/source/blocks/init.ts @@ -23,7 +23,7 @@ namespace blocks { pixel(size.z), pixel(size.y), pixel(size.z), ]] - minetest.register_node(":tall_grass_" + i, { + utility.registerNode(":tall_grass_" + i, { drawtype: utility.Drawtype.plantlike, walkable: false, waving: 1, diff --git a/source/blocks/normal.ts b/source/blocks/normal.ts index 63f1ef8b..608a0c6e 100644 --- a/source/blocks/normal.ts +++ b/source/blocks/normal.ts @@ -4,7 +4,7 @@ namespace blocks { const ToolType = types.ToolType; const blockType = types.BlockType; - minetest.register_node(":stone", { + utility.registerNode(":stone", { drawtype: utility.Drawtype.normal, tiles: ["default_stone.png"], sounds: sounds.stone(), @@ -24,7 +24,7 @@ namespace blocks { } }) - minetest.register_node(":cobblestone", { + utility.registerNode(":cobblestone", { drawtype: utility.Drawtype.normal, tiles: ["default_cobble.png"], sounds: sounds.stone(), @@ -33,7 +33,7 @@ namespace blocks { } }) - minetest.register_node(":dirt", { + utility.registerNode(":dirt", { drawtype: utility.Drawtype.normal, tiles: ["default_dirt.png"], sounds: sounds.dirt(), @@ -42,7 +42,7 @@ namespace blocks { } }) - minetest.register_node(":grass", { + utility.registerNode(":grass", { drawtype: utility.Drawtype.normal, tiles: [ "default_grass.png", @@ -56,7 +56,7 @@ namespace blocks { drop: "dirt" }) - minetest.register_node(":sand", { + utility.registerNode(":sand", { drawtype: utility.Drawtype.normal, tiles: ["default_sand.png"], sounds: sounds.sand(), @@ -65,7 +65,7 @@ namespace blocks { } }) - minetest.register_node(":gravel", { + utility.registerNode(":gravel", { drawtype: utility.Drawtype.normal, tiles: ["default_gravel.png"], sounds: sounds.gravel(), @@ -74,7 +74,7 @@ namespace blocks { } }) - minetest.register_node(":oak_tree", { + utility.registerNode(":oak_tree", { drawtype: utility.Drawtype.normal, tiles: [ "default_tree_top.png", @@ -88,7 +88,7 @@ namespace blocks { } }) - minetest.register_node(":oak_leaves", { + utility.registerNode(":oak_leaves", { drawtype: utility.Drawtype.allfaces_optional, paramtype: utility.ParamType1.light, waving: 1, @@ -109,7 +109,7 @@ namespace blocks { } }) - minetest.register_node(":oak_wood", { + utility.registerNode(":oak_wood", { drawtype: utility.Drawtype.normal, tiles: [ "default_wood.png" @@ -142,7 +142,7 @@ namespace blocks { "yellow" ] for (const color of dyes) { - minetest.register_node(":" + color + "_wool", { + utility.registerNode(":" + color + "_wool", { tiles: ["wool_" + color + ".png"], sounds: sounds.wool(), groups: { @@ -151,7 +151,7 @@ namespace blocks { }) } - minetest.register_node(":glass", { + utility.registerNode(":glass", { drawtype: utility.Drawtype.glasslike_framed_optional, tiles: [ "default_glass.png", diff --git a/source/blocks/ores.ts b/source/blocks/ores.ts index 7195bec7..3268e924 100644 --- a/source/blocks/ores.ts +++ b/source/blocks/ores.ts @@ -3,12 +3,12 @@ namespace blocks { const generateDropRequirements = tools.generateDropRequirements; const ToolType = types.ToolType; const blockType = types.BlockType; - + function oreIt(oreTexture: string): string[] { return ["default_stone.png^" + oreTexture] } - minetest.register_node(":coal_ore", { + utility.registerNode(":coal_ore", { drawtype: utility.Drawtype.normal, tiles: oreIt("default_mineral_coal.png"), sounds: sounds.stone(), @@ -27,7 +27,7 @@ namespace blocks { } }) - minetest.register_node(":iron_ore", { + utility.registerNode(":iron_ore", { drawtype: utility.Drawtype.normal, tiles: oreIt("default_mineral_iron.png"), sounds: sounds.stone(), @@ -46,7 +46,7 @@ namespace blocks { } }) - minetest.register_node(":gold_ore", { + utility.registerNode(":gold_ore", { drawtype: utility.Drawtype.normal, tiles: oreIt("default_mineral_gold.png"), sounds: sounds.stone(), @@ -65,7 +65,7 @@ namespace blocks { } }) - minetest.register_node(":diamond_ore", { + utility.registerNode(":diamond_ore", { drawtype: utility.Drawtype.normal, tiles: oreIt("default_mineral_diamond.png"), sounds: sounds.stone(), @@ -84,7 +84,7 @@ namespace blocks { } }) - minetest.register_node(":mese_ore", { + utility.registerNode(":mese_ore", { drawtype: utility.Drawtype.normal, tiles: oreIt("default_mineral_mese.png"), sounds: sounds.stone(), diff --git a/source/blocks/workbench.ts b/source/blocks/workbench.ts index 267dc168..00509182 100644 --- a/source/blocks/workbench.ts +++ b/source/blocks/workbench.ts @@ -182,7 +182,7 @@ namespace blocks { // } - minetest.register_node(":workbench", { + utility.registerNode(":workbench", { drawtype: utility.Drawtype.normal, tiles: [ "crafting_workbench_top.png",