This commit is contained in:
2025-11-12 17:28:48 +08:00
parent dc270bfaae
commit 9bdfc84902
18 changed files with 695 additions and 284 deletions

View File

@@ -62,9 +62,7 @@
</costList>
<recipeMaker>
<researchPrerequisite>WULA_Colony_License_LV1_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<!-- <techHediffsTags>
<li>FieldHand</li>
@@ -86,9 +84,7 @@
</costList>
<recipeMaker Inherit="False">
<researchPrerequisite>WULA_Synth_Addons_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<comps>
<li Class="CompProperties_Usable">
@@ -206,9 +202,7 @@
</graphicData>
<recipeMaker Inherit="False">
<researchPrerequisite>WULA_Synth_Addons_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<costList>
<Steel>200</Steel>
@@ -271,9 +265,7 @@
</costList>
<recipeMaker Inherit="False">
<researchPrerequisite>WULA_Synth_Addons_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<comps>
<li Class="CompProperties_Usable">
@@ -354,9 +346,7 @@
</thingSetMakerTags>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -474,9 +464,7 @@
</thingSetMakerTags>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -562,9 +550,7 @@
</thingSetMakerTags>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -661,9 +647,7 @@
<li>WULA_Synth_Addons_2_Technology</li>
<li>WULA_Neutronium_Technology</li>
</researchPrerequisites>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -724,9 +708,7 @@
</costList>
<recipeMaker>
<researchPrerequisite>WULA_Colony_License_LV1_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
</ThingDef>
<ThingDef ParentName="MechanitorImplantCraftableBase">
@@ -742,9 +724,7 @@
</costList>
<recipeMaker Inherit="False">
<researchPrerequisite>WULA_Synth_Addons_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<comps>
<li Class="CompProperties_Usable">
@@ -834,9 +814,7 @@
</costList>
<recipeMaker Inherit="False">
<researchPrerequisite>WULA_Synth_Addons_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<comps>
<li Class="CompProperties_Usable">
@@ -1019,9 +997,7 @@
</thingSetMakerTags>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Antenna_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -1159,9 +1135,7 @@
</thingSetMakerTags>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -1306,9 +1280,7 @@
</thingSetMakerTags>
<recipeMaker>
<researchPrerequisite>WULA_Synth_Addons_Technology</researchPrerequisite>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
</recipeMaker>
<statBases>
<Mass>0.3</Mass>
@@ -1478,9 +1450,7 @@
</thingSetMakerTags>
<recipeMaker>
<unfinishedThingDef>UnfinishedHealthItemProsthetic</unfinishedThingDef>
<recipeUsers>
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<recipeUsers Inherit="False"/>
<useIngredientsForColor>false</useIngredientsForColor>
<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
<workSkill>Crafting</workSkill>

View File

@@ -1,6 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<ThingDef ParentName="BodyPartProstheticMakeableBase">
<defName>WULA_Addons_Antenna_Hide</defName>
<label>隐藏式天线</label>
<description>埋于脑后的特殊指挥天线,拥有一套独特的系统编码,任何殖民者都可以使用这套通讯设备与乌拉帝国舰队通讯,是乌拉帝国对殖民地认可的凭证。</description>
<descriptionHyperlinks><HediffDef>WULA_Addons_Antenna_Hediff_Base</HediffDef></descriptionHyperlinks>
<!-- <thingSetMakerTags><li>RewardStandardLowFreq</li></thingSetMakerTags> -->
<useHitPoints>false</useHitPoints>
<statBases>
<MaxHitPoints>-1</MaxHitPoints>
<Flammability>0</Flammability>
</statBases>
<graphicData>
<texPath>Things/Item/Health/HealthItem</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<recipeMaker Inherit="False"/>
<comps>
<li Class="CompProperties_Usable">
<compClass>CompUsableImplant</compClass>
<useJob>UseItem</useJob>
<useLabel>安装隐藏式天线</useLabel>
<!-- <userMustHaveHediff>WULA_Addons_Antenna_Hediff_Base</userMustHaveHediff> -->
</li>
<li Class="CompProperties_UseEffectDestroySelf" />
<li Class="CompProperties_UseEffectInstallImplant">
<hediffDef>WULA_Addons_Antenna_Hediff_Base</hediffDef>
<bodyPart>Brain</bodyPart>
<canUpgrade>false</canUpgrade>
<maxSeverity>1</maxSeverity>
</li>
</comps>
</ThingDef>
<HediffDef ParentName="ImplantHediffBase">
<defName>WULA_Addons_Antenna_Hediff_Base</defName>
<hediffClass>Hediff_Mechlink</hediffClass>
@@ -10,7 +42,7 @@
<isBad>false</isBad>
<duplicationAllowed>false</duplicationAllowed>
<keepOnBodyPartRestoration>true</keepOnBodyPartRestoration>
<defaultInstallPart>WULA_Addons_Antenna_Bodypart</defaultInstallPart>
<defaultInstallPart>Brain</defaultInstallPart>
<!-- <spawnThingOnRemoved>WULA_Addons_Antenna_Base</spawnThingOnRemoved> -->
<comps>
<li Class="WulaFallenEmpire.HediffCompProperties_MakesMechanitor"/>
@@ -21,6 +53,7 @@
<statusLabel>频道:{0}</statusLabel>
<statusDesc>查看当前频率的详细信息</statusDesc>
<availableHediffs>
<li>Wula_FM_Switc_None</li>
<li>Wula_FM_Switc_Fleet</li>
<li>Wula_FM_Switc_Artillery</li>
<li>Wula_FM_Switc_Aircraft</li>
@@ -32,6 +65,23 @@
</comps>
</HediffDef>
<HediffDef>
<defName>Wula_FM_Switc_None</defName>
<label>调频(无)</label>
<description>关闭所有的调频,免得技能栏太挤</description>
<hediffClass>Hediff_High</hediffClass>
<everCurableByItem>false</everCurableByItem>
<duplicationAllowed>false</duplicationAllowed>
<keepOnBodyPartRestoration>True</keepOnBodyPartRestoration>
<isBad>false</isBad>
<stages>
<li>
<becomeVisible>false</becomeVisible>
</li>
</stages>
<comps>
</comps>
</HediffDef>
<HediffDef>
<defName>Wula_FM_Switc_Fleet</defName>
<label>调频(舰队)</label>

