基因窃贼

This commit is contained in:
Tourswen
2025-10-22 01:02:33 +08:00
parent fc9bd81f88
commit 88000aa1ca
25 changed files with 1060 additions and 52 deletions

View File

@@ -2,12 +2,28 @@
"Version": 1,
"WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\ara_genestealer\\compabilityeffect_injectgenes.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_genestealer\\compabilityeffect_injectgenes.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\ara_genestealer\\compabilityeffect_extractgene.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_genestealer\\compabilityeffect_extractgene.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\ara_genestealer\\compproperties_abilityinjectgenes.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_genestealer\\compproperties_abilityinjectgenes.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\verbs\\cleave\\verb_meleeattack_cleave.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:verbs\\cleave\\verb_meleeattack_cleave.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\hediffs\\ara_hivemind\\hediff_hiveminddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hivemind\\hediff_hiveminddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\hediffs\\ara_hivemind\\hediffcomp_hiveminddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\hediffs\\ara_hivemind\\hediffcomp_hiveminddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hivemind\\hediffcomp_hiveminddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
@@ -15,11 +31,11 @@
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hivemind\\hediff_hivemindmaster.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\mentalstate\\mentalstate_hivemindcascade.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\mentalstate\\mentalstate_hivemindcascade.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:mentalstate\\mentalstate_hivemindcascade.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\buildings\\building_arachnidgravengine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\buildings\\building_arachnidgravengine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:buildings\\building_arachnidgravengine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
@@ -94,15 +110,67 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 8,
"SelectedChildIndex": 3,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "CompProperties_AbilityInjectGenes.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_Genestealer\\CompProperties_AbilityInjectGenes.cs",
"RelativeDocumentMoniker": "Abilities\\ARA_Genestealer\\CompProperties_AbilityInjectGenes.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_Genestealer\\CompProperties_AbilityInjectGenes.cs",
"RelativeToolTip": "Abilities\\ARA_Genestealer\\CompProperties_AbilityInjectGenes.cs",
"ViewState": "AgIAAAAAAAAAAAAAAADwvwAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T16:09:51.937Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "CompAbilityEffect_ExtractGene.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_Genestealer\\CompAbilityEffect_ExtractGene.cs",
"RelativeDocumentMoniker": "Abilities\\ARA_Genestealer\\CompAbilityEffect_ExtractGene.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_Genestealer\\CompAbilityEffect_ExtractGene.cs",
"RelativeToolTip": "Abilities\\ARA_Genestealer\\CompAbilityEffect_ExtractGene.cs",
"ViewState": "AgIAADUAAAAAAAAAAAAewFwAAABVAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T16:09:29.065Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "CompAbilityEffect_InjectGenes.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_Genestealer\\CompAbilityEffect_InjectGenes.cs",
"RelativeDocumentMoniker": "Abilities\\ARA_Genestealer\\CompAbilityEffect_InjectGenes.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_Genestealer\\CompAbilityEffect_InjectGenes.cs",
"RelativeToolTip": "Abilities\\ARA_Genestealer\\CompAbilityEffect_InjectGenes.cs",
"ViewState": "AgIAAC0AAAAAAAAAAAAtwD4AAAAQAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T16:08:53.903Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Verb_MeleeAttack_Cleave.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\Cleave\\Verb_MeleeAttack_Cleave.cs",
"RelativeDocumentMoniker": "Verbs\\Cleave\\Verb_MeleeAttack_Cleave.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\Cleave\\Verb_MeleeAttack_Cleave.cs",
"RelativeToolTip": "Verbs\\Cleave\\Verb_MeleeAttack_Cleave.cs",
"ViewState": "AgIAAG8AAAAAAAAAAAAhwI8AAABCAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T12:52:47.558Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "HediffComp_HiveMindDrone.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HiveMind\\HediffComp_HiveMindDrone.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_HiveMind\\HediffComp_HiveMindDrone.cs",
@@ -110,12 +178,11 @@
"RelativeToolTip": "Hediffs\\ARA_HiveMind\\HediffComp_HiveMindDrone.cs",
"ViewState": "AgIAAAAAAAAAAAAAAADwvxAAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T11:18:08.124Z",
"EditorCaption": ""
"WhenOpened": "2025-10-21T11:18:08.124Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 7,
"Title": "MentalState_HiveMindCascade.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\MentalState\\MentalState_HiveMindCascade.cs",
"RelativeDocumentMoniker": "MentalState\\MentalState_HiveMindCascade.cs",
@@ -123,12 +190,11 @@
"RelativeToolTip": "MentalState\\MentalState_HiveMindCascade.cs",
"ViewState": "AgIAAI8AAAAAAAAAAAAkwJQAAAA2AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T10:30:11.696Z",
"EditorCaption": ""
"WhenOpened": "2025-10-21T10:30:11.696Z"
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 8,
"Title": "Building_ArachnidGravEngine.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_ArachnidGravEngine.cs",
"RelativeDocumentMoniker": "Buildings\\Building_ArachnidGravEngine.cs",
@@ -136,12 +202,11 @@
"RelativeToolTip": "Buildings\\Building_ArachnidGravEngine.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAAkwBUAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-21T09:12:42.006Z",
"EditorCaption": ""
"WhenOpened": "2025-10-21T09:12:42.006Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"DocumentIndex": 12,
"Title": "CompAbilityEffect_AbilityShowSpawnablePawns.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs",
"RelativeDocumentMoniker": "Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs",
@@ -153,7 +218,7 @@
},
{
"$type": "Document",
"DocumentIndex": 9,
"DocumentIndex": 13,
"Title": "Patch_UniquePawn.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_UniquePawn\\Patch_UniquePawn.cs",
"RelativeDocumentMoniker": "Pawn_Comps\\ARA_UniquePawn\\Patch_UniquePawn.cs",
@@ -165,7 +230,7 @@
},
{
"$type": "Document",
"DocumentIndex": 12,
"DocumentIndex": 16,
"Title": "Building_TurretGunHasSpeed.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_TurretGunHasSpeed.cs",
"RelativeDocumentMoniker": "Buildings\\Building_TurretGunHasSpeed.cs",
@@ -177,7 +242,7 @@
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 6,
"Title": "Hediff_HiveMindMaster.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HiveMind\\Hediff_HiveMindMaster.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_HiveMind\\Hediff_HiveMindMaster.cs",
@@ -185,25 +250,23 @@
"RelativeToolTip": "Hediffs\\ARA_HiveMind\\Hediff_HiveMindMaster.cs",
"ViewState": "AgIAACIAAAAAAAAAAAAAADkAAACXAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-20T17:25:29.183Z",
"EditorCaption": ""
"WhenOpened": "2025-10-20T17:25:29.183Z"
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 4,
"Title": "Hediff_HiveMindDrone.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HiveMind\\Hediff_HiveMindDrone.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_HiveMind\\Hediff_HiveMindDrone.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HiveMind\\Hediff_HiveMindDrone.cs",
"RelativeToolTip": "Hediffs\\ARA_HiveMind\\Hediff_HiveMindDrone.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAFcAAAAWAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAAVAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-20T17:26:14.842Z",
"EditorCaption": ""
"WhenOpened": "2025-10-20T17:26:14.842Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"DocumentIndex": 11,
"Title": "CompProperties_SpawnPawnFromList.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_SpawnPawnFromList\\CompProperties_SpawnPawnFromList.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_SpawnPawnFromList\\CompProperties_SpawnPawnFromList.cs",
@@ -215,7 +278,7 @@
},
{
"$type": "Document",
"DocumentIndex": 6,
"DocumentIndex": 10,
"Title": "CompSpawnPawnFromList.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_SpawnPawnFromList\\CompSpawnPawnFromList.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_SpawnPawnFromList\\CompSpawnPawnFromList.cs",
@@ -227,7 +290,7 @@
},
{
"$type": "Document",
"DocumentIndex": 5,
"DocumentIndex": 9,
"Title": "Building_Incubatable.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_Incubatable.cs",
"RelativeDocumentMoniker": "Buildings\\Building_Incubatable.cs",
@@ -239,7 +302,7 @@
},
{
"$type": "Document",
"DocumentIndex": 11,
"DocumentIndex": 15,
"Title": "CompProperties_UniquePawn.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_UniquePawn\\CompProperties_UniquePawn.cs",
"RelativeDocumentMoniker": "Pawn_Comps\\ARA_UniquePawn\\CompProperties_UniquePawn.cs",
@@ -251,7 +314,7 @@
},
{
"$type": "Document",
"DocumentIndex": 10,
"DocumentIndex": 14,
"Title": "CompUniquePawn.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_UniquePawn\\CompUniquePawn.cs",
"RelativeDocumentMoniker": "Pawn_Comps\\ARA_UniquePawn\\CompUniquePawn.cs",
@@ -263,7 +326,7 @@
},
{
"$type": "Document",
"DocumentIndex": 13,
"DocumentIndex": 17,
"Title": "Building_RefuelingVat.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_Building_RefuelingVat\\Building_RefuelingVat.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_Building_RefuelingVat\\Building_RefuelingVat.cs",
@@ -275,7 +338,7 @@
},
{
"$type": "Document",
"DocumentIndex": 14,
"DocumentIndex": 18,
"Title": "Building_NutrientVat.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_NutrientVat\\Building_NutrientVat.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_NutrientVat\\Building_NutrientVat.cs",
@@ -287,7 +350,7 @@
},
{
"$type": "Document",
"DocumentIndex": 15,
"DocumentIndex": 19,
"Title": "Building_CatastropheMissileSilo.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_CatastropheMissileSilo\\Building_CatastropheMissileSilo.cs",
"RelativeDocumentMoniker": "Buildings\\Building_CatastropheMissileSilo\\Building_CatastropheMissileSilo.cs",
@@ -299,7 +362,7 @@
},
{
"$type": "Document",
"DocumentIndex": 16,
"DocumentIndex": 20,
"Title": "Building_ARANutrientDispenser.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Buildings\\Building_ARANutrientDispenser\\Building_ARANutrientDispenser.cs",
"RelativeDocumentMoniker": "Buildings\\Building_ARANutrientDispenser\\Building_ARANutrientDispenser.cs",
@@ -311,7 +374,7 @@
},
{
"$type": "Document",
"DocumentIndex": 17,
"DocumentIndex": 21,
"Title": "HediffComp_DrawMoteInRange.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_DrawMoteInRange\\HediffComp_DrawMoteInRange.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_DrawMoteInRange\\HediffComp_DrawMoteInRange.cs",
@@ -323,7 +386,7 @@
},
{
"$type": "Document",
"DocumentIndex": 18,
"DocumentIndex": 22,
"Title": "CompAbilityEffect_BindDrone.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HiveMind\\CompAbilityEffect_BindDrone.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_HiveMind\\CompAbilityEffect_BindDrone.cs",
@@ -335,7 +398,7 @@
},
{
"$type": "Document",
"DocumentIndex": 19,
"DocumentIndex": 23,
"Title": "CompProperties_AbilityBindDrone.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HiveMind\\CompProperties_AbilityBindDrone.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_HiveMind\\CompProperties_AbilityBindDrone.cs",
@@ -347,7 +410,7 @@
},
{
"$type": "Document",
"DocumentIndex": 20,
"DocumentIndex": 24,
"Title": "Verb_ShootArc.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Verbs\\Verb_ShootArc.cs",
"RelativeDocumentMoniker": "Verbs\\Verb_ShootArc.cs",

View File

@@ -0,0 +1,271 @@
using RimWorld;
using Verse;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace ArachnaeSwarm
{
public class CompProperties_AbilityExtractGene : CompProperties_AbilityEffect
{
public int baseGeneCount = 1;
public float maxComplexity = 5f;
public bool canExtractArchiteGenes = false;
public bool allowMelaninGenes = false;
public bool targetLosesGene = false; // 是否从目标身上移除基因
// 基因数量概率曲线
public SimpleCurve geneCountChanceCurve = new SimpleCurve
{
new CurvePoint(1f, 0.7f),
new CurvePoint(2f, 0.2f),
new CurvePoint(3f, 0.08f),
new CurvePoint(4f, 0.02f)
};
public CompProperties_AbilityExtractGene()
{
this.compClass = typeof(CompAbilityEffect_ExtractGene);
}
}
public class CompAbilityEffect_ExtractGene : CompAbilityEffect
{
public new CompProperties_AbilityExtractGene Props => (CompProperties_AbilityExtractGene)this.props;
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
{
base.Apply(target, dest);
Pawn caster = parent.pawn;
Pawn targetPawn = target.Pawn;
if (caster == null || targetPawn == null)
return;
// 检查目标是否有基因
if (targetPawn.genes == null || !targetPawn.genes.GenesListForReading.Any())
{
Messages.Message("TargetHasNoGenes".Translate(targetPawn.Named("TARGET")), targetPawn, MessageTypeDefOf.RejectInput);
return;
}
// 获取可提取的基因列表
List<Gene> availableGenes = GetExtractableGenes(targetPawn);
if (!availableGenes.Any())
{
Messages.Message("NoExtractableGenes".Translate(targetPawn.Named("TARGET")), targetPawn, MessageTypeDefOf.RejectInput);
return;
}
// 确定要提取的基因数量
int geneCount = DetermineGeneCount(availableGenes.Count);
// 选择基因
List<GeneDef> genesToAdd = SelectGenesToExtract(availableGenes, geneCount, caster);
if (!genesToAdd.Any())
{
Messages.Message("FailedToExtractGenes".Translate(), caster, MessageTypeDefOf.NegativeEvent);
return;
}
// 应用基因效果
ApplyGeneExtraction(caster, targetPawn, genesToAdd);
// 显示消息
ShowExtractionMessage(caster, targetPawn, genesToAdd);
}
/// <summary>
/// 获取可提取的基因列表
/// </summary>
private List<Gene> GetExtractableGenes(Pawn target)
{
return target.genes.GenesListForReading.Where(gene =>
{
// 检查是否可以提取Archite基因
if (!Props.canExtractArchiteGenes && gene.def.biostatArc > 0)
return false;
// 检查是否允许提取黑色素基因
if (!Props.allowMelaninGenes && gene.def.endogeneCategory == EndogeneCategory.Melanin)
return false;
// 检查复杂度限制
if (gene.def.biostatCpx > Props.maxComplexity)
return false;
return true;
}).ToList();
}
/// <summary>
/// 确定要提取的基因数量
/// </summary>
private int DetermineGeneCount(int availableGeneCount)
{
int maxPossible = Mathf.Min(availableGeneCount, 4); // 最多4个基因
// 使用概率曲线确定数量
int count = (int)Props.geneCountChanceCurve.RandomElementByWeight(point => point.y).x;
return Mathf.Min(count, maxPossible);
}
/// <summary>
/// 选择要提取的基因
/// </summary>
private List<GeneDef> SelectGenesToExtract(List<Gene> availableGenes, int geneCount, Pawn caster)
{
List<GeneDef> selectedGenes = new List<GeneDef>();
List<Gene> remainingGenes = new List<Gene>(availableGenes);
for (int i = 0; i < geneCount && remainingGenes.Count > 0; i++)
{
// 使用权重选择基因
if (remainingGenes.TryRandomElementByWeight(gene => GetGeneSelectionWeight(gene, selectedGenes, caster), out Gene selectedGene))
{
selectedGenes.Add(selectedGene.def);
remainingGenes.Remove(selectedGene);
}
}
return selectedGenes;
}
/// <summary>
/// 获取基因选择权重
/// </summary>
private float GetGeneSelectionWeight(Gene gene, List<GeneDef> alreadySelected, Pawn caster)
{
// 如果已经选择了这个基因权重为0
if (alreadySelected.Contains(gene.def))
return 0f;
// 检查施法者是否已经有这个基因
if (caster.genes.HasActiveGene(gene.def))
return 0f;
// 复杂基因有更高权重
if (gene.def.biostatCpx > 0)
return 3f;
return 1f;
}
/// <summary>
/// 应用基因提取效果
/// </summary>
private void ApplyGeneExtraction(Pawn caster, Pawn target, List<GeneDef> genesToAdd)
{
// 给施法者添加基因(作为内源基因)
foreach (GeneDef geneDef in genesToAdd)
{
if (!caster.genes.HasActiveGene(geneDef))
{
caster.genes.AddGene(geneDef, xenogene: false);
}
}
// 如果配置为从目标身上移除基因
if (Props.targetLosesGene)
{
foreach (GeneDef geneDef in genesToAdd)
{
Gene geneToRemove = target.genes.GetGene(geneDef);
if (geneToRemove != null)
{
target.genes.RemoveGene(geneToRemove);
}
}
}
}
/// <summary>
/// 显示提取消息
/// </summary>
private void ShowExtractionMessage(Pawn caster, Pawn target, List<GeneDef> genesAdded)
{
if (genesAdded.Count > 0)
{
string geneList = genesAdded.Select(g => g.label).ToCommaList().CapitalizeFirst();
string message = "ARAGeneExtractionComplete".Translate(caster.Named("CASTER"), target.Named("TARGET")) + ": " + geneList;
Messages.Message(message, new LookTargets(caster, target), MessageTypeDefOf.PositiveEvent);
}
else
{
Messages.Message("ARAGeneExtractionFailed".Translate(), caster, MessageTypeDefOf.NegativeEvent);
}
}
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
{
Pawn targetPawn = target.Pawn;
if (targetPawn == null)
{
if (throwMessages)
Messages.Message("AbilityMustTargetPawn".Translate(), target.ToTargetInfo(parent.pawn.Map), MessageTypeDefOf.RejectInput);
return false;
}
// 检查目标是否有人类基因
if (!targetPawn.RaceProps.Humanlike)
{
if (throwMessages)
Messages.Message("TargetMustBeHumanlike".Translate(), targetPawn, MessageTypeDefOf.RejectInput);
return false;
}
// 检查目标是否有基因
if (targetPawn.genes == null || !targetPawn.genes.GenesListForReading.Any())
{
if (throwMessages)
Messages.Message("TargetHasNoGenes".Translate(targetPawn.Named("TARGET")), targetPawn, MessageTypeDefOf.RejectInput);
return false;
}
// 检查是否有可提取的基因
if (!GetExtractableGenes(targetPawn).Any())
{
if (throwMessages)
Messages.Message("NoExtractableGenes".Translate(targetPawn.Named("TARGET")), targetPawn, MessageTypeDefOf.RejectInput);
return false;
}
// 检查施法者基因容量
if (!CanCasterAcceptMoreGenes())
{
if (throwMessages)
Messages.Message("CasterAtGeneCapacity".Translate(parent.pawn.Named("CASTER")), parent.pawn, MessageTypeDefOf.RejectInput);
return false;
}
return base.Valid(target, throwMessages);
}
/// <summary>
/// 检查施法者是否可以接受更多基因
/// </summary>
private bool CanCasterAcceptMoreGenes()
{
// 这里可以添加基因容量检查逻辑
// 暂时返回true可以根据需要修改
return true;
}
public override string ExtraLabelMouseAttachment(LocalTargetInfo target)
{
Pawn targetPawn = target.Pawn;
if (targetPawn != null && targetPawn.genes != null)
{
int extractableCount = GetExtractableGenes(targetPawn).Count;
return "ExtractableGenesCount".Translate(extractableCount);
}
return base.ExtraLabelMouseAttachment(target);
}
}
}

View File

@@ -0,0 +1,230 @@
using RimWorld;
using Verse;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace ArachnaeSwarm
{
public class CompAbilityEffect_InjectGenes : CompAbilityEffect
{
public new CompProperties_AbilityInjectGenes Props => (CompProperties_AbilityInjectGenes)this.props;
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
{
base.Apply(target, dest);
Pawn caster = parent.pawn;
Pawn targetPawn = target.Pawn;
if (caster == null || targetPawn == null)
return;
// 检查施法者是否有基因
if (caster.genes == null || !caster.genes.GenesListForReading.Any())
{
Messages.Message("CasterHasNoGenes".Translate(caster.Named("CASTER")), caster, MessageTypeDefOf.RejectInput);
return;
}
// 获取施法者可注入的基因列表(原生基因)
List<Gene> genesToTransfer = GetTransferableGenes(caster);
if (!genesToTransfer.Any())
{
Messages.Message("NoTransferableGenes".Translate(caster.Named("CASTER")), caster, MessageTypeDefOf.RejectInput);
return;
}
// 检查目标是否可以接受这些基因
if (!CanTargetAcceptGenes(targetPawn, genesToTransfer))
{
Messages.Message("TargetCannotAcceptGenes".Translate(targetPawn.Named("TARGET")), targetPawn, MessageTypeDefOf.RejectInput);
return;
}
// 执行基因转移
PerformGeneTransfer(caster, targetPawn, genesToTransfer);
// 显示消息
ShowTransferMessage(caster, targetPawn, genesToTransfer);
}
/// <summary>
/// 获取可转移的基因列表(施法者的原生基因)
/// </summary>
private List<Gene> GetTransferableGenes(Pawn caster)
{
return caster.genes.GenesListForReading.Where(gene =>
{
// 检查是否包括Archite基因
if (!Props.includeArchiteGenes && gene.def.biostatArc > 0)
return false;
// 检查是否包括黑色素基因
if (!Props.includeMelaninGenes && gene.def.endogeneCategory == EndogeneCategory.Melanin)
return false;
// 检查复杂度限制
if (gene.def.biostatCpx > Props.maxComplexity)
return false;
return true;
}).ToList();
}
/// <summary>
/// 检查目标是否可以接受这些基因
/// </summary>
private bool CanTargetAcceptGenes(Pawn target, List<Gene> genesToTransfer)
{
if (target.genes == null)
return false;
// 检查每个基因是否可以被目标接受
foreach (var gene in genesToTransfer)
{
// 如果目标已经有这个基因且不允许重复,则不能接受
if (!Props.allowDuplicateGenes && target.genes.HasActiveGene(gene.def))
return false;
// 检查生物统计值限制
// 这里可以添加更复杂的容量检查
}
return true;
}
/// <summary>
/// 执行基因转移
/// </summary>
private void PerformGeneTransfer(Pawn caster, Pawn target, List<Gene> genesToTransfer)
{
List<GeneDef> transferredGenes = new List<GeneDef>();
// 按特定顺序处理基因(先添加后移除,避免出现问题)
foreach (Gene gene in genesToTransfer)
{
GeneDef geneDef = gene.def;
try
{
// 给目标添加基因(作为原生基因)
if (!target.genes.HasActiveGene(geneDef))
{
target.genes.AddGene(geneDef, xenogene: false);
transferredGenes.Add(geneDef);
}
else if (Props.allowDuplicateGenes)
{
// 如果允许重复,仍然记录但可能不重复添加
transferredGenes.Add(geneDef);
}
// 从施法者移除基因
if (caster.genes.HasActiveGene(geneDef))
{
Gene geneToRemove = caster.genes.GetGene(geneDef);
if (geneToRemove != null)
{
caster.genes.RemoveGene(geneToRemove);
}
}
}
catch (System.Exception ex)
{
Log.Error($"Error transferring gene {geneDef.defName}: {ex}");
}
}
}
/// <summary>
/// 显示转移消息
/// </summary>
private void ShowTransferMessage(Pawn caster, Pawn target, List<Gene> transferredGenes)
{
if (transferredGenes.Count > 0)
{
string geneList = transferredGenes.Select(g => g.def.label).ToCommaList().CapitalizeFirst();
string message = "ARA_GeneInjectionComplete".Translate(caster.Named("CASTER"), target.Named("TARGET")) + ": " + geneList;
Messages.Message(message, new LookTargets(caster, target), MessageTypeDefOf.PositiveEvent);
if (Prefs.DevMode)
{
Log.Message($"Gene injection: {caster.Label} transferred {transferredGenes.Count} genes to {target.Label}");
}
}
else
{
Messages.Message("ARA_GeneInjectionFailed".Translate(), caster, MessageTypeDefOf.NegativeEvent);
}
}
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
{
Pawn targetPawn = target.Pawn;
if (targetPawn == null)
{
if (throwMessages)
Messages.Message("AbilityMustTargetPawn".Translate(), target.ToTargetInfo(parent.pawn.Map), MessageTypeDefOf.RejectInput);
return false;
}
// 检查目标是否有人类基因
if (!targetPawn.RaceProps.Humanlike)
{
if (throwMessages)
Messages.Message("TargetMustBeHumanlike".Translate(), targetPawn, MessageTypeDefOf.RejectInput);
return false;
}
// 检查施法者是否有可转移的基因
if (parent.pawn.genes == null || !GetTransferableGenes(parent.pawn).Any())
{
if (throwMessages)
Messages.Message("CasterHasNoTransferableGenes".Translate(parent.pawn.Named("CASTER")), parent.pawn, MessageTypeDefOf.RejectInput);
return false;
}
// 检查目标是否可以接受基因
List<Gene> transferableGenes = GetTransferableGenes(parent.pawn);
if (!CanTargetAcceptGenes(targetPawn, transferableGenes))
{
if (throwMessages)
Messages.Message("TargetCannotAcceptGenes".Translate(targetPawn.Named("TARGET")), targetPawn, MessageTypeDefOf.RejectInput);
return false;
}
return base.Valid(target, throwMessages);
}
public override string ExtraLabelMouseAttachment(LocalTargetInfo target)
{
Pawn targetPawn = target.Pawn;
Pawn caster = parent.pawn;
if (targetPawn != null && caster != null && caster.genes != null)
{
int transferableCount = GetTransferableGenes(caster).Count;
int targetHasCount = 0;
if (!Props.allowDuplicateGenes && targetPawn.genes != null)
{
var transferableGenes = GetTransferableGenes(caster);
targetHasCount = transferableGenes.Count(g => targetPawn.genes.HasActiveGene(g.def));
}
string baseText = "TransferableGenesCount".Translate(transferableCount);
if (targetHasCount > 0)
{
baseText += " (" + "TargetHasGenesCount".Translate(targetHasCount) + ")";
}
return baseText;
}
return base.ExtraLabelMouseAttachment(target);
}
}
}

View File

@@ -0,0 +1,31 @@
using RimWorld;
using Verse;
namespace ArachnaeSwarm
{
public class CompProperties_AbilityInjectGenes : CompProperties_AbilityEffect
{
// 是否包括Archite基因
public bool includeArchiteGenes = false;
// 是否包括黑色素基因
public bool includeMelaninGenes = false;
// 施法者失去基因后是否获得负面效果
public bool casterGetsNegativeEffect = true;
// 目标获得基因后是否获得正面效果
public bool targetGetsPositiveEffect = true;
// 是否允许向已有相同基因的目标注入
public bool allowDuplicateGenes = false;
// 最大复杂度限制
public float maxComplexity = 10f;
public CompProperties_AbilityInjectGenes()
{
this.compClass = typeof(CompAbilityEffect_InjectGenes);
}
}
}

View File

@@ -75,6 +75,9 @@
<Compile Include="Abilities\ARA_AddExtraExp\CompProperties_AddExtraExp.cs" />
<Compile Include="Abilities\ARA_DestroyOwnBodyPart\CompAbilityEffect_DestroyOwnBodyPart.cs" />
<Compile Include="Abilities\ARA_DestroyOwnBodyPart\CompProperties_AbilityDestroyOwnBodyPart.cs" />
<Compile Include="Abilities\ARA_Genestealer\CompAbilityEffect_ExtractGene.cs" />
<Compile Include="Abilities\ARA_Genestealer\CompAbilityEffect_InjectGenes.cs" />
<Compile Include="Abilities\ARA_Genestealer\CompProperties_AbilityInjectGenes.cs" />
<Compile Include="Abilities\ARA_GiveHediffWithSkillDuration\CompAbilityEffect_GiveHediffWithSkillDuration.cs" />
<Compile Include="Abilities\ARA_GiveHediffWithSkillDuration\CompProperties_GiveHediffWithSkillDuration.cs" />
<Compile Include="Abilities\ARA_HediffRestriction\CompAbilityEffect_HediffRestriction.cs" />

View File

@@ -13,18 +13,62 @@ namespace ArachnaeSwarm
{
var harmony = new Harmony("ArachnaeSwarm.Mod");
harmony.PatchAll();
// 初始化全局变量管理器
GlobalVariableManager.Initialize();
}
}
[HarmonyPatch(typeof(Game), "ExposeData")]
public static class Game_ExposeData_Patch
{
public static void Postfix()
public static void Postfix(Game __instance)
{
GlobalVariableManager.ExposeData();
}
}
// 新增:在游戏开始或结束时清理变量
[HarmonyPatch(typeof(Game), "InitNewGame")]
public static class Game_InitNewGame_Patch
{
public static void Postfix()
{
// 新游戏开始时清理所有变量
GlobalVariableManager.ClearAllVariables();
if (Prefs.DevMode)
{
Log.Message("GlobalVariableManager: Cleared all variables for new game");
}
}
}
// 新增:在游戏加载时确保变量正确
[HarmonyPatch(typeof(Game), "LoadGame")]
public static class Game_LoadGame_Patch
{
public static void Postfix()
{
// 确保变量管理器已初始化
GlobalVariableManager.Initialize();
if (Prefs.DevMode)
{
Log.Message("GlobalVariableManager: Initialized for loaded game");
}
}
}
// 新增:在返回主菜单时清理变量
[HarmonyPatch(typeof(Game), "FinalizeInit")]
public static class Game_FinalizeInit_Patch
{
public static void Postfix()
{
// 确保变量管理器已初始化
GlobalVariableManager.Initialize();
}
}
// 复活拦截补丁
[HarmonyPatch]
public static class ResurrectionUtility_Patch
@@ -140,12 +184,17 @@ namespace ArachnaeSwarm
private static HashSet<string> _globalVariables;
private static bool _initialized = false;
private static void EnsureInitialized()
public static void Initialize()
{
if (!_initialized)
{
_globalVariables = new HashSet<string>();
_initialized = true;
if (Prefs.DevMode)
{
Log.Message("GlobalVariableManager: Initialized");
}
}
}
@@ -153,13 +202,20 @@ namespace ArachnaeSwarm
{
try
{
// 确保在保存或加载前已初始化
Initialize();
if (Scribe.mode == LoadSaveMode.Saving)
{
EnsureInitialized();
if (_globalVariables.Count > 0)
{
List<string> variablesList = new List<string>(_globalVariables);
Scribe_Collections.Look(ref variablesList, "ArachnaeSwarm_GlobalVariables", LookMode.Value);
if (Prefs.DevMode)
{
Log.Message($"GlobalVariableManager: Saved {_globalVariables.Count} variables");
}
}
}
else if (Scribe.mode == LoadSaveMode.LoadingVars)
@@ -170,12 +226,19 @@ namespace ArachnaeSwarm
if (variablesList != null)
{
_globalVariables = new HashSet<string>(variablesList);
if (Prefs.DevMode)
{
Log.Message($"GlobalVariableManager: Loaded {_globalVariables.Count} variables");
}
}
else
{
_globalVariables = new HashSet<string>();
if (Prefs.DevMode)
{
Log.Message("GlobalVariableManager: No variables found in save, initializing empty set");
}
}
_initialized = true;
}
}
catch (System.Exception ex)
@@ -186,32 +249,50 @@ namespace ArachnaeSwarm
public static bool HasVariable(string variable)
{
EnsureInitialized();
Initialize();
return _globalVariables.Contains(variable);
}
public static void SetVariable(string variable)
{
EnsureInitialized();
Initialize();
_globalVariables.Add(variable);
if (Prefs.DevMode)
{
Log.Message($"GlobalVariableManager: Added variable '{variable}'");
}
}
public static bool RemoveVariable(string variable)
{
EnsureInitialized();
return _globalVariables.Remove(variable);
Initialize();
bool removed = _globalVariables.Remove(variable);
if (removed && Prefs.DevMode)
{
Log.Message($"GlobalVariableManager: Removed variable '{variable}'");
}
return removed;
}
public static IEnumerable<string> GetAllVariables()
{
EnsureInitialized();
Initialize();
return _globalVariables;
}
public static void ClearAllVariables()
{
EnsureInitialized();
Initialize();
int count = _globalVariables.Count;
_globalVariables.Clear();
if (Prefs.DevMode)
{
Log.Message($"GlobalVariableManager: Cleared {count} variables");
}
}
}
}

