Fix this mess
This commit is contained in:
parent
fd45329b9c
commit
149df2b352
@ -219,7 +219,7 @@ namespace blocks {
|
||||
|
||||
function fuelCheck(fuelInventory: ItemStackObject[]): CraftResultObject {
|
||||
const [result,] = minetest.get_craft_result({
|
||||
method: utility.CraftCheckType.fuel,
|
||||
method: CraftCheckType.fuel,
|
||||
width: 1,
|
||||
items: fuelInventory
|
||||
})
|
||||
@ -229,7 +229,7 @@ namespace blocks {
|
||||
|
||||
function itemCheck(inputInventory: ItemStackObject[]): CraftResultObject {
|
||||
const [result,] = minetest.get_craft_result({
|
||||
method: utility.CraftCheckType.cooking,
|
||||
method: CraftCheckType.cooking,
|
||||
width: 1,
|
||||
items: inputInventory
|
||||
})
|
||||
@ -431,7 +431,7 @@ namespace blocks {
|
||||
//? Visuals
|
||||
|
||||
const furnaceNodeBox: NodeBox = {
|
||||
type: utility.Nodeboxtype.fixed,
|
||||
type: Nodeboxtype.fixed,
|
||||
fixed: [
|
||||
[ // Left slice.
|
||||
pixel(0), pixel(0), pixel(0),
|
||||
@ -461,7 +461,7 @@ namespace blocks {
|
||||
}
|
||||
|
||||
const furnaceSelectionBox: NodeBox = {
|
||||
type: utility.Nodeboxtype.fixed,
|
||||
type: Nodeboxtype.fixed,
|
||||
fixed: [
|
||||
[pixel(0), pixel(0), pixel(0), pixel(16), pixel(16), pixel(16)]
|
||||
]
|
||||
@ -470,8 +470,8 @@ namespace blocks {
|
||||
//? Implementation
|
||||
|
||||
utility.registerNode("furnace", {
|
||||
drawtype: utility.Drawtype.nodebox,
|
||||
paramtype2: utility.ParamType2.facedir,
|
||||
drawtype: Drawtype.nodebox,
|
||||
paramtype2: ParamType2.facedir,
|
||||
is_ground_content: false,
|
||||
node_box: furnaceNodeBox,
|
||||
selection_box: furnaceSelectionBox,
|
||||
@ -500,8 +500,8 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("furnace_active", {
|
||||
drawtype: utility.Drawtype.nodebox,
|
||||
paramtype2: utility.ParamType2.facedir,
|
||||
drawtype: Drawtype.nodebox,
|
||||
paramtype2: ParamType2.facedir,
|
||||
is_ground_content: false,
|
||||
light_source: 8,
|
||||
node_box: furnaceNodeBox,
|
||||
|
@ -24,20 +24,20 @@ namespace blocks {
|
||||
]]
|
||||
|
||||
utility.registerNode("tall_grass_" + i, {
|
||||
drawtype: utility.Drawtype.plantlike,
|
||||
drawtype: Drawtype.plantlike,
|
||||
walkable: false,
|
||||
waving: 1,
|
||||
paramtype: utility.ParamType1.light,
|
||||
paramtype2: utility.ParamType2.degrotate,
|
||||
paramtype: ParamType1.light,
|
||||
paramtype2: ParamType2.degrotate,
|
||||
tiles: ["default_grass_" + i + ".png"],
|
||||
buildable_to: true,
|
||||
sounds: sounds.plant(),
|
||||
collision_box: {
|
||||
type: utility.Nodeboxtype.fixed,
|
||||
type: Nodeboxtype.fixed,
|
||||
fixed: collisionBox
|
||||
},
|
||||
selection_box: {
|
||||
type: utility.Nodeboxtype.fixed,
|
||||
type: Nodeboxtype.fixed,
|
||||
fixed: collisionBox
|
||||
},
|
||||
groups: {
|
||||
|
@ -5,7 +5,7 @@ namespace blocks {
|
||||
const blockType = types.BlockType;
|
||||
|
||||
utility.registerNode("stone", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: ["default_stone.png"],
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
@ -25,7 +25,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("cobblestone", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: ["default_cobble.png"],
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
@ -34,7 +34,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("dirt", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: ["default_dirt.png"],
|
||||
sounds: sounds.dirt(),
|
||||
groups: {
|
||||
@ -43,7 +43,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("grass", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: [
|
||||
"default_grass.png",
|
||||
"default_dirt.png",
|
||||
@ -57,7 +57,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("sand", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: ["default_sand.png"],
|
||||
sounds: sounds.sand(),
|
||||
groups: {
|
||||
@ -66,7 +66,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("gravel", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: ["default_gravel.png"],
|
||||
sounds: sounds.gravel(),
|
||||
groups: {
|
||||
@ -75,7 +75,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("oak_tree", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: [
|
||||
"default_tree_top.png",
|
||||
"default_tree_top.png",
|
||||
@ -89,8 +89,8 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("oak_leaves", {
|
||||
drawtype: utility.Drawtype.allfaces_optional,
|
||||
paramtype: utility.ParamType1.light,
|
||||
drawtype: Drawtype.allfaces_optional,
|
||||
paramtype: ParamType1.light,
|
||||
waving: 1,
|
||||
tiles: ["default_leaves.png"],
|
||||
sounds: sounds.plant(),
|
||||
@ -110,7 +110,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("oak_wood", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: [
|
||||
"default_wood.png"
|
||||
],
|
||||
@ -152,13 +152,13 @@ namespace blocks {
|
||||
}
|
||||
|
||||
utility.registerNode("glass", {
|
||||
drawtype: utility.Drawtype.glasslike_framed_optional,
|
||||
drawtype: Drawtype.glasslike_framed_optional,
|
||||
tiles: [
|
||||
"default_glass.png",
|
||||
"default_glass_detail.png"
|
||||
],
|
||||
use_texture_alpha: utility.TextureAlpha.clip,
|
||||
paramtype: utility.ParamType1.light,
|
||||
use_texture_alpha: TextureAlpha.clip,
|
||||
paramtype: ParamType1.light,
|
||||
sunlight_propagates: true,
|
||||
is_ground_content: false,
|
||||
sounds: sounds.glass(),
|
||||
|
@ -9,7 +9,7 @@ namespace blocks {
|
||||
}
|
||||
|
||||
utility.registerNode("coal_ore", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: oreIt("default_mineral_coal.png"),
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
@ -28,7 +28,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("iron_ore", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: oreIt("default_mineral_iron.png"),
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
@ -47,7 +47,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("gold_ore", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: oreIt("default_mineral_gold.png"),
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
@ -66,7 +66,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("diamond_ore", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: oreIt("default_mineral_diamond.png"),
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
@ -85,7 +85,7 @@ namespace blocks {
|
||||
})
|
||||
|
||||
utility.registerNode("mese_ore", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: oreIt("default_mineral_mese.png"),
|
||||
sounds: sounds.stone(),
|
||||
groups: {
|
||||
|
@ -183,7 +183,7 @@ namespace blocks {
|
||||
|
||||
|
||||
utility.registerNode("workbench", {
|
||||
drawtype: utility.Drawtype.normal,
|
||||
drawtype: Drawtype.normal,
|
||||
tiles: [
|
||||
"crafting_workbench_top.png",
|
||||
"default_wood.png",
|
||||
|
@ -75,7 +75,7 @@ namespace builtinEntity {
|
||||
physical: true,
|
||||
collide_with_objects: false,
|
||||
collisionbox: [-0.3, -0.3, -0.3, 0.3, 0.3, 0.3],
|
||||
visual: utility.EntityVisual.cube,
|
||||
visual: EntityVisual.cube,
|
||||
visual_size: vector.create2d(),
|
||||
automatic_rotate: 1,
|
||||
textures: [""],
|
||||
@ -103,7 +103,7 @@ namespace builtinEntity {
|
||||
|
||||
this.object.set_properties({
|
||||
is_visible: true,
|
||||
visual: utility.EntityVisual.wielditem,
|
||||
visual: EntityVisual.wielditem,
|
||||
textures: [itemName],
|
||||
visual_size: vector.create2d(size + bias, size + bias),
|
||||
collisionbox: c,
|
||||
@ -374,8 +374,8 @@ namespace builtinEntity {
|
||||
if (sNode) {
|
||||
const sDef = minetest.registered_nodes[sNode.name] || {}
|
||||
isStuck = (sDef.walkable == null || sDef.walkable == true) &&
|
||||
(sDef.collision_box == null || sDef.collision_box.type == "regular") &&
|
||||
(sDef.node_box == null || sDef.node_box.type == "regular")
|
||||
(sDef.collision_box == null || sDef.collision_box.type == Nodeboxtype.regular) &&
|
||||
(sDef.node_box == null || sDef.node_box.type == Nodeboxtype.regular)
|
||||
this.unstuckSelf(pos, isStuck)
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ namespace minecart {
|
||||
name = "minecart"
|
||||
object = fakeRef()
|
||||
initial_properties = {
|
||||
visual: utility.EntityVisual.mesh,
|
||||
visual: EntityVisual.mesh,
|
||||
// Reference: carts_cart.b3d
|
||||
mesh: "minecart.b3d",
|
||||
textures: ["minecart.png"]
|
||||
|
@ -4,13 +4,13 @@ namespace recipes {
|
||||
const blockType = types.CraftingBlockType
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.cooking,
|
||||
type: CraftRecipeType.cooking,
|
||||
output: "glass",
|
||||
recipe: blockType.sand,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.cooking,
|
||||
type: CraftRecipeType.cooking,
|
||||
output: "iron",
|
||||
recipe: "iron_ore",
|
||||
})
|
||||
|
@ -4,31 +4,31 @@ namespace recipes {
|
||||
const blockType = types.CraftingBlockType
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.fuel,
|
||||
type: CraftRecipeType.fuel,
|
||||
recipe: "coal",
|
||||
burntime: 40,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.fuel,
|
||||
type: CraftRecipeType.fuel,
|
||||
recipe: "coal_block",
|
||||
burntime: 370,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.fuel,
|
||||
type: CraftRecipeType.fuel,
|
||||
recipe: blockType.tree,
|
||||
burntime: 40,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.fuel,
|
||||
type: CraftRecipeType.fuel,
|
||||
recipe: blockType.planks,
|
||||
burntime: 7,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type: utility.CraftRecipeType.fuel,
|
||||
type: CraftRecipeType.fuel,
|
||||
recipe: "stick",
|
||||
burntime: 1,
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
namespace recipes {
|
||||
const r = minetest.register_craft;
|
||||
const recipeType = utility.CraftRecipeType;
|
||||
const recipeType = CraftRecipeType;
|
||||
const craftBlockType = types.CraftingBlockType;
|
||||
// This will probably get broken down into sub-files in this namespace.
|
||||
// But for now, crafting goes here.
|
||||
|
@ -32,7 +32,7 @@ namespace world {
|
||||
|
||||
minetest.register_decoration({
|
||||
name: "grassOnFields",
|
||||
deco_type: utility.DecorationType.simple,
|
||||
deco_type: DecorationType.simple,
|
||||
place_on: "grass",
|
||||
biomes: ["Forgotten Fields"],
|
||||
decoration: grass,
|
||||
@ -294,7 +294,7 @@ namespace world {
|
||||
oakIDs.forEach((id, key) => {
|
||||
minetest.register_decoration({
|
||||
name: "oak_" + oakSize[key],
|
||||
deco_type: utility.DecorationType.schematic,
|
||||
deco_type: DecorationType.schematic,
|
||||
place_on: "grass",
|
||||
biomes: ["Forgotten Fields"],
|
||||
schematic: id,
|
||||
|
@ -4,7 +4,7 @@ namespace world {
|
||||
//? Coal
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "coal_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 8 * 8 * 8,
|
||||
@ -15,7 +15,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "coal_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 12 * 12 * 12,
|
||||
@ -28,7 +28,7 @@ namespace world {
|
||||
//? Iron
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "iron_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 9 * 9 * 9,
|
||||
@ -39,7 +39,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "iron_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 7 * 7 * 7,
|
||||
@ -50,7 +50,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "iron_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 12 * 12 * 12,
|
||||
@ -63,7 +63,7 @@ namespace world {
|
||||
//? Gold
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "gold_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 13 * 13 * 13,
|
||||
@ -74,7 +74,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "gold_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 15 * 15 * 15,
|
||||
@ -85,7 +85,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "gold_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 13 * 13 * 13,
|
||||
@ -98,7 +98,7 @@ namespace world {
|
||||
//? Diamond
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "diamond_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 14 * 14 * 14,
|
||||
@ -109,7 +109,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "diamond_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 18 * 18 * 18,
|
||||
@ -120,7 +120,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "diamond_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 14 * 14 * 14,
|
||||
@ -133,7 +133,7 @@ namespace world {
|
||||
//? Mese
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "mese_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 15 * 15 * 15,
|
||||
@ -144,7 +144,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "mese_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 17 * 17 * 17,
|
||||
@ -155,7 +155,7 @@ namespace world {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type: utility.OreType.scatter,
|
||||
ore_type: OreType.scatter,
|
||||
ore: "mese_ore",
|
||||
wherein: "stone",
|
||||
clust_scarcity: 15 * 15 * 15,
|
||||
|
Loading…
x
Reference in New Issue
Block a user