View File

@@ -45,10 +45,6 @@
<WulaDoor>
<position>(7, 0, 9)</position>
</WulaDoor>
<WULA_Cube_Productor_Energy>
<position>(6, 0, 1)</position>
<relativeRotation>Opposite</relativeRotation>
</WULA_Cube_Productor_Energy>
<Barricade>
<rects>
<li>(5,5,6,5)</li>

View File

@@ -6,6 +6,7 @@
<questScriptDef>WULA_Intro_Spy</questScriptDef> <!-- 通向具体的questScrip -->
<baseChance>0</baseChance> <!-- given by a special storyteller comp -->
</IncidentDef>
<QuestScriptDef>
<defName>WULA_Intro_Spy</defName>
<defaultChallengeRating>1</defaultChallengeRating> <!-- 挑战等级(星级) -->
@@ -18,14 +19,10 @@
<!-- 命名规则 -->
<questNameRules>
<rulesStrings>
<li>questName->the [adjAny] [asker_royalTitleInCurrentFaction]</li>
<li>questName->[QuestName]</li>
<!-- Pieces -->
<li>adjAny->hunted</li>
<li>adjAny->fleeing</li>
<li>adjAny->solitary</li>
<li>adjAny->ambushed</li>
<li>QuestName->hunted</li>
</rulesStrings>
</questNameRules>
<questDescriptionRules>
@@ -33,8 +30,7 @@
<li>QuestHospitalityCommon</li>
</include>
<rulesStrings>
<li>questDescription->[asker_nameFull], a [asker_royalTitleInCurrentFaction] of [asker_faction_name] is calling from nearby. [asker_possessive] guards were killed in an ambush. [asker_pronoun] escaped, but is now being followed by (*Threat)a manhunting [animalKindDef_label](/Threat).\n\n[asker_nameDef] wants you to keep [asker_objective] safe at [map_definite] for a few hours until [asker_possessive] shuttle can come pick [asker_objective] up.
\n[asker_pronoun] will bestow [royalFavorReward] [asker_faction_royalFavorLabel] on whoever accepts this quest. This is enough [asker_faction_royalFavorLabel] to receive the royal title of Novice, and all benefits that come with it - including the first level of psychic powers.</li>
<li>questDescription->[asker_nameFull], a [asker_royalTitleInCurrentFaction] of [asker_faction_name] is calling from nearby. [asker_possessive] guards were killed in an ambush. [asker_pronoun] escaped, but is now being followed by (*Threat)a manhunting [animalKindDef_label](/Threat).\n\n[asker_nameDef] wants you to keep [asker_objective] safe at [map_definite] for a few hours until [asker_possessive] shuttle can come pick [asker_objective] up.\n[asker_pronoun] will bestow [royalFavorReward] [asker_faction_royalFavorLabel] on whoever accepts this quest. This is enough [asker_faction_royalFavorLabel] to receive the royal title of Novice, and all benefits that come with it - including the first level of psychic powers.</li>
</rulesStrings>
</questDescriptionRules>
@@ -42,43 +38,26 @@
<root Class="QuestNode_Sequence">
<nodes>
<li Class="WulaFallenEmpire.QuestNode_Root_EventLetter">
<eventDefName>Wula_UI_Legion_1</eventDefName>
<eventDefName>Wula_Intro_Spy_UI_1</eventDefName>
</li>
<li Class="QuestNode_ResolveQuestName">
<rules>
<rulesStrings>
<li>questName->乌拉的呼唤</li>
<li>questName->掩护帝国密探</li>
</rulesStrings>
</rules>
</li>
<li Class="QuestNode_ResolveQuestDescription">
<rules>
<rulesStrings>
<li>questDescription->一个强大的心灵实体将它的意志强加于你的意识之中</li>
<li>questDescription->乌拉帝国行星封锁机关的总控AI向殖民地发送了一个请求。一位乌拉帝国密探已经暴露正在遭受未知派系追杀——密探手无寸铁且携带重要信息殖民地需要掩护它直到乌拉帝国的穿梭机抵达并将其接走。袭击不会太剧烈密探已经甩掉了大部分敌人</li>
</rulesStrings>
</rules>
</li>
<!-- 通讯 -->
<li Class="WulaFallenEmpire.QuestNode_Root_EventLetter">
<letterLabel>乌拉需要你的注意</letterLabel>
<letterTitle>乌拉需要你的注意</letterTitle>
<letterText>一个强大的心灵实体将它的意志强加于你的意识之中。它自称为“乌拉”,并要求你阅览它的消息。这股力量是压倒性的,不容拒绝。</letterText>
<options>
<li>
<label>阅览消息</label>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_UI_Legion_1</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</li>
<li Class="QuestNode_SubScript">
<def>Util_RandomizePointsChallengeRating</def>
</li>
<!-- 获取地图 -->
<li Class="QuestNode_GetMap" />
<!-- 获取边缘进入点 -->
@@ -87,6 +66,21 @@
<li Class="QuestNode_RoyalTitleHyperlink">
<faction>Wula_PIA_Legion_Faction</faction>
</li>
<!-- 选取敌对派系 -->
<li Class="QuestNode_GetFaction">
<allowEnemy>true</allowEnemy>
<mustBePermanentEnemy>true</mustBePermanentEnemy>
<storeAs>enemyFaction</storeAs>
</li>
<!-- 生成物品奖励 -->
<!-- <li Class="QuestNode_GenerateThingSet">
<thingSetMaker>Reward_GravshipUpgrade</thingSetMaker>
<storeAs>upgradeItem</storeAs>
</li>
<li Class="QuestNode_AddItemsReward">
<items>$upgradeItem</items>
</li> -->
<!-- 判断任务能否用皇家声望,后续生成奖励用 -->
<!-- <li Class="QuestNode_RequireRoyalFavorFromFaction">
<faction>Wula_PIA_Legion_Faction</faction>
@@ -131,10 +125,19 @@
<!-- 判断条件:是否允许暴力行为(游戏设置) -->
<node Class="QuestNode_ViolentQuestsAllowed">
<!-- 允许暴力则生成狂暴动物袭击 -->
<node Class="QuestNode_ManhunterPack">
<animalCount>1</animalCount>
<customLetterLabel TKey="LetterLabelAngryAnimal">Manhunting [animalKindDef_label]</customLetterLabel>
<customLetterText TKey="LetterTextAngryAnimal">The [animalKindDef_label] which was following [asker_nameFull] has arrived in the area.</customLetterText>
<node Class="QuestNode_SubScript">
<def>Util_Raid</def>
<prefix>raid</prefix>
<parms>
<inSignal>$inSignal</inSignal>
<map>$map</map>
<points>$points</points>
<enemyFaction>$enemyFaction</enemyFaction>
<walkInSpot>$walkInSpot</walkInSpot>
<customLetterLabel TKey="LetterLabelChasing">{BASELABEL} chasing [../asker_nameDef]</customLetterLabel>
<customLetterText TKey="LetterTextChasing">{BASETEXT}
\nThe [enemyFaction_pawnsPlural] have come to get [../asker_nameDef].</customLetterText>
</parms>
</node>
<!-- 不允许暴力则生成温和动物 -->
<elseNode Class="QuestNode_Sequence">
@@ -381,9 +384,23 @@
<amount>$royalFavorReward</amount>
<isSingleReward>true</isSingleReward>
</li> -->
<!-- 穿梭机成功离开后发送任务完成信号 -->
<li Class="WulaFallenEmpire.QuestNode_EventLetter">
<inSignal>pickupShipThing.SentSatisfied</inSignal>
<eventDefName>Wula_Intro_Spy_UI_End_1</eventDefName>
</li>
<!-- 穿梭机成功离开后任务完成信号 -->
<li Class="QuestNode_Signal">
<inSignal>pickupShipThing.SentSatisfied</inSignal>
<!-- 等待特定信号再打开窗口 -->
<node Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>true</sendStandardLetter>
</node>
</li>
<!-- 穿梭机成功离开后任务完成信号 -->
<li Class="QuestNode_Signal">
<inSignal>pickupShipThing.SentSatisfied</inSignal>
<!-- 等待特定信号再打开窗口 -->
<node Class="QuestNode_End">
<outcome>Success</outcome>
<sendStandardLetter>true</sendStandardLetter>
@@ -411,4 +428,207 @@
</nodes>
</root>
</QuestScriptDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_Spy_UI_1</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>未知通讯</characterName>
<descriptions>
<li>殖民地的居民们,这里是乌拉帝国舰队。我们有一个临时请求,现在需要你们的协助。\n\n我们的一名情报密探在执行侦察任务时暴露了身份正遭到敌对势力的追捕。这名密探手无寸铁但携带着至关重要的战略信息——我们需要你们提供临时庇护保护密探安全直到我们的穿梭机抵达。作为交换我们将提供相应的报酬并在未来考虑与你们建立更正式的关系。</li>
</descriptions>
<options>
<li>
<label>你们是谁?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_Spy_UI_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>我们能得到什么好处?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_Spy_UI_3</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>好的,我们会留意的</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_Spy_UI_2</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_1</portraitPath>
<characterName>未知通讯</characterName>
<descriptions>
<li>我们是乌拉帝国开发署的先遣力量——行星封锁机关P.I.A负责控制调度帝国在你们星球轨道上的先锋舰队。\n\n帝国开发署的使命是在银河系中寻找有价值的殖民地并进行整合。我们不是来摧毁你们的而是来建立秩序。\n\n这次请求是试探你们合作意愿的机会。如果你们证明了自己值得信任未来可能会有更多互惠互利的机会。拒绝合作不会带来任何好处但合作可能会为你们在这个危险星球上的生存带来转机。</li>
</descriptions>
<options>
<li>
<label>还有别的事情···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_Spy_UI_1</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_Spy_UI_3</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_2</portraitPath>
<characterName>未知通讯</characterName>
<descriptions>
<li>务实的问题。成功的合作将为你们带来:\n\n1. 技术数据访问权限 - 有限度地开放部分基础科技信息\n2. 舰队调度许可 - 我们将允许你们获得一份植入物,使你们的一名殖民者获得向帝国舰队发送信号请求炮击增援、空投、战机近地支援等能力\n3. 政治考量加分 - 在帝国对你们星球的最终评估中获得正面评价\n\n记住这只是一个开始。乌拉帝国对待合作伙伴的态度取决于他们的表现。如果这次任务顺利完成更多实质性的利益将会随之而来。</li>
</descriptions>
<options>
<li>
<label>还有别的事情···</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_Spy_UI_1</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_Spy_UI_End_1</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_1</portraitPath>
<characterName>未知通讯</characterName>
<descriptions>
<li>任务完成。你们的合作态度令人满意。密探已安全撤离,携带的情报将对帝国在你们星球上的行动规划起到关键作用。\n\n作为对你们协助的回报我们向你们提供以下技术资产\n\n1. 乌拉帝国技术系统接入许可 - 允许你们访问初步访问乌拉帝国的数据库\n\n2. 神经链接植入物 - 使一名殖民者能够直接与我们舰队建立通讯连接,可请求轨道支援\n\n3. 通讯终端 - 一套专用通讯设备,用于和乌拉帝国舰队生产设施进行通讯以下达订单——如果你们需要一些别的帮助,也可以通过这个通讯台联络我\n\n这些只是开始。如果你们继续证明自己的价值更多先进的帝国技术将会向你们开放。记住合作是双向的——我们对忠诚的合作伙伴从不吝啬。</li>
</descriptions>
<options>
<li>
<label>我们好像还不知道你的名字?</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_Intro_Spy_UI_End_2</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
<dismissEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_ShowMessage">
<message>来自乌拉帝国的谢礼已抵达,此外,乌拉帝国科技树已经开放</message>
</li>
<li Class="WulaFallenEmpire.Effect_CallSkyfaller">
<skyfallerDef>WULA_WeaponArmor_Productor_Incoming</skyfallerDef>
<delayTicks>1</delayTicks>
<checkClearance>true</checkClearance>
<clearanceRadius>3</clearanceRadius>
<letterLabel>空投建筑</letterLabel>
<letterText>乌拉帝国的空投建筑正在路上,注意落点!</letterText>
</li>
<li Class="WulaFallenEmpire.Effect_GiveThing">
<thingDef>WULA_Addons_Antenna_Hide</thingDef>
<count>1</count>
</li>
<li Class="WulaFallenEmpire.Effect_GiveThing">
<thingDef>WULA_Fake_Mothership_Beacon_Building</thingDef>
<count>1</count>
</li>
<li Class="WulaFallenEmpire.Effect_FinishResearch">
<research>WULA_Colony_License_LV1_Technology</research>
</li>
</effects>
</li>
</dismissEffects>
</WulaFallenEmpire.EventDef>
<WulaFallenEmpire.EventDef>
<defName>Wula_Intro_Spy_UI_End_2</defName>
<label>未知通讯</label>
<portraitPath>Wula/Events/Portraits/WULA_Legion_3</portraitPath>
<characterName>「军团」,P.I.A</characterName>
<descriptions>
<li>名字我是乌拉帝国行星封锁机关的中控AI你们就叫我「军团」吧。</li>
</descriptions>
<options>
<li>
<label>好的,奖励我们就收下了</label>
<useCustomColors>true</useCustomColors>
<normalColor>(226,191,195,195)</normalColor>
<hoverColor>(226,191,195,185)</hoverColor>
<textColor>(255,255,255,255)</textColor>
<textHoverColor>(255,255,255,255)</textHoverColor>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_CloseDialog" />
</effects>
</li>
</optionEffects>
</li>
</options>
</WulaFallenEmpire.EventDef>
</Defs>

