部分json修改,npc入参数据名修改

This commit is contained in:
lq 2024-12-18 11:16:15 +08:00
parent bba48a5f25
commit 9770a94f2b
6 changed files with 956 additions and 962 deletions

View File

@ -9,7 +9,8 @@
"Difficulty": "1|2|6", "Difficulty": "1|2|6",
"SpecialEvent": "-1,-1,-1,-1|1,50,10,20|1,50,20,20", "SpecialEvent": "-1,-1,-1,-1|1,50,10,20|1,50,20,20",
"Role": "8000,8001,8002,8003,8004,8005,8006,8008,8009|8000,8001,8002,8003,8004,8005,8006,8008,8009|8000,8001,8002,8003,8004,8005,8006,8008,8009,8010", "Role": "8000,8001,8002,8003,8004,8005,8006,8008,8009|8000,8001,8002,8003,8004,8005,8006,8008,8009|8000,8001,8002,8003,8004,8005,8006,8008,8009,8010",
"GeneralRole": "8000,8001,8002,8003,8004,8005,8006,8008,8009,8010" "GeneralRole": "8000,8001,8002,8003,8004,8005,8006,8008,8009,8010",
"ItemPos": "-1#3016,2,1,2,3#3016,2,1,2,3|3016,2,2,2,2"
}, },
{ {
"ID": "2002", "ID": "2002",
@ -21,30 +22,7 @@
"Difficulty": "1|2|3", "Difficulty": "1|2|3",
"SpecialEvent": "-1,-1,-1,-1|1,50,10,20|1,50,20,20", "SpecialEvent": "-1,-1,-1,-1|1,50,10,20|1,50,20,20",
"Role": "8000,8001,8002,8003,8004,8005,8007,8011|8000,8001,8002,8003,8004,8005,8007,8011|8000,8001,8002,8003,8004,8005,8007,8011", "Role": "8000,8001,8002,8003,8004,8005,8007,8011|8000,8001,8002,8003,8004,8005,8007,8011|8000,8001,8002,8003,8004,8005,8007,8011",
"GeneralRole": "8000,8001,8002,8003,8004,8005,8007,8010,8011" "GeneralRole": "8000,8001,8002,8003,8004,8005,8007,8010,8011",
}, "ItemPos": "-1"
{
"ID": "2003",
"Note": "test1",
"Name": "2003",
"Scene": "9003",
"Position": "1,1,1",
"Volume": "-1",
"Difficulty": "2|3",
"SpecialEvent": "-1,-1,-1,-1|1,50,10,20",
"Role": "8001,8002,8003,8004,8005|8001,8002,8003,8004,8005",
"GeneralRole": "8010"
},
{
"ID": "2004",
"Note": "test2",
"Name": "2004",
"Scene": "9003",
"Position": "2,2,2",
"Volume": "-1",
"Difficulty": "1|5|6",
"SpecialEvent": "-1,-1,-1,-1|1,50,10,20|1,50,20,20",
"Role": "8000,8001,8002,8003,8004,8005,8006,8008,8009|8000,8001,8002,8003,8004,8005,8006,8008,8009|8000,8001,8002,8003,8004,8005,8006,8008,8009,8010",
"GeneralRole": "8010"
} }
] ]

View File

@ -1,274 +1,291 @@
[ [
{ {
"ID": 3001, "ID": "3001",
"Note": "消防水枪", "Note": "消防水枪",
"Type": 1, "Type": "1",
"Name": 3001, "Name": "3001",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_001", "Icon": "icon_001",
"ResPath": "\\ASSETS\\a001.Prefeb", "ResPath": "\\ASSETS\\a001.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3002, "ID": "3002",
"Note": "消防水带", "Note": "消防水带",
"Type": 1, "Type": "1",
"Name": 3002, "Name": "3002",
"Weight": 1, "Weight": "2",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_002", "Icon": "icon_002",
"ResPath": "\\ASSETS\\a002.Prefeb", "ResPath": "\\ASSETS\\a002.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Durations": "-1",
"Attribute": "14,20", "Attribute": "14,20",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3003, "ID": "3003",
"Note": "灭火器", "Note": "灭火器",
"Type": 1, "Type": "1",
"Name": 3003, "Name": "3003",
"Weight": 1, "Weight": "2",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": "8002|8003", "RoleLimit": "8002|8003",
"Icon": "icon_003", "Icon": "icon_003",
"ResPath": "\\ASSETS\\a003.Prefeb", "ResPath": "\\ASSETS\\a003.Prefeb",
"ConsumableType": 1, "ConsumableType": "1",
"Durations": 30, "WearingTime": "-1",
"Durations": "30",
"Attribute": "15,30", "Attribute": "15,30",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3004, "ID": "3004",
"Note": "消防水桶", "Note": "消防水桶",
"Type": 2, "Type": "2",
"Name": 3004, "Name": "3004",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_004", "Icon": "icon_004",
"ResPath": "\\ASSETS\\a004.Prefeb", "ResPath": "\\ASSETS\\a004.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3005, "ID": "3005",
"Note": "灭火战斗服", "Note": "灭火战斗服",
"Type": 3, "Type": "3",
"Name": 3005, "Name": "3005",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_005", "Icon": "icon_005",
"ResPath": "\\ASSETS\\a005.Prefeb", "ResPath": "\\ASSETS\\a005.Prefeb",
"ConsumableType": 2, "ConsumableType": "2",
"Durations": -1, "WearingTime": "3",
"Durations": "-1",
"Attribute": "5,20", "Attribute": "5,20",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3006, "ID": "3006",
"Note": "防护面具", "Note": "防护面具",
"Type": 3, "Type": "3",
"Name": 3006, "Name": "3006",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_006", "Icon": "icon_006",
"ResPath": "\\ASSETS\\a006.Prefeb", "ResPath": "\\ASSETS\\a006.Prefeb",
"ConsumableType": 3, "ConsumableType": "3",
"Durations": -1, "WearingTime": "1",
"Durations": "-1",
"Attribute": "5,40", "Attribute": "5,40",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3007, "ID": "3007",
"Note": "防护手套", "Note": "防护手套",
"Type": 3, "Type": "3",
"Name": 3007, "Name": "3007",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_007", "Icon": "icon_007",
"ResPath": "\\ASSETS\\a007.Prefeb", "ResPath": "\\ASSETS\\a007.Prefeb",
"ConsumableType": 2, "ConsumableType": "2",
"Durations": -1, "WearingTime": "1",
"Durations": "-1",
"Attribute": "5,20", "Attribute": "5,20",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3008, "ID": "3008",
"Note": "正压式空气呼吸器", "Note": "正压式空气呼吸器",
"Type": 3, "Type": "3",
"Name": 3008, "Name": "3008",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_008", "Icon": "icon_008",
"ResPath": "\\ASSETS\\a008.Prefeb", "ResPath": "\\ASSETS\\a008.Prefeb",
"ConsumableType": 3, "ConsumableType": "3",
"Durations": 300, "WearingTime": "2",
"Attribute": -1, "Durations": "300",
"Attribute": "-1",
"IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0", "IsPickup": "8001,0|8002,0|8003,1|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3009, "ID": "3009",
"Note": "隔离警示带", "Note": "隔离警示带",
"Type": 4, "Type": "4",
"Name": 3009, "Name": "3009",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_009", "Icon": "icon_009",
"ResPath": "\\ASSETS\\a009.Prefeb", "ResPath": "\\ASSETS\\a009.Prefeb",
"ConsumableType": 1, "ConsumableType": "1",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3010, "ID": "3010",
"Note": "锥形事故标志柱", "Note": "锥形事故标志柱",
"Type": 4, "Type": "4",
"Name": 3010, "Name": "3010",
"Weight": 1, "Weight": "2",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": "8008|8009", "RoleLimit": "8008|8009",
"Icon": "icon_010", "Icon": "icon_010",
"ResPath": "\\ASSETS\\a010.Prefeb", "ResPath": "\\ASSETS\\a010.Prefeb",
"ConsumableType": 1, "ConsumableType": "1",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3011, "ID": "3011",
"Note": "警戒标志杆", "Note": "警戒标志杆",
"Type": 4, "Type": "4",
"Name": 3011, "Name": "3011",
"Weight": 1, "Weight": "2",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": "8008|8009", "RoleLimit": "8008|8009",
"Icon": "icon_011", "Icon": "icon_011",
"ResPath": "\\ASSETS\\a011.Prefeb", "ResPath": "\\ASSETS\\a011.Prefeb",
"ConsumableType": 1, "ConsumableType": "1",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3012, "ID": "3012",
"Note": "头戴式照明灯", "Note": "头戴式照明灯",
"Type": 5, "Type": "5",
"Name": 3012, "Name": "3012",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_012", "Icon": "icon_012",
"ResPath": "\\ASSETS\\a012.Prefeb", "ResPath": "\\ASSETS\\a012.Prefeb",
"ConsumableType": 2, "ConsumableType": "2",
"Durations": -1, "WearingTime": "1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3013, "ID": "3013",
"Note": "手电筒", "Note": "手电筒",
"Type": 5, "Type": "5",
"Name": 3013, "Name": "3013",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_013", "Icon": "icon_013",
"ResPath": "\\ASSETS\\a013.Prefeb", "ResPath": "\\ASSETS\\a013.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3014, "ID": "3014",
"Note": "对讲机", "Note": "对讲机",
"Type": 4, "Type": "4",
"Name": 3014, "Name": "3014",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": -1, "RoleLimit": "-1",
"Icon": "icon_014", "Icon": "icon_014",
"ResPath": "\\ASSETS\\a014.Prefeb", "ResPath": "\\ASSETS\\a014.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,0|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "0"
}, },
{ {
"ID": 3015, "ID": "3015",
"Note": "急救医疗箱", "Note": "急救医疗箱",
"Type": 7, "Type": "7",
"Name": 3015, "Name": "3015",
"Weight": 1, "Weight": "1",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": "8004|8005", "RoleLimit": "8004|8005",
"Icon": "icon_015", "Icon": "icon_015",
"ResPath": "\\ASSETS\\a015.Prefeb", "ResPath": "\\ASSETS\\a015.Prefeb",
"ConsumableType": 1, "ConsumableType": "1",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8001,1|8002,1|8003,0|8004,0|8005,0|8006,0", "IsPickup": "8001,1|8002,1|8003,0|8004,0|8005,0|8006,0",
"PutInStore": 1 "PutInStore": "1"
}, },
{ {
"ID": 3016, "ID": "3016",
"Note": "易燃物1", "Note": "易燃物1",
"Type": 0, "Type": "0",
"Name": 3016, "Name": "3016",
"Weight": 2, "Weight": "4",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": 8006, "RoleLimit": "8006",
"Icon": "icon_016", "Icon": "icon_016",
"ResPath": "\\ASSETS\\a016.Prefeb", "ResPath": "\\ASSETS\\a016.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Durations": "-1",
"Attribute": "16,1", "Attribute": "16,1",
"IsPickup": "8000,0|8001,0|8002,0|8003,0|8004,0|8005,0|8006,1|8007,0|8008,0|8009,0|8010,0|8011,0", "IsPickup": "8000,0|8001,0|8002,0|8003,0|8004,0|8005,0|8006,1|8007,0|8008,0|8009,0|8010,0|8011,0",
"PutInStore": 0 "PutInStore": "0"
}, },
{ {
"ID": 3017, "ID": "3017",
"Note": "可转移的障碍物", "Note": "可转移的障碍物",
"Type": 0, "Type": "0",
"Name": 3017, "Name": "3017",
"Weight": 2, "Weight": "4",
"Scene ": 9003, "Scene ": "9003",
"RoleLimit": 8006, "RoleLimit": "8006",
"Icon": "icon_017", "Icon": "icon_017",
"ResPath": "\\ASSETS\\a017.Prefeb", "ResPath": "\\ASSETS\\a017.Prefeb",
"ConsumableType": 0, "ConsumableType": "0",
"Durations": -1, "WearingTime": "-1",
"Attribute": -1, "Durations": "-1",
"Attribute": "-1",
"IsPickup": "8000,0|8001,0|8002,0|8003,0|8004,0|8005,0|8006,1|8007,0|8008,0|8009,0|8010,0|8011,0", "IsPickup": "8000,0|8001,0|8002,0|8003,0|8004,0|8005,0|8006,1|8007,0|8008,0|8009,0|8010,0|8011,0",
"PutInStore": 0 "PutInStore": "0"
} }
] ]

View File

@ -60,7 +60,7 @@ public class NpcList//NPC
{ {
public string npcId;//NPC编号--------------------------------必须 public string npcId;//NPC编号--------------------------------必须
public string areaId;//区域编号------------------------------必须 public string areaId;//区域编号------------------------------必须
public int num;//数量--------------------------------必须 public int npcNum;//数量--------------------------------必须
public int isHere;//是否归属 public int isHere;//是否归属
} }
public class MaterialList//设备器材列表 public class MaterialList//设备器材列表

View File

@ -58,6 +58,7 @@ public class DatePanel : MonoBehaviour
createTemplateInfo.Instance.auth_CreateTemplate.isTemplate = "1"; createTemplateInfo.Instance.auth_CreateTemplate.isTemplate = "1";
} }
panel.UploadData(); panel.UploadData();
Debug.LogError("+++++++++");
createTemplateInterface.createTemplate(dataText.text); createTemplateInterface.createTemplate(dataText.text);
} }

View File

@ -85,7 +85,7 @@ public class EvacuationPanel : MonoBehaviour
nPC.npcId = npcInfo.npcId.ToString(); nPC.npcId = npcInfo.npcId.ToString();
nPC.areaId = npcInfo.sceneId.ToString(); nPC.areaId = npcInfo.sceneId.ToString();
nPC.isHere=npcInfo.isHere; nPC.isHere=npcInfo.isHere;
nPC.num = npcInfo.NpcNum; nPC.npcNum = npcInfo.NpcNum;
createTemplateInfo.Instance.auth_CreateTemplate.npcList.Add(nPC); createTemplateInfo.Instance.auth_CreateTemplate.npcList.Add(nPC);
} }
@ -363,7 +363,6 @@ public class EvacuationPanel : MonoBehaviour
// 3. 筛选有效的分配区域(剩余的 personnelItems // 3. 筛选有效的分配区域(剩余的 personnelItems
List<PersonnelItem> validAreas = personnelItems.Where(item => item.NpcNum >= 0).ToList(); List<PersonnelItem> validAreas = personnelItems.Where(item => item.NpcNum >= 0).ToList();
if (validAreas.Count == 0) if (validAreas.Count == 0)
{ {
Debug.LogWarning("No valid areas available for redistribution."); Debug.LogWarning("No valid areas available for redistribution.");
@ -403,7 +402,6 @@ public class EvacuationPanel : MonoBehaviour
targetItem.NpcNum += kvp.Value; // 更新 NPC 数量 targetItem.NpcNum += kvp.Value; // 更新 NPC 数量
targetItem.SetInfo(targetItem.NpcNum.ToString()); // 更新 UI 显示 targetItem.SetInfo(targetItem.NpcNum.ToString()); // 更新 UI 显示
targetItem.personnelImage.gameObject.SetActive(true); // 确保图标可见 targetItem.personnelImage.gameObject.SetActive(true); // 确保图标可见
Debug.Log($"Randomly redistributed {kvp.Value} NPCs to Scene ID: {kvp.Key}");
} }
} }
} }