V0.7.3e
This commit is contained in:
parent
c7cea8600e
commit
402946e5de
@ -1,5 +1,5 @@
|
||||
{
|
||||
"nextId": 326,
|
||||
"nextId": 327,
|
||||
"bugs": [
|
||||
{
|
||||
"id": 2,
|
||||
@ -3288,6 +3288,17 @@
|
||||
"longTerm": false,
|
||||
"createdAt": 1780902545583,
|
||||
"updatedAt": 1780902545583
|
||||
},
|
||||
{
|
||||
"id": 326,
|
||||
"title": "在军营上召唤的蕾米/芙兰不会因吸血鬼被动+1移动",
|
||||
"description": "",
|
||||
"status": "open",
|
||||
"priority": "medium",
|
||||
"module": "",
|
||||
"longTerm": false,
|
||||
"createdAt": 1780935882174,
|
||||
"updatedAt": 1780935882174
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"nextId": 20,
|
||||
"nextId": 21,
|
||||
"suggestions": [
|
||||
{
|
||||
"id": 1,
|
||||
@ -171,6 +171,15 @@
|
||||
"module": "",
|
||||
"createdAt": 1780849417722,
|
||||
"updatedAt": 1780849417722
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"title": "加入随机选项",
|
||||
"description": "",
|
||||
"status": "open",
|
||||
"module": "",
|
||||
"createdAt": 1780925794090,
|
||||
"updatedAt": 1780925794090
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -12,8 +12,13 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c659b850b20e460f866ed3f696be406b, type: 3}
|
||||
m_Name: VersionConfig
|
||||
m_EditorClassIdentifier:
|
||||
CurVersionId: 70303
|
||||
CurVersionId: 70304
|
||||
Versions:
|
||||
- MajorVersion: 0
|
||||
MinorVersion: 7
|
||||
PatchVersion: 3
|
||||
Description: "[\u7248\u672C V0.7.3e]\n\u53D1\u5E03\u65E5\u671F:26.6.9\n\n---------[\u8C03\u6574\u4E0E\u65B0\u529F\u80FD]-------------\n1.\u65B0\u589E\u62A4\u773C\u6A21\u5F0F\uFF0C\u53EF\u5728\u8BBE\u7F6E\u4E2D\u9009\u62E9\u3002\u8BE5\u6A21\u5F0F\u6B63\u5728\u6D4B\u8BD5\u6539\u8FDB\u4E2D\u3002\n2.\u5355\u673A\u81EA\u5B9A\u4E49\u6A21\u5F0F\u4E0B\u53EF\u4EE5\u8BBE\u7F6EAI\u73A9\u5BB6\u7684\u9635\u8425\u4E0E\u961F\u4F0D\n3.\u5355\u673A\u81EA\u5B9A\u4E49\u6A21\u5F0F\u4E0B\u53EF\u4EE5\u9009\u62E9\u8FDB\u5165\u6D4B\u8BD5\u6A21\u5F0F\uFF0C\u4E3B\u52A8\u63A7\u5236\u6240\u6709AI\u884C\u52A8\u3002\n\n---------[bug\u4FEE\u590D\u4E0E\u4F18\u5316]-------------\n1.\u4FEE\u590D\u4E86\u90E8\u5206\u7FFB\u8BD1\u9519\u8BEF"
|
||||
FourthVersion: 4
|
||||
- MajorVersion: 0
|
||||
MinorVersion: 7
|
||||
PatchVersion: 3
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -12,8 +12,13 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c659b850b20e460f866ed3f696be406b, type: 3}
|
||||
m_Name: VersionConfig
|
||||
m_EditorClassIdentifier:
|
||||
CurVersionId: 70303
|
||||
CurVersionId: 70304
|
||||
Versions:
|
||||
- MajorVersion: 0
|
||||
MinorVersion: 7
|
||||
PatchVersion: 3
|
||||
Description: 21057
|
||||
FourthVersion: 4
|
||||
- MajorVersion: 0
|
||||
MinorVersion: 7
|
||||
PatchVersion: 3
|
||||
|
||||
@ -76,3 +76,120 @@ MonoBehaviour:
|
||||
- Group: GridObject/Ground
|
||||
Source: {fileID: 21300000, guid: 5f6e5da4f97fa854fb17cd588cf6078f, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 3f647398edea4cfa95cc2a9449c46b9c, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: b68c20c19ee51ac418164b94e7019787, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: ee56deae8c714f8e9c2f5cb70f0e1f2e, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: aa59e9b148de3fb43b3e4f8042e7aa1d, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: cb924b2f3a07469a9b1d3692d5cb51e2, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 655bdf0e55ee85143a173eea225a7dd5, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 77ccf7e86dae46b4b894ac76e428539c, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 08f4c6a6eed9d594399367adb9cef813, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 53b1c0696b264b1f8afcea344f6a115f, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 187e66ec1541a6e459f3569a6621db59, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: beda9bd5e1984dca88b0c1e7b7db5634, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 074c23b1decbea547b0afa6a99a5ed73, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 7f9e0b5f0a10445598d9fd87d9b6ee91, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 81a8025ee6857ed489e72306f7e0f6dd, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 06f7669f57884b4a9142bfab37911dc0, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: d7eecb9ee5566544b9d39ec9bfb75f15, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: edaa156ed3194f4ebadb0d8bfbb122e9, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 4879d6b82634fa44d8b926600004f634, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 91e9c9fc12364cad8f616be6da4f3124, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: c502b96be3d45e14ebbabfbfa09e788f, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: ae6eb1c16dae405e827c3abf8b725498, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 0fb3db5d7ff290e409ad4877ce38a196, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 736a8ce9511c417d85b6602439c09023, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 1f8093612ac36b348976efbf64efe584, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: a1d3d9e47dc84846bdcebba22030855b, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 68aaadd01b28ed241b3fc7de2be99ada, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: fb655e03461f40bd9921d38bb3cdac9b, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 2b8176ac9a66ca948aab1f257d80af1b, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: f75f176401504bfa97ebc287e4f6e70c, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: b07070112fea63340aaf809b09997358, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 0cdd3bf1ce2640108884d992d5dd8258, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 310b8a0fb7da1ec44aa9f19c098970c0, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 63e2e3769014436faf7b3830744d9b0b, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 3233cd3a30f66f24a896252322fd1b2e, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: b572ef4d4cb74ad2a194833bd2a811d2, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 163acdeff4a769c44877845862093fc5, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: e9221fc4a98e43ad8fd1afd4fe551221, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: 2586ab8a56396f2468af0944f12db20d, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 146822b8359b4aec99682084599e92f2, type: 3}
|
||||
- Group: GridObject/Mountain
|
||||
Source: {fileID: 21300000, guid: f18a863d850783f4598dba6692684f8f, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 89e4e55aaa3244bea4caa0d55b91bed1, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: cb0267035ec3ed44d8c74b79c550f5ec, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: f78aef26c70f4d508f76e23baf28f144, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 857a9ff2f48ca2240bcd4e39569542a9, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: ca1e1a23874b4ed9a19e3595e868d377, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 2bf4e8d049578134b939f0381bc187eb, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 6198a47b21d14216b4212c67b8ef4759, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 6a5ef20c049b7db41bc8bb020bf96d64, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: c2433650d6e14f1cb50a5aa918c1c8b3, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 7fa235f42e2a6d24e992dc7d6a28b899, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: b9bb5480177f4ebca3ca1e0e8a98113d, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 995bcd903aa31484294ea226892c5354, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 24565f9a2f114940b4795b2ffb6d526b, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 71999e576b9463745b1997b06cd79222, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: c8b1343e310d4660a6094f4d77083577, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: fe78266a21779c5428b2bf634c051c58, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: e5e6dff64eea416f9731d842f5152302, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: e4f0845e92abbe041a5317ed8d9b122d, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: c7436471343843cea3ac1bce50d2bb72, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: e11cfaea911b9854e961cbfc456782f1, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 94ef595daac5400886ab017a730e1374, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: a428f5a139976ea43a0b790ed2ff091f, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 7c4b4e1a125245adbf8c7a68c2e9e884, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 13a55ab1d39f0b34a8926f63dda3b90d, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 5f989658f6904200991d44db1efa50ef, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: ac1b4d6ce869e734f967d1624f74fd3b, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 8c6d841b71124bc0af470aff1f74e774, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: da9f4917b235fa24a8f7ef9a5fa9aa07, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: a0c5b1fae22b4f859baa0e658e01f3e3, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 433918c1944a2014cab69a0e054436a7, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 6d3143b1eeb040e7a6753e10636c8ce0, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: b6376408849643d478b359fadd7e06c2, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: a670891debd648d8b13064d53eb11f12, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: a97b3180433845f4d84fd4df929a5ebf, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: 7abcdda1d54747c9a7573e528f02b9fa, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: eeebd9e7b8141594f8a0d22aebac543b, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: a908844b9ed34c38806055ba311060bc, type: 3}
|
||||
- Group: GridObject/Forest
|
||||
Source: {fileID: 21300000, guid: 7fd0edb210f2fd148943930fc02c377c, type: 3}
|
||||
EyeComfort: {fileID: 21300000, guid: bf21ed929ccd43fbb3875473c37194bb, type: 3}
|
||||
|
||||
Binary file not shown.
@ -6030,6 +6030,10 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 336217032336022189, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 353698318363263094, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6090,6 +6094,30 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 842365678484758782, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 842365678484758782, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 842365678484758782, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 842365678484758782, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 842365678484758782, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1305705549259675497, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_Size
|
||||
value: 0.7644631
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415829388902399652, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6110,6 +6138,26 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1421213477546708062, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1421213477546708062, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1421213477546708062, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1421213477546708062, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1421213477546708062, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1515226799700260099, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: UIOutsideSelectCheckPanel
|
||||
@ -6354,6 +6402,26 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3369923803933117928, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3369923803933117928, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3369923803933117928, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3369923803933117928, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3369923803933117928, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3396045311621120458, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6374,18 +6442,6 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3398231935455104055, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: DataProvider.Text
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3398231935455104055, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: DataProvider.WikiId
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3398231935455104055, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: DataProvider.HintDataType
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3403009586194134000, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6406,6 +6462,26 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3503339034301027112, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3503339034301027112, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3503339034301027112, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3503339034301027112, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3503339034301027112, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3688935943811444366, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6426,6 +6502,26 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3804159187488037122, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3804159187488037122, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3804159187488037122, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3804159187488037122, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3804159187488037122, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4074230333989382612, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6526,6 +6622,26 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5327350550419352723, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5327350550419352723, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5327350550419352723, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5327350550419352723, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5327350550419352723, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5371057169501943992, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6626,6 +6742,26 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6257805479002729035, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6257805479002729035, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6257805479002729035, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6257805479002729035, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6257805479002729035, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6339876661125356018, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6666,26 +6802,6 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6374269977039491242, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6374269977039491242, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6374269977039491242, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6374269977039491242, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6374269977039491242, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6481525979706449133, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
@ -6746,9 +6862,45 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6658725794200779676, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
- target: {fileID: 6906197524831060160, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6906197524831060160, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6906197524831060160, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6906197524831060160, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -23
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6906197524831060160, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7043334411004346706, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7043334411004346706, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7043334411004346706, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 986.67896
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7043334411004346706, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 493.33948
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7043334411004346706, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -668.20294
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7149320089420431655, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
@ -6890,6 +7042,18 @@ PrefabInstance:
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7855546057131527130, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7855546057131527130, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7855546057131527130, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7913802527439453684, guid: d60a14dc86fa6eb4393a807707706fe8, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55870a56abaa6a947a6f9927167e52eb
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -260,7 +260,7 @@ namespace RuntimeData
|
||||
var slot = MultiCivs[i];
|
||||
var isHostControlled = slot.MemberId == 0 && !slot.IsAI && slot.IsHostControlled;
|
||||
PrepareSinglePlayerSlot(slot, i, isAI: !isHostControlled, isHostControlled: isHostControlled);
|
||||
if (!slot.IsCivFixed || usedCivs.Contains(slot.CivId))
|
||||
if (!slot.IsCivFixed)
|
||||
{
|
||||
var civId = PickDefaultCivId(i, usedCivs);
|
||||
slot.CivId = civId;
|
||||
@ -273,11 +273,12 @@ namespace RuntimeData
|
||||
|
||||
private static void PrepareSinglePlayerSlot(MemberCiv slot, int index, bool isAI, bool isHostControlled = false)
|
||||
{
|
||||
var teamId = slot.TeamId;
|
||||
slot.Index = index;
|
||||
slot.MemberId = 0;
|
||||
slot.IsReady = false;
|
||||
slot.PlayerId = 0;
|
||||
slot.TeamId = NoTeamId;
|
||||
slot.TeamId = teamId >= NoTeamId ? teamId : NoTeamId;
|
||||
slot.IsAI = isAI;
|
||||
slot.IsHostControlled = !isAI && isHostControlled;
|
||||
}
|
||||
@ -629,13 +630,20 @@ namespace RuntimeData
|
||||
EnsureSerializedPlayerSlots(mapData.PlayerMap.PlayerDataList.Count);
|
||||
BindSlotPlayerIdsByIndex(mapData);
|
||||
|
||||
foreach (var player in mapData.PlayerMap.PlayerDataList)
|
||||
var playerCount = Math.Min(mapData.PlayerMap.PlayerDataList.Count, MultiCivs?.Count ?? 0);
|
||||
for (int i = 0; i < playerCount; i++)
|
||||
{
|
||||
if (player == null) continue;
|
||||
foreach (var target in mapData.PlayerMap.PlayerDataList)
|
||||
var player = mapData.PlayerMap.PlayerDataList[i];
|
||||
var slot = MultiCivs[i];
|
||||
if (player == null || slot == null || slot.TeamId == NoTeamId) continue;
|
||||
|
||||
for (int j = 0; j < playerCount; j++)
|
||||
{
|
||||
if (target == null || player.Id == target.Id) continue;
|
||||
if (!ArePlayersInSameTeam(player.Id, target.Id)) continue;
|
||||
if (i == j) continue;
|
||||
var target = mapData.PlayerMap.PlayerDataList[j];
|
||||
var targetSlot = MultiCivs[j];
|
||||
if (target == null || targetSlot == null) continue;
|
||||
if (slot.TeamId != targetSlot.TeamId) continue;
|
||||
if (player.GetCountryDiplomacyInfo(target.Id, out var info))
|
||||
{
|
||||
ApplyTeammateDiplomacy(info);
|
||||
@ -2055,6 +2063,8 @@ namespace RuntimeData
|
||||
|
||||
GridMap = new GridMapData(MapConfig, _idGenerator);
|
||||
PlayerMap = new PlayerMapData(this, _idGenerator, netMode);
|
||||
if (netMode == NetMode.Single && MapConfig.GameMode == GameMode.CREATIVE)
|
||||
MapConfig.ApplyTeamDiplomacy(this);
|
||||
CityMap = new CityMapData();
|
||||
UnitMap = new UnitMapData();
|
||||
Net = new NetData();
|
||||
@ -2726,6 +2736,7 @@ namespace RuntimeData
|
||||
if (PlayerMap == null || !PlayerMap.GetPlayerDataByPlayerID(playerId, out _)) return false;
|
||||
if (PlayerMap.SelfPlayerId == playerId) return false;
|
||||
PlayerMap.SelfPlayerId = playerId;
|
||||
RefreshMainMapRenderAfterSelfPlayerChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2737,12 +2748,22 @@ namespace RuntimeData
|
||||
{
|
||||
if (PlayerMap.SelfPlayerId == playerId) return false;
|
||||
PlayerMap.SelfPlayerId = playerId;
|
||||
RefreshMainMapRenderAfterSelfPlayerChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void RefreshMainMapRenderAfterSelfPlayerChanged()
|
||||
{
|
||||
if (this != Main.MapData) return;
|
||||
var renderer = MapRenderer.Current;
|
||||
if (renderer == null) return;
|
||||
renderer.InGameBubbleManager?.CloseAllBubble();
|
||||
renderer.RepairAllRenderers();
|
||||
}
|
||||
|
||||
private bool TryGetLocalControlledPlayerId(bool preferSurvival, out uint playerId)
|
||||
{
|
||||
playerId = 0;
|
||||
|
||||
@ -251,6 +251,10 @@ namespace TH1_Logic.Core
|
||||
MapRenderer.Instance.FirstRenderMap();
|
||||
MapGeneratorLogic.GenerateMapAfterMapRenderer(MapData);
|
||||
AfterMapAddtion();
|
||||
if (InitSingleStartTeamState(MapData))
|
||||
{
|
||||
MatchSettlementLogicFactory.RefreshMatchSettlementInfo(MapData);
|
||||
}
|
||||
|
||||
// 成就绑定
|
||||
AchievementDataManager.Instance.OnGameStart(MapData);
|
||||
@ -447,6 +451,40 @@ namespace TH1_Logic.Core
|
||||
mapData.MapConfig?.ApplyTeamDiplomacy(mapData);
|
||||
PlayerLogic?.UpdateAllTeammateCapitalSight(mapData);
|
||||
}
|
||||
|
||||
private bool InitSingleStartTeamState(MapData mapData)
|
||||
{
|
||||
if (mapData?.Net == null || mapData.Net.Mode != NetMode.Single) return false;
|
||||
if (mapData.MapConfig?.GameMode != GameMode.CREATIVE) return false;
|
||||
mapData.MapConfig.ApplyTeamDiplomacy(mapData);
|
||||
PlayerLogic?.InitSingleTeammateMeetAndSight(mapData);
|
||||
LogSingleCreativeTeamState(mapData);
|
||||
EventManager.Publish(new UpdateUIBottomRanking());
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LogSingleCreativeTeamState(MapData mapData)
|
||||
{
|
||||
if (mapData?.PlayerMap?.PlayerDataList == null || mapData.MapConfig?.MultiCivs == null) return;
|
||||
|
||||
var slots = mapData.MapConfig.MultiCivs;
|
||||
var players = mapData.PlayerMap.PlayerDataList;
|
||||
var selfPlayerId = mapData.PlayerMap.SelfPlayerId;
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.Append("[SingleCreativeTeam] InGame ");
|
||||
int count = Math.Min(slots.Count, players.Count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
var slot = slots[i];
|
||||
var player = players[i];
|
||||
if (slot == null || player == null) continue;
|
||||
if (i > 0) sb.Append(" | ");
|
||||
var sameSelf = player.Id == selfPlayerId || mapData.SameUnion(selfPlayerId, player.Id);
|
||||
sb.Append($"slot={slot.Index},team={slot.TeamId},slotPlayerId={slot.PlayerId},playerId={player.Id},sameSelf={sameSelf}");
|
||||
}
|
||||
|
||||
LogSystem.LogInfo(sb.ToString());
|
||||
}
|
||||
|
||||
// 房主联机继续的实际实现。
|
||||
//
|
||||
|
||||
@ -1183,6 +1183,25 @@ namespace Logic
|
||||
//UIManager.Instance.CenterMessageUI.SetCenterMessageShow(UICenterMessageID.MeetNewPlayer,player1,grid);
|
||||
}
|
||||
}
|
||||
|
||||
public void InitSingleTeammateMeetAndSight(MapData map)
|
||||
{
|
||||
if (map?.Net == null || map.Net.Mode != NetMode.Single) return;
|
||||
if (map.PlayerMap?.PlayerDataList == null || map.MapConfig == null) return;
|
||||
|
||||
foreach (var player in map.PlayerMap.PlayerDataList)
|
||||
{
|
||||
if (player == null || !player.IsSurvival) continue;
|
||||
foreach (var teammate in map.PlayerMap.PlayerDataList)
|
||||
{
|
||||
if (teammate == null || !teammate.IsSurvival || teammate.Id == player.Id) continue;
|
||||
if (!map.SameUnion(player.Id, teammate.Id)) continue;
|
||||
if (!player.MeetPlayers.Contains(teammate.Id)) player.MeetPlayers.Add(teammate.Id);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateAllTeammateCapitalSight(map);
|
||||
}
|
||||
|
||||
//-------- 查询 --------//
|
||||
public bool HasRoadForUnitOnGrid(MapData mapData, GridData gridData, UnitData unitData)
|
||||
|
||||
@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using Logic.Multilingual;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace TH1_UI.View.Outside
|
||||
{
|
||||
public class UIOutsideSelectAISettingRowMono : MonoBehaviour
|
||||
{
|
||||
public GameObject AvatarRoot;
|
||||
public Image AvatarImage;
|
||||
public TextMeshProUGUI ForcesText;
|
||||
public Button ForceLeftButton;
|
||||
public Button ForceRightButton;
|
||||
public TextMeshProUGUI TeamText;
|
||||
public Button TeamLeftButton;
|
||||
public Button TeamRightButton;
|
||||
|
||||
private CivEnum _civ;
|
||||
private ForceEnum _force;
|
||||
private int _teamId;
|
||||
private int _maxTeamId;
|
||||
private string _forceNameOverride;
|
||||
private Action<int> _onForceChanged;
|
||||
private Action<int> _onTeamChanged;
|
||||
private bool _showForceButtons;
|
||||
private bool _showTeamButtons;
|
||||
private Vector3 _avatarDefaultScale = Vector3.one;
|
||||
private bool _avatarScaleCached;
|
||||
|
||||
public void SetContent(
|
||||
CivEnum civ,
|
||||
ForceEnum force,
|
||||
int teamId,
|
||||
int maxTeamId,
|
||||
string forceNameOverride,
|
||||
Action<int> onForceChanged,
|
||||
Action<int> onTeamChanged,
|
||||
bool showForceButtons = true,
|
||||
bool showTeamButtons = true)
|
||||
{
|
||||
ResetButtons();
|
||||
_civ = civ;
|
||||
_force = force;
|
||||
_teamId = Mathf.Max(1, teamId);
|
||||
_maxTeamId = Mathf.Max(1, maxTeamId);
|
||||
_forceNameOverride = forceNameOverride;
|
||||
_onForceChanged = onForceChanged;
|
||||
_onTeamChanged = onTeamChanged;
|
||||
_showForceButtons = showForceButtons;
|
||||
_showTeamButtons = showTeamButtons;
|
||||
|
||||
UpdatePlayerInfoView();
|
||||
SetTeamText(_teamId);
|
||||
BindButtons();
|
||||
}
|
||||
|
||||
private void ResetButtons()
|
||||
{
|
||||
ForceLeftButton?.onClick.RemoveAllListeners();
|
||||
ForceRightButton?.onClick.RemoveAllListeners();
|
||||
TeamLeftButton?.onClick.RemoveAllListeners();
|
||||
TeamRightButton?.onClick.RemoveAllListeners();
|
||||
}
|
||||
|
||||
private void BindButtons()
|
||||
{
|
||||
if (ForceLeftButton != null) ForceLeftButton.gameObject.SetActive(_showForceButtons);
|
||||
if (ForceRightButton != null) ForceRightButton.gameObject.SetActive(_showForceButtons);
|
||||
if (TeamLeftButton != null) TeamLeftButton.gameObject.SetActive(_showTeamButtons);
|
||||
if (TeamRightButton != null) TeamRightButton.gameObject.SetActive(_showTeamButtons);
|
||||
|
||||
if (_showForceButtons)
|
||||
{
|
||||
ForceLeftButton?.onClick.AddListener(() => ChangeForce(-1));
|
||||
ForceRightButton?.onClick.AddListener(() => ChangeForce(1));
|
||||
}
|
||||
|
||||
if (_showTeamButtons)
|
||||
{
|
||||
TeamLeftButton?.onClick.AddListener(() => ChangeTeam(-1));
|
||||
TeamRightButton?.onClick.AddListener(() => ChangeTeam(1));
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePlayerInfoView()
|
||||
{
|
||||
if (!Table.Instance.PlayerDataAssets.GetPlayerInfo(_civ, _force, out var playerInfo)) return;
|
||||
|
||||
if (ForcesText != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_forceNameOverride))
|
||||
ForcesText.text = _forceNameOverride;
|
||||
else
|
||||
MultilingualManager.Instance.SetUIText(ForcesText, playerInfo.ForceName);
|
||||
}
|
||||
|
||||
SetAvatarImage(playerInfo.LeaderIllustration, playerInfo.LeaderAvatar);
|
||||
}
|
||||
|
||||
private void SetAvatarImage(Sprite illustration, Sprite fallbackAvatar)
|
||||
{
|
||||
if (AvatarImage == null) return;
|
||||
if (AvatarRoot != null) AvatarRoot.SetActive(true);
|
||||
|
||||
CacheAvatarScale();
|
||||
bool useFallback = illustration == null && fallbackAvatar != null;
|
||||
AvatarImage.sprite = illustration != null ? illustration : fallbackAvatar;
|
||||
AvatarImage.rectTransform.localScale = useFallback ? _avatarDefaultScale * 0.5f : _avatarDefaultScale;
|
||||
}
|
||||
|
||||
private void CacheAvatarScale()
|
||||
{
|
||||
if (_avatarScaleCached || AvatarImage == null) return;
|
||||
_avatarDefaultScale = AvatarImage.rectTransform.localScale;
|
||||
_avatarScaleCached = true;
|
||||
}
|
||||
|
||||
private void SetTeamText(int teamId)
|
||||
{
|
||||
if (TeamText == null) return;
|
||||
|
||||
var multilingual = TeamText.GetComponent<MultilingualTextMono>();
|
||||
if (multilingual != null)
|
||||
{
|
||||
multilingual.Ban = true;
|
||||
multilingual.ID = 0;
|
||||
}
|
||||
|
||||
var title = MultilingualManager.Instance.GetMultilingualText(Table.Instance.TextDataAssets.OutsideMultiplayTeamTitle);
|
||||
TeamText.text = $"{title}{teamId}";
|
||||
}
|
||||
|
||||
private void ChangeForce(int direction)
|
||||
{
|
||||
_onForceChanged?.Invoke(direction);
|
||||
}
|
||||
|
||||
private void ChangeTeam(int direction)
|
||||
{
|
||||
_onTeamChanged?.Invoke(direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: caeb4822d8fb4e9d93c8e56c08899e8c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,76 +1,109 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Animancer;
|
||||
using Logic.AI;
|
||||
using Logic.Multilingual;
|
||||
using MongoDB.Driver;
|
||||
using NodeCanvas.Tasks.Actions;
|
||||
using RuntimeData;
|
||||
using TH1_Logic.Core;
|
||||
using TH1_Logic.Net;
|
||||
using TH1_Logic.Steam;
|
||||
using TH1_UI.HintUI;
|
||||
using TH1_UI.View.Outside;
|
||||
using TH1Resource;
|
||||
using TMPro;
|
||||
using UI.HintUI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIOutsideSelectCheckPanelMono : MonoBehaviour
|
||||
{
|
||||
|
||||
public UIOutsideSelectOptionGroupMono GameMode;
|
||||
public UIOutsideSelectOptionGroupMono PlayerCount;
|
||||
public UIOutsideSelectOptionGroupMono MapSize;
|
||||
public UIOutsideSelectOptionGroupMono Diff;
|
||||
public UIOutsideSelectOptionGroupMono Water;
|
||||
public GameObject WinTitle;
|
||||
public UIOutsideSelectOptionGroupMono WinGroup;
|
||||
public GameObject AISettingTitle;
|
||||
public GameObject AISettingGroup;
|
||||
public GameObject AISettingRowPrefab;
|
||||
public GameObject TestTitle;
|
||||
public GameObject TestGroup;
|
||||
public Toggle ResumeToggle;
|
||||
public Button StartButton;
|
||||
public Button CloseButton;
|
||||
public Button BlockerButton;
|
||||
public AnimancerComponent Animancer;
|
||||
|
||||
// PlayerPrefs key for saving last selected map size in CREATIVE mode
|
||||
private const string LAST_MAP_SIZE_INDEX_KEY = "LastCreativeMapSizeIndex";
|
||||
private static readonly uint[] CreativeWinMatchConfigIds = { 7, 9, 10 };
|
||||
private static readonly List<(CivEnum Civ, ForceEnum Force)> FallbackForceOptions = new List<(CivEnum Civ, ForceEnum Force)>
|
||||
{
|
||||
(CivEnum.Egyptian, ForceEnum.Remilia),
|
||||
(CivEnum.French, ForceEnum.Kaguya),
|
||||
(CivEnum.Germany, ForceEnum.Kanako),
|
||||
(CivEnum.Indian, ForceEnum.Satori),
|
||||
};
|
||||
|
||||
private Action _onStartClick;
|
||||
private Empire _playerEmpire;
|
||||
private readonly List<AISettingData> _aiSettings = new List<AISettingData>();
|
||||
private readonly List<UIOutsideSelectAISettingRowMono> _aiSettingRows = new List<UIOutsideSelectAISettingRowMono>();
|
||||
private bool _aiSettingRowsCached;
|
||||
|
||||
public uint WinSelectedIndex => WinGroup != null ? WinGroup.SelectedIndex : 0;
|
||||
public bool IsTestMode => GameMode != null && GameMode.SelectedIndex == 2 && ResumeToggle != null && ResumeToggle.isOn;
|
||||
public IReadOnlyList<AISettingData> AISettings => _aiSettings;
|
||||
|
||||
public class AISettingData
|
||||
{
|
||||
public int SlotIndex;
|
||||
public uint CivId;
|
||||
public uint ForceId;
|
||||
public int TeamId;
|
||||
public bool IsForceUserEdited;
|
||||
public bool IsTeamUserEdited;
|
||||
}
|
||||
|
||||
public void Init(Action onStartClick)
|
||||
{
|
||||
InitSetting();
|
||||
_onStartClick = onStartClick;
|
||||
|
||||
StartButton.onClick.RemoveAllListeners();
|
||||
StartButton.onClick.AddListener(() =>
|
||||
{
|
||||
//Animancer.Play(ResourceCache.Instance.AnimCache.UICommonPanelFadeOut);
|
||||
_onStartClick.Invoke();
|
||||
});
|
||||
|
||||
StartButton.onClick.AddListener(() => _onStartClick?.Invoke());
|
||||
|
||||
CloseButton.onClick.RemoveAllListeners();
|
||||
CloseButton.onClick.AddListener(Hide);
|
||||
|
||||
|
||||
BlockerButton.onClick.RemoveAllListeners();
|
||||
BlockerButton.onClick.AddListener(Hide);
|
||||
}
|
||||
|
||||
public void SetPlayerEmpire(Empire playerEmpire)
|
||||
{
|
||||
_playerEmpire = playerEmpire;
|
||||
uint playerCount = PlayerCount != null
|
||||
? PlayerCount.SelectedIndex + 2
|
||||
: Main.Instance.MapConfig?.PlayerCount ?? 2;
|
||||
InitAISettings(playerCount, gameObject.activeInHierarchy);
|
||||
RefreshAISettingRows();
|
||||
}
|
||||
|
||||
public void InitSetting()
|
||||
{
|
||||
|
||||
uint playerCount = 2;
|
||||
AIDifficult diff = AIDifficult.HARD;
|
||||
GameMode gameMode = RuntimeData.GameMode.PERFECT;
|
||||
//读取玩家缺省存储值
|
||||
uint matchConfigId = 7;
|
||||
|
||||
if (Main.Instance.MapConfig != null)
|
||||
{
|
||||
playerCount = Main.Instance.MapConfig.PlayerCount;
|
||||
diff = Main.Instance.MapConfig.AIDiff;
|
||||
gameMode = Main.Instance.MapConfig.GameMode;
|
||||
matchConfigId = Main.Instance.MapConfig.Id;
|
||||
}
|
||||
|
||||
|
||||
uint playerCountIdx = playerCount >= 2 ? playerCount - 2 : 0;
|
||||
// CREATIVE模式下从PlayerPrefs读取上次的MapSize选择,其他模式根据玩家数量计算
|
||||
uint mapSizeIdx = gameMode == RuntimeData.GameMode.CREATIVE
|
||||
? (uint)PlayerPrefs.GetInt(LAST_MAP_SIZE_INDEX_KEY, 3) // 默认18x18 (index 3)
|
||||
? (uint)PlayerPrefs.GetInt(LAST_MAP_SIZE_INDEX_KEY, 3)
|
||||
: playerCount switch
|
||||
{
|
||||
2 => 0,
|
||||
@ -78,7 +111,7 @@ public class UIOutsideSelectCheckPanelMono : MonoBehaviour
|
||||
4 => 2,
|
||||
_ => 3
|
||||
};
|
||||
uint diffIdx = diff switch
|
||||
uint diffIdx = diff switch
|
||||
{
|
||||
AIDifficult.EASY => 0,
|
||||
AIDifficult.NORMAL => 1,
|
||||
@ -92,25 +125,35 @@ public class UIOutsideSelectCheckPanelMono : MonoBehaviour
|
||||
RuntimeData.GameMode.CREATIVE => 2,
|
||||
_ => 2
|
||||
};
|
||||
|
||||
// Water设置:CREATIVE模式从存档读取,其他模式强制为Pangea(2)
|
||||
uint waterIdx = gameMode == RuntimeData.GameMode.CREATIVE && Main.Instance.MapConfig != null
|
||||
? (uint)Main.Instance.MapConfig.WaterType
|
||||
: 2; // default Pangea
|
||||
: 2;
|
||||
|
||||
GameMode.OnOptionClicked = OnGameModeOptionClicked;
|
||||
PlayerCount.OnOptionClicked = OnPlayerOptionClicked;
|
||||
if (WinGroup != null) WinGroup.OnOptionClicked = OnWinOptionClicked;
|
||||
if (ResumeToggle != null)
|
||||
{
|
||||
ResumeToggle.onValueChanged.RemoveAllListeners();
|
||||
ResumeToggle.onValueChanged.AddListener(OnTestModeChanged);
|
||||
}
|
||||
|
||||
GameMode.Init(gameModeIdx);
|
||||
GameMode.OnOptionClicked = OnGameModeOptionClicked;
|
||||
PlayerCount.Init(playerCountIdx);
|
||||
PlayerCount.OnOptionClicked = OnPlayerOptionClicked;
|
||||
MapSize.Init(mapSizeIdx);
|
||||
Diff.Init(diffIdx);
|
||||
if (Water != null) Water.Init(waterIdx);
|
||||
if (WinGroup != null) WinGroup.Init(GetWinIndexByMatchConfigId(matchConfigId));
|
||||
|
||||
InitAISettings(playerCount, false);
|
||||
OnGameModeOptionClicked(gameModeIdx);
|
||||
}
|
||||
|
||||
public void OnPlayerOptionClicked(uint idx)
|
||||
{
|
||||
// Only auto-sync MapSize in non-CREATIVE modes
|
||||
InitAISettings(idx + 2, true);
|
||||
RefreshAISettingRows();
|
||||
|
||||
if (GameMode.SelectedIndex == 2) return;
|
||||
uint mapSizeIdx = idx switch
|
||||
{
|
||||
@ -124,38 +167,62 @@ public class UIOutsideSelectCheckPanelMono : MonoBehaviour
|
||||
|
||||
public void OnGameModeOptionClicked(uint idx)
|
||||
{
|
||||
if (idx == 2) // CREATIVE
|
||||
bool isCreative = idx == 2;
|
||||
if (WinTitle != null) WinTitle.SetActive(isCreative);
|
||||
if (WinGroup != null)
|
||||
{
|
||||
WinGroup.gameObject.SetActive(isCreative);
|
||||
WinGroup.Init(WinGroup.SelectedIndex);
|
||||
}
|
||||
if (AISettingTitle != null) AISettingTitle.SetActive(isCreative);
|
||||
if (AISettingGroup != null) AISettingGroup.SetActive(isCreative);
|
||||
if (TestTitle != null) TestTitle.SetActive(isCreative);
|
||||
if (TestGroup != null) TestGroup.SetActive(isCreative);
|
||||
RefreshAISettingRows();
|
||||
|
||||
if (isCreative)
|
||||
{
|
||||
MapSize.Passive = false;
|
||||
MapSize.Init(MapSize.SelectedIndex);
|
||||
if (Water != null) { Water.Passive = false; Water.Init(Water.SelectedIndex); }
|
||||
if (Water != null)
|
||||
{
|
||||
Water.Passive = false;
|
||||
Water.Init(Water.SelectedIndex);
|
||||
}
|
||||
}
|
||||
else // DOMINATION / PERFECT
|
||||
else
|
||||
{
|
||||
MapSize.Passive = true;
|
||||
MapSize.Init(MapSize.SelectedIndex);
|
||||
// Sync MapSize with PlayerCount
|
||||
OnPlayerOptionClicked(PlayerCount.SelectedIndex);
|
||||
if (Water != null) { Water.Passive = true; Water.Init(2); } // 重置为盘古大陆(Pangea)
|
||||
if (Water != null)
|
||||
{
|
||||
Water.Passive = true;
|
||||
Water.Init(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public uint GetSelectedCreativeMatchConfigId()
|
||||
{
|
||||
return GetCreativeMatchConfigIdByWinIndex(WinSelectedIndex);
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
InitSetting();
|
||||
gameObject.SetActive(true);
|
||||
Animancer.Play(ResourceCache.Instance.AnimCache.UICommonPanelFadeIn);
|
||||
|
||||
|
||||
Timer.Instance.TimerRegister(this, () =>
|
||||
{
|
||||
|
||||
GameMode.OnShow();
|
||||
PlayerCount.OnShow();
|
||||
MapSize.OnShow();
|
||||
Diff.OnShow();
|
||||
if (Water != null) Water.OnShow();
|
||||
},0.01f,"");
|
||||
|
||||
if (WinGroup != null && WinGroup.gameObject.activeInHierarchy) WinGroup.OnShow();
|
||||
}, 0.01f, "");
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
@ -163,14 +230,406 @@ public class UIOutsideSelectCheckPanelMono : MonoBehaviour
|
||||
var state = Animancer.Play(ResourceCache.Instance.AnimCache.UICommonPanelFadeOut);
|
||||
state.Events.OnEnd = () => { gameObject.SetActive(false); };
|
||||
}
|
||||
void Start()
|
||||
|
||||
private void InitAISettings(uint playerCount, bool preserveUserTeamEdits)
|
||||
{
|
||||
|
||||
int targetCount = Mathf.Max(0, (int)playerCount - 1);
|
||||
var usedPlayerOptions = new HashSet<(uint CivId, uint ForceId)>();
|
||||
AddPlayerEmpireToUsedOptions(usedPlayerOptions);
|
||||
var nextSettings = new List<AISettingData>();
|
||||
|
||||
for (int slotIndex = 1; slotIndex <= targetCount; slotIndex++)
|
||||
{
|
||||
var existingData = GetAISettingData(slotIndex);
|
||||
var slot = GetExistingPlayerSlot(slotIndex);
|
||||
var setting = CreateAISettingData(slotIndex, playerCount, usedPlayerOptions, existingData, slot, preserveUserTeamEdits);
|
||||
nextSettings.Add(setting);
|
||||
usedPlayerOptions.Add((setting.CivId, setting.ForceId));
|
||||
}
|
||||
|
||||
_aiSettings.Clear();
|
||||
_aiSettings.AddRange(nextSettings);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
private AISettingData CreateAISettingData(
|
||||
int slotIndex,
|
||||
uint playerCount,
|
||||
HashSet<(uint CivId, uint ForceId)> usedPlayerOptions,
|
||||
AISettingData existingData,
|
||||
MemberCiv slot,
|
||||
bool preserveUserTeamEdits)
|
||||
{
|
||||
|
||||
if (existingData != null && IsValidPlayerOption(existingData.CivId, existingData.ForceId))
|
||||
{
|
||||
var key = (existingData.CivId, existingData.ForceId);
|
||||
if (existingData.IsForceUserEdited || !usedPlayerOptions.Contains(key))
|
||||
{
|
||||
return new AISettingData
|
||||
{
|
||||
SlotIndex = slotIndex,
|
||||
CivId = existingData.CivId,
|
||||
ForceId = existingData.ForceId,
|
||||
TeamId = GetPreferredTeamId(existingData, slotIndex, (int)playerCount, preserveUserTeamEdits),
|
||||
IsForceUserEdited = existingData.IsForceUserEdited,
|
||||
IsTeamUserEdited = preserveUserTeamEdits && existingData.IsTeamUserEdited
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (slot != null && slot.IsCivFixed && IsValidPlayerOption(slot.CivId, slot.ForceId))
|
||||
{
|
||||
var key = (slot.CivId, slot.ForceId);
|
||||
if (!usedPlayerOptions.Contains(key))
|
||||
{
|
||||
return new AISettingData
|
||||
{
|
||||
SlotIndex = slotIndex,
|
||||
CivId = slot.CivId,
|
||||
ForceId = slot.ForceId,
|
||||
TeamId = GetPreferredTeamId(existingData, slotIndex, (int)playerCount, preserveUserTeamEdits),
|
||||
IsForceUserEdited = false,
|
||||
IsTeamUserEdited = preserveUserTeamEdits && existingData?.IsTeamUserEdited == true
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
var playerOption = PickDefaultPlayerOption(slotIndex, usedPlayerOptions);
|
||||
return new AISettingData
|
||||
{
|
||||
SlotIndex = slotIndex,
|
||||
CivId = playerOption.CivId,
|
||||
ForceId = playerOption.ForceId,
|
||||
TeamId = GetPreferredTeamId(existingData, slotIndex, (int)playerCount, preserveUserTeamEdits),
|
||||
IsForceUserEdited = false,
|
||||
IsTeamUserEdited = preserveUserTeamEdits && existingData?.IsTeamUserEdited == true
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshAISettingRows()
|
||||
{
|
||||
CacheExistingAISettingRows();
|
||||
bool show = GameMode != null && GameMode.SelectedIndex == 2 && AISettingGroup != null;
|
||||
if (AISettingGroup != null) AISettingGroup.SetActive(show);
|
||||
if (!show)
|
||||
{
|
||||
for (int i = 0; i < _aiSettingRows.Count; i++)
|
||||
if (_aiSettingRows[i] != null) _aiSettingRows[i].gameObject.SetActive(false);
|
||||
RefreshAISettingLayout();
|
||||
return;
|
||||
}
|
||||
|
||||
var sameCountDict = BuildForceSameCountDict();
|
||||
int maxTeamId = Mathf.Max(1, (int)(PlayerCount.SelectedIndex + 2));
|
||||
int visibleRowCount = 0;
|
||||
RenderSelfPlayerRow(sameCountDict, maxTeamId);
|
||||
visibleRowCount++;
|
||||
|
||||
for (int i = 0; i < _aiSettings.Count; i++)
|
||||
{
|
||||
int rowIndex = i + 1;
|
||||
var row = GetAISettingRow(rowIndex);
|
||||
if (row == null) continue;
|
||||
|
||||
row.gameObject.SetActive(true);
|
||||
row.transform.SetSiblingIndex(rowIndex);
|
||||
var data = _aiSettings[i];
|
||||
var civ = Table.Instance.TransCivIdToCivEnum(data.CivId);
|
||||
var force = Table.Instance.TransForceIdToForceEnum(data.ForceId);
|
||||
var forceNameOverride = GetForceNameOverride(data, civ, force, sameCountDict);
|
||||
row.SetContent(civ, force, data.TeamId, maxTeamId, forceNameOverride,
|
||||
direction => OnAIRowForceChanged(data.SlotIndex, direction),
|
||||
direction => OnAIRowTeamChanged(data.SlotIndex, direction));
|
||||
visibleRowCount++;
|
||||
}
|
||||
|
||||
for (int i = visibleRowCount; i < _aiSettingRows.Count; i++)
|
||||
{
|
||||
if (_aiSettingRows[i] == null) continue;
|
||||
_aiSettingRows[i].gameObject.SetActive(false);
|
||||
_aiSettingRows[i].transform.SetSiblingIndex(i);
|
||||
}
|
||||
|
||||
RefreshAISettingLayout();
|
||||
}
|
||||
|
||||
private void RenderSelfPlayerRow(Dictionary<(CivEnum, ForceEnum), int> sameCountDict, int maxTeamId)
|
||||
{
|
||||
var row = GetAISettingRow(0);
|
||||
if (row == null) return;
|
||||
|
||||
row.gameObject.SetActive(true);
|
||||
row.transform.SetSiblingIndex(0);
|
||||
|
||||
var playerEmpire = GetCurrentPlayerEmpire();
|
||||
var forceNameOverride = GetSelfForceNameOverride(playerEmpire.Civ, playerEmpire.Force, sameCountDict);
|
||||
row.SetContent(playerEmpire.Civ, playerEmpire.Force, 1, maxTeamId, forceNameOverride, null, null, false, false);
|
||||
}
|
||||
|
||||
private UIOutsideSelectAISettingRowMono GetAISettingRow(int index)
|
||||
{
|
||||
CacheExistingAISettingRows();
|
||||
if (AISettingRowPrefab == null || AISettingGroup == null) return null;
|
||||
while (_aiSettingRows.Count <= index)
|
||||
{
|
||||
var item = Instantiate(AISettingRowPrefab, AISettingGroup.transform);
|
||||
item.SetActive(true);
|
||||
_aiSettingRows.Add(item.GetComponent<UIOutsideSelectAISettingRowMono>());
|
||||
}
|
||||
|
||||
return _aiSettingRows[index];
|
||||
}
|
||||
|
||||
private void CacheExistingAISettingRows()
|
||||
{
|
||||
if (_aiSettingRowsCached || AISettingGroup == null) return;
|
||||
_aiSettingRowsCached = true;
|
||||
|
||||
for (int i = 0; i < AISettingGroup.transform.childCount; i++)
|
||||
{
|
||||
var row = AISettingGroup.transform.GetChild(i).GetComponent<UIOutsideSelectAISettingRowMono>();
|
||||
if (row != null && !_aiSettingRows.Contains(row)) _aiSettingRows.Add(row);
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshAISettingLayout()
|
||||
{
|
||||
if (AISettingGroup == null) return;
|
||||
var groupRect = AISettingGroup.GetComponent<RectTransform>();
|
||||
if (groupRect == null) return;
|
||||
|
||||
Canvas.ForceUpdateCanvases();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(groupRect);
|
||||
|
||||
var parentRect = groupRect.parent as RectTransform;
|
||||
if (parentRect != null) LayoutRebuilder.ForceRebuildLayoutImmediate(parentRect);
|
||||
Canvas.ForceUpdateCanvases();
|
||||
}
|
||||
|
||||
private Dictionary<(CivEnum, ForceEnum), int> BuildForceSameCountDict()
|
||||
{
|
||||
var sameCountDict = new Dictionary<(CivEnum, ForceEnum), int>();
|
||||
var playerEmpire = GetCurrentPlayerEmpire();
|
||||
AddSameCount(playerEmpire.Civ, playerEmpire.Force);
|
||||
foreach (var data in _aiSettings)
|
||||
{
|
||||
AddSameCount(Table.Instance.TransCivIdToCivEnum(data.CivId), Table.Instance.TransForceIdToForceEnum(data.ForceId));
|
||||
}
|
||||
|
||||
return sameCountDict;
|
||||
|
||||
void AddSameCount(CivEnum civ, ForceEnum force)
|
||||
{
|
||||
if (civ == CivEnum.Common || force == ForceEnum.Common) return;
|
||||
var key = (civ, force);
|
||||
sameCountDict.TryGetValue(key, out var prevCnt);
|
||||
sameCountDict[key] = prevCnt + 1;
|
||||
}
|
||||
}
|
||||
|
||||
private string GetForceNameOverride(AISettingData data, CivEnum civ, ForceEnum force, Dictionary<(CivEnum, ForceEnum), int> sameCountDict)
|
||||
{
|
||||
if (!sameCountDict.TryGetValue((civ, force), out var sameCnt) || sameCnt < 2) return null;
|
||||
if (!Table.Instance.PlayerDataAssets.GetPlayerInfo(civ, force, out var pi)) return null;
|
||||
var raw = MultilingualManager.Instance.GetMultilingualTextSafe(pi.ForceName);
|
||||
return $"{raw} {data.SlotIndex + 1}P";
|
||||
}
|
||||
|
||||
private string GetSelfForceNameOverride(CivEnum civ, ForceEnum force, Dictionary<(CivEnum, ForceEnum), int> sameCountDict)
|
||||
{
|
||||
if (!sameCountDict.TryGetValue((civ, force), out var sameCnt) || sameCnt < 2) return null;
|
||||
if (!Table.Instance.PlayerDataAssets.GetPlayerInfo(civ, force, out var pi)) return null;
|
||||
var raw = MultilingualManager.Instance.GetMultilingualTextSafe(pi.ForceName);
|
||||
return $"{raw} 1P";
|
||||
}
|
||||
|
||||
private void OnAIRowForceChanged(int slotIndex, int direction)
|
||||
{
|
||||
var data = GetAISettingData(slotIndex);
|
||||
if (data == null) return;
|
||||
|
||||
var next = GetNextAIForce(data.CivId, data.ForceId, direction);
|
||||
data.CivId = Table.Instance.TransCivEnumToCivId(next.Civ);
|
||||
data.ForceId = Table.Instance.TransForceEnumToForceId(next.Force);
|
||||
data.IsForceUserEdited = true;
|
||||
RefreshAISettingRows();
|
||||
}
|
||||
|
||||
private void OnAIRowTeamChanged(int slotIndex, int direction)
|
||||
{
|
||||
var data = GetAISettingData(slotIndex);
|
||||
if (data == null) return;
|
||||
|
||||
data.TeamId = GetNextTeamId(data.TeamId, direction);
|
||||
data.IsTeamUserEdited = true;
|
||||
RefreshAISettingRows();
|
||||
}
|
||||
|
||||
private AISettingData GetAISettingData(int slotIndex)
|
||||
{
|
||||
for (int i = 0; i < _aiSettings.Count; i++)
|
||||
if (_aiSettings[i].SlotIndex == slotIndex) return _aiSettings[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
private int GetNextTeamId(int teamId, int direction)
|
||||
{
|
||||
int maxTeamId = Mathf.Max(1, (int)(PlayerCount.SelectedIndex + 2));
|
||||
teamId += direction;
|
||||
if (teamId < 1) return maxTeamId;
|
||||
if (teamId > maxTeamId) return 1;
|
||||
return teamId;
|
||||
}
|
||||
|
||||
private (CivEnum Civ, ForceEnum Force) GetNextAIForce(uint civId, uint forceId, int direction)
|
||||
{
|
||||
var options = GetAIForceOptions();
|
||||
var civ = Table.Instance.TransCivIdToCivEnum(civId);
|
||||
var force = Table.Instance.TransForceIdToForceEnum(forceId);
|
||||
int index = 0;
|
||||
for (int i = 0; i < options.Count; i++)
|
||||
{
|
||||
if (options[i].Civ == civ && options[i].Force == force)
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
index = (index + direction + options.Count) % options.Count;
|
||||
return options[index];
|
||||
}
|
||||
|
||||
private IReadOnlyList<(CivEnum Civ, ForceEnum Force)> GetAIForceOptions()
|
||||
{
|
||||
var assets = Table.Instance.PlayerDataAssets;
|
||||
var options = new List<(CivEnum Civ, ForceEnum Force)>();
|
||||
var optionSet = new HashSet<(CivEnum Civ, ForceEnum Force)>();
|
||||
if (assets?.PlayerDataList != null)
|
||||
{
|
||||
foreach (var info in assets.PlayerDataList)
|
||||
{
|
||||
if (info == null) continue;
|
||||
var civ = Table.Instance.TransCivIdToCivEnum(info.CivId);
|
||||
var force = Table.Instance.TransForceIdToForceEnum(info.ForceId);
|
||||
if (civ == CivEnum.Common || force == ForceEnum.Common) continue;
|
||||
if (!optionSet.Add((civ, force))) continue;
|
||||
options.Add((civ, force));
|
||||
}
|
||||
}
|
||||
|
||||
return options.Count > 0 ? options : FallbackForceOptions;
|
||||
}
|
||||
|
||||
private bool IsValidPlayerOption(uint civId, uint forceId)
|
||||
{
|
||||
var civ = Table.Instance.TransCivIdToCivEnum(civId);
|
||||
var force = Table.Instance.TransForceIdToForceEnum(forceId);
|
||||
if (civ == CivEnum.Common || force == ForceEnum.Common) return false;
|
||||
return Table.Instance.PlayerDataAssets.GetPlayerInfo(civ, force, out _);
|
||||
}
|
||||
|
||||
private static int GetPreferredTeamId(AISettingData existingData, int slotIndex, int playerCount, bool preserveUserTeamEdits)
|
||||
{
|
||||
if (preserveUserTeamEdits && existingData != null && existingData.IsTeamUserEdited)
|
||||
return GetValidTeamId(existingData.TeamId, slotIndex, playerCount);
|
||||
return GetDefaultTeamId(slotIndex, playerCount);
|
||||
}
|
||||
|
||||
private static int GetValidTeamId(int teamId, int slotIndex, int playerCount)
|
||||
{
|
||||
int maxTeamId = Mathf.Max(1, playerCount);
|
||||
if (teamId >= 1 && teamId <= maxTeamId) return teamId;
|
||||
return GetDefaultTeamId(slotIndex, playerCount);
|
||||
}
|
||||
|
||||
private static int GetDefaultTeamId(int slotIndex, int playerCount)
|
||||
{
|
||||
return Mathf.Clamp(slotIndex + 1, 1, Mathf.Max(1, playerCount));
|
||||
}
|
||||
|
||||
private void AddPlayerEmpireToUsedOptions(HashSet<(uint CivId, uint ForceId)> usedPlayerOptions)
|
||||
{
|
||||
var playerEmpire = GetCurrentPlayerEmpire();
|
||||
if (playerEmpire.Civ != CivEnum.Common && playerEmpire.Force != ForceEnum.Common)
|
||||
{
|
||||
var civId = Table.Instance.TransCivEnumToCivId(playerEmpire.Civ);
|
||||
var forceId = Table.Instance.TransForceEnumToForceId(playerEmpire.Force);
|
||||
if (IsValidPlayerOption(civId, forceId))
|
||||
{
|
||||
usedPlayerOptions.Add((civId, forceId));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var selfSlot = GetExistingPlayerSlot(0);
|
||||
if (selfSlot != null && IsValidPlayerOption(selfSlot.CivId, selfSlot.ForceId))
|
||||
{
|
||||
usedPlayerOptions.Add((selfSlot.CivId, selfSlot.ForceId));
|
||||
}
|
||||
}
|
||||
|
||||
private Empire GetCurrentPlayerEmpire()
|
||||
{
|
||||
if (_playerEmpire.Civ != CivEnum.Common && _playerEmpire.Force != ForceEnum.Common)
|
||||
return _playerEmpire;
|
||||
|
||||
var selfSlot = GetExistingPlayerSlot(0);
|
||||
if (selfSlot != null)
|
||||
{
|
||||
var civ = Table.Instance.TransCivIdToCivEnum(selfSlot.CivId);
|
||||
var force = Table.Instance.TransForceIdToForceEnum(selfSlot.ForceId);
|
||||
if (civ != CivEnum.Common && force != ForceEnum.Common) return new Empire(civ, force);
|
||||
}
|
||||
|
||||
return new Empire(CivEnum.Egyptian, ForceEnum.Remilia);
|
||||
}
|
||||
|
||||
private (uint CivId, uint ForceId) PickDefaultPlayerOption(int preferredIndex, HashSet<(uint CivId, uint ForceId)> usedPlayerOptions)
|
||||
{
|
||||
var options = GetAIForceOptions();
|
||||
for (int offset = 0; offset < options.Count; offset++)
|
||||
{
|
||||
int index = (preferredIndex + offset) % options.Count;
|
||||
var option = options[index];
|
||||
var ids = (
|
||||
Table.Instance.TransCivEnumToCivId(option.Civ),
|
||||
Table.Instance.TransForceEnumToForceId(option.Force));
|
||||
if (!usedPlayerOptions.Contains(ids)) return ids;
|
||||
}
|
||||
|
||||
var fallback = options[preferredIndex % options.Count];
|
||||
return (
|
||||
Table.Instance.TransCivEnumToCivId(fallback.Civ),
|
||||
Table.Instance.TransForceEnumToForceId(fallback.Force));
|
||||
}
|
||||
|
||||
private static MemberCiv GetExistingPlayerSlot(int slotIndex)
|
||||
{
|
||||
var slots = Main.Instance.MapConfig?.MultiCivs;
|
||||
if (slots == null || slotIndex < 0 || slotIndex >= slots.Count) return null;
|
||||
return slots[slotIndex];
|
||||
}
|
||||
|
||||
private void OnWinOptionClicked(uint idx)
|
||||
{
|
||||
}
|
||||
|
||||
private void OnTestModeChanged(bool isOn)
|
||||
{
|
||||
}
|
||||
|
||||
private static uint GetWinIndexByMatchConfigId(uint matchConfigId)
|
||||
{
|
||||
for (int i = 0; i < CreativeWinMatchConfigIds.Length; i++)
|
||||
{
|
||||
if (CreativeWinMatchConfigIds[i] == matchConfigId) return (uint)i;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static uint GetCreativeMatchConfigIdByWinIndex(uint idx)
|
||||
{
|
||||
return idx < CreativeWinMatchConfigIds.Length ? CreativeWinMatchConfigIds[(int)idx] : CreativeWinMatchConfigIds[0];
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,9 +6,11 @@ using Logic.Action;
|
||||
using MapWaterType = Logic.MapWaterType;
|
||||
using Logic.AI;
|
||||
using Logic.Audio;
|
||||
using Logic.CrashSight;
|
||||
using Logic.Multilingual;
|
||||
using ParadoxNotion;
|
||||
using RuntimeData;
|
||||
using MapConfig = RuntimeData.MapConfig;
|
||||
using Steamworks;
|
||||
using TH1_Core.Events;
|
||||
using TH1_Core.Managers;
|
||||
@ -164,6 +166,7 @@ namespace TH1_UI.View.Outside
|
||||
public void SetCivForceInfo(Empire playerEmpire)
|
||||
{
|
||||
_selectEmpire = playerEmpire;
|
||||
SelectCheckPanelMono?.SetPlayerEmpire(playerEmpire);
|
||||
if (!Table.Instance.PlayerDataAssets.GetPlayerInfo(playerEmpire.Civ, playerEmpire.Force, out var info)) return;
|
||||
//Step #1 设置文明基础文字信息
|
||||
MultilingualManager.Instance.SetUIText(ForceName,info.ForceName);
|
||||
@ -278,14 +281,15 @@ namespace TH1_UI.View.Outside
|
||||
? SelectCheckPanelMono.Water.SelectedIndex
|
||||
: 2); // default Pangea
|
||||
|
||||
// domination => 2, perfect => 6, creative => 7
|
||||
// domination => 2, perfect => 6, creative => custom win group
|
||||
uint matchConfigId = gameMode switch
|
||||
{
|
||||
GameMode.PERFECT => 6,
|
||||
GameMode.CREATIVE => 7,
|
||||
GameMode.CREATIVE => SelectCheckPanelMono.GetSelectedCreativeMatchConfigId(),
|
||||
_ => 2 // DOMINATION
|
||||
};
|
||||
Main.Instance.MapConfig.ChangeByMapConfig(MatchConfigManager.Instance.GetMatchConfig(matchConfigId));
|
||||
Main.Instance.MapConfig.Id = matchConfigId;
|
||||
Main.Instance.MapConfig.GameMode = gameMode;
|
||||
Main.Instance.MapConfig.Width = mapSize;
|
||||
Main.Instance.MapConfig.Height = mapSize;
|
||||
@ -295,6 +299,7 @@ namespace TH1_UI.View.Outside
|
||||
Main.Instance.MapConfig.SetSinglePlayerCiv(
|
||||
Table.Instance.TransCivEnumToCivId(_selectEmpire.Civ),
|
||||
Table.Instance.TransForceEnumToForceId(_selectEmpire.Force));
|
||||
ApplyAISettingsToMapConfig(gameMode);
|
||||
|
||||
// Save the selected empire for next time
|
||||
SaveLastSelectedEmpire(_selectEmpire);
|
||||
@ -310,6 +315,60 @@ namespace TH1_UI.View.Outside
|
||||
|
||||
}
|
||||
|
||||
private void ApplyAISettingsToMapConfig(GameMode gameMode)
|
||||
{
|
||||
if (SelectCheckPanelMono == null || Main.Instance.MapConfig?.MultiCivs == null) return;
|
||||
|
||||
int maxTeamId = Mathf.Max(1, (int)Main.Instance.MapConfig.PlayerCount);
|
||||
var selfSlot = Main.Instance.MapConfig.GetPlayerSlot(0, NetMode.Single);
|
||||
if (selfSlot != null)
|
||||
{
|
||||
selfSlot.TeamId = gameMode == GameMode.CREATIVE ? 1 : MapConfig.NoTeamId;
|
||||
selfSlot.IsAI = false;
|
||||
selfSlot.IsHostControlled = false;
|
||||
selfSlot.IsCivFixed = true;
|
||||
}
|
||||
|
||||
foreach (var setting in SelectCheckPanelMono.AISettings)
|
||||
{
|
||||
var slot = Main.Instance.MapConfig.GetPlayerSlot(setting.SlotIndex, NetMode.Single);
|
||||
if (slot == null) continue;
|
||||
|
||||
slot.Index = setting.SlotIndex;
|
||||
slot.MemberId = 0;
|
||||
slot.PlayerId = 0;
|
||||
slot.CivId = setting.CivId;
|
||||
slot.ForceId = setting.ForceId;
|
||||
slot.TeamId = gameMode == GameMode.CREATIVE
|
||||
? Mathf.Clamp(setting.TeamId, 1, maxTeamId)
|
||||
: MapConfig.NoTeamId;
|
||||
slot.IsCivFixed = true;
|
||||
slot.IsReady = false;
|
||||
slot.IsAI = !SelectCheckPanelMono.IsTestMode;
|
||||
slot.IsHostControlled = SelectCheckPanelMono.IsTestMode;
|
||||
}
|
||||
|
||||
LogSingleCreativeTeamConfig(gameMode);
|
||||
}
|
||||
|
||||
private void LogSingleCreativeTeamConfig(GameMode gameMode)
|
||||
{
|
||||
var config = Main.Instance.MapConfig;
|
||||
if (gameMode != GameMode.CREATIVE || config?.MultiCivs == null) return;
|
||||
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.Append("[SingleCreativeTeam] BeforeStart ");
|
||||
for (int i = 0; i < config.MultiCivs.Count; i++)
|
||||
{
|
||||
var slot = config.MultiCivs[i];
|
||||
if (slot == null) continue;
|
||||
if (i > 0) sb.Append(" | ");
|
||||
sb.Append($"slot={slot.Index},team={slot.TeamId},civ={slot.CivId},force={slot.ForceId},ai={slot.IsAI},hostControlled={slot.IsHostControlled}");
|
||||
}
|
||||
|
||||
LogSystem.LogInfo(sb.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the last selected empire to PlayerPrefs
|
||||
/// </summary>
|
||||
|
||||
@ -140,7 +140,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: 0.7.3d
|
||||
bundleVersion: 0.7.3e
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user