View File

@@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<QuestScriptDef>
<defName>Wula_Quest_ExampleEvent</defName>
<label>乌拉的呼唤</label>
<description>一个强大的心灵实体将它的意志强加于你的意识之中。</description>
<root Class="QuestNode_Sequence">
<nodes>
<li Class="QuestNode_ResolveQuestName">
<rules>
<rulesStrings>
<li>questName->乌拉的呼唤</li>
</rulesStrings>
</rules>
</li>
<li Class="QuestNode_ResolveQuestDescription">
<rules>
<rulesStrings>
<li>questDescription->一个强大的心灵实体将它的意志强加于你的意识之中。</li>
</rulesStrings>
</rules>
</li>
<li Class="WulaFallenEmpire.QuestNode_Root_EventLetter">
<letterLabel>乌拉需要你的注意</letterLabel>
<letterTitle>乌拉需要你的注意</letterTitle>
<letterText>一个强大的心灵实体将它的意志强加于你的意识之中。它自称为“乌拉”,并要求你阅览它的消息。这股力量是压倒性的,不容拒绝。</letterText>
<options>
<li>
<label>阅览消息</label>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_UI_Anisia_1</defName>
</li>
</effects>
</li>
</optionEffects>
</li>
<li>
<label>尝试抵抗(但失败了)</label>
<optionEffects>
<li>
<effects>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_UI_Anisia_1</defName>
</li>
<li Class="WulaFallenEmpire.Effect_ShowMessage">
<message>你试图抵抗心灵入侵,但这股力量过于强大。无论如何,消息还是涌入了你的脑海。</message>
<messageTypeDef>NegativeEvent</messageTypeDef>
</li>
</effects>
</li>
</optionEffects>
</li>
</options>
</li>
</nodes>
</root>
</QuestScriptDef>
</Defs>

