commit 4698d790
Added a csv with the food items. The goal is to generate the sprite, items and spawn_spell file for them.
Changed files
| M | data/saland/items/base_items.json before |
| A | extra/scripts/food_items.csv |
| A | extra/scripts/python/process_food_items.py |
diff --git a/data/saland/items/base_items.json b/data/saland/items/base_items.json
index 002212f..bac47ef 100644
--- a/data/saland/items/base_items.json
+++ b/data/saland/items/base_items.json
@@ -1,35 +1,6 @@
{
"items": [
{
- "name": "spell_fireball",
- "icon": "effect_fireball",
- "item_name": "",
- "tile": 0,
- "_comment_tile": "Number reference to a tile, we might also need a tileset at some point",
- "type": "dot"
- }
- ,{
- "icon": "item_weapon_long_knife",
- "name": "weapon_slash_long_knife"
- }
- ,{
- "name": "spell_create_block",
- "tile": 607,
- "type": "tile"
- }
- ,{
- "icon": "",
- "name" : "spell_create_block",
- "tile" : 28,
- "type" : "tile"
- }
- ,{
- "icon" : "",
- "name" : "spell_create_block",
- "tile" : 16,
- "type" : "tile"
- }
- ,{
"icon" : "item_food_potato",
"name" : "spell_spawn_item",
"item_name" : "food_potato"
diff --git a/extra/scripts/food_items.csv b/extra/scripts/food_items.csv
new file mode 100644
index 0000000..4458e95
--- /dev/null
+++ b/extra/scripts/food_items.csv
@@ -0,0 +1,15 @@
+food_name,x,y,radius,description
+potato,0,0,5,"Potato"
+carrot,192,0,5,"Carrot"
+onion,416,0,5,"Onion"
+onion_red,448,0,5,"Red onion"
+pepper_green,576,0,5,"Green pepper"
+pepper_red,608,0,5,"Red pepper"
+pepper_orange,640,0,5,"Orange pepper"
+pepper_yellow,672,0,5,"Yellow pepper"
+water_mellon,736,0,15,"Water mellon"
+mellon,800,0,14,"Mellon"
+pumpkin,864,0,15,"Pumpkin"
+apple_green,32,320,5,"Green apple"
+apple_yellow,96,320,5,"Yellow apple"
+apple_red,128,320,5,"Red apple"
\ No newline at end of file
diff --git a/extra/scripts/python/process_food_items.py b/extra/scripts/python/process_food_items.py
new file mode 100644
index 0000000..84087ad
--- /dev/null
+++ b/extra/scripts/python/process_food_items.py
@@ -0,0 +1,11 @@
+import pandas as pd
+
+FILENAME="../food_items.csv"
+
+def main():
+ reader = pd.read_csv(FILENAME)
+ for row in reader.itertuples():
+ print(row)
+
+
+main()
\ No newline at end of file