Made it so you can see the sword in your inventory and pick them up from the ground.
This commit is contained in:
parent
dfc86452fc
commit
aa83417ba3
6 changed files with 26 additions and 2 deletions
|
|
@ -17,6 +17,11 @@
|
||||||
"frame_width": 256,
|
"frame_width": 256,
|
||||||
"frame_height": 256
|
"frame_height": 256
|
||||||
},
|
},
|
||||||
|
"sword_1":
|
||||||
|
{"path": "assets/items/sword_1_sprite.png",
|
||||||
|
"frame_width": 256,
|
||||||
|
"frame_height": 256
|
||||||
|
},
|
||||||
"ladder_down":
|
"ladder_down":
|
||||||
{"path": "assets/sprites/ladder_down.png",
|
{"path": "assets/sprites/ladder_down.png",
|
||||||
"frame_width": 256,
|
"frame_width": 256,
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,10 @@
|
||||||
{"path": "assets/icons/repair_kit.png",
|
{"path": "assets/icons/repair_kit.png",
|
||||||
"frame_width": 96,
|
"frame_width": 96,
|
||||||
"frame_height": 96
|
"frame_height": 96
|
||||||
|
},
|
||||||
|
"sword_1":
|
||||||
|
{"path": "assets/icons/sword_1_icon.png",
|
||||||
|
"frame_width": 300,
|
||||||
|
"frame_height": 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
assets/icons/sword_1_icon.png
Normal file
BIN
assets/icons/sword_1_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -13,5 +13,19 @@
|
||||||
{"_type": "Sprite", "name": "repair_kit", "width": 256, "height": 256, "scale": 1.0},
|
{"_type": "Sprite", "name": "repair_kit", "width": 256, "height": 256, "scale": 1.0},
|
||||||
{"_type": "Sound", "attack": "pickup", "death": "blank"}
|
{"_type": "Sound", "attack": "pickup", "death": "blank"}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"SWORD_1": {
|
||||||
|
"id": "SWORD_1",
|
||||||
|
"name": "Robot Repair Kit",
|
||||||
|
"description": "A healing item for robots.",
|
||||||
|
"inventory_count": 1,
|
||||||
|
"components": [
|
||||||
|
{"_type": "Tile", "display": 1004,
|
||||||
|
"foreground": "items/fg:potion",
|
||||||
|
"background": "color:transparent"
|
||||||
|
},
|
||||||
|
{"_type": "Sprite", "name": "sword_1", "width": 300, "height": 100, "scale": 1.0},
|
||||||
|
{"_type": "Sound", "attack": "pickup", "death": "blank"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
assets/items/sword_1_sprite.png
Normal file
BIN
assets/items/sword_1_sprite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
|
|
@ -204,8 +204,8 @@ void WorldBuilder::configure_starting_items(DinkyECS::World &world) {
|
||||||
auto healing = System::spawn_item(world, "REPAIR_KIT");
|
auto healing = System::spawn_item(world, "REPAIR_KIT");
|
||||||
inventory.add("inv0", healing);
|
inventory.add("inv0", healing);
|
||||||
|
|
||||||
healing = System::spawn_item(world, "REPAIR_KIT");
|
auto sword = System::spawn_item(world, "SWORD_1");
|
||||||
inventory.add("inv1", healing);
|
inventory.add("hand_main", sword);
|
||||||
|
|
||||||
world.make_constant(healing);
|
world.make_constant(healing);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue