Init
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# 数据文件夹说明
|
||||
|
||||
## 📁 文件夹结构
|
||||
|
||||
### 📁 config/ - 配置文件
|
||||
包含游戏的核心配置文件:
|
||||
- `items.csv` - 物品数据配置
|
||||
- `resource_categories.json` - 资源分类配置
|
||||
- `inventory_categories.json` - 库存分类配置
|
||||
- `items.csv.import` - CSV文件的导入设置
|
||||
|
||||
### 📁 translations/ - 本地化文件
|
||||
存放 Godot 自动生成的本地化文件(.translation)。
|
||||
这个文件夹包含 `.gdignore` 文件,告诉 Godot 忽略其中的内容。
|
||||
|
||||
### 📁 imports/ - 导入配置备份
|
||||
存放导入配置文件的备份。
|
||||
这个文件夹包含 `.gdignore` 文件,告诉 Godot 忽略其中的内容。
|
||||
|
||||
## ⚠️ 重要说明
|
||||
|
||||
### 防止 Translation 文件自动生成
|
||||
|
||||
如果你发现 `config/` 文件夹中又出现了 `.translation` 文件,说明 CSV 文件的导入设置被重置了。
|
||||
|
||||
**解决方法:**
|
||||
|
||||
1. 检查 `data/config/items.csv.import` 文件
|
||||
2. 确保内容如下:
|
||||
```
|
||||
[remap]
|
||||
|
||||
importer="keep"
|
||||
type=""
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/config/items.csv"
|
||||
|
||||
[params]
|
||||
```
|
||||
|
||||
3. 如果不是这样,请修改为上述内容
|
||||
4. 删除任何新生成的 `.translation` 文件:
|
||||
```bash
|
||||
del data\config\*.translation
|
||||
```
|
||||
|
||||
### 为什么会生成 Translation 文件?
|
||||
|
||||
Godot 默认将 CSV 文件识别为本地化资源,会自动生成 `.translation` 文件。
|
||||
通过将导入器设置为 "keep",我们告诉 Godot 将 CSV 文件保持原样,不进行特殊处理。
|
||||
|
||||
## 🔧 维护建议
|
||||
|
||||
1. **不要手动编辑** `.import` 文件,除非必要
|
||||
2. **定期检查** config 文件夹,确保没有新的 translation 文件生成
|
||||
3. **备份重要配置** 在修改配置文件前先备份
|
||||
4. **使用版本控制** 跟踪配置文件的变化
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"recipes": [
|
||||
{
|
||||
"id": "iron_ingot_smelting",
|
||||
"outputItem": "iron_ingot",
|
||||
"outputQuantity": 1,
|
||||
"craftingMethod": "冶炼",
|
||||
"craftingTime": 1.0,
|
||||
"ingredients": [
|
||||
{
|
||||
"itemId": "iron_ore",
|
||||
"quantity": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"categories": [
|
||||
{
|
||||
"categoryName": "原材料",
|
||||
"items": [
|
||||
"iron_ore",
|
||||
"copper_ore",
|
||||
"coal_ore",
|
||||
"water"
|
||||
]
|
||||
},
|
||||
{
|
||||
"categoryName": "炼制成品",
|
||||
"items": [
|
||||
"iron_ingot",
|
||||
"copper_ingot"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
Id,Name,Category,Description,Recipe,CraftTime,PowerConsumption,IconPath
|
||||
iron_ore,铁矿,RawMaterial,基础原材料,可用于冶炼铁块,null,0,0,res://assets/textures/items/iron_ore.png
|
||||
copper_ore,铜矿,RawMaterial,基础原材料,可用于冶炼铜块,null,0,0,res://assets/textures/items/copper_ore.png
|
||||
stone_ore,石矿,RawMaterial,基础建筑材料,可用于建造建筑,null,0,0,res://assets/textures/items/stone_ore.png
|
||||
coal_ore,煤矿,RawMaterial,重要的能源资源,可用于发电,null,0,0,res://assets/textures/items/coal_ore.png
|
||||
water,水,RawMaterial,基础资源,可用于多种生产,null,0,0,res://assets/textures/items/water.png
|
||||
crude_oil,原油,RawMaterial,重要的能源资源,可用于生产燃料,null,0,0,res://assets/textures/items/crude_oil.png
|
||||
iron_ingot,铁块,ProcessedMaterial,由铁矿冶炼而成的基础材料,iron_ore:1,1.0,60.0,res://assets/textures/items/iron_ingot.png
|
||||
copper_ingot,铜块,ProcessedMaterial,由铜矿冶炼而成的基础材料,copper_ore:1,1.0,60.0,res://assets/textures/items/copper_ingot.png
|
||||
smelter,冶炼厂,Building,用于冶炼矿石的基础建筑,iron_ingot:4;copper_ingot:2,3.0,360.0,res://assets/textures/buildings/smelter.png
|
||||
miner,采矿机,Building,自动采集矿石的基础建筑,iron_ingot:3;copper_ingot:1,2.0,420.0,res://assets/textures/buildings/miner.png
|
||||
assembler,组装机,ProductionDevice,高级生产设备,可制造复杂物品,iron_ingot:6;copper_ingot:4,5.0,480.0,res://assets/textures/buildings/assembler.png
|
||||
chemical_plant,化工厂,ProductionDevice,专业化工生产设备,可处理液体,iron_ingot:8;copper_ingot:6,6.0,600.0,res://assets/textures/buildings/chemical_plant.png
|
||||
|
@@ -0,0 +1,10 @@
|
||||
[remap]
|
||||
|
||||
importer="keep"
|
||||
type=""
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/config/items.csv"
|
||||
|
||||
[params]
|
||||
@@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"categoryName": "手动采集",
|
||||
"itemIds": [
|
||||
"iron_ore",
|
||||
"copper_ore",
|
||||
"coal_ore",
|
||||
"stone_ore",
|
||||
"water",
|
||||
"crude_oil"
|
||||
]
|
||||
},
|
||||
{
|
||||
"categoryName": "基础资源",
|
||||
"itemIds": [
|
||||
"iron_ore",
|
||||
"copper_ore",
|
||||
"stone_ore",
|
||||
"coal_ore"
|
||||
]
|
||||
},
|
||||
{
|
||||
"categoryName": "液体资源",
|
||||
"itemIds": [
|
||||
"water",
|
||||
"crude_oil"
|
||||
]
|
||||
},
|
||||
{
|
||||
"categoryName": "冶炼",
|
||||
"itemIds": [
|
||||
"iron_ingot",
|
||||
"copper_ingot"
|
||||
]
|
||||
},
|
||||
{
|
||||
"categoryName": "建筑设施",
|
||||
"itemIds": [
|
||||
"smelter",
|
||||
"miner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"categoryName": "生产设备",
|
||||
"itemIds": [
|
||||
"assembler",
|
||||
"chemical_plant"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,2 @@
|
||||
# Godot 会忽略这个文件夹中的所有文件
|
||||
# 这些是自动生成的本地化文件,不需要被 Godot 处理
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user