View File

@@ -14,6 +14,12 @@
<baseCost>10000</baseCost>
<researchViewX>0.00</researchViewX>
<researchViewY>3.20</researchViewY>
<techprintCount>1</techprintCount>
<techprintCommonality>0</techprintCommonality>
<techprintMarketValue>999999</techprintMarketValue>
<heldByFactionCategoryTags>
<li>Wula_PIA_Legion_Faction</li>
</heldByFactionCategoryTags>
<prerequisites>
<li>Electricity</li>
</prerequisites>

View File

@@ -16,7 +16,7 @@
<drawHighlight>true</drawHighlight>
<highlightColor>(0.56, 0.62, 0.9)</highlightColor>
<graphicData>
<texPath>Wula/Building/WULA_Flyover_Beacon</texPath>
<texPath>Wula/Weapon/WULA_Weapon_Empty</texPath>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>TransparentPostLight</shaderType>
<drawSize>(1,1)</drawSize>
@@ -42,11 +42,17 @@
<repairEffect>ConstructMetal</repairEffect>
<forceDebugSpawnable>true</forceDebugSpawnable>
<building>
<expandHomeArea>false</expandHomeArea>
<destroySound>BuildingDestroyed_Metal_Big</destroySound>
<paintable>true</paintable>
<isInert>true</isInert>
</building>
<comps>
<li Class="WulaFallenEmpire.CompProperties_FactionSetter">
<!-- <factionDef>Mechanoid</factionDef> 不写默认玩家派系-->
<usePlayerFactionIfNull>true</usePlayerFactionIfNull>
<overrideExistingFaction>false</overrideExistingFaction>
</li>
<li Class="WulaFallenEmpire.CompProperties_AircraftHangar">
<aircraftDef>WULA_MotherShip_Entity</aircraftDef>
<aircraftCount>1</aircraftCount>

View File

@@ -178,6 +178,113 @@
</li>
</comps>
</ThingDef>
<ThingDef Name="WULA_ApparelArmorBase" ParentName="ArmorMachineableBase" Abstract="True">
<techLevel>Spacer</techLevel>
<tickerType>Normal</tickerType>
<thingCategories>
<li>ApparelArmor</li>
</thingCategories>
<recipeMaker>
<displayPriority>105</displayPriority>
<unfinishedThingDef>UnfinishedTechArmor</unfinishedThingDef>
<recipeUsers Inherit="False">
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<useIngredientsForColor>false</useIngredientsForColor>
</recipeMaker>
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
</graphicData>
<stuffCategories>
<li>Metallic</li>
</stuffCategories>
<apparel>
<tags>
<li>Wula_Apparel</li>
<li>Wula_Armor</li>
</tags>
<bodyPartGroups>
<li>Torso</li>
<li>Neck</li>
<li>Shoulders</li>
<li>Arms</li>
<li>Legs</li>
</bodyPartGroups>
<layers>
<li>Middle</li>
<li>Shell</li>
</layers>
<useDeflectMetalEffect>true</useDeflectMetalEffect>
<soundWear>Wear_PowerArmor</soundWear>
<soundRemove>Remove_PowerArmor</soundRemove>
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
<useWornGraphicMask>true</useWornGraphicMask>
</apparel>
<thingClass>Apparel</thingClass>
<comps>
<li Class="CompProperties_Biocodable"/>
</comps>
<thingSetMakerTags>
<li>RewardStandardHighFreq</li>
</thingSetMakerTags>
<statBases>
<StuffEffectMultiplierArmor>0.6</StuffEffectMultiplierArmor>
<StuffEffectMultiplierInsulation_Cold>0.25</StuffEffectMultiplierInsulation_Cold>
<StuffEffectMultiplierInsulation_Heat>0.25</StuffEffectMultiplierInsulation_Heat>
</statBases>
</ThingDef>
<ThingDef Name="WULA_ApparelHelmetBase" ParentName="HatMakeableBase" Abstract="True">
<techLevel>Spacer</techLevel>
<thingCategories>
<li>ApparelArmor</li>
</thingCategories>
<recipeMaker>
<displayPriority>105</displayPriority>
<unfinishedThingDef>UnfinishedTechArmor</unfinishedThingDef>
<recipeUsers Inherit="False">
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
</recipeMaker>
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
</graphicData>
<apparel>
<renderSkipFlags>
<li>None</li>
</renderSkipFlags>
<countsAsClothingForNudity>false</countsAsClothingForNudity>
<tags>
<li>Wula_Apparel</li>
<li>Wula_Armor</li>
</tags>
<bodyPartGroups>
<li>FullHead</li>
</bodyPartGroups>
<layers>
<li>Overhead</li>
</layers>
<parentTagDef>ApparelHead</parentTagDef>
<useDeflectMetalEffect>true</useDeflectMetalEffect>
<soundWear>Wear_PowerArmor</soundWear>
<soundRemove>Remove_PowerArmor</soundRemove>
<useWornGraphicMask>true</useWornGraphicMask>
</apparel>
<stuffCategories>
<li>Metallic</li>
</stuffCategories>
<thingSetMakerTags>
<li>RewardStandardHighFreq</li>
</thingSetMakerTags>
<statBases>
<StuffEffectMultiplierArmor>0.6</StuffEffectMultiplierArmor>
<StuffEffectMultiplierInsulation_Cold>0.25</StuffEffectMultiplierInsulation_Cold>
<StuffEffectMultiplierInsulation_Heat>0.25</StuffEffectMultiplierInsulation_Heat>
</statBases>
</ThingDef>
<!-- 内衬 -->
<ThingDef ParentName="WULA_ApparelOnSkinBase">
@@ -301,113 +408,6 @@
</equippedStatOffsets>
</ThingDef>
<ThingDef Name="WULA_ApparelArmorBase" ParentName="ArmorMachineableBase" Abstract="True">
<techLevel>Spacer</techLevel>
<tickerType>Normal</tickerType>
<thingCategories>
<li>ApparelArmor</li>
</thingCategories>
<recipeMaker>
<displayPriority>105</displayPriority>
<unfinishedThingDef>UnfinishedTechArmor</unfinishedThingDef>
<recipeUsers Inherit="False">
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
<useIngredientsForColor>false</useIngredientsForColor>
</recipeMaker>
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
</graphicData>
<stuffCategories>
<li>Metallic</li>
</stuffCategories>
<apparel>
<tags>
<li>Wula_Apparel</li>
<li>Wula_Armor</li>
</tags>
<bodyPartGroups>
<li>Torso</li>
<li>Neck</li>
<li>Shoulders</li>
<li>Arms</li>
<li>Legs</li>
</bodyPartGroups>
<layers>
<li>Middle</li>
<li>Shell</li>
</layers>
<useDeflectMetalEffect>true</useDeflectMetalEffect>
<soundWear>Wear_PowerArmor</soundWear>
<soundRemove>Remove_PowerArmor</soundRemove>
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
<useWornGraphicMask>true</useWornGraphicMask>
</apparel>
<thingClass>Apparel</thingClass>
<comps>
<li Class="CompProperties_Biocodable"/>
</comps>
<thingSetMakerTags>
<li>RewardStandardHighFreq</li>
</thingSetMakerTags>
<statBases>
<StuffEffectMultiplierArmor>0.6</StuffEffectMultiplierArmor>
<StuffEffectMultiplierInsulation_Cold>0.25</StuffEffectMultiplierInsulation_Cold>
<StuffEffectMultiplierInsulation_Heat>0.25</StuffEffectMultiplierInsulation_Heat>
</statBases>
</ThingDef>
<ThingDef Name="WULA_ApparelHelmetBase" ParentName="HatMakeableBase" Abstract="True">
<techLevel>Spacer</techLevel>
<thingCategories>
<li>ApparelArmor</li>
</thingCategories>
<recipeMaker>
<displayPriority>105</displayPriority>
<unfinishedThingDef>UnfinishedTechArmor</unfinishedThingDef>
<recipeUsers Inherit="False">
<li>WULA_Cube_Productor_Energy</li>
</recipeUsers>
</recipeMaker>
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
</graphicData>
<apparel>
<renderSkipFlags>
<li>None</li>
</renderSkipFlags>
<countsAsClothingForNudity>false</countsAsClothingForNudity>
<tags>
<li>Wula_Apparel</li>
<li>Wula_Armor</li>
</tags>
<bodyPartGroups>
<li>FullHead</li>
</bodyPartGroups>
<layers>
<li>Overhead</li>
</layers>
<parentTagDef>ApparelHead</parentTagDef>
<useDeflectMetalEffect>true</useDeflectMetalEffect>
<soundWear>Wear_PowerArmor</soundWear>
<soundRemove>Remove_PowerArmor</soundRemove>
<useWornGraphicMask>true</useWornGraphicMask>
</apparel>
<stuffCategories>
<li>Metallic</li>
</stuffCategories>
<thingSetMakerTags>
<li>RewardStandardHighFreq</li>
</thingSetMakerTags>
<statBases>
<StuffEffectMultiplierArmor>0.6</StuffEffectMultiplierArmor>
<StuffEffectMultiplierInsulation_Cold>0.25</StuffEffectMultiplierInsulation_Cold>
<StuffEffectMultiplierInsulation_Heat>0.25</StuffEffectMultiplierInsulation_Heat>
</statBases>
</ThingDef>
<ThingDef ParentName="WULA_ApparelArmorBase">
<defName>WULA_Knight_PowerArmor</defName>
<label>乌拉帝国骑士军团甲</label>

