// Item prototypes. // // Fields: id, name, sprite (required); description, max_stack (50), tags, on_use // (script hook "module::function"), consume_on_use, props (numbers for scripts). items: [ // Materials { id: "iron_ore", name: "Iron ore", sprite: "sprites/items/iron_ore.png", description: "Rough ore. Smelt it in a furnace.", tags: ["ore"] }, { id: "iron_plate", name: "Iron plate", sprite: "sprites/items/iron_plate.png", description: "Standard building material.", tags: ["metal"] }, { id: "log", name: "Log", sprite: "sprites/items/log.png", max_stack: 20, tags: ["wood"] }, { id: "plank", name: "Plank", sprite: "sprites/items/plank.png", tags: ["wood"] }, // Tools { id: "screwdriver", name: "Screwdriver", sprite: "sprites/items/screwdriver.png", max_stack: 1, tags: ["tool"] }, { id: "wrench", name: "Wrench", sprite: "sprites/items/wrench.png", max_stack: 1, tags: ["tool"] }, { id: "pickaxe", name: "Pickaxe", sprite: "sprites/items/pickaxe.png", max_stack: 1, tags: ["tool"] }, { id: "axe", name: "Axe", sprite: "sprites/items/axe.png", max_stack: 1, tags: ["tool"] }, // Food { id: "apple", name: "Apple", sprite: "sprites/items/apple.png", max_stack: 10, tags: ["food"], on_use: Some("food::eat"), consume_on_use: true, props: { "nutrition": 15 } }, { id: "bread", name: "Bread", sprite: "sprites/items/bread.png", max_stack: 10, tags: ["food"], on_use: Some("food::eat"), consume_on_use: true, props: { "nutrition": 25 } }, { id: "sandwich", name: "Sandwich", sprite: "sprites/items/sandwich.png", max_stack: 5, tags: ["food"], on_use: Some("food::eat"), consume_on_use: true, props: { "nutrition": 50, "heal": 5 } }, // Medical { id: "medkit", name: "Medkit", sprite: "sprites/items/medkit.png", max_stack: 5, tags: ["medical"], on_use: Some("medical::treat"), consume_on_use: true, props: { "heal": 40 } }, ]