diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 8e093eb..7409190 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/AbilityDefs/ARA_Abilities.xml b/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml index 061fe6b..4f5fc15 100644 --- a/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml +++ b/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml @@ -35,7 +35,7 @@ ARA_RaceBaseSwarmProduceOn 重启该阿拉克涅督虫自动抚育辅虫的能力。 - ArachnaeSwarm/UI/Abilities/ARA_BindDrone + ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOn 601 false true @@ -63,7 +63,7 @@ ARA_RaceBaseSwarmProduceOff 关闭该阿拉克涅督虫自动抚育辅虫的能力。 - ArachnaeSwarm/UI/Abilities/ARA_BindDrone + ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOff 601 false true @@ -131,7 +131,7 @@ ARA_TumorSpew 排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。 - UI/Commands/EggSpew + ArachnaeSwarm/UI/Abilities/ARA_TumorSpew 5000 false 300 @@ -466,11 +466,11 @@ - + ARA_Skyraider_jump 使用强壮的翅膀瞬间加力,以重定位至一处新的地点。 - UI/Abilities/Longjump + ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump 5000 false false @@ -650,14 +650,15 @@ ARA_PsychicBrainburn - 以强大的纯净灵能直接冲击目标,烧毁目标的中枢神经系统——这会直接杀死目标。 - UI/Abilities/Slaughter + 以强大的纯净灵能冲击目标,烧毁目标的中枢神经系统——这会直接杀死目标。 + Psycast + Psychic + ArachnaeSwarm/UI/Abilities/ARA_PsychicBrainburn 18000 false 300 - true - false - false + false + true true true 0.5 @@ -665,6 +666,11 @@ HoraxianAbilityCasting AnomalyAbilityWarmup true + + 75 + -1 + 0 + Verb_CastAbility 6 @@ -677,6 +683,7 @@
  • + True Skip_Entry @@ -685,11 +692,11 @@
  • - + ARA_NeuroSwarm_jump 增强用于使身体悬浮的力量快速进入较高的高度,然后飞到一处新的地点。 - UI/Abilities/Longjump + ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump 5000 false false @@ -713,4 +720,60 @@ CastJump + + + ARA_MimicNematode_Needle_Fire + + 向目标喷射若干伤害较低但是会引发阿拉克涅拟线种寄生的囊针,随着感染的推进,目标将逐渐被拟线种控制,逐渐无视外部刺激以获得强大的抗击打能力。\n\n这是一种危险的交易,拟线种无法被女皇种控制,聪明的虫巢在使用拟线种的力量前,都需要思虑再三。 + True + False + 6000 + ArachnaeSwarm/UI/Abilities/ARA_Toxic_Needle_Fire + false + + Verb_AbilityShoot + Bullet_ARA_MimicNematode_Needle + 5 + Heatspikes_Shot + Heatspikes_Tail + 9 + 2 + 0 + 32 + 1 + 1 + 1 + 1 + false + + +
  • + Food + 0.1 + 营养值不足,需要进食 +
  • + +
  • + ARA_Technology_2MED + 需要科技 节点MED-2"拟线寄生" 以解锁技能 +
  • +
    +
    + + Bullet_ARA_MimicNematode_Needle + + + Things/Projectile/Bullet_Small + Graphic_Single + (117, 204, 49, 180) + + + ARA_MimicNematodeBite + 1 + 40 + + \ No newline at end of file diff --git a/1.6/1.6/Defs/AbilityDefs/Abilities_EggSpew.xml b/1.6/1.6/Defs/AbilityDefs/Abilities_EggSpew.xml index 58a88fa..7773bdc 100644 --- a/1.6/1.6/Defs/AbilityDefs/Abilities_EggSpew.xml +++ b/1.6/1.6/Defs/AbilityDefs/Abilities_EggSpew.xml @@ -208,4 +208,16 @@
    + + + ARA_Cocoon_Medicine + + 投放一枚医药茧,内含可以孵化一组医疗用品或化学品的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。 + ArachnaeSwarm/UI/Abilities/ARA_Cocoon_Medicine + +
  • + ARA_Cocoon_Proj_Medicine +
  • +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/BackstoryDefs/ARA_BackstoryDef.xml b/1.6/1.6/Defs/BackstoryDefs/ARA_BackstoryDef.xml index aa41eb5..4f053e4 100644 --- a/1.6/1.6/Defs/BackstoryDefs/ARA_BackstoryDef.xml +++ b/1.6/1.6/Defs/BackstoryDefs/ARA_BackstoryDef.xml @@ -91,7 +91,7 @@
  • Crafting
  • Constructing
  • -
  • Caring
  • +
  • Social
  • Artistic
  • Intellectual
  • @@ -210,7 +210,7 @@
  • Crafting
  • Cooking
  • Constructing
  • - +
  • Caring
  • Social
  • Artistic
  • Intellectual
  • diff --git a/1.6/1.6/Defs/BodyAndPartDefs/ARA_Bodyparts.xml b/1.6/1.6/Defs/BodyAndPartDefs/ARA_Bodyparts.xml index c9d0766..5d64a01 100644 --- a/1.6/1.6/Defs/BodyAndPartDefs/ARA_Bodyparts.xml +++ b/1.6/1.6/Defs/BodyAndPartDefs/ARA_Bodyparts.xml @@ -1068,6 +1068,15 @@
  • ARA_Acid_sacs
  • + +
  • + ARA_Toxic_Needle + 0.005 + Inside + +
  • ARA_Toxic_Needles
  • + + diff --git a/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml b/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml index 2fb47e4..7a63a54 100644 --- a/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml +++ b/1.6/1.6/Defs/DamageDefs/ARA_Damages.xml @@ -59,7 +59,7 @@
  • ARA_MimicNematode - 0.001 + 0.05
  • @@ -90,4 +90,30 @@ + + ARA_Psi_Damage + true + + +
  • (0, 0)
  • +
  • (1, 0.5)
  • +
    +
    + + true + DamageWorker_AddInjury + true + {0} 被灵能闪电烧死了。 + true + Bullet + Burn + Heat + 0~0.7 + true + false + 20 + 1.5 + 1 + 1 +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml index 590e78f..d81b08e 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml @@ -14,7 +14,6 @@ 0 0 - 500
  • Joy
  • @@ -68,12 +67,6 @@ 一只新的阿拉克涅督虫 {0_labelShort} 已经破茧而出!她正在四处徘徊,等待女皇种的指示——使用阿拉克涅女皇种的信息素标记技能完成链接,或者等待其自行建立链接。 HumanPregnancy -
  • - -
  • ARA_RaceBaseSwarmProduceOn
  • -
  • ARA_RaceBaseSwarmProduceOff
  • - - @@ -85,26 +78,6 @@ false false -
  • - 6 - ARA_CreepyCrawly_Hediff - - - -
  • Colonist
  • - - - - - false - false - false - false - true - - false - true -
  • @@ -117,6 +90,24 @@ + + ARA_HiveStrength + + 这只阿拉克涅虫族的修复细胞与众不同,它能以非常快的速度自动治愈伤势,甚至是再生出一些已经损失的器官。 + HediffWithComps + (0.6, 0.4, 0.8) + false + false + + + +
  • + 0 + 100 +
  • +
    +
    + ARA_TemperatureRegulation @@ -124,7 +115,7 @@ Hediff_High (0.6, 0.8, 0.9) 1.0 - -0.01 + 0.01 0.5
  • @@ -239,37 +230,72 @@ false - + + ARA_Psi_Master + + 阿拉克涅织域种是虫巢中的灵能大师,她们对使用灵能能力得心应手,不仅自身可以依靠灵能进行飞行,还能为附近的己方单位提供保护,并将其作为灵能导线对敌人发射能量攻击。 + Hediff_High + (0.6, 0.8, 0.9) + 1.0 + 0.01 + 0.5 + +
  • + 18 + ARA_Psi_Conductor + + + + + + + + false + true + false + true + true + + true + true +
  • +
    + + +
    + ARA_Psi_Conductor - 一只阿拉克涅织域种将这个殖民者的所有灵能抽出来,转化为可以 + 一只阿拉克涅织域种将这个殖民者作为其强大灵能力量的导体,织域种可以通过控制这个殖民者的灵能对敌方发起自动攻击,并使得这个殖民者更加难以击倒——代价则是殖民者自身会短暂地出现灵能失聪的情况。 - WULA_Addons_Antenna_Shotgun - WULA_Addons_Antenna_Shotgun_Turret - Install_WULA_Addons_Antenna_Shotgun + ARA_Psi_Conductor_Turret - WULA_Addons_Antenna_Shield - - - true - + HediffWithComps + false + (0.6, 0.6, 0.6) + false
  • - - -2 - -1 - - -
  • - Consciousness - -0.1 -
  • - + + 0.75 + 0 +
    -
  • - WULA_Addons_Antenna_Shotgun_Turret +
  • + false +
  • +
  • +
  • +
  • + ARA_Psi_Conductor_Turret 0 true
  • diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants.xml index 39d960a..244f92f 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants.xml @@ -1,10 +1,9 @@ - - + ARA_MimicNematode - 被阿拉克涅拟线种虫族寄生了,如果不加以干预,拟线虫最终会杀死宿主并将其转化为没有意识的寄生体。拟线虫会通过寄生体的攻击行为感染其他躯体。 + 该殖民者被阿拉克涅拟线种寄生了,如果不加以干预,拟线虫最终会杀死宿主并将其转化为没有意识的寄生体。拟线虫会通过寄生体的攻击行为感染其他躯体。 ArachnaeSwarm.Hediff_NecroticVirus @@ -29,7 +28,7 @@ 1 0.5 0.9 - false + true
  • Talking @@ -148,13 +147,12 @@ ARA_MimicNematodeBite
  • -
    ARA_CureBloodRot - 通过多种药物联合靶向治疗清除患者体内的阿拉克涅拟线种虫族感染。 + 通过多种药物联合靶向治疗清除患者体内的阿拉克涅拟线种虫族感染,这种手术非常复杂,只能使用来自闪耀世界的医药进行。 Recipe_RemoveHediff 清除拟线虫感染. 2000 @@ -173,7 +171,7 @@
  • MedicineUltratech
  • - 10 + 2 @@ -301,5 +299,4 @@
    -
    \ No newline at end of file diff --git a/1.6/1.6/Defs/RecipeDefs/ARA_Recipes_Upgrade.xml b/1.6/1.6/Defs/RecipeDefs/ARA_Recipes_Upgrade.xml index 6d6a8b6..5c62595 100644 --- a/1.6/1.6/Defs/RecipeDefs/ARA_Recipes_Upgrade.xml +++ b/1.6/1.6/Defs/RecipeDefs/ARA_Recipes_Upgrade.xml @@ -348,4 +348,153 @@
    + + + + ARA_Myrmecocystus_Production_InsectJelly + + 这只阿拉克涅蜜罐种正在产出虫蜜,以滋养虫群。一只蜜罐种每天产出10份阿拉克涅虫蜜。 + + ARA_InsectJelly + + HediffWithComps + (0.6, 0.4, 0.8) + false + false + 1.0 + + +
  • + + + true + + ARA_InsectJelly + + 10 + + + 1 + + 1 + 0 + + + false + + true + + true + + 20 + + + true + + false +
  • +
  • + +
  • ARA_Myrmecocystus_Production_Medicine
  • + + +
  • + +
  • ARA_Myrmecocystus_Production_Medicine
  • + + +
    +
    + + ARA_Myrmecocystus_Production_Medicine + + 使蜜罐种发生内驱性进化,以牺牲生产阿拉克涅虫蜜的代价,使其可以孵化医药茧,并允许使用医疗能力和操纵拟线种。\n\n该进化过程不可逆! + ArachnaeSwarm/UI/Abilities/ARA_Myrmecocystus_Production_Medicine + 1800 + false + true + true + false + true + true + false + CastAbilityOnThing + + Verb_CastAbility + 1 + 12 + AcidSpray_Resolve + false + false + + True + + + +
  • + CompAbilityEffect_GiveHediff + ARA_Myrmecocystus_Production_Medicine + True + true + 1 +
  • +
  • + ARA_Technology_1MED + 需要科技 节点MED-1"制药" 以解锁进化 +
  • +
    +
    + + ARA_Myrmecocystus_Production_Medicine + + 这只阿拉克涅蜜罐种已经获得拔耀,不再生产虫蜜,而是生产巢穴所稀缺的药物、化学品,并可以操纵拟线种。 + + ARA_InsectJelly + + HediffWithComps + (0.6, 0.4, 0.8) + false + false + 1.0 + +
  • + 0.01 + + 1 + +
  • +
    + +
  • + +
  • ARA_Cocoon_Medicine
  • +
  • ARA_MimicNematode_Needle_Fire
  • + + +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml b/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml index d091426..229f15d 100644 --- a/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml +++ b/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml @@ -118,7 +118,7 @@ ARA_Technology_5KYC - 允许女皇种孵化新的虫族——浓雾种,一种拥有厚重甲壳的大型督虫,可以铺设菌毯、释放烟雾和阻燃剂以协助虫群进行集群冲击。 + 允许女皇种孵化新的虫族——浓雾种,一种拥有厚重甲壳的大型督虫,可以释放烟雾、阻燃剂和召唤虫族增援的信息素以协助虫群进行集群冲击。 150 5.50 4.60 @@ -204,6 +204,18 @@
  • ARA_Base_Technology
  • + + ARA_Technology_6SHL + + 允许虫族建造一种可以控制房间温度的特殊固定辅虫。 + 150 + 2.00 + 2.00 + ARA_ResearchBench + +
  • ARA_Base_Technology
  • +
    +
    ARA_Technology_6SPV @@ -218,4 +230,30 @@
  • ARA_Technology_5PAV
  • - \ No newline at end of file + + + ARA_Technology_1MED + + 允许蜜罐种进行定向进化,以强化其自身的医疗能力并解锁孵化医药茧的技能。 + 150 + 5.50 + 2.70 + ARA_ResearchBench + +
  • ARA_Technology_1WMT
  • +
    +
    + + ARA_Technology_2MED + + 允许蜜罐种使用拟线种寄生的能力,并在医药茧中解锁拟线种抑制剂的制作。 + 150 + 6.50 + 2.70 + ARA_ResearchBench + +
  • ARA_Technology_1MED
  • +
  • ARA_Technology_5PAV
  • +
    +
    + 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 6d14f88..576153f 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml @@ -321,6 +321,7 @@
  • ARA_InsectJelly
  • ARA_NutrientPasteMeal
  • +
  • ARA_PheromoneSolvent
  • true @@ -736,11 +737,11 @@ -
  • +
  • true ARA_RaceBaseSwarmProduceSwitchHediff @@ -764,6 +765,13 @@ 阿拉克涅的督虫们生命如精密的发条般运转着。 true
  • +
  • + +
  • ARA_Myrmecocystus_Production_InsectJelly
  • + + 1.0 + false +
    @@ -918,11 +926,6 @@ true - -
  • ARA_WeaponSmith_Upgrade_1_Stage
  • - - -
    @@ -963,11 +966,6 @@ 0.75 - - -
  • ARA_WeaponSmith_Upgrade_1_Stage
  • -
    -
  • @@ -1771,6 +1769,9 @@
  • ARA_HiveMindDrone
  • +
  • ARA_HiveStrength
  • +
  • ARA_Psi_Master
  • +
  • PsychicAmplifier
  • 1.0 false diff --git a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml index a8d4374..2c9e025 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml @@ -411,6 +411,7 @@
  • ARA_InsectJelly
  • ARA_NutrientPasteMeal
  • +
  • ARA_PheromoneSolvent
  • true @@ -431,9 +432,6 @@ false -
  • ARA_WeaponSmith_Upgrade_1_Stage
  • - -
    - + + ARA_Medicine + + 由阿拉克涅医药孵化茧所孵化的药物,效力等同于常规的医药,但是需要在冷藏条件下保存。 + 10 + + Things/Item/Resource/Medicine/MedicineHerbal + Graphic_StackCount + 0.85 + + Animal + + 10 + 0.5 + 1 + 1 + 1.00 + 2 + 700 + + Rare + +
  • + 150 + true +
  • +
    + 20 +
    + + ARA_PheromoneSolvent @@ -12,9 +40,9 @@ ARA_MimicNematode - Things/Item/Drug/WakeUp - Graphic_StackCount - (1.0, 0.647, 0.0, 0.5) + ArachnaeSwarm/Item/ARA_PheromoneSolvent + Graphic_Single + TransparentPostLight false @@ -22,7 +50,7 @@ 50 0.01 - Industrial + Animal Medical @@ -33,13 +61,10 @@ - MedicineProduction - -
  • DrugLab
  • -
    + ARA_Technology_2MED +
    - 2 5 @@ -51,14 +76,11 @@
    - - - ARA_SymbioticStabilizer 一种信息素抑制效果 - 阿拉克涅信息素溶剂的效果正在生效,它模拟了虫群的共生信号,抑制了体内寄生体的活性。 + 阿拉克涅信息素溶剂的效果正在生效,它模拟了虫群的共生信号,抑制了体内寄生体的活性。在溶剂生效时,不会使得拟线种虫族寄生的进度超过80%。 HediffWithComps (0.7, 1.0, 0.7) false @@ -69,47 +91,12 @@
    - - - - - ARA_NematodeEgg - - 一个经过特殊处理的阿拉克涅拟线种虫卵,可以被直接服用。服用后,虫卵会迅速在宿主体内孵化并释放大量阿拉克涅拟线虫,导致极其严重的感染。 - - ARA_MimicNematode - - - Things/Item/Drug/Luciferium - Graphic_StackCount - (100,50,100) - - - 75 - 0.05 - - Industrial - - None - AnimalProduct - -
  • - ARA_MimicNematode - 0.5 -
  • -
    -
    - -
    - - - + ARA_Pheromone ARA_PheromoneAddiction - Chemical_ARA_Pheromone Need_Chemical @@ -118,7 +105,6 @@ 0.333 50 - ARA_PheromoneAddiction @@ -147,7 +133,6 @@ - ARA_PheromoneWithdrawal ThoughtWorker_Hediff @@ -164,5 +149,4 @@ - \ No newline at end of file diff --git a/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml b/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml index a4deb3d..2bc5420 100644 --- a/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml +++ b/1.6/1.6/Defs/Thing_Misc/Apparels/ARA_Apparel.xml @@ -38,6 +38,9 @@ ARA_Bodystocking_White 阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。 + + ARA_Cocoon_Cloth + ArachnaeSwarm/Apparel/ARA_Bodystocking_White @@ -58,6 +61,9 @@ ARA_Bodystocking_Black 阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。 + + ARA_Cocoon_Cloth + ArachnaeSwarm/Apparel/ARA_Bodystocking_Black @@ -156,6 +162,9 @@ ARA_Maid_Uniform 阿拉克涅督虫们所着织物中的一种,设计上修身轻便,可以使其在阿拉克捏菌毯上获得额外的速度,是她们永远服侍虫巢的形象的完美具现化。 + + ARA_Cocoon_Cloth + ARA_Technology_4DIL 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 f0468c4..13371ce 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 @@ -5,6 +5,9 @@ ARA_MW_Bone_Sword 阿拉克涅虫群督虫使用基础近战武装器官,通过多根外露神经束与督虫的辅肢相连。尽管它只是一块坚硬的剑形骨片,但是丝毫不影响那些拥有无穷蛮力的阿拉克涅虫群督虫使用它将侵犯虫巢之敌一一斩首。 + + ARA_Cocoon_Weapon +
  • ARA_Armed_Organ
  • ARA_Armed_Organ_Melee
  • @@ -72,6 +75,9 @@ 阿拉克涅虫群督虫使用基础远程武装器官,外表就像一只拳套,可以通过神经束缠绕接在阿拉克涅督虫的辅肢上。这种武器小巧轻盈,虽然射程很短,但是面对敌人时能喷出一整排的带毒尖刺,把对手扎个透心凉。 Normal Animal + + ARA_Cocoon_Weapon + ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun Graphic_Single @@ -170,6 +176,9 @@ 阿拉克涅虫群督虫所使用的武装器官,拥有四排刺针管道,可以在联结神经束的指挥下交替发射大量的毒针,虽然准度较差但是威力不逊色于人类所使用的机枪。 Normal Animal + + ARA_Cocoon_Weapon_1Stage + ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun Graphic_Single @@ -239,6 +248,9 @@ 阿拉克涅虫群督虫使用基础远程武装器官,可以通过肌肉的瞬间加压喷出一团包含阿拉克涅酸液的液体团。这种酸液团的飞行速度很慢,但是能在目标地点炸开,并灼烧所有粘上酸液的敌人。 Normal Animal + + ARA_Cocoon_Weapon + ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun Graphic_Single @@ -345,6 +357,9 @@ 阿拉克涅虫群督虫使用大型远程武装器官,膛内布满了强健的肌肉组织,可以在一瞬间的收缩后将一团酸液发射到空中,以在安全距离下对敌人的集群进行轰炸。 Normal Animal + + ARA_Cocoon_Weapon_1Stage + ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun Graphic_Single @@ -454,6 +469,9 @@ 阿拉科涅虫群的生物武器 Normal Animal + + ARA_Cocoon_Weapon_1Stage + ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun Graphic_Single @@ -628,4 +646,83 @@
  • RewardStandardQualitySuper
  • + + + + ARA_Psi_Conductor_Turret + + 阿拉克涅织域种正在通过这个殖民者对敌方发起攻击——这种攻击的发动无关殖民者的状态,无论它目前在干什么,攻击都会照常进行。 + + ArachnaeSwarm/Weapon/ARA_Weapon_Empty + Graphic_Single + + + ARA_Psi_Conductor + + + 1 + 1 + 1 + 1 + 5 + + +
  • + Verb_Shoot + true + Bullet_ARA_Psi_Conductor_Turret + 6 + 1 + AgonyPulse_Cast + GunTail_Medium + 9 + 4 +
  • +
    +
    + + Bullet_ARA_Psi_Conductor_Turret + + Beam + + Things/Projectile/Bullet_Small + Graphic_Single + + + ARA_Psi_Damage + 4 + ARA_Psi_Conductor_Turret_ArcBeam + 0.5 + 1 + + + + ARA_Psi_Conductor_Turret_ArcBeam + MoteDualAttached + MoteOverhead + + 0 + 1 + 0.4 + False + True + True + False + + true + + ArachnaeSwarm/Mote/ARA_Lighting_Beam + (140, 49, 138, 255) + Graphic_MoteWithAgeSecs + MoteGlow + (1.5,1) + + <_ExtraTexA>/Things/Mote/BeamSecondaryNoise_A + <_ExtraTexB>/Things/Mote/BeamSecondaryNoise_B + <_ScrollSpeedA>-4 + <_ScrollSpeedB>3 + <_Intensity>2 + + + \ No newline at end of file diff --git a/1.6/1.6/Defs/Thing_building/ARA_Building.xml b/1.6/1.6/Defs/Thing_building/ARA_Building.xml index 755b491..a8952cd 100644 --- a/1.6/1.6/Defs/Thing_building/ARA_Building.xml +++ b/1.6/1.6/Defs/Thing_building/ARA_Building.xml @@ -523,4 +523,71 @@ + + + ARA_SmartThermostat + + 一只只有基础反射反应的阿拉克涅辅虫,它会尝试将通过气体交换,维持尾部所向的房间的温度。必须像制冷器一样安装在墙上。 + ArachnaeSwarm.Building_SmartThermostat + ArachnaeSwarm/Building/ARA_SmartThermostat_south + + ArachnaeSwarm/Building/ARA_SmartThermostat + Graphic_Multi + (1.75,1.75) + + (0.6, 0.4, 0.3) + (0,0,-0.1) + + + 0.6 + BuildingOnTop + Impassable + true + 1 + true + true + true + true + false + 0 + ARA_Creep + + 400 + 100 + 1.0 + + Rare + + 30 + + +
  • PlaceWorker_Vent
  • +
    + true + + true + true + true + + +
  • ARA_Technology_6SHL
  • +
    + ARA_Buildings + + +
  • + UI/Commands/Vent + CommandDesignateOpenCloseVentLabel + CommandDesignateOpenCloseVentDesc +
  • + + +
  • + + 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 9b10250..91563dd 100644 --- a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml +++ b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml @@ -66,8 +66,8 @@
  • ARA_Base_Technology
  • +
  • ARA_Technology_1KYC
  • -
  • 6 @@ -219,6 +219,10 @@ (1.2,1.2) + +
  • ARA_Technology_2KYC
  • +
  • ARA_Technology_4KYC
  • +
  • @@ -285,6 +289,10 @@ (0.9, 0.9 ,0.5) (1.4,1.4) + +
  • ARA_Technology_5KYC
  • +
  • ARA_Technology_6KYC
  • +
  • @@ -496,15 +504,13 @@ ARA_Cocoon_Cloth - + 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-30~55°C),需要小心保护! ARA_Bodystocking_White ARA_Bodystocking_Black + ARA_Maid_Uniform - -
  • ARA_Technology_4DIL
  • - @@ -697,15 +703,12 @@
    ARA_Cocoon_Cloth_1Stage - + 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为-30~55°C),需要小心保护! ARA_Bodystocking_White ARA_Bodystocking_Black - -
  • ARA_Technology_4DIL
  • -
    @@ -889,4 +892,98 @@
    + + + + ARA_Cocoon_Proj_Medicine + + ARA_Cocoon_Medicine + + + + ARA_Cocoon_Medicine + + 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅蜜罐种所诞之卵,内含孵化一组医疗用品或化学品的营养物质,可以通过阿拉克涅蜜罐种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感(该类型的茧适温为0~12°C),需要小心保护! + + ARA_PheromoneSolvent + + + + +
  • + 10 + 虫蜜 + + +
  • ARA_InsectJelly
  • + + + 0 + true + 1 + 1 + + +
  • + +
  • + ARA_Medicine + 36000 + 10 +
  • +
  • + ARA_PheromoneSolvent + 72000 + 20 + ARA_Technology_2MED +
  • + + + +
  • ArachnaeNode_Race_Myrmecocystus
  • +
    + 10 + True + 0 + 12 + 0.00001 + 0.2 + 1.0 + + +
  • + Legendary + 0.99 +
  • +
  • + Masterwork + 0.90 +
  • +
  • + Excellent + 0.70 +
  • +
  • + Good + 0.50 +
  • +
  • + Normal + 0.20 +
  • +
  • + Poor + 0.10 +
  • +
    + +
  • + 0 + 12 + 0.00005 + 0.005 + 0.001 +
  • +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/Thing_building/Building_SmartThermostat.xml b/1.6/1.6/Defs/Thing_building/Building_SmartThermostat.xml deleted file mode 100644 index d1bb05c..0000000 --- a/1.6/1.6/Defs/Thing_building/Building_SmartThermostat.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - ARA_SmartThermostat - - 一个不耗电的温控虫虫。它是一个可逆的热泵,能自动制热或制冷以维持设定的目标温度。必须像制冷器一样安装在墙上。 - ArachnaeSwarm.Building_SmartThermostat - - Things/Building/Misc/TempControl/Cooler - Graphic_Multi - - (0.6, 0.4, 0.3) - (0,0,-0.1) - - - Building - Impassable - true - 1 - true - true - true - true - false - 0 - - 400 - 100 - 1.0 - - Rare - - 30 - - Medium - -
  • PlaceWorker_Vent
  • -
    - true - - true - true - true - - -
  • AirConditioning
  • -
    - ARA_Buildings - - -
  • - UI/Commands/Vent - CommandDesignateOpenCloseVentLabel - CommandDesignateOpenCloseVentDesc -
  • - - -
  • - - 34 -
  • - -
  • - - - \ No newline at end of file diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml index d324416..cf0e4a3 100644 --- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml +++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml @@ -26,4 +26,5 @@ {TRAP} 被 {PAWN} 触发! {TRAP} 被触发! + {PAWN}生成了{THING}。 \ No newline at end of file diff --git a/About/preview.png b/About/preview.png index 24f33eb..70aa592 100644 Binary files a/About/preview.png and b/About/preview.png differ diff --git a/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_north.png b/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_north.png new file mode 100644 index 0000000..80bc432 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_north.png differ diff --git a/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_south.png b/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_south.png new file mode 100644 index 0000000..3db18ac Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_south.png differ diff --git a/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_west.png b/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_west.png new file mode 100644 index 0000000..cc12349 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Building/ARA_SmartThermostat_west.png differ diff --git a/Content/Textures/ArachnaeSwarm/Item/ARA_PheromoneSolvent.png b/Content/Textures/ArachnaeSwarm/Item/ARA_PheromoneSolvent.png new file mode 100644 index 0000000..71dd156 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Item/ARA_PheromoneSolvent.png differ diff --git a/Content/Textures/ArachnaeSwarm/Mote/ARA_GunTail_Plasma.png b/Content/Textures/ArachnaeSwarm/Mote/ARA_GunTail_Plasma.png new file mode 100644 index 0000000..15b909b Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Mote/ARA_GunTail_Plasma.png differ diff --git a/Content/Textures/ArachnaeSwarm/Mote/ARA_Lighting_Beam.png b/Content/Textures/ArachnaeSwarm/Mote/ARA_Lighting_Beam.png new file mode 100644 index 0000000..18fe0dc Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Mote/ARA_Lighting_Beam.png differ diff --git a/Content/Textures/ArachnaeSwarm/Mote/ElectricalSpark_ARA_Plasma_Explosive.png b/Content/Textures/ArachnaeSwarm/Mote/ElectricalSpark_ARA_Plasma_Explosive.png new file mode 100644 index 0000000..8631c92 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Mote/ElectricalSpark_ARA_Plasma_Explosive.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Cocoon_Medicine.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Cocoon_Medicine.png new file mode 100644 index 0000000..70bbb02 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Cocoon_Medicine.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Myrmecocystus_Production_Medicine.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Myrmecocystus_Production_Medicine.png new file mode 100644 index 0000000..3d1b414 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Myrmecocystus_Production_Medicine.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_PsychicBrainburn.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_PsychicBrainburn.png new file mode 100644 index 0000000..522aceb Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_PsychicBrainburn.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOff.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOff.png new file mode 100644 index 0000000..62551c6 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOff.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOn.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOn.png new file mode 100644 index 0000000..6746848 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOn.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump.png new file mode 100644 index 0000000..24b6367 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump.png differ diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_TumorSpew.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_TumorSpew.png new file mode 100644 index 0000000..4b654fd Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_TumorSpew.png differ diff --git a/Content/Textures/ArachnaeSwarm/Weapon/ARA_Weapon_Empty.png b/Content/Textures/ArachnaeSwarm/Weapon/ARA_Weapon_Empty.png new file mode 100644 index 0000000..37b54f7 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/Weapon/ARA_Weapon_Empty.png differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index 07a36f6..066687c 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 7b7cc17..505e3c1 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -1,12 +1,7 @@ { "Version": 1, - "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", - "Documents": [ - { - "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\hediffs\\ara_hediffcomp_topturret\\hediffcomp_topturret.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hediffcomp_topturret\\hediffcomp_topturret.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - } - ], + "WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", + "Documents": [], "DocumentGroupContainers": [ { "Orientation": 0, @@ -14,21 +9,8 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 0, + "SelectedChildIndex": -1, "Children": [ - { - "$type": "Document", - "DocumentIndex": 0, - "Title": "HediffComp_TopTurret.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", - "RelativeDocumentMoniker": "Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", - "RelativeToolTip": "Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", - "ViewState": "AgIAAIUAAAAAAAAAAAAswAoAAAAFAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-09-20T03:55:47.292Z", - "EditorCaption": "" - }, { "$type": "Bookmark", "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj index 0e61035..6e473cc 100644 --- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj +++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj @@ -147,6 +147,9 @@ + + + diff --git a/Source/ArachnaeSwarm/Hediffs/MoharHediffs/HediffCompProperties_Spawner.cs b/Source/ArachnaeSwarm/Hediffs/MoharHediffs/HediffCompProperties_Spawner.cs new file mode 100644 index 0000000..89d45d9 --- /dev/null +++ b/Source/ArachnaeSwarm/Hediffs/MoharHediffs/HediffCompProperties_Spawner.cs @@ -0,0 +1,118 @@ +using System; +using Verse; + +namespace ArachnaeSwarm.MoharHediffs +{ + public class HediffCompProperties_Spawner : HediffCompProperties + { + public HediffCompProperties_Spawner() + { + this.compClass = typeof(HediffComp_Spawner); + } + + /// + /// 要生成的物品的ThingDef。如果animalThing为false,则使用此项。 + /// + public ThingDef thingToSpawn; + + /// + /// 每次生成的基础物品数量。 + /// + public int spawnCount = 1; + + /// + /// 如果为true,则生成一个Pawn(动物)。如果为false,则生成一个Thing。 + /// + public bool animalThing; + + /// + /// 要生成的动物的PawnKindDef。如果animalThing为true,则使用此项。 + /// + public PawnKindDef animalToSpawn; + + /// + /// 如果为true,生成的动物将属于玩家派系。 + /// + public bool factionOfPlayerAnimal; + + /// + /// 下一次生成事件发生前的最少天数。 + /// + public float minDaysB4Next = 1f; + + /// + /// 下一次生成事件发生前的最大天数。 + /// + public float maxDaysB4Next = 2f; + + /// + /// 生成后进入宽限期(延迟下一次生成)的几率(0.0到1.0)。 + /// + public float randomGrace; + + /// + /// 如果触发,宽限期的持续时间(天)。 + /// + public float graceDays = 0.5f; + + /// + /// 附近允许的相同Pawn的最大数量。如果超过该数量,则暂停生成。-1为禁用。 + /// + public int spawnMaxAdjacent = -1; + + /// + /// 如果为true,生成的物品将被禁用。 + /// + public bool spawnForbidden; + + /// + /// 如果为true,当宿主Pawn饥饿时,生成将暂停。 + /// + public bool hungerRelative; + + /// + /// 如果为true,当宿主Pawn受伤时,生成将暂停。 + /// + public bool healthRelative; + + /// + /// 如果为true,生成数量将根据宿主的年龄进行调整。 + /// + public bool ageWeightedQuantity; + + /// + /// 如果为true,生成周期(两次生成之间的时间)将根据宿主的年龄进行调整。 + /// + public bool ageWeightedPeriod; + + /// + /// 如果为true且ageWeightedPeriod为true,则随着宿主年龄增长,生成周期变短。如果为false,则变长。 + /// + public bool olderSmallerPeriod; + + /// + /// 如果为true且ageWeightedQuantity为true,则随着宿主年龄增长,生成数量变多。如果为false,则变少。 + /// + public bool olderBiggerQuantity; + + /// + /// 如果为true且ageWeightedQuantity为true,则随年龄增长的数量缩放将是指数性的而非线性的。 + /// + public bool exponentialQuantity; + + /// + /// 指数级数量缩放的最大乘数,以防止出现荒谬的数字。 + /// + public int exponentialRatioLimit = 15; + + /// + /// 生成时显示的消息的翻译键(例如,“{PAWN}下了一个蛋。”)。 + /// + public string spawnVerb = "delivery"; + + /// + /// 如果为true,则为此组件启用详细的调试日志记录。 + /// + public bool debug; + } +} \ No newline at end of file diff --git a/Source/ArachnaeSwarm/Hediffs/MoharHediffs/HediffComp_Spawner.cs b/Source/ArachnaeSwarm/Hediffs/MoharHediffs/HediffComp_Spawner.cs new file mode 100644 index 0000000..377b3fc --- /dev/null +++ b/Source/ArachnaeSwarm/Hediffs/MoharHediffs/HediffComp_Spawner.cs @@ -0,0 +1,565 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using RimWorld.Planet; +using Verse; + +namespace ArachnaeSwarm.MoharHediffs +{ + public class HediffComp_Spawner : HediffComp + { + public HediffCompProperties_Spawner Props + { + get + { + return (HediffCompProperties_Spawner)this.props; + } + } + + public override void CompExposeData() + { + Scribe_Values.Look(ref this.ticksUntilSpawn, "ticksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.initialTicksUntilSpawn, "initialTicksUntilSpawn", 0, false); + Scribe_Values.Look(ref this.calculatedMinDaysB4Next, "calculatedMinDaysB4Next", 0f, false); + Scribe_Values.Look(ref this.calculatedMaxDaysB4Next, "calculatedMaxDaysB4Next", 0f, false); + Scribe_Values.Look(ref this.calculatedQuantity, "calculatedQuantity", 0, false); + Scribe_Values.Look(ref this.graceTicks, "graceTicks", 0, false); + } + + public override void CompPostMake() + { + this.myDebug = this.Props.debug; + Tools.Warn(string.Concat(new string[] + { + ">>> ", + this.parent.pawn.Label, + " - ", + this.parent.def.defName, + " - CompPostMake start" + }), this.myDebug); + this.TraceProps(); + this.CheckProps(); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.TraceCalculatedValues(); + if (this.initialTicksUntilSpawn == 0) + { + Tools.Warn("Reseting countdown bc initialTicksUntilSpawn == 0 (comppostmake)", this.myDebug); + this.ResetCountdown(); + } + } + + public override void CompPostTick(ref float severityAdjustment) + { + this.pawn = this.parent.pawn; + if (!Tools.OkPawn(this.pawn)) + { + return; + } + if (this.blockSpawn) + { + return; + } + if (this.graceTicks > 0) + { + this.graceTicks--; + return; + } + if (this.Props.hungerRelative && this.pawn.IsHungry(this.myDebug)) + { + int num = (int)(this.RandomGraceDays() * 60000f); + this.hungerReset++; + this.graceTicks = num; + return; + } + if (this.Props.healthRelative && this.pawn.IsInjured(this.myDebug)) + { + int num2 = (int)(this.RandomGraceDays() * 60000f); + this.healthReset++; + this.graceTicks = num2; + return; + } + this.hungerReset = (this.healthReset = 0); + if (this.CheckShouldSpawn()) + { + Tools.Warn("Reseting countdown bc spawned thing", this.myDebug); + this.CalculateValues(); + this.CheckCalculatedValues(); + this.ResetCountdown(); + if (Rand.Chance(this.Props.randomGrace)) + { + int num3 = (int)(this.RandomGraceDays() * 60000f); + this.graceTicks = num3; + } + } + } + + private void TraceProps() + { + Tools.Warn(string.Concat(new string[] + { + "Props => minDaysB4Next: ", + this.Props.minDaysB4Next.ToString(), + "; maxDaysB4Next: ", + this.Props.maxDaysB4Next.ToString(), + "; randomGrace: ", + this.Props.randomGrace.ToString(), + "; graceDays: ", + this.Props.graceDays.ToString(), + "; hungerRelative: ", + this.Props.hungerRelative.ToString(), + "; healthRelative: ", + this.Props.healthRelative.ToString(), + "; " + }), this.myDebug); + if (this.Props.animalThing) + { + Tools.Warn(string.Concat(new string[] + { + "animalThing: ", + this.Props.animalThing.ToString(), + "; animalName: ", + this.Props.animalToSpawn.defName, + "; factionOfPlayerAnimal: ", + this.Props.factionOfPlayerAnimal.ToString(), + "; " + }), this.myDebug); + } + if (this.Props.ageWeightedQuantity) + { + Tools.Warn(string.Concat(new string[] + { + "ageWeightedQuantity:", + this.Props.ageWeightedQuantity.ToString(), + "; olderBiggerQuantity:", + this.Props.olderBiggerQuantity.ToString(), + "; ", + this.myDebug.ToString() + }), false); + if (this.Props.exponentialQuantity) + { + Tools.Warn(string.Concat(new string[] + { + "exponentialQuantity:", + this.Props.exponentialQuantity.ToString(), + "; exponentialRatioLimit:", + this.Props.exponentialRatioLimit.ToString(), + "; " + }), this.myDebug); + } + } + Tools.Warn(string.Concat(new string[] + { + "ageWeightedPeriod:", + this.Props.ageWeightedPeriod.ToString(), + "; olderSmallerPeriod:", + this.Props.olderSmallerPeriod.ToString(), + "; ", + this.myDebug.ToString() + }), false); + } + + private void CalculateValues() + { + float num = Tools.GetPawnAgeOverlifeExpectancyRatio(this.parent.pawn, this.myDebug); + num = ((num > 1f) ? 1f : num); + this.calculatedMinDaysB4Next = this.Props.minDaysB4Next; + this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next; + if (this.Props.ageWeightedPeriod) + { + float num2 = this.Props.olderSmallerPeriod ? (-num) : num; + this.calculatedMinDaysB4Next = this.Props.minDaysB4Next * (1f + num2); + this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next * (1f + num2); + Tools.Warn(string.Concat(new string[] + { + " ageWeightedPeriod: ", + this.Props.ageWeightedPeriod.ToString(), + " ageRatio: ", + num.ToString(), + " minDaysB4Next: ", + this.Props.minDaysB4Next.ToString(), + " maxDaysB4Next: ", + this.Props.maxDaysB4Next.ToString(), + " daysAgeRatio: ", + num2.ToString(), + " calculatedMinDaysB4Next: ", + this.calculatedMinDaysB4Next.ToString(), + "; calculatedMaxDaysB4Next: ", + this.calculatedMaxDaysB4Next.ToString(), + "; " + }), this.myDebug); + } + this.calculatedQuantity = this.Props.spawnCount; + if (this.Props.ageWeightedQuantity) + { + float num3 = this.Props.olderBiggerQuantity ? num : (-num); + Tools.Warn("quantityAgeRatio: " + num3.ToString(), this.myDebug); + this.calculatedQuantity = (int)Math.Round((double)this.Props.spawnCount * (double)(1f + num3)); + if (this.Props.exponentialQuantity) + { + num3 = 1f - num; + if (num3 == 0f) + { + Tools.Warn(">ERROR< quantityAgeRatio is f* up : " + num3.ToString(), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + float num4 = this.Props.olderBiggerQuantity ? (1f / num3) : (num3 * num3); + bool flag = false; + bool flag2 = false; + if (num4 > (float)this.Props.exponentialRatioLimit) + { + num4 = (float)this.Props.exponentialRatioLimit; + flag = true; + } + this.calculatedQuantity = (int)Math.Round((double)this.Props.spawnCount * (double)num4); + if (this.calculatedQuantity < 1) + { + this.calculatedQuantity = 1; + flag2 = true; + } + Tools.Warn(string.Concat(new string[] + { + " exponentialQuantity: ", + this.Props.exponentialQuantity.ToString(), + "; expoFactor: ", + num4.ToString(), + "; gotLimited: ", + flag.ToString(), + "; gotAugmented: ", + flag2.ToString() + }), this.myDebug); + } + Tools.Warn("; Props.spawnCount: " + this.Props.spawnCount.ToString() + "; calculatedQuantity: " + this.calculatedQuantity.ToString(), this.myDebug); + } + } + + private void CheckCalculatedValues() + { + if (this.calculatedQuantity > this.errorSpawnCount) + { + Tools.Warn(string.Concat(new string[] + { + ">ERROR< calculatedQuantity is too high: ", + this.calculatedQuantity.ToString(), + "(>", + this.errorSpawnCount.ToString(), + "), check and adjust your hediff props" + }), this.myDebug); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.calculatedMinDaysB4Next < this.errorMinDaysB4Next) + { + this.calculatedMinDaysB4Next = this.errorMinDaysB4Next; + } + if (this.calculatedMaxDaysB4Next < this.errorMinDaysB4Next) + { + this.calculatedMaxDaysB4Next = this.errorMinDaysB4Next; + } + } + + private void TraceCalculatedValues() + { + Tools.Warn("calculatedMinDaysB4Next:" + this.calculatedMinDaysB4Next.ToString(), this.myDebug); + Tools.Warn("calculatedMaxDaysB4Next:" + this.calculatedMaxDaysB4Next.ToString(), this.myDebug); + Tools.Warn("calculatedQuantity:" + this.calculatedQuantity.ToString(), this.myDebug); + } + + private void CheckProps() + { + if (this.Props.animalThing && this.Props.animalToSpawn == null) + { + Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with animalflag but without animalToSpawn", true); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.minDaysB4Next <= 0f) + { + Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with null/negative minDaysB4Next", true); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.maxDaysB4Next <= 0f) + { + Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with null/negative maxDaysB4Next", true); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.maxDaysB4Next < this.Props.minDaysB4Next) + { + Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with maxDaysB4Next < minDaysB4Next", true); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.spawnCount <= 0) + { + Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with null/negative spawnCount", true); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (!this.Props.animalThing && this.Props.thingToSpawn == null) + { + Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner without thingToSpawn", true); + this.blockSpawn = true; + Tools.DestroyParentHediff(this.parent, this.myDebug); + return; + } + if (this.Props.ageWeightedQuantity && this.Props.exponentialQuantity && this.Props.exponentialRatioLimit > this.errorExponentialLimit) + { + Tools.Warn(string.Concat(new string[] + { + this.parent.pawn.Label, + " has a hediffcomp_spawner with exponentialRatioLimit>", + this.errorExponentialLimit.ToString(), + " this is not allowed. It will be set to ", + this.errorExponentialLimit.ToString() + }), true); + this.Props.exponentialRatioLimit = this.errorExponentialLimit; + } + } + + private bool CheckShouldSpawn() + { + this.ticksUntilSpawn--; + if (this.ticksUntilSpawn <= 0) + { + if (this.TryDoSpawn()) + { + return true; + } + Tools.Warn("Did not spawn, reseting countdown", this.myDebug); + this.ResetCountdown(); + } + return false; + } + + private PawnKindDef MyPawnKindDefNamed(string myDefName) + { + return DefDatabase.GetNamed(myDefName, true); + } + + public bool TryDoSpawn() + { + Pawn pawn = this.parent.pawn; + if (this.Props.spawnMaxAdjacent > 0 && pawn.Map.mapPawns.AllPawns.Where(delegate(Pawn mP) + { + ThingDef defToCompare = this.Props.animalThing ? this.Props.animalToSpawn?.race : this.Props.thingToSpawn; + if (defToCompare?.race == null) + { + return false; + } + return mP.def == defToCompare && mP.Position.InHorDistOf(pawn.Position, (float)this.Props.spawnMaxAdjacent); + }).Count() >= this.Props.spawnMaxAdjacent) + { + return false; + } + if (this.Props.animalThing) + { + if (this.Props.animalToSpawn == null) + { + return false; + } + Faction faction = this.Props.factionOfPlayerAnimal ? Faction.OfPlayer : null; + int i = 0; + while (i < this.calculatedQuantity) + { + IntVec3 intVec; + if (!this.TryFindSpawnCell(out intVec)) + { + return false; + } + Pawn pawn2 = PawnGenerator.GeneratePawn(this.Props.animalToSpawn, faction); + if (pawn2 == null) + { + return false; + } + GenSpawn.Spawn(pawn2, intVec, pawn.Map, WipeMode.Vanish); + pawn2.SetFaction(faction, null); + FilthMaker.TryMakeFilth(intVec, pawn.Map, ThingDefOf.Filth_AmnioticFluid, pawn.LabelIndefinite(), 5, FilthSourceFlags.None); + if (!this.Props.spawnForbidden) + { + pawn2.playerSettings.Master = pawn; + pawn2.training.Train(TrainableDefOf.Obedience, pawn, true); + } + i++; + continue; + } + if (PawnUtility.ShouldSendNotificationAbout(pawn) || PawnUtility.ShouldSendNotificationAbout(pawn)) + { + Messages.Message(this.Props.spawnVerb.Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.PositiveEvent, true); + } + return true; + } + else + { + IntVec3 intVec2; + if (!this.TryFindSpawnCell(out intVec2)) + { + return false; + } + Thing thing = ThingMaker.MakeThing(this.Props.thingToSpawn, null); + if (thing == null) + { + return false; + } + thing.stackCount = this.calculatedQuantity; + if (this.Props.spawnForbidden) + { + thing.SetForbidden(true, true); + } + GenPlace.TryPlaceThing(thing, intVec2, pawn.Map, ThingPlaceMode.Direct, null, null, default(Rot4)); + if (PawnUtility.ShouldSendNotificationAbout(pawn)) + { + Messages.Message(this.Props.spawnVerb.Translate(pawn.Named("PAWN"), thing.Named("THING")), thing, MessageTypeDefOf.PositiveEvent, true); + } + return true; + } + } + + private bool TryFindSpawnCell(out IntVec3 result) + { + result = IntVec3.Invalid; + bool result2; + if (this.pawn == null) + { + result2 = false; + } + else + { + Map map = this.pawn.Map; + if (map == null) + { + result2 = false; + } + else + { + result = CellFinder.RandomClosewalkCellNear(this.pawn.Position, map, 5, null); + result2 = true; + } + } + return result2; + } + + private void ResetCountdown() + { + this.ticksUntilSpawn = (int)(this.RandomDays2wait() * 60000f); + this.initialTicksUntilSpawn = this.ticksUntilSpawn; + } + + private float RandomDays2wait() + { + return Rand.Range(this.calculatedMinDaysB4Next, this.calculatedMaxDaysB4Next); + } + + private float RandomGraceDays() + { + return Rand.Range(this.Props.graceDays / 2f, this.Props.graceDays); + } + + public override string CompTipStringExtra + { + get + { + if (!this.myDebug) + { + return null; + } + string text = "ticksUntilSpawn: " + this.ticksUntilSpawn.ToString() + "\n"; + string text2 = text; + text = string.Concat(new string[] + { + text2, + "initialTicksUntilSpawn: ", + this.initialTicksUntilSpawn.ToString(), + "\n" + }); + text2 = text; + text = string.Concat(new string[] + { + text2, + "graceTicks: ", + this.graceTicks.ToString(), + "\n" + }); + text2 = text; + text = string.Concat(new string[] + { + text2, + "hunger resets: ", + this.hungerReset.ToString(), + "\n" + }); + text2 = text; + text = string.Concat(new string[] + { + text2, + "health resets: ", + this.healthReset.ToString(), + "\n" + }); + text2 = text; + text = string.Concat(new string[] + { + text2, + "calculatedMinDaysB4Next: ", + this.calculatedMinDaysB4Next.ToString(), + "\n" + }); + text2 = text; + text = string.Concat(new string[] + { + text2, + "calculatedMaxDaysB4Next: ", + this.calculatedMaxDaysB4Next.ToString(), + "\n" + }); + text2 = text; + text = string.Concat(new string[] + { + text2, + "calculatedQuantity: ", + this.calculatedQuantity.ToString(), + "\n" + }); + return text + "blockSpawn: " + this.blockSpawn.ToString(); + } + } + + private int ticksUntilSpawn; + + private int initialTicksUntilSpawn; + + private int hungerReset; + + private int healthReset; + + private int graceTicks; + + private Pawn pawn; + + private float calculatedMaxDaysB4Next = 2f; + + private float calculatedMinDaysB4Next = 1f; + + private int calculatedQuantity = 1; + + private bool blockSpawn; + + private bool myDebug; + + private readonly float errorMinDaysB4Next = 0.001f; + + private readonly int errorExponentialLimit = 20; + + private readonly int errorSpawnCount = 750; + } +} \ No newline at end of file diff --git a/Source/ArachnaeSwarm/Hediffs/MoharHediffs/Tools.cs b/Source/ArachnaeSwarm/Hediffs/MoharHediffs/Tools.cs new file mode 100644 index 0000000..c066574 --- /dev/null +++ b/Source/ArachnaeSwarm/Hediffs/MoharHediffs/Tools.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using RimWorld; +using UnityEngine; +using Verse; + +namespace ArachnaeSwarm.MoharHediffs +{ + public static class Tools + { + public static void DestroyParentHediff(Hediff parentHediff, bool debug = false) + { + if (parentHediff.pawn != null && parentHediff.def.defName != null && debug) + { + Log.Warning(parentHediff.pawn.Label + "'s Hediff: " + parentHediff.def.defName + " says goodbye."); + } + parentHediff.Severity = 0f; + } + + public static float GetPawnAgeOverlifeExpectancyRatio(Pawn pawn, bool debug = false) + { + float result = 1f; + if (pawn == null) + { + if (debug) + { + Log.Warning("GetPawnAgeOverlifeExpectancyRatio pawn NOT OK"); + } + return result; + } + result = pawn.ageTracker.AgeBiologicalYearsFloat / pawn.RaceProps.lifeExpectancy; + if (debug) + { + Log.Warning(string.Concat(new string[] + { + pawn.Label, + " Age: ", + pawn.ageTracker.AgeBiologicalYearsFloat.ToString(), + "; lifeExpectancy: ", + pawn.RaceProps.lifeExpectancy.ToString(), + "; ratio:", + result.ToString() + })); + } + return result; + } + + public static bool IsInjured(this Pawn pawn, bool debug = false) + { + if (pawn == null) + { + if (debug) + { + Log.Warning("pawn is null - wounded "); + } + return false; + } + float num = 0f; + List hediffs = pawn.health.hediffSet.hediffs; + for (int i = 0; i < hediffs.Count; i++) + { + if (hediffs[i] is Hediff_Injury && !hediffs[i].IsPermanent()) + { + num += hediffs[i].Severity; + } + } + if (debug && num > 0f) + { + Log.Warning(pawn.Label + " is wounded "); + } + return num > 0f; + } + + public static bool IsHungry(this Pawn pawn, bool debug = false) + { + if (pawn == null) + { + if (debug) + { + Log.Warning("pawn is null - IsHungry "); + } + return false; + } + bool flag = pawn.needs.food != null && pawn.needs.food.CurCategory == HungerCategory.Starving; + if (debug && flag) + { + Log.Warning(pawn.Label + " is hungry "); + } + return flag; + } + + public static bool OkPawn(Pawn pawn) + { + return pawn != null && pawn.Map != null; + } + + public static void Warn(string warning, bool debug = false) + { + if (debug) + { + Log.Warning(warning); + } + } + + } +} \ No newline at end of file diff --git a/非公开资源/Content/Textures/Building/ARA_SmartThermostat.sai2 b/非公开资源/Content/Textures/Building/ARA_SmartThermostat.sai2 index 0a0b781..f1f20f3 100644 Binary files a/非公开资源/Content/Textures/Building/ARA_SmartThermostat.sai2 and b/非公开资源/Content/Textures/Building/ARA_SmartThermostat.sai2 differ diff --git a/非公开资源/Content/Textures/Item/ARA_PheromoneSolvent.sai2 b/非公开资源/Content/Textures/Item/ARA_PheromoneSolvent.sai2 new file mode 100644 index 0000000..f9a4fb8 Binary files /dev/null and b/非公开资源/Content/Textures/Item/ARA_PheromoneSolvent.sai2 differ diff --git a/非公开资源/Content/Textures/UI/Abilities/ARA_PsychicBrainburn.sai2 b/非公开资源/Content/Textures/UI/Abilities/ARA_PsychicBrainburn.sai2 new file mode 100644 index 0000000..f319e75 Binary files /dev/null and b/非公开资源/Content/Textures/UI/Abilities/ARA_PsychicBrainburn.sai2 differ diff --git a/非公开资源/Content/Textures/UI/Abilities/ARA_RaceBaseSwarmProduceOn.sai2 b/非公开资源/Content/Textures/UI/Abilities/ARA_RaceBaseSwarmProduceOn.sai2 new file mode 100644 index 0000000..732d225 Binary files /dev/null and b/非公开资源/Content/Textures/UI/Abilities/ARA_RaceBaseSwarmProduceOn.sai2 differ diff --git a/非公开资源/Content/Textures/UI/Abilities/ARA_Skyraider_jump.sai2 b/非公开资源/Content/Textures/UI/Abilities/ARA_Skyraider_jump.sai2 new file mode 100644 index 0000000..6cc502f Binary files /dev/null and b/非公开资源/Content/Textures/UI/Abilities/ARA_Skyraider_jump.sai2 differ diff --git a/非公开资源/Content/Textures/UI/Abilities/ARA_TumorSpew.sai2 b/非公开资源/Content/Textures/UI/Abilities/ARA_TumorSpew.sai2 new file mode 100644 index 0000000..869748e Binary files /dev/null and b/非公开资源/Content/Textures/UI/Abilities/ARA_TumorSpew.sai2 differ diff --git a/非公开资源/Content/preview.sai2 b/非公开资源/Content/preview.sai2 index 5bf51f1..2cb1c7e 100644 Binary files a/非公开资源/Content/preview.sai2 and b/非公开资源/Content/preview.sai2 differ diff --git a/非公开资源/Content/脑虫.png b/非公开资源/Content/脑虫.png new file mode 100644 index 0000000..61ee3bb Binary files /dev/null and b/非公开资源/Content/脑虫.png differ diff --git a/非公开资源/Content/脑虫.sai2 b/非公开资源/Content/脑虫.sai2 index ce48c96..b33244c 100644 Binary files a/非公开资源/Content/脑虫.sai2 and b/非公开资源/Content/脑虫.sai2 differ