View File

@@ -1739,7 +1739,7 @@
</statBases>
<recipeMaker>
<recipeUsers Inherit="False">
<li>WULA_Cube_Productor_Energy</li>
<li>WULA_Cube_Productor</li>
</recipeUsers>
<researchPrerequisite>WULA_Synth_Weapon_1_Missile_Technology</researchPrerequisite>
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>

View File

@@ -8,7 +8,7 @@
<workType>Smithing</workType>
<priorityInType>75</priorityInType>
<fixedBillGiverDefs>
<li>WULA_Cube_Productor_Energy</li>
<li>WULA_Cube_Productor</li>
</fixedBillGiverDefs>
<verb>工作于</verb>
<gerund>工作于</gerund>

View File

@@ -9,7 +9,7 @@
<customBackgroundImagePath>Wula/Events/tile_large_bg</customBackgroundImagePath>
<!-- <backgroundImagePath>Wula/Events/Portraits/PIA</backgroundImagePath> -->
<windowSize>(600,850)</windowSize>
<windowSize>(600,900)</windowSize>
<!-- 元素显示控制 -->
<showPortrait>true</showPortrait>
@@ -25,7 +25,7 @@
<portraitSize>(600,400)</portraitSize>
<labelSize>(600,40)</labelSize>
<characterNameSize>(600,30)</characterNameSize>
<descriptionsSize>(500,150)</descriptionsSize>
<descriptionsSize>(560,200)</descriptionsSize>
<optionsListSize>(600,200)</optionsListSize>
<optionSize>(500,150)</optionSize>
@@ -33,11 +33,11 @@
<portraitMargins>(0,10)</portraitMargins>
<labelMargins>(10,0)</labelMargins>
<characterNameMargins>(10,0)</characterNameMargins>
<descriptionsMargins>(10,20)</descriptionsMargins>
<optionsListMargins>(10,0)</optionsListMargins>
<descriptionsMargins>(10,10)</descriptionsMargins>
<optionsListMargins>(5,0)</optionsListMargins>
<!-- 描述区域内边距 (x=上下间距, y=左右间距) -->
<descriptionsPadding>(10,25)</descriptionsPadding>
<descriptionsPadding>(0,0)</descriptionsPadding>
<!-- 选项列表内边距 (x=左右间距, y=上下间距) -->
<optionsListPadding>(20,20)</optionsListPadding>
@@ -46,7 +46,7 @@
<optionSpacing>20</optionSpacing>
<!-- 调试和样式 -->
<drawBorders>false</drawBorders>
<drawBorders>true</drawBorders>
<showDefName>false</showDefName>
<labelFont>Medium</labelFont>
</WulaFallenEmpire.EventUIConfigDef>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<LetterDef>
<defName>Wula_EventChoiceLetter</defName>
<letterClass>WulaFallenEmpire.Letter_EventChoice</letterClass>
<arriveSound>LetterArrive_Good</arriveSound>
<color>(120, 150, 255)</color>
</LetterDef>
</Defs>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationSequence" MayRequire="Ludeon.RimWorld.Odyssey">
<!-- <Operation Class="PatchOperationSequence" MayRequire="Ludeon.RimWorld.Odyssey">
<operations>
<li Class="PatchOperationAdd">
<xpath>*/ThingDef[defName = "GravEngine"]/comps/li[@Class = "CompProperties_AffectedByFacilities"]/linkableFacilities</xpath>
@@ -9,15 +9,5 @@
</value>
</li>
</operations>
</Operation>
<Operation Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationAdd">
<xpath>*/ThingDef[defName = "TableButcher"]/recipes</xpath>
<value>
<li>Make_Wula_Organic_Precursor</li>
</value>
</li>
</operations>
</Operation>
</Operation> -->
</Patch>

View File

@@ -480,6 +480,20 @@
<variableName>MechanoidGoodwill</variableName>
</li>
```
### `Effect_CallSkyfaller`
在玩家殖民地附近呼叫一个skyfaller。
- **checkClearance**: 确保落点附近X格内净空。
```xml
<li Class="WulaFallenEmpire.Effect_CallSkyfaller">
<skyfallerDef>DropPodIncoming</skyfallerDef>
<delayTicks>180</delayTicks>
<checkClearance>true</checkClearance>
<clearanceRadius>4</clearanceRadius>
<letterLabel>空投舱已呼叫</letterLabel>
<letterText>轨道空投舱已在途中预计3秒后抵达。</letterText>
</li>
```
---
## 4. 可用的条件 (`Condition`)

View File

@@ -0,0 +1,129 @@
using System.Collections.Generic;
using Verse;
using RimWorld;
using UnityEngine;
namespace WulaFallenEmpire
{
public class Effect_CallSkyfaller : EffectBase
{
public ThingDef skyfallerDef;
public int delayTicks = 120;
public bool checkClearance = true;
public int clearanceRadius = 3;
public string letterLabel;
public string letterText;
public LetterDef letterDef;
public override void Execute(Window dialog = null)
{
Map currentMap = Find.CurrentMap;
if (currentMap == null)
{
Log.Error("[WulaFallenEmpire] Effect_CallSkyfaller cannot execute without a current map.");
return;
}
if (skyfallerDef == null)
{
Log.Error("[WulaFallenEmpire] Effect_CallSkyfaller has a null skyfallerDef.");
return;
}
// 寻找合适的掉落点
IntVec3 dropCenter;
if (checkClearance)
{
dropCenter = FindDropSpotWithClearance(currentMap, clearanceRadius);
}
else
{
dropCenter = DropCellFinder.RandomDropSpot(currentMap);
}
if (!dropCenter.IsValid)
{
Log.Error("[WulaFallenEmpire] Effect_CallSkyfaller could not find a valid drop spot.");
return;
}
// 创建延时召唤
CallSkyfallerDelayed(dropCenter, currentMap);
// 发送通知信件
if (!string.IsNullOrEmpty(letterLabel) && !string.IsNullOrEmpty(letterText))
{
Find.LetterStack.ReceiveLetter(letterLabel, letterText, letterDef ?? LetterDefOf.NeutralEvent);
}
Log.Message($"[WulaFallenEmpire] Scheduled skyfaller '{skyfallerDef.defName}' at {dropCenter} with {delayTicks} ticks delay");
}
private IntVec3 FindDropSpotWithClearance(Map map, int radius)
{
// 优先在殖民地附近寻找
IntVec3 result;
if (RCellFinder.TryFindRandomCellNearTheCenterOfTheMapWith(
(IntVec3 c) => IsValidDropSpotWithClearance(c, map, radius) && map.reachability.CanReachColony(c),
map, out result))
{
return result;
}
// 如果找不到,放宽条件
if (CellFinder.TryFindRandomCellNear(map.Center, map, Mathf.Max(map.Size.x / 4, 10),
(IntVec3 c) => IsValidDropSpotWithClearance(c, map, radius), out result))
{
return result;
}
// 最后尝试任何有效位置
if (CellFinder.TryFindRandomCellNear(map.Center, map, map.Size.x / 2,
(IntVec3 c) => IsValidDropSpotWithClearance(c, map, radius), out result))
{
return result;
}
return IntVec3.Invalid;
}
private bool IsValidDropSpotWithClearance(IntVec3 center, Map map, int radius)
{
// 检查中心点是否有效
if (!center.IsValid || !center.InBounds(map) || !center.Standable(map) || center.Fogged(map))
return false;
// 检查指定半径内的所有单元格
foreach (IntVec3 cell in GenRadial.RadialCellsAround(center, radius, true))
{
if (!cell.InBounds(map) || !cell.Walkable(map) || cell.Fogged(map))
return false;
// 检查是否有建筑物阻挡
Building building = cell.GetEdifice(map);
if (building != null && building.def.passability == Traversability.Impassable)
return false;
// 检查是否有屋顶(可选,根据需求调整)
if (cell.Roofed(map))
return false;
}
return true;
}
private void CallSkyfallerDelayed(IntVec3 targetCell, Map map)
{
// 获取或创建延时组件
var delayedComponent = map.GetComponent<MapComponent_SkyfallerDelayed>();
if (delayedComponent == null)
{
delayedComponent = new MapComponent_SkyfallerDelayed(map);
map.components.Add(delayedComponent);
}
// 安排延时召唤
delayedComponent.ScheduleSkyfaller(skyfallerDef, targetCell, delayTicks);
}
}
}

View File

@@ -0,0 +1,98 @@
using RimWorld;
using RimWorld.QuestGen;
using System;
using Verse;
namespace WulaFallenEmpire
{
public class QuestNode_EventLetter : QuestNode
{
[NoTranslate]
public SlateRef<string> inSignal;
public SlateRef<string> eventDefName;
protected override bool TestRunInt(Slate slate)
{
return true;
}
protected override void RunInt()
{
Slate slate = QuestGen.slate;
string signal = inSignal.GetValue(slate);
string defName = eventDefName.GetValue(slate);
if (defName.NullOrEmpty())
{
Log.Error("[WulaFallenEmpire] QuestNode_EventLetter: eventDefName is not specified.");
return;
}
// 关键:使用 HardcodedSignalWithQuestID 处理信号
string processedSignal = QuestGenUtility.HardcodedSignalWithQuestID(signal) ?? slate.Get<string>("inSignal");
QuestPart_EventLetter questPart = new QuestPart_EventLetter();
questPart.inSignal = processedSignal;
questPart.eventDefName = defName;
QuestGen.quest.AddPart(questPart);
}
}
public class QuestPart_EventLetter : QuestPart
{
public string inSignal;
public string eventDefName;
public override void Notify_QuestSignalReceived(Signal signal)
{
base.Notify_QuestSignalReceived(signal);
Log.Message($"[WulaFallenEmpire] QuestPart_EventLetter received signal: '{signal.tag}', waiting for: '{inSignal}'");
if (signal.tag == inSignal)
{
Log.Message($"[WulaFallenEmpire] Signal matched! Opening EventDef: {eventDefName}");
OpenEventDefWindow(eventDefName);
}
}
private void OpenEventDefWindow(string defName)
{
try
{
EventDef eventDef = DefDatabase<EventDef>.GetNamed(defName, false);
if (eventDef == null)
{
Log.Error($"[WulaFallenEmpire] EventDef '{defName}' not found in DefDatabase.");
return;
}
if (eventDef.windowType == null)
{
Log.Error($"[WulaFallenEmpire] EventDef '{defName}' has null windowType.");
return;
}
Log.Message($"[WulaFallenEmpire] Creating window instance for {defName} with type {eventDef.windowType}");
Window window = (Window)Activator.CreateInstance(eventDef.windowType, eventDef);
Log.Message($"[WulaFallenEmpire] Adding window to WindowStack");
Find.WindowStack.Add(window);
Log.Message($"[WulaFallenEmpire] Successfully opened EventDef window: {defName}");
}
catch (Exception ex)
{
Log.Error($"[WulaFallenEmpire] Error opening EventDef window '{defName}': {ex}");
}
}
public override void ExposeData()
{
base.ExposeData();
Scribe_Values.Look(ref inSignal, "inSignal");
Scribe_Values.Look(ref eventDefName, "eventDefName");
}
}
}

View File

@@ -106,9 +106,11 @@
<Compile Include="EventSystem\Dialog_CustomDisplay.cs" />
<Compile Include="EventSystem\Dialog_ManageEventVariables.cs" />
<Compile Include="EventSystem\Effect\EffectBase.cs" />
<Compile Include="EventSystem\Effect\Effect_CallSkyfaller.cs" />
<Compile Include="EventSystem\EventDef.cs" />
<Compile Include="EventSystem\EventUIConfigDef.cs" />
<Compile Include="EventSystem\EventVariableManager.cs" />
<Compile Include="EventSystem\QuestNode\QuestNode_EventLetter.cs" />
<Compile Include="EventSystem\QuestNode\QuestNode_Root_EventLetter.cs" />
<Compile Include="Flyover\ThingclassFlyOver.cs" />
<Compile Include="Flyover\WULA_AircraftHangar\CompAbilityEffect_AircraftStrike.cs" />