小玩具
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Defs>
|
<Defs>
|
||||||
<DamageDef>
|
<DamageDef Name="Wula_Darm_Matter_Beam_DMG">
|
||||||
<defName>Wula_Darm_Matter_Beam</defName>
|
<defName>Wula_Darm_Matter_Beam</defName>
|
||||||
<ignoreShields>true</ignoreShields>
|
<ignoreShields>true</ignoreShields>
|
||||||
<igniteChanceByTargetFlammability>
|
<igniteChanceByTargetFlammability>
|
||||||
@@ -41,4 +41,16 @@
|
|||||||
<label>暗物质湮灭</label>
|
<label>暗物质湮灭</label>
|
||||||
<deathMessage>{0} 由于暗物质湮灭爆炸而死。</deathMessage>
|
<deathMessage>{0} 由于暗物质湮灭爆炸而死。</deathMessage>
|
||||||
</DamageDef>
|
</DamageDef>
|
||||||
|
|
||||||
|
<DamageDef ParentName="Wula_Darm_Matter_Beam_DMG">
|
||||||
|
<defName>Wula_Darm_Matter_Beam_Explode</defName>
|
||||||
|
<additionalHediffs>
|
||||||
|
<li>
|
||||||
|
<hediff>WULA_Darkmatter_Explosion</hediff>
|
||||||
|
<severityPerDamageDealt>0.01</severityPerDamageDealt>
|
||||||
|
<inverseStatScaling>true</inverseStatScaling>
|
||||||
|
<victimSeverityScalingByInvBodySize>true</victimSeverityScalingByInvBodySize>
|
||||||
|
</li>
|
||||||
|
</additionalHediffs>
|
||||||
|
</DamageDef>
|
||||||
</Defs>
|
</Defs>
|
||||||
|
|||||||
32
1.6/Defs/HediffDefs/Hediffs_WULA_Damage_Effect.xml
Normal file
32
1.6/Defs/HediffDefs/Hediffs_WULA_Damage_Effect.xml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<Defs>
|
||||||
|
<HediffDef>
|
||||||
|
<defName>WULA_Darkmatter_Explosion</defName>
|
||||||
|
<label>暗流爆发</label>
|
||||||
|
<description>你身上沾染了不明暗物质!马上就要爆炸了!只能祝你好运咯~</description>
|
||||||
|
<defaultLabelColor>(1, 1, 0.8)</defaultLabelColor>
|
||||||
|
<hediffClass>HediffWithComps</hediffClass>
|
||||||
|
<comps>
|
||||||
|
<li Class="HediffCompProperties_SeverityPerDay">
|
||||||
|
<severityPerDay>-4</severityPerDay>
|
||||||
|
</li>
|
||||||
|
<li Class="WulaFallenEmpire.HediffCompProperties_TimedExplosion">
|
||||||
|
<damageDef>Wula_Darm_Matter_Flame</damageDef>
|
||||||
|
<soundDef>Explosion_Bomb</soundDef>
|
||||||
|
<explosionRadius>1.5</explosionRadius>
|
||||||
|
<showRemainingTime>true</showRemainingTime>
|
||||||
|
<damageAmount>15</damageAmount>
|
||||||
|
<armorPenetration>0.10</armorPenetration>
|
||||||
|
<disappearsAfterTicks>10</disappearsAfterTicks>
|
||||||
|
</li>
|
||||||
|
<li Class="HediffCompProperties_DisappearsOnDeath"/>
|
||||||
|
</comps>
|
||||||
|
<stages>
|
||||||
|
<li>
|
||||||
|
<label>minor</label>
|
||||||
|
<becomeVisible>true</becomeVisible>
|
||||||
|
</li>
|
||||||
|
</stages>
|
||||||
|
</HediffDef>
|
||||||
|
</Defs>
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
<li Class="WulaFallenEmpire.VerbProperties_Arc">
|
<li Class="WulaFallenEmpire.VerbProperties_Arc">
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootArc</verbClass>
|
<verbClass>WulaFallenEmpire.Verb_ShootArc</verbClass>
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
<hasStandardCommand>true</hasStandardCommand>
|
||||||
<damageDef>Wula_Darm_Matter_Beam</damageDef>
|
<damageDef>Wula_Darm_Matter_Beam_Explode</damageDef>
|
||||||
<damageAmount>20</damageAmount>
|
<damageAmount>20</damageAmount>
|
||||||
<EMPDamageAmount>20</EMPDamageAmount>
|
<EMPDamageAmount>20</EMPDamageAmount>
|
||||||
<warmupTime>0.5</warmupTime>
|
<warmupTime>1</warmupTime>
|
||||||
<range>34.9</range>
|
<range>34.9</range>
|
||||||
<affectedAngle>25</affectedAngle>
|
<affectedAngle>25</affectedAngle>
|
||||||
<armorPenetration>1.0</armorPenetration>
|
<armorPenetration>1.0</armorPenetration>
|
||||||
|
|||||||
@@ -1577,26 +1577,25 @@
|
|||||||
<ThingDef ParentName="BaseBullet">
|
<ThingDef ParentName="BaseBullet">
|
||||||
<defName>Bullet_WULA_RW_Handle_Cannon</defName>
|
<defName>Bullet_WULA_RW_Handle_Cannon</defName>
|
||||||
<label>熔岩炮弹</label>
|
<label>熔岩炮弹</label>
|
||||||
<!-- <thingClass>Projectile_HellsphereCannon</thingClass> -->
|
<thingClass>WulaFallenEmpire.Projectile_ConfigurableHellsphereCannon</thingClass>
|
||||||
<thingClass>Projectile_Explosive</thingClass>
|
|
||||||
<graphicData>
|
<graphicData>
|
||||||
<texPath>Things/Projectile/HellsphereCannon</texPath>
|
<texPath>Things/Projectile/HellsphereCannon</texPath>
|
||||||
<graphicClass>Graphic_Single</graphicClass>
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
<shaderType>MoteGlow</shaderType>
|
<shaderType>MoteGlow</shaderType>
|
||||||
<drawSize>(1.5, 3)</drawSize>
|
<drawSize>(1.5, 3)</drawSize>
|
||||||
</graphicData>
|
</graphicData>
|
||||||
<projectile>
|
<projectile Class="WulaFallenEmpire.ProjectileProperties_ConfigurableHellsphereCannon">
|
||||||
<damageDef>Vaporize</damageDef>
|
<damageDef>Vaporize</damageDef>
|
||||||
<speed>75</speed>
|
<speed>75</speed>
|
||||||
<damageAmountBase>300</damageAmountBase>
|
<damageAmountBase>75</damageAmountBase>
|
||||||
<explosionRadius>2.5</explosionRadius>
|
<explosionRadius>1.5</explosionRadius>
|
||||||
<screenShakeFactor>0.75</screenShakeFactor>
|
<screenShakeFactor>0.75</screenShakeFactor>
|
||||||
</projectile>
|
</projectile>
|
||||||
<!-- <modExtensions>
|
<modExtensions>
|
||||||
<li Class="WulaFallenEmpire.ShotgunExtension">
|
<li Class="WulaFallenEmpire.ShotgunExtension">
|
||||||
<pelletCount>6</pelletCount>
|
<pelletCount>4</pelletCount>
|
||||||
</li>
|
</li>
|
||||||
</modExtensions> -->
|
</modExtensions>
|
||||||
</ThingDef>
|
</ThingDef>
|
||||||
<!-- 自动炮 -->
|
<!-- 自动炮 -->
|
||||||
<ThingDef ParentName="BaseHumanMakeableGun">
|
<ThingDef ParentName="BaseHumanMakeableGun">
|
||||||
|
|||||||
Binary file not shown.
@@ -3,48 +3,12 @@
|
|||||||
"WorkspaceRootPath": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\",
|
"WorkspaceRootPath": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\",
|
||||||
"Documents": [
|
"Documents": [
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\verb\\shootarc.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\verb\\projectile_configurablehellspherecannon.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:verb\\shootarc.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:verb\\projectile_configurablehellspherecannon.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\verb\\propershotgun.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\building_wula_darkenergy_engine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:verb\\propershotgun.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:building_wula_darkenergy_engine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|c:\\steam\\steamapps\\common\\rimworld\\mods\\3516260226\\source\\wulafallenempire\\verb\\trackingbullet.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:verb\\trackingbullet.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\VerbPropertiesExplosiveBeam.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Verb\\VerbPropertiesExplosiveBeam.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\eventsystem\\dialog_customdisplay.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:eventsystem\\dialog_customdisplay.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\eventsystem\\condition.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:eventsystem\\condition.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\eventsystem\\compopencustomui.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:eventsystem\\compopencustomui.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\eventsystem\\debugactions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:eventsystem\\debugactions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\eventsystem\\effect.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{F5AE8C3B-0221-4C16-A128-9A62D521A8FF}|WulaFallenEmpire.csproj|solutionrelative:eventsystem\\effect.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\CustomUIDef.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:EventSystem\\CustomUIDef.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Verb_ShootBeamExplosive.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
|
||||||
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Verb\\Verb_ShootBeamExplosive.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"DocumentGroupContainers": [
|
"DocumentGroupContainers": [
|
||||||
@@ -54,7 +18,7 @@
|
|||||||
"DocumentGroups": [
|
"DocumentGroups": [
|
||||||
{
|
{
|
||||||
"DockedWidth": 200,
|
"DockedWidth": 200,
|
||||||
"SelectedChildIndex": 1,
|
"SelectedChildIndex": 2,
|
||||||
"Children": [
|
"Children": [
|
||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
@@ -63,137 +27,28 @@
|
|||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 0,
|
||||||
"Title": "ShootArc.cs",
|
"Title": "Projectile_ConfigurableHellsphereCannon.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\ShootArc.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Projectile_ConfigurableHellsphereCannon.cs",
|
||||||
"RelativeDocumentMoniker": "Verb\\ShootArc.cs",
|
"RelativeDocumentMoniker": "Verb\\Projectile_ConfigurableHellsphereCannon.cs",
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\ShootArc.cs",
|
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Projectile_ConfigurableHellsphereCannon.cs",
|
||||||
"RelativeToolTip": "Verb\\ShootArc.cs",
|
"RelativeToolTip": "Verb\\Projectile_ConfigurableHellsphereCannon.cs",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAwAAAAFAAAA",
|
"ViewState": "AQIAAC0AAAAAAAAAAAAUwFwAAAABAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2025-08-01T04:09:11.909Z",
|
"WhenOpened": "2025-08-01T05:40:06.726Z",
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 2,
|
|
||||||
"Title": "Trackingbullet.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Trackingbullet.cs",
|
|
||||||
"RelativeDocumentMoniker": "Verb\\Trackingbullet.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Trackingbullet.cs",
|
|
||||||
"RelativeToolTip": "Verb\\Trackingbullet.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwYAAAAaAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-31T17:19:18.131Z",
|
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 1,
|
"DocumentIndex": 1,
|
||||||
"Title": "ProperShotgun.cs",
|
"Title": "Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\ProperShotgun.cs",
|
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"RelativeDocumentMoniker": "Verb\\ProperShotgun.cs",
|
"RelativeDocumentMoniker": "Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\ProperShotgun.cs",
|
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"RelativeToolTip": "Verb\\ProperShotgun.cs",
|
"RelativeToolTip": "Building_Wula_DarkEnergy_Engine.cs",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAaAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAADwvwUAAAAWAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2025-07-31T17:19:04.819Z",
|
"WhenOpened": "2025-08-01T05:27:49.469Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 3,
|
|
||||||
"Title": "VerbPropertiesExplosiveBeam.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\VerbPropertiesExplosiveBeam.cs",
|
|
||||||
"RelativeDocumentMoniker": "Verb\\VerbPropertiesExplosiveBeam.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\VerbPropertiesExplosiveBeam.cs",
|
|
||||||
"RelativeToolTip": "Verb\\VerbPropertiesExplosiveBeam.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwAAAAAAAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-31T17:16:20.591Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 10,
|
|
||||||
"Title": "Verb_ShootBeamExplosive.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Verb_ShootBeamExplosive.cs",
|
|
||||||
"RelativeDocumentMoniker": "Verb\\Verb_ShootBeamExplosive.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\Verb\\Verb_ShootBeamExplosive.cs",
|
|
||||||
"RelativeToolTip": "Verb\\Verb_ShootBeamExplosive.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwYAAAAaAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-31T17:12:13.033Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 8,
|
|
||||||
"Title": "Effect.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\Effect.cs",
|
|
||||||
"RelativeDocumentMoniker": "EventSystem\\Effect.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\Effect.cs",
|
|
||||||
"RelativeToolTip": "EventSystem\\Effect.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAACICAAAAAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-31T16:05:42.638Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 6,
|
|
||||||
"Title": "CompOpenCustomUI.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\CompOpenCustomUI.cs",
|
|
||||||
"RelativeDocumentMoniker": "EventSystem\\CompOpenCustomUI.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\CompOpenCustomUI.cs",
|
|
||||||
"RelativeToolTip": "EventSystem\\CompOpenCustomUI.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwAAAAAAAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-31T07:40:45.671Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 4,
|
|
||||||
"Title": "Dialog_CustomDisplay.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\Dialog_CustomDisplay.cs",
|
|
||||||
"RelativeDocumentMoniker": "EventSystem\\Dialog_CustomDisplay.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\Dialog_CustomDisplay.cs",
|
|
||||||
"RelativeToolTip": "EventSystem\\Dialog_CustomDisplay.cs",
|
|
||||||
"ViewState": "AQIAAO8AAAAAAAAAAAAiwAAAAAAAAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-27T10:59:13.84Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 7,
|
|
||||||
"Title": "DebugActions.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\DebugActions.cs",
|
|
||||||
"RelativeDocumentMoniker": "EventSystem\\DebugActions.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\DebugActions.cs",
|
|
||||||
"RelativeToolTip": "EventSystem\\DebugActions.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvxoAAAAAAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-27T10:59:11.817Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 9,
|
|
||||||
"Title": "CustomUIDef.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\CustomUIDef.cs",
|
|
||||||
"RelativeDocumentMoniker": "EventSystem\\CustomUIDef.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\CustomUIDef.cs",
|
|
||||||
"RelativeToolTip": "EventSystem\\CustomUIDef.cs",
|
|
||||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-27T10:59:01.929Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$type": "Document",
|
|
||||||
"DocumentIndex": 5,
|
|
||||||
"Title": "Condition.cs",
|
|
||||||
"DocumentMoniker": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\Condition.cs",
|
|
||||||
"RelativeDocumentMoniker": "EventSystem\\Condition.cs",
|
|
||||||
"ToolTip": "C:\\Steam\\steamapps\\common\\RimWorld\\Mods\\3516260226\\Source\\WulaFallenEmpire\\EventSystem\\Condition.cs",
|
|
||||||
"RelativeToolTip": "EventSystem\\Condition.cs",
|
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwAAAAAAAAAA",
|
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
|
||||||
"WhenOpened": "2025-07-27T10:50:26.799Z"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
244
Source/WulaFallenEmpire/TimedExplosion.cs
Normal file
244
Source/WulaFallenEmpire/TimedExplosion.cs
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using Verse;
|
||||||
|
using Verse.Noise;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class HediffComp_TimedExplosion : HediffComp
|
||||||
|
{
|
||||||
|
// 倒计时相关字段
|
||||||
|
public int ticksToDisappear;
|
||||||
|
public int disappearsAfterTicks;
|
||||||
|
public int seed;
|
||||||
|
|
||||||
|
// 配置属性快捷访问
|
||||||
|
public HediffCompProperties_TimedExplosion Props =>
|
||||||
|
(HediffCompProperties_TimedExplosion)props;
|
||||||
|
|
||||||
|
// 消失判定属性
|
||||||
|
public override bool CompShouldRemove
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ticksToDisappear > 0) return false;
|
||||||
|
if (Props.requiredMentalState != null)
|
||||||
|
{
|
||||||
|
return parent.pawn.MentalStateDef != Props.requiredMentalState;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 进度计算
|
||||||
|
public float Progress =>
|
||||||
|
1f - (float)ticksToDisappear / Mathf.Max(1, disappearsAfterTicks);
|
||||||
|
|
||||||
|
public int EffectiveTicksToDisappear => ticksToDisappear / TicksLostPerTick;
|
||||||
|
|
||||||
|
public float NoisyProgress => AddNoiseToProgress(Progress, seed);
|
||||||
|
|
||||||
|
public virtual int TicksLostPerTick => 1;
|
||||||
|
|
||||||
|
public override string CompLabelInBracketsExtra
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Props.showRemainingTime)
|
||||||
|
{
|
||||||
|
if (EffectiveTicksToDisappear < 2500)
|
||||||
|
{
|
||||||
|
return EffectiveTicksToDisappear.ToStringSecondsFromTicks("F0");
|
||||||
|
}
|
||||||
|
return EffectiveTicksToDisappear.ToStringTicksToPeriod(allowSeconds: true, shortForm: true, canUseDecimals: true, allowYears: true, Props.canUseDecimalsShortForm);
|
||||||
|
}
|
||||||
|
return base.CompLabelInBracketsExtra;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float AddNoiseToProgress(float progress, int seed)
|
||||||
|
{
|
||||||
|
float num = (float)Perlin.GetValue(progress, 0.0, 0.0, 9.0, seed);
|
||||||
|
float num2 = 0.25f * (1f - progress);
|
||||||
|
return Mathf.Clamp01(progress + num2 * num);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
public override void CompPostMake()
|
||||||
|
{
|
||||||
|
base.CompPostMake();
|
||||||
|
disappearsAfterTicks = Props.disappearsAfterTicks.RandomInRange;
|
||||||
|
seed = Rand.Int;
|
||||||
|
ticksToDisappear = disappearsAfterTicks;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 每帧更新
|
||||||
|
public override void CompPostTick(ref float severityAdjustment)
|
||||||
|
{
|
||||||
|
ticksToDisappear--;
|
||||||
|
if (CompShouldRemove)
|
||||||
|
{
|
||||||
|
parent.pawn.health.RemoveHediff(parent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除后处理
|
||||||
|
public override void CompPostPostRemoved()
|
||||||
|
{
|
||||||
|
base.CompPostPostRemoved();
|
||||||
|
|
||||||
|
// 处理新鲜伤口状态
|
||||||
|
if (!Props.leaveFreshWounds && parent.Part != null)
|
||||||
|
{
|
||||||
|
foreach (BodyPartRecord part in parent.Part.GetPartAndAllChildParts())
|
||||||
|
{
|
||||||
|
Hediff_MissingPart hediff = parent.pawn.health.hediffSet.GetMissingPartFor(part) as Hediff_MissingPart;
|
||||||
|
if (hediff != null)
|
||||||
|
{
|
||||||
|
hediff.IsFresh = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 触发爆炸逻辑
|
||||||
|
if (ShouldTriggerExplosion())
|
||||||
|
{
|
||||||
|
TriggerExplosion();
|
||||||
|
DestroyGearIfNeeded();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送消息通知
|
||||||
|
if (!Props.messageOnDisappear.NullOrEmpty() && PawnUtility.ShouldSendNotificationAbout(parent.pawn))
|
||||||
|
{
|
||||||
|
Messages.Message(
|
||||||
|
Props.messageOnDisappear.Formatted(parent.pawn.Named("PAWN")),
|
||||||
|
parent.pawn,
|
||||||
|
MessageTypeDefOf.NeutralEvent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送信件通知
|
||||||
|
if (!Props.letterTextOnDisappear.NullOrEmpty() &&
|
||||||
|
!Props.letterLabelOnDisappear.NullOrEmpty() &&
|
||||||
|
PawnUtility.ShouldSendNotificationAbout(parent.pawn))
|
||||||
|
{
|
||||||
|
Find.LetterStack.ReceiveLetter(
|
||||||
|
Props.letterLabelOnDisappear.Formatted(parent.pawn.Named("PAWN")),
|
||||||
|
Props.letterTextOnDisappear.Formatted(parent.pawn.Named("PAWN")),
|
||||||
|
LetterDefOf.NegativeEvent,
|
||||||
|
parent.pawn
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 爆炸条件检查
|
||||||
|
private bool ShouldTriggerExplosion()
|
||||||
|
{
|
||||||
|
return parent.pawn.Spawned &&
|
||||||
|
Props.explosionRadius > 0.01f &&
|
||||||
|
Props.damageDef != null &&
|
||||||
|
parent.pawn.Map != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行爆炸
|
||||||
|
private void TriggerExplosion()
|
||||||
|
{
|
||||||
|
GenExplosion.DoExplosion(
|
||||||
|
center: parent.pawn.Position,
|
||||||
|
map: parent.pawn.Map,
|
||||||
|
radius: Props.explosionRadius,
|
||||||
|
damType: Props.damageDef,
|
||||||
|
instigator: parent.pawn,
|
||||||
|
damAmount: Props.damageAmount,
|
||||||
|
armorPenetration: Props.armorPenetration,
|
||||||
|
explosionSound: Props.soundDef,
|
||||||
|
weapon: null,
|
||||||
|
projectile: null,
|
||||||
|
intendedTarget: null,
|
||||||
|
postExplosionSpawnThingDef: Props.postExplosionSpawnThingDef,
|
||||||
|
postExplosionSpawnChance: Props.postExplosionSpawnChance,
|
||||||
|
postExplosionSpawnThingCount: Props.postExplosionSpawnThingCount,
|
||||||
|
postExplosionGasType: null,
|
||||||
|
applyDamageToExplosionCellsNeighbors: false,
|
||||||
|
chanceToStartFire: Props.chanceToStartFire,
|
||||||
|
damageFalloff: Props.damageFalloff,
|
||||||
|
direction: null,
|
||||||
|
ignoredThings: new List<Thing> { parent.pawn }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 装备销毁
|
||||||
|
private void DestroyGearIfNeeded()
|
||||||
|
{
|
||||||
|
if (!Props.destroyGear) return;
|
||||||
|
|
||||||
|
if (parent.pawn.equipment != null)
|
||||||
|
{
|
||||||
|
parent.pawn.equipment.DestroyAllEquipment(DestroyMode.Vanish);
|
||||||
|
}
|
||||||
|
if (parent.pawn.apparel != null)
|
||||||
|
{
|
||||||
|
parent.pawn.apparel.DestroyAll(DestroyMode.Vanish);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据持久化
|
||||||
|
public override void CompExposeData()
|
||||||
|
{
|
||||||
|
Scribe_Values.Look(ref ticksToDisappear, "ticksToDisappear", 0);
|
||||||
|
Scribe_Values.Look(ref disappearsAfterTicks, "disappearsAfterTicks", 0);
|
||||||
|
Scribe_Values.Look(ref seed, "seed", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调试信息
|
||||||
|
public override string CompDebugString()
|
||||||
|
{
|
||||||
|
return $"倒计时: {ticksToDisappear}\n爆炸半径: {Props.explosionRadius}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class HediffCompProperties_TimedExplosion : HediffCompProperties
|
||||||
|
{
|
||||||
|
[Header("消失设置")]
|
||||||
|
public IntRange disappearsAfterTicks = new IntRange(600, 1200);
|
||||||
|
public bool showRemainingTime = true;
|
||||||
|
public bool canUseDecimalsShortForm;
|
||||||
|
public MentalStateDef requiredMentalState;
|
||||||
|
public bool leaveFreshWounds = true;
|
||||||
|
|
||||||
|
[Header("爆炸设置")]
|
||||||
|
public float explosionRadius = 3f;
|
||||||
|
public DamageDef damageDef;
|
||||||
|
public int damageAmount = 20;
|
||||||
|
public float armorPenetration;
|
||||||
|
public SoundDef soundDef;
|
||||||
|
public float chanceToStartFire;
|
||||||
|
public bool damageFalloff = true;
|
||||||
|
|
||||||
|
[Header("后续效果")]
|
||||||
|
public bool destroyGear;
|
||||||
|
public GasType gasType;
|
||||||
|
public ThingDef postExplosionSpawnThingDef;
|
||||||
|
public float postExplosionSpawnChance;
|
||||||
|
public int postExplosionSpawnThingCount = 1;
|
||||||
|
|
||||||
|
[Header("通知设置")]
|
||||||
|
[MustTranslate]
|
||||||
|
public string messageOnDisappear;
|
||||||
|
[MustTranslate]
|
||||||
|
public string letterLabelOnDisappear;
|
||||||
|
[MustTranslate]
|
||||||
|
public string letterTextOnDisappear;
|
||||||
|
public bool sendLetterOnDisappearIfDead = true;
|
||||||
|
|
||||||
|
public HediffCompProperties_TimedExplosion()
|
||||||
|
{
|
||||||
|
compClass = typeof(HediffComp_TimedExplosion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
26
Source/WulaFallenEmpire/Verb/ExplosionParameters.cs
Normal file
26
Source/WulaFallenEmpire/Verb/ExplosionParameters.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace ConfigurableHellsphereCannon
|
||||||
|
{
|
||||||
|
public class ExplosionParameters : DefModExtension
|
||||||
|
{
|
||||||
|
public float explosionRadius = 4.9f;
|
||||||
|
public SoundDef explosionSound = null;
|
||||||
|
public ThingDef postExplosionSpawnThingDef = null;
|
||||||
|
public float postExplosionSpawnChance = 0f;
|
||||||
|
public int postExplosionSpawnThingCount = 1;
|
||||||
|
public GasType? postExplosionGasType = null;
|
||||||
|
public bool applyDamageToExplosionCellsNeighbors = false;
|
||||||
|
public ThingDef preExplosionSpawnThingDef = null;
|
||||||
|
public float preExplosionSpawnChance = 0f;
|
||||||
|
public int preExplosionSpawnThingCount = 1;
|
||||||
|
public bool damageFalloff = false;
|
||||||
|
public ThingDef filth = null;
|
||||||
|
public bool doVisualEffects = true;
|
||||||
|
public float screenShakeFactor = 1f;
|
||||||
|
public bool doSoundEffects = true;
|
||||||
|
public bool doHitEffects = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 这个类用于定义可以在XML的 <projectile> 节点中配置的自定义属性。
|
||||||
|
/// </summary>
|
||||||
|
public class ProjectileProperties_ConfigurableHellsphereCannon : ProjectileProperties
|
||||||
|
{
|
||||||
|
// --- 修正部分:添加了 explosionChanceToStartFire ---
|
||||||
|
// 使用 'new' 关键字来隐藏并替换基类的同名字段
|
||||||
|
public new float explosionRadius = 4.9f;
|
||||||
|
public new float explosionChanceToStartFire = 0f; // <--- 新增此行,使其可在XML中配置
|
||||||
|
public new bool applyDamageToExplosionCellsNeighbors = false;
|
||||||
|
public new ThingDef preExplosionSpawnThingDef = null;
|
||||||
|
public new float preExplosionSpawnChance = 0f;
|
||||||
|
public new int preExplosionSpawnThingCount = 1;
|
||||||
|
public new ThingDef postExplosionSpawnThingDef = null;
|
||||||
|
public new float postExplosionSpawnChance = 0f;
|
||||||
|
public new int postExplosionSpawnThingCount = 1;
|
||||||
|
public new GasType? postExplosionGasType = null;
|
||||||
|
public new float screenShakeFactor = 1f;
|
||||||
|
public new ThingDef postExplosionSpawnThingDefWater = null;
|
||||||
|
public new ThingDef postExplosionSpawnSingleThingDef = null;
|
||||||
|
public new ThingDef preExplosionSpawnSingleThingDef = null;
|
||||||
|
|
||||||
|
// 这些是您添加的全新字段,不需要 'new' 关键字
|
||||||
|
public SoundDef explosionSound = null;
|
||||||
|
public bool damageFalloff = false;
|
||||||
|
public bool doVisualEffects = true;
|
||||||
|
public bool doSoundEffects = true;
|
||||||
|
public float? postExplosionGasRadiusOverride = null;
|
||||||
|
public int postExplosionGasAmount = 255;
|
||||||
|
public float? direction = null;
|
||||||
|
public FloatRange? affectedAngle = null;
|
||||||
|
public float excludeRadius = 0f;
|
||||||
|
public SimpleCurve flammabilityChanceCurve = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 这是投射物的核心逻辑类,由XML中的 <thingClass> 指定。
|
||||||
|
/// </summary>
|
||||||
|
public class Projectile_ConfigurableHellsphereCannon : Projectile
|
||||||
|
{
|
||||||
|
public ProjectileProperties_ConfigurableHellsphereCannon Props => (ProjectileProperties_ConfigurableHellsphereCannon)def.projectile;
|
||||||
|
|
||||||
|
protected override void Impact(Thing hitThing, bool blockedByShield = false)
|
||||||
|
{
|
||||||
|
Map map = base.Map;
|
||||||
|
base.Impact(hitThing, blockedByShield);
|
||||||
|
|
||||||
|
GenExplosion.DoExplosion(
|
||||||
|
center: base.Position,
|
||||||
|
map: map,
|
||||||
|
radius: Props.explosionRadius,
|
||||||
|
damType: base.DamageDef,
|
||||||
|
instigator: launcher,
|
||||||
|
damAmount: DamageAmount,
|
||||||
|
armorPenetration: ArmorPenetration,
|
||||||
|
explosionSound: Props.explosionSound,
|
||||||
|
weapon: equipmentDef,
|
||||||
|
projectile: def,
|
||||||
|
intendedTarget: intendedTarget.Thing,
|
||||||
|
postExplosionSpawnThingDef: Props.postExplosionSpawnThingDef,
|
||||||
|
postExplosionSpawnChance: Props.postExplosionSpawnChance,
|
||||||
|
postExplosionSpawnThingCount: Props.postExplosionSpawnThingCount,
|
||||||
|
postExplosionGasType: Props.postExplosionGasType,
|
||||||
|
postExplosionGasRadiusOverride: Props.postExplosionGasRadiusOverride,
|
||||||
|
postExplosionGasAmount: Props.postExplosionGasAmount,
|
||||||
|
applyDamageToExplosionCellsNeighbors: Props.applyDamageToExplosionCellsNeighbors,
|
||||||
|
preExplosionSpawnThingDef: Props.preExplosionSpawnThingDef,
|
||||||
|
preExplosionSpawnChance: Props.preExplosionSpawnChance,
|
||||||
|
preExplosionSpawnThingCount: Props.preExplosionSpawnThingCount,
|
||||||
|
// --- 修正部分:使用了正确的字段 ---
|
||||||
|
chanceToStartFire: Props.explosionChanceToStartFire, // <--- 修正了此行
|
||||||
|
damageFalloff: Props.damageFalloff,
|
||||||
|
direction: Props.direction,
|
||||||
|
affectedAngle: Props.affectedAngle,
|
||||||
|
doVisualEffects: Props.doVisualEffects,
|
||||||
|
propagationSpeed: base.DamageDef.expolosionPropagationSpeed,
|
||||||
|
excludeRadius: Props.excludeRadius,
|
||||||
|
doSoundEffects: Props.doSoundEffects,
|
||||||
|
postExplosionSpawnThingDefWater: Props.postExplosionSpawnThingDefWater,
|
||||||
|
screenShakeFactor: Props.screenShakeFactor,
|
||||||
|
flammabilityChanceCurve: Props.flammabilityChanceCurve,
|
||||||
|
postExplosionSpawnSingleThingDef: Props.postExplosionSpawnSingleThingDef,
|
||||||
|
preExplosionSpawnSingleThingDef: Props.preExplosionSpawnSingleThingDef
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -116,6 +116,8 @@
|
|||||||
<Compile Include="EventSystem\Letter_EventChoice.cs" />
|
<Compile Include="EventSystem\Letter_EventChoice.cs" />
|
||||||
<Compile Include="Verb\ProperShotgun.cs" />
|
<Compile Include="Verb\ProperShotgun.cs" />
|
||||||
<Compile Include="Verb\Trackingbullet.cs" />
|
<Compile Include="Verb\Trackingbullet.cs" />
|
||||||
|
<Compile Include="Verb\Projectile_ConfigurableHellsphereCannon.cs" />
|
||||||
|
<Compile Include="TimedExplosion.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user