diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index e19fd07..17f4758 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml b/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml index dc673c9..86bc635 100644 --- a/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml +++ b/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml @@ -23,7 +23,7 @@ Crack
  • - ToxicBuildup + ARA_ToxicBuildup 0.02 ToxicResistance true diff --git a/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml b/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml index 107b37c..450b3ac 100644 --- a/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml +++ b/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml @@ -825,8 +825,8 @@ 1
  • - ARA_Technology_1MED - 需要科技 节点MED-1"制药" 以解锁进化 + ARA_Technology_1BAC + 需要科技 节点BAC-1"育菌种" 以解锁进化
  • diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml index 9c756a5..986f534 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml @@ -85,6 +85,111 @@ + + ARA_ToxicBuildup + + 阿拉克涅毒针所携带的神经毒素正在攻击这个殖民者,这种强力毒素将使得目标快速丧失行动能力并造成恶心眩晕感,还有可能导致永久的大脑损伤。 + HediffWithComps + (0.7, 1.0, 0.7) + + + true + true + ToxicityRevealed + +
  • + HediffComp_ImmunizableToxic + -0.08 +
  • +
    + +
  • + + false +
  • +
  • + + 0.04 + +
  • + Consciousness + -0.1 +
  • + + +
  • + + 0.2 + +
  • + Consciousness + -0.2 +
  • + + +
  • + + 0.40 + 5 + +
  • + Consciousness + -0.3 +
  • + + +
  • + Dementia + 146 + +
  • Brain
  • + + +
    + +
  • + + 0.60 + 1 + +
  • + Consciousness + 0.3 +
  • + + +
  • + Dementia + 37 + +
  • Brain
  • + + +
    + +
  • + + 0.80 + 0.5 + +
  • + Consciousness + 0.10 +
  • + + +
  • + Dementia + 13 + +
  • Brain
  • + + +
    + +
    +
    + ARA_SkyhiveBite diff --git a/1.6/1.6/Defs/RecipeDefs/ARA_Recipes.xml b/1.6/1.6/Defs/RecipeDefs/ARA_Recipes.xml index 61ef0f3..5b71e66 100644 --- a/1.6/1.6/Defs/RecipeDefs/ARA_Recipes.xml +++ b/1.6/1.6/Defs/RecipeDefs/ARA_Recipes.xml @@ -225,6 +225,57 @@ 1 1 + + ARA_Surgery_Install_Carapace_Shell + + 以甲壳素为阿拉克涅虫族的甲壳进行加厚,获得额外的防御力。 + + ARA_Carapace_Shell_Hediff + + 正在实施定向变异 + +
  • + + +
  • ARA_Carapace
  • + + + 25 + +
    + + +
  • ARA_Carapace
  • +
    +
    + +
  • ARA_Chitin_Shell
  • +
    + ARA_Carapace_Shell_Hediff + ARA_Technology_1EVO +
    + + ARA_Carapace_Shell_Hediff + + 这只阿拉克涅虫族的甲壳以甲壳素进行了增厚,获得了额外防御力。 + Hediff_Implant + (0.52, 1, 0.95) + + ARA_Surgery_Install_Carapace_Shell + + +
  • + + 0.25 + 0.25 + +
  • +
    + false + other + 1 + 1 +
    diff --git a/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml b/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml index 3dce913..724def4 100644 --- a/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml +++ b/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml @@ -95,18 +95,6 @@
  • ARA_Technology_2WMT
  • - - - ARA_Technology_9RVXI - - 允许工艺种孵化新的武器。 - 1000 - 11.00 - 2.10 - ARA_ResearchBench - -
  • ARA_Technology_9VXI
  • -
    ARA_Technology_10VXI @@ -596,8 +584,8 @@ ARA_Technology_1EVO - - 允许实行新的阿拉克涅进化手术,允许阿拉克涅虫族获得更大的营养储存能力。 + + 允许实行新的阿拉克涅进化手术,使得阿拉克涅虫族获得更大的营养储存能力和更厚的甲壳。 250 1.00 4.40 diff --git a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml index cf44bcc..1a17e46 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml @@ -334,6 +334,7 @@
  • ARA_MW_Cartilage_Whip
  • ARA_MW_Scything_Talons
  • ARA_RW_Missile_HG_Gun
  • +
  • ARA_RW_Toxic_Needle_SG
  • false @@ -693,8 +694,9 @@
  • ARA_RW_Acid_Mortar
  • ARA_RW_Basic_SniperCannon_Gun
  • -
  • ARA_RW_Basic_Acid_Spreay_Gun
  • +
  • ARA_RW_Basic_FireSpewer_Gun
  • ARA_RW_Missile_AR_Gun
  • +
  • ARA_RW_Basic_Rail_Gun
  • @@ -1479,7 +1481,7 @@ - ArachnaeFighter_Body + ArachnaeSkyraider_Body ARA_ArachnaeRenderTree 1.0 diff --git a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Missile_Weapon.xml b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Missile_Weapon.xml deleted file mode 100644 index 645e14b..0000000 --- a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Missile_Weapon.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml index 223330e..027e2aa 100644 --- a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml +++ b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml @@ -300,8 +300,8 @@ 0.25 Bullet_ARA_RW_Basic_Fist_Needle_Gun 14 - 6 - 2 + 4 + 4 SpitterSpit true @@ -468,7 +468,7 @@ ARA_Cocoon_Weapon_1Stage - ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_MG + ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_SG Graphic_Single 1 @@ -536,7 +536,6 @@ - ARA_Bullet_SniperCannon @@ -553,7 +552,6 @@ 120 - ARA_RW_Basic_SniperCannon_Gun @@ -635,7 +633,6 @@ - ARA_Bullet_Rail @@ -661,10 +658,9 @@ 5 - ARA_RW_Basic_Rail_Gun - + 阿拉克涅虫群的大型武装器官,拥有张牙舞爪的侵略性外形,其口器与一连串可以增生巨型棘刺的血链相连,并通过肌肉压缩获得极高的膛压以射出腔内破坏力惊人的棘刺。这种改型进一步提高了膛压能够发射出具有极强穿透力的巨型棘刺,但缺少快速发射的能力。 Normal Animal @@ -672,7 +668,7 @@ ARA_Cocoon_Weapon_2Stage - ArachnaeSwarm/Weapon/ARA_RW_Basic_SniperCannon_Gun + ArachnaeSwarm/Weapon/ARA_RW_Basic_Rail_Gun Graphic_Single 1.5 @@ -851,20 +847,19 @@ - ARA_RW_Basic_Acid_Spreay_Gun + ARA_RW_Basic_FireSpewer_Gun - 阿拉克涅虫群的大型远程武装器官,拥有布满酸腺的液囊和强健的肌肉纤管,可以向瞄准的方向喷射酸雨,覆盖范围内的敌人并融化它们的装甲和血肉。 + 阿拉克涅虫群的大型远程武装器官,拥有布满酸腺的液囊和强健的肌肉纤管,可以向瞄准的方向喷射火酸热熔气团,覆盖范围内的敌人并融化它们的装甲和血肉。 Normal Animal ARA_Cocoon_Weapon_1Stage - ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Spreay_Gun + ArachnaeSwarm/Weapon/ARA_RW_Basic_FireSpewer_Gun Graphic_Single - 1.5 + 1.2 - 0.75 SpitterSpawn @@ -880,27 +875,30 @@ 0.45 0.3 2.5 - 200 - 8 + 450 + 15 -
  • - ArachnaeSwarm.Verb_ShootSprayMulti +
  • + ArachnaeSwarm.Verb_ShootFireSpew true - false - 1.0 - ARA_Proj_StrongSludgeSpray_Eco - false - false - 3 - 28 - 8 - 2 - SpitterSpit - - true - - 4 + 1.5 + 16 + 12 + 3 + Shot_MiniFlameblaster + GunTail_Medium + 9 + + + 15 + ARA_AcidBurn + 12 + Filth_SpentAcid + ARA_Fire_Spew + 0.5 + 0 + false
  • @@ -933,6 +931,71 @@
    + + ARA_Fire_Spew + +
  • + SubEffecter_SprayerChance + 0.15 + ARA_FireSpew_A + 0.9 + 5~10 + 15.5 + 0.8~1.2 + -15~15 + 0.85 + true +
  • +
  • + SubEffecter_SprayerChance + 0.1 + FireSpew_Base + 0.1 + 0.6 + 0.8 + -9~9 + 0.75 + true +
  • +
  • + SubEffecter_SprayerChance + 0.1 + Mote_SparkThrownFast + 0.5 + 3.3~5 + 0.1~0.2 + -12~12 + 0.8 + true +
  • +
  • + SubEffecter_SprayerChance + 0.2 + FireSpew_Glow + 0.16 + 0.65 +
  • +
    +
    + + ARA_FireSpew_A + MoteOverhead + 0.2 + 0.5 + 0.2 + true + -90 + + Graphic_FleckPulse + GlowAnimated + ArachnaeSwarm/Mote/ARA_FireSpew_B + + <_NumFrames>5 + <_FramesPerSec>7 + + 1.2 + + ARA_RW_Acid_Mortar diff --git a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_FireSpew.xml b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_FireSpew.xml index 582d3e9..f36405e 100644 --- a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_FireSpew.xml +++ b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_FireSpew.xml @@ -1,156 +1,4 @@ - - ARA_RW_Basic_FireSpewer_Gun - - 阿拉克涅虫群督虫使用基础远程武装器官,可以加压喷出热熔气团。瞬间伤害路径范围内的所有敌人。 - Normal - Animal - - ARA_Cocoon_Weapon_2Stage - - - ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun - Graphic_Single - 1.2 - - SpitterSpawn - - - ARA_Technology_9RVXI - UnfinishedWeapon - - - 1300 - - 3.5 - 0.5 - 0.6 - 0.45 - 0.3 - 2.5 - 450 - 15 - - -
  • - ArachnaeSwarm.Verb_ShootFireSpew - true - 1.5 - 16 - 12 - 3 - Shot_MiniFlameblaster - GunTail_Medium - 9 - - - 15 - ARA_AcidBurn - 12 - Filth_SpentAcid - ARA_Fire_Spew - 0.5 - 0 - false -
  • -
    - - 50 - - -
  • ARA_Armed_Organ
  • -
  • ARA_Armed_Organ_Ranged
  • -
  • ARA_Armed_Organ_T1
  • -
    - -
  • RewardStandardQualitySuper
  • -
    - -
  • - -
  • ARA_Cocoon_Weapon_2Stage
  • -
  • ARA_BioforgeIncubator_Thing
  • - - -
  • - -
  • ARA_Weapon_Damage_Acid
  • - - - 1 - 1 - - -
    -
    - - - ARA_Fire_Spew - -
  • - SubEffecter_SprayerChance - 0.15 - ARA_FireSpew_A - 0.9 - 5~10 - 15.5 - 0.8~1.2 - -15~15 - 0.85 - true -
  • -
  • - SubEffecter_SprayerChance - 0.1 - FireSpew_Base - 0.1 - 0.6 - 0.8 - -9~9 - 0.75 - true -
  • -
  • - SubEffecter_SprayerChance - 0.1 - Mote_SparkThrownFast - 0.5 - 3.3~5 - 0.1~0.2 - -12~12 - 0.8 - true -
  • -
  • - SubEffecter_SprayerChance - 0.2 - FireSpew_Glow - 0.16 - 0.65 -
  • -
    -
    - - - ARA_FireSpew_A - MoteOverhead - 0.2 - 0.5 - 0.2 - true - -90 - - Graphic_FleckPulse - GlowAnimated - ArachnaeSwarm/Mote/ARA_FireSpew_B - - <_NumFrames>5 - <_FramesPerSec>7 - - 1.2 - - -
    \ No newline at end of file diff --git a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml index 1335d2b..6521090 100644 --- a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml +++ b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml @@ -763,7 +763,7 @@ 一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-20~35°C),需要小心保护! ARA_MW_Cartilage_Whip - ARA_RW_Basic_Acid_Spreay_Gun + ARA_RW_Basic_FireSpewer_Gun ARA_RW_Toxic_Needle_SG ARA_RW_Toxic_Needle_MG ARA_RW_Basic_SkyHive_Gun @@ -786,33 +786,6 @@
  • - -
  • ArachnaeNode_Race_WeaponSmith
  • @@ -951,7 +924,6 @@ 一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为21~30°C),需要小心保护! ARA_RW_Basic_SniperCannon_Gun - ARA_RW_Basic_FireSpewer_Gun ARA_RW_Missile_HG_Gun ARA_RW_Missile_AR_Gun ARA_RW_Acid_Mortar diff --git a/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Spreay_Gun.png b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_FireSpewer_Gun.png similarity index 100% rename from Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Spreay_Gun.png rename to Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_FireSpewer_Gun.png diff --git a/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_Rail_Gun.png b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_Rail_Gun.png new file mode 100644 index 0000000..cd1f4dd Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_Rail_Gun.png differ diff --git a/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_SkyHive_Gun.png b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_SkyHive_Gun.png index d67f156..ee4e69a 100644 Binary files a/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_SkyHive_Gun.png and b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Basic_SkyHive_Gun.png differ diff --git a/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_SG.png b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_SG.png new file mode 100644 index 0000000..cf86787 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_SG.png differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index e61554e..bab75df 100644 Binary files a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo and b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json index 77355c7..4b134d4 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -2,6 +2,10 @@ "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\\building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.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\\building_comps\\wula_mutifuelspawner\\comprefuelablenutrition_withkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\wula_mutifuelspawner\\comprefuelablenutrition_withkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -23,12 +27,25 @@ { "$type": "Document", "DocumentIndex": 0, + "Title": "CompInteractiveProducer.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs", + "RelativeDocumentMoniker": "Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs", + "RelativeToolTip": "Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAB4AAAA0AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-02T10:43:34.234Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, "Title": "CompRefuelableNutrition_WithKey.cs", "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs", "RelativeDocumentMoniker": "Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs", "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs", "RelativeToolTip": "Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs", - "ViewState": "AgIAABwAAAAAAAAAAAAUwFsAAAAcAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAFsAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-10-02T06:18:10.518Z", "EditorCaption": "" diff --git a/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompInteractiveProducer.cs b/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompInteractiveProducer.cs index 08148da..981aa4e 100644 --- a/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompInteractiveProducer.cs +++ b/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompInteractiveProducer.cs @@ -101,6 +101,22 @@ namespace ArachnaeSwarm Log.Warning($"Could not find ProcessDef for {selectedProcessThingDef.defName} after loading. Resetting production."); ResetProduction(); } + // 关键修复:检查时间戳是否有效 + else if (productionUntilTick > 0) + { + // 如果生产结束时间已经过去,立即完成生产 + if (Find.TickManager.TicksGame >= productionUntilTick) + { + Log.Warning($"Production time already passed for {selectedProcessThingDef.defName}. Finishing immediately."); + FinishProduction(); + } + // 如果时间戳异常(比如超过游戏当前时间太多),重新计算 + else if (productionUntilTick - Find.TickManager.TicksGame > _selectedProcess.productionTicks * 10) + { + Log.Warning($"Abnormal production time detected for {selectedProcessThingDef.defName}. Recalculating."); + productionUntilTick = Find.TickManager.TicksGame + _selectedProcess.productionTicks; + } + } } } @@ -205,6 +221,14 @@ namespace ArachnaeSwarm base.CompTick(); if (InProduction && productionUntilTick > 0) { + // 关键修复:添加时间戳有效性检查 + if (productionUntilTick <= 0) + { + Log.Error($"Invalid productionUntilTick: {productionUntilTick}. Resetting production."); + ResetProduction(); + return; + } + if (FuelComp == null) return; bool hasFuel = FuelComp.HasFuel; @@ -212,6 +236,10 @@ namespace ArachnaeSwarm if (!hasFuel) { parent.TakeDamage(new DamageInfo(DamageDefOf.Rotting, Props.damagePerTickWhenUnfueled)); + + // 修复:没有燃料时不推进生产,而是暂停 + // 移除原来的 productionUntilTick++ 逻辑 + return; } float ambientTemperature = parent.AmbientTemperature; @@ -226,7 +254,8 @@ namespace ArachnaeSwarm temperaturePenaltyPercent = Mathf.Min(1f, temperaturePenaltyPercent + tempDelta * Props.penaltyPerDegreePerTick); } - if (Find.TickManager.TicksGame >= productionUntilTick) + // 修复:添加额外的边界检查 + if (productionUntilTick > 0 && Find.TickManager.TicksGame >= productionUntilTick) { FinishProduction(); } @@ -306,27 +335,37 @@ namespace ArachnaeSwarm { if (_selectedProcess == null) { + Log.Warning("FinishProduction called but _selectedProcess is null. Resetting."); ResetProduction(); return; } - var qualityDetails = GetEstimatedQualityDetails(); - QualityCategory finalQuality = qualityDetails.quality; - - for (int i = 0; i < Props.spawnCount.RandomInRange; i++) + try { - Thing product = ThingMaker.MakeThing(_selectedProcess.thingDef); - product.TryGetComp()?.SetQuality(finalQuality, ArtGenerationContext.Colony); - - GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near); - } + var qualityDetails = GetEstimatedQualityDetails(); + QualityCategory finalQuality = qualityDetails.quality; - if (Props.destroyOnSpawn) + for (int i = 0; i < Props.spawnCount.RandomInRange; i++) + { + Thing product = ThingMaker.MakeThing(_selectedProcess.thingDef); + product.TryGetComp()?.SetQuality(finalQuality, ArtGenerationContext.Colony); + + GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near); + } + + if (Props.destroyOnSpawn) + { + parent.Destroy(DestroyMode.Vanish); + } + } + catch (System.Exception ex) { - parent.Destroy(DestroyMode.Vanish); + Log.Error($"Error in FinishProduction: {ex.Message}"); + } + finally + { + ResetProduction(); } - - ResetProduction(); } private void ResetProduction() @@ -378,6 +417,16 @@ namespace ArachnaeSwarm icon = CancelIcon, action = () => ResetProduction() }; + + // 调试命令:强制完成生产 + if (Prefs.DevMode) + { + yield return new Command_Action + { + defaultLabel = "Debug: Force Finish", + action = () => FinishProduction() + }; + } } } } diff --git a/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompQueuedInteractiveProducer.cs b/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompQueuedInteractiveProducer.cs index 4b90ca9..df3d84b 100644 --- a/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompQueuedInteractiveProducer.cs +++ b/Source/ArachnaeSwarm/Building_Comps/ARA_CompInteractiveProducer/CompQueuedInteractiveProducer.cs @@ -141,6 +141,13 @@ namespace ArachnaeSwarm foreach(var order in producingOrders) { + // 关键修复:检查时间戳有效性 + if (order.productionUntilTick <= 0) + { + Log.Error($"Invalid productionUntilTick: {order.productionUntilTick} for {order.process?.thingDef?.defName}. Skipping."); + continue; + } + if(hasFuel && isTempSafe) { order.ticksUnderOptimalConditions++; @@ -150,10 +157,8 @@ namespace ArachnaeSwarm float tempDelta = (ambientTemperature > Props.maxSafeTemperature) ? ambientTemperature - Props.maxSafeTemperature : Props.minSafeTemperature - ambientTemperature; order.temperaturePenaltyPercent = Mathf.Min(1f, order.temperaturePenaltyPercent + tempDelta * Props.penaltyPerDegreePerTick); } - if (!hasFuel) - { - order.productionUntilTick++; - } + // 修复:移除原来的 order.productionUntilTick++ 逻辑 + // 没有燃料时暂停生产 } if (FuelComp != null) @@ -217,14 +222,27 @@ namespace ArachnaeSwarm private void FinishProduction(QueuedProcessOrder order) { - var qualityDetails = GetEstimatedQualityDetails(order); - QualityCategory finalQuality = qualityDetails.quality; - - for (int i = 0; i < Props.spawnCount.RandomInRange; i++) + if (order.process == null) { - Thing product = ThingMaker.MakeThing(order.process.thingDef); - product.TryGetComp()?.SetQuality(finalQuality, ArtGenerationContext.Colony); - GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near); + Log.Warning("FinishProduction called but order.process is null. Skipping."); + return; + } + + try + { + var qualityDetails = GetEstimatedQualityDetails(order); + QualityCategory finalQuality = qualityDetails.quality; + + for (int i = 0; i < Props.spawnCount.RandomInRange; i++) + { + Thing product = ThingMaker.MakeThing(order.process.thingDef); + product.TryGetComp()?.SetQuality(finalQuality, ArtGenerationContext.Colony); + GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near); + } + } + catch (System.Exception ex) + { + Log.Error($"Error in FinishProduction for {order.process.thingDef.defName}: {ex.Message}"); } } @@ -306,6 +324,26 @@ namespace ArachnaeSwarm Log.Warning($"CompQueuedInteractiveProducer: Could not find a matching ProcessDef for '{order.tempThingDefName}' after loading. The item may have been removed. Removing order."); return true; } + + // 关键修复:检查加载后的时间戳有效性 + if (order.productionUntilTick > 0) + { + // 如果生产结束时间已经过去,立即完成生产 + if (Find.TickManager.TicksGame >= order.productionUntilTick) + { + Log.Warning($"Production time already passed for {order.tempThingDefName}. Finishing immediately."); + FinishProduction(order); + return true; + } + // 如果时间戳异常(比如超过游戏当前时间太多),重新计算 + else if (order.productionUntilTick - Find.TickManager.TicksGame > order.process.productionTicks * 10) + { + Log.Warning($"Abnormal production time detected for {order.tempThingDefName}. Recalculating."); + float speedFactor = 1f + (FacilitiesComp?.GetStatOffset(StatDef.Named("ARA_IncubationSpeedFactor")) ?? 0f); + int modifiedDelay = (int)(order.process.productionTicks / speedFactor); + order.productionUntilTick = Find.TickManager.TicksGame + modifiedDelay; + } + } return false; }); @@ -419,4 +457,4 @@ namespace ArachnaeSwarm return 10f; } } -} \ No newline at end of file +} diff --git a/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_Acid_Spreay_Gun.sai2 b/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_FireSpewer_Gun.sai2 similarity index 100% rename from 非公开资源/Content/Textures/Weapon/ARA_RW_Basic_Acid_Spreay_Gun.sai2 rename to 非公开资源/Content/Textures/Weapon/ARA_RW_Basic_FireSpewer_Gun.sai2 diff --git a/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_Rail_Gun.sai2 b/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_Rail_Gun.sai2 new file mode 100644 index 0000000..6b7f688 Binary files /dev/null and b/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_Rail_Gun.sai2 differ diff --git a/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_SkyHive_Gun.sai2 b/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_SkyHive_Gun.sai2 index 8d054cf..c8008b5 100644 Binary files a/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_SkyHive_Gun.sai2 and b/非公开资源/Content/Textures/Weapon/ARA_RW_Basic_SkyHive_Gun.sai2 differ diff --git a/非公开资源/Content/Textures/Weapon/ARA_RW_Toxic_Needle_SG.sai2 b/非公开资源/Content/Textures/Weapon/ARA_RW_Toxic_Needle_SG.sai2 new file mode 100644 index 0000000..ed698d4 Binary files /dev/null and b/非公开资源/Content/Textures/Weapon/ARA_RW_Toxic_Needle_SG.sai2 differ