所有表格Json数据更新

This commit is contained in:
lq 2024-12-18 14:35:56 +08:00
parent f55ae148eb
commit 44f1c9ad78
7 changed files with 3517 additions and 3512 deletions

View File

@ -1,28 +1,28 @@
[ [
{ {
"ID": "6001", "ID": "6001",
"Note": "小学生", "Note": "小学生",
"Name": "6001", "Name": "6001",
"PlayScript": "5001,0", "PlayScript": "5001,0",
"ResPath": "Path1001", "ResPath": "Path1001",
"State1": "1", "State1": "1",
"StateRes1": "Path1002|Path1003", "StateRes1": "Path1002|Path1003",
"State2": "2", "State2": "2",
"StateRes2": "Path1004|Path1005", "StateRes2": "Path1004|Path1005",
"Stats1": "10,1.3|11,100", "Stats1": "10,1.3|11,100",
"Stats2": "2,12,50|3,12,50|6,12,55" "Stats2": "2,12,50|3,12,50|6,12,55"
}, },
{ {
"ID": "6002", "ID": "6002",
"Note": "外部增援NPC", "Note": "外部增援NPC",
"Name": "6002", "Name": "6002",
"PlayScript": "5001,1", "PlayScript": "5001,1",
"ResPath": "Path2", "ResPath": "Path2",
"State1": "-1", "State1": "-1",
"StateRes1": "-1", "StateRes1": "-1",
"State2": "-1", "State2": "-1",
"StateRes2": "-1", "StateRes2": "-1",
"Stats1": "-1", "Stats1": "-1",
"Stats2": "-1" "Stats2": "-1"
} }
] ]

View File

@ -3,14 +3,12 @@
"ID": "5001", "ID": "5001",
"Note": "火灾", "Note": "火灾",
"Name": "5001", "Name": "5001",
"Role": "8000|8001|8002|8003|8004|8005|8006|8008|8009|8010", "DisasterLocation": "2001"
"DisasterLocation": "2001|2002|2003"
}, },
{ {
"ID": "5002", "ID": "5002",
"Note": "塌方", "Note": "塌方",
"Name": "5002", "Name": "5002",
"Role": "8000|8001|8002|8003|8004|8005|8006|8008|8009|8010", "DisasterLocation": "2004|2002"
"DisasterLocation": "2004"
} }
] ]

View File

@ -1,182 +1,182 @@
[ [
{ {
"ID": 8000, "ID": "8000",
"Note": "主持人", "Note": "主持人",
"Name": "2001,1,8000|2001,2,8000|2001,6,8000", "Name": "2001,1,8000|2001,2,8000|2001,6,8000",
"ActionMode": 0, "ActionMode": "0",
"Group": -1, "Group": "-1",
"GroupLeader": 3, "GroupLeader": "3",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_312", "ICON": "ICON_312",
"WeightLimit": -1, "WeightLimit": "-1",
"Stats": -1, "Stats": "-1",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b013.Prefeb", "ResPath": "\\ASSETS\\b013.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8001, "ID": "8001",
"Note": "总指挥", "Note": "总指挥",
"Name": "2001,1,8001|2001,2,8001|2001,6,8001", "Name": "2001,1,8001|2001,2,8001|2001,6,8001",
"ActionMode": 2, "ActionMode": "2",
"Group": -1, "Group": "-1",
"GroupLeader": 2, "GroupLeader": "2",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_313", "ICON": "ICON_313",
"WeightLimit": 5, "WeightLimit": "5",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b001.Prefeb", "ResPath": "\\ASSETS\\b001.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8002, "ID": "8002",
"Note": "抢险救援组", "Note": "抢险救援组",
"Name": "2001,1,8002|2001,2,8002|2001,6,8002", "Name": "2001,1,8002|2001,2,8002|2001,6,8002",
"ActionMode": 2, "ActionMode": "2",
"Group": 8003, "Group": "8003",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_314", "ICON": "ICON_314",
"WeightLimit": 5, "WeightLimit": "5",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b002.Prefeb", "ResPath": "\\ASSETS\\b002.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8003, "ID": "8003",
"Note": "(组长)抢险救援组", "Note": "(组长)抢险救援组",
"Name": "2001,1,8003|2001,2,8003|2001,6,8003", "Name": "2001,1,8003|2001,2,8003|2001,6,8003",
"ActionMode": 2, "ActionMode": "2",
"Group": -1, "Group": "-1",
"GroupLeader": 1, "GroupLeader": "1",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_315", "ICON": "ICON_315",
"WeightLimit": 5, "WeightLimit": "5",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b003.Prefeb", "ResPath": "\\ASSETS\\b003.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8004, "ID": "8004",
"Note": "医疗救护组", "Note": "医疗救护组",
"Name": "2001,1,8004|2001,2,8004|2001,6,8004", "Name": "2001,1,8004|2001,2,8004|2001,6,8004",
"ActionMode": 2, "ActionMode": "2",
"Group": 8005, "Group": "8005",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_316", "ICON": "ICON_316",
"WeightLimit": 5, "WeightLimit": "5",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b004.Prefeb", "ResPath": "\\ASSETS\\b004.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8005, "ID": "8005",
"Note": "(组长)医疗救护组", "Note": "(组长)医疗救护组",
"Name": "2001,1,8005|2001,2,8005|2001,6,8005", "Name": "2001,1,8005|2001,2,8005|2001,6,8005",
"ActionMode": 2, "ActionMode": "2",
"Group": -1, "Group": "-1",
"GroupLeader": 1, "GroupLeader": "1",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_317", "ICON": "ICON_317",
"WeightLimit": 5, "WeightLimit": "5",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b005.Prefeb", "ResPath": "\\ASSETS\\b005.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8006, "ID": "8006",
"Note": "疏散引导组1", "Note": "疏散引导组1",
"Name": "2001,1,8006|2001,2,8006|2001,6,8999", "Name": "2001,1,8006|2001,2,8006|2001,6,8999",
"ActionMode": 1, "ActionMode": "1",
"Group": 8001, "Group": "8001",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 1, "IsLeadingNPC": "1",
"ICON": "ICON_318", "ICON": "ICON_318",
"WeightLimit": -1, "WeightLimit": "-1",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b006.Prefeb", "ResPath": "\\ASSETS\\b006.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8007, "ID": "8007",
"Note": "疏散引导组2", "Note": "疏散引导组2",
"Name": "2002,1,8007|2002,2,8007|2002,3,8999", "Name": "2002,1,8007|2002,2,8007|2002,3,8999",
"ActionMode": 2, "ActionMode": "2",
"Group": 8001, "Group": "8001",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 1, "IsLeadingNPC": "1",
"ICON": "ICON_319", "ICON": "ICON_319",
"WeightLimit": -1, "WeightLimit": "-1",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b007.Prefeb", "ResPath": "\\ASSETS\\b007.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8008, "ID": "8008",
"Note": "后勤保障组", "Note": "后勤保障组",
"Name": "2001,1,8008|2001,2,8008|2001,6,8008", "Name": "2001,1,8008|2001,2,8008|2001,6,8008",
"ActionMode": 2, "ActionMode": "2",
"Group": 8009, "Group": "8009",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_320", "ICON": "ICON_320",
"WeightLimit": 10, "WeightLimit": "10",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b008.Prefeb", "ResPath": "\\ASSETS\\b008.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8009, "ID": "8009",
"Note": "(组长)后勤保障组", "Note": "(组长)后勤保障组",
"Name": "2001,1,8009|2001,2,8009|2001,6,8009", "Name": "2001,1,8009|2001,2,8009|2001,6,8009",
"ActionMode": 2, "ActionMode": "2",
"Group": -1, "Group": "-1",
"GroupLeader": 1, "GroupLeader": "1",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_321", "ICON": "ICON_321",
"WeightLimit": 10, "WeightLimit": "10",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b009.Prefeb", "ResPath": "\\ASSETS\\b009.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
}, },
{ {
"ID": 8010, "ID": "8010",
"Note": "搜寻组", "Note": "搜寻组",
"Name": "2001,1,8010|2001,2,8010|2001,6,8010", "Name": "2001,1,8010|2001,2,8010|2001,6,8010",
"ActionMode": 2, "ActionMode": "2",
"Group": 8001, "Group": "8001",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 0, "IsLeadingNPC": "0",
"ICON": "ICON_322", "ICON": "ICON_322",
"WeightLimit": 5, "WeightLimit": "5",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b010.Prefeb", "ResPath": "\\ASSETS\\b010.Prefeb",
"ManageLevel": "1|2|3|4|5" "ManageLevel": "1|2|3|4|5"
}, },
{ {
"ID": 8011, "ID": "8011",
"Note": "学生寝室长", "Note": "学生寝室长",
"Name": "2002,1,8011|2002,2,8011|2002,3,8999", "Name": "2002,1,8011|2002,2,8011|2002,3,8999",
"ActionMode": 1, "ActionMode": "1",
"Group": 8001, "Group": "8001",
"GroupLeader": 0, "GroupLeader": "0",
"IsLeadingNPC": 1, "IsLeadingNPC": "1",
"ICON": "ICON_323", "ICON": "ICON_323",
"WeightLimit": -1, "WeightLimit": "-1",
"Stats": "1,6.5|2,1.8|3,1|6,100", "Stats": "1,6.5|2,1.8|3,1|6,100",
"Skills": "4001,-1|4003,202|4005,-1", "Skills": "4001,-1|4003,202|4005,-1",
"ResPath": "\\ASSETS\\b012.Prefeb", "ResPath": "\\ASSETS\\b012.Prefeb",
"ManageLevel": -1 "ManageLevel": "-1"
} }
] ]

View File

@ -7,8 +7,7 @@
"ObjList": "7001,7002,7003|7001,7003|7001,7002,7003", "ObjList": "7001,7002,7003|7001,7003|7001,7002,7003",
"AreaList": "1012|1013|1014|1015|1017|1018|1019|1020|1021|1022|1023|1024|1025|1026|1027|1028|1029|1030|1076|1031|1032|1033|1034|1036|1037|1038|1039|1040|1041|1077|1078|1079|1080|1081|1082|1083|1084|1085|1086", "AreaList": "1012|1013|1014|1015|1017|1018|1019|1020|1021|1022|1023|1024|1025|1026|1027|1028|1029|1030|1076|1031|1032|1033|1034|1036|1037|1038|1039|1040|1041|1077|1078|1079|1080|1081|1082|1083|1084|1085|1086",
"Storeroom": "1011", "Storeroom": "1011",
"ConfigText": "10039|10040|10039", "ConfigText": "10039|10040|10039"
"": ""
}, },
{ {
"ID": "9003", "ID": "9003",
@ -18,7 +17,6 @@
"ObjList": "7001,7002,7003|7001,7003|7001,7002,7003", "ObjList": "7001,7002,7003|7001,7003|7001,7002,7003",
"AreaList": "1012|1013|1014|1015|1017|1018|1019|1020|1021|1022|1023|1024|1025|1026|1027|1028|1029|1030|1076|1031|1032|1033|1034|1036|1037|1038|1039|1040|1041|1077|1078|1079|1080|1081|1082|1083|1084|1085|1086", "AreaList": "1012|1013|1014|1015|1017|1018|1019|1020|1021|1022|1023|1024|1025|1026|1027|1028|1029|1030|1076|1031|1032|1033|1034|1036|1037|1038|1039|1040|1041|1077|1078|1079|1080|1081|1082|1083|1084|1085|1086",
"Storeroom": "1011", "Storeroom": "1011",
"ConfigText": "20034|20035|20036", "ConfigText": "20034|20035|20036"
"": ""
} }
] ]

View File

@ -3303,7 +3303,7 @@
}, },
{ {
"ID": "10097", "ID": "10097",
"Note": "-0", "Note": "在操场搜寻学生",
"PlayScript": "5001,6,6", "PlayScript": "5001,6,6",
"Group": "21,1", "Group": "21,1",
"UnDisplay": "1", "UnDisplay": "1",

File diff suppressed because it is too large Load Diff

View File

@ -56,6 +56,7 @@ public class EvacuationPanel : MonoBehaviour
List<int> nonZeroAreas = new List<int>(); List<int> nonZeroAreas = new List<int>();
public SelectScenePanel selectScene; public SelectScenePanel selectScene;
[Header("被清除的区域")] public List<int> clearRegion=new List<int>(); [Header("被清除的区域")] public List<int> clearRegion=new List<int>();
[Header("被重新分配的区域")] private HashSet<int> excludedAreas = new HashSet<int>();
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -86,7 +87,6 @@ public class EvacuationPanel : MonoBehaviour
nPC.areaId = npcInfo.sceneId.ToString(); nPC.areaId = npcInfo.sceneId.ToString();
nPC.isHere=npcInfo.isHere; nPC.isHere=npcInfo.isHere;
nPC.npcNum = npcInfo.NpcNum; nPC.npcNum = npcInfo.NpcNum;
createTemplateInfo.Instance.auth_CreateTemplate.npcList.Add(nPC); createTemplateInfo.Instance.auth_CreateTemplate.npcList.Add(nPC);
} }
panel.panelToggle[3].interactable = true; // 启用第二个Toggle panel.panelToggle[3].interactable = true; // 启用第二个Toggle
@ -345,14 +345,20 @@ public class EvacuationPanel : MonoBehaviour
// 1. 计算需要重新分配的 NPC 总数 // 1. 计算需要重新分配的 NPC 总数
int totalRedistributePeople = excludedNum; int totalRedistributePeople = excludedNum;
// 2. 从 personnelItems 中找到并清除指定区域 // 2. 标记当前重新分配的区域
if (!excludedAreas.Contains(excludedSceneId))
{
excludedAreas.Add(excludedSceneId); // 将被重新分配的区域加入到排除列表中
Debug.Log($"Scene ID {excludedSceneId} added to excluded areas.");
}
// 修改被重新分配区域的数据
PersonnelItem excludedItem = personnelItems.FirstOrDefault(item => item.sceneId == excludedSceneId); PersonnelItem excludedItem = personnelItems.FirstOrDefault(item => item.sceneId == excludedSceneId);
if (excludedItem != null) if (excludedItem != null)
{ {
excludedItem.NpcNum = 0; // 清空 NPC 数量 excludedItem.NpcNum = 0; // 清空 NPC 数量
excludedItem.SetInfo(""); // 更新 UI 显示为空 excludedItem.SetInfo(""); // 更新 UI 显示为空
excludedItem.personnelImage.gameObject.SetActive(false); // 隐藏图标 excludedItem.personnelImage.gameObject.SetActive(false); // 隐藏图标
personnelItems.Remove(excludedItem); // 从列表中移除
Debug.Log($"Cleared NPCs from Scene ID: {excludedSceneId}"); Debug.Log($"Cleared NPCs from Scene ID: {excludedSceneId}");
} }
else else
@ -361,8 +367,8 @@ public class EvacuationPanel : MonoBehaviour
return; return;
} }
// 3. 筛选有效的分配区域(剩余的 personnelItems // 3. 筛选有效的分配区域(跳过已排除的区域
List<PersonnelItem> validAreas = personnelItems.Where(item => item.NpcNum >= 0).ToList(); List<PersonnelItem> validAreas = personnelItems.Where(item => !excludedAreas.Contains(item.sceneId)).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.");
@ -402,10 +408,13 @@ 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($"Redistributed {kvp.Value} NPCs to Scene ID: {kvp.Key}");
} }
} }
} }
//设置文字颜色 //设置文字颜色
public void OnSceneItemClicked(GameObject clickedItem, Color color, GameObject select) public void OnSceneItemClicked(GameObject clickedItem, Color color, GameObject select)
{ {