View File

@@ -9,6 +9,11 @@ namespace ArachnaeSwarm
public float cleaveDamageFactor = 0.7f;
public bool damageDowned = false;
public DamageDef explosionDamageDef = null;
// 新增:攻击特效
public EffecterDef attackEffecter = null;
public EffecterDef cleaveEffecter = null;
public SoundDef attackSound = null;
public CompProperties_Cleave()
{
@@ -20,4 +25,4 @@ namespace ArachnaeSwarm
{
public CompProperties_Cleave Props => (CompProperties_Cleave)this.props;
}
}
}

View File

@@ -26,6 +26,9 @@ namespace ArachnaeSwarm
DamageWorker.DamageResult result = new DamageWorker.DamageResult();
// 播放攻击特效
PlayAttackEffecter(target);
// 1. 对主目标造成伤害
DamageInfo dinfo = new DamageInfo(
this.verbProps.meleeDamageDef,
@@ -104,6 +107,45 @@ namespace ArachnaeSwarm
return result;
}
/// <summary>
/// 播放攻击特效
/// </summary>
private void PlayAttackEffecter(LocalTargetInfo target)
{
if (this.CasterPawn == null || this.CasterPawn.Map == null)
return;
// 播放攻击特效
if (this.Comp.Props.attackEffecter != null)
{
Effecter attackEffect = this.Comp.Props.attackEffecter.Spawn();
attackEffect.Trigger(new TargetInfo(this.CasterPawn.Position, this.CasterPawn.Map), target.ToTargetInfo(this.CasterPawn.Map));
attackEffect.Cleanup();
}
// 播放溅射特效
if (this.Comp.Props.cleaveEffecter != null && target.HasThing)
{
PlayCleaveEffecter(target.Thing);
}
}
/// <summary>
/// 播放溅射特效
/// </summary>
private void PlayCleaveEffecter(Thing mainTarget)
{
if (this.CasterPawn == null || this.CasterPawn.Map == null || mainTarget == null)
return;
Pawn casterPawn = this.CasterPawn;
// 播放主要的溅射特效
Effecter cleaveEffect = this.Comp.Props.cleaveEffecter.Spawn();
cleaveEffect.Trigger(new TargetInfo(casterPawn.Position, casterPawn.Map), new TargetInfo(mainTarget.Position, casterPawn.Map));
cleaveEffect.Cleanup();
}
private void CreateCleaveExplosion(Pawn caster, Thing target, float radius, float angle)
{
if (caster.Map == null || this.Comp.Props.explosionDamageDef == null) return;
@@ -177,4 +219,4 @@ namespace ArachnaeSwarm
}).ToList();
}
}
}
}