部分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

File diff suppressed because it is too large Load Diff

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