From e1477593a6cded5937e887fcc91c8a0b09ee75b9 Mon Sep 17 00:00:00 2001 From: "ProjectKoi-Kalo\\Kalo" Date: Wed, 27 Aug 2025 18:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=982?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Weapons/WULA_Ionic_Weapons.xml | 94 +- MCP/vector_cache/knowledge_cache.json | 2068 +++++++++++++++++ .../VerbProperties_Wula_IonicBeam.cs | 14 + .../Verb_Wula_BreachingBeam.cs | 78 +- .../Verb_Wula_SustainedBeam.cs | 82 +- Source/WulaFallenEmpire/WulaBeamUtility.cs | 4 +- .../WulaFallenEmpire/WulaFallenEmpire.csproj | 9 +- 7 files changed, 2258 insertions(+), 91 deletions(-) diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Ionic_Weapons.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Ionic_Weapons.xml index a3f8369e..58d5dfe9 100644 --- a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Ionic_Weapons.xml +++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Ionic_Weapons.xml @@ -3,13 +3,12 @@ @@ -31,12 +30,12 @@ - + WULA_Weapon_BreachingBeamGun - 发射一道高能离子束,能够烧穿路径上的多个目标,直到能量耗尽。单发威力巨大,但射速较慢。 + 发射一道高能离子束,能够烧穿路径上的多个目标,直到能量耗尽。光束路径上会周期性地引发小规模湮灭反应。
  • WulaFallenEmpire.Verb_Wula_BreachingBeam @@ -46,40 +45,40 @@ 2.5 40 1 - Shot_ChargeLance + BeamGraser_Shooting - 30000 + 300 0.95 - 45 - - + 45 - - Mote_ChargeLanceBeam - ChargeLance_Explosion - Shot_ChargeLance_Sustainer - 12 + + true + 10 + Wula_Dark_Matter + 0.1 - - 3 - Beam - true + + 10 + BlastFlame + Explosion_Flame - - 0.2 - 0.2 - 0.3~0.5 + + BeamGraser_Shooting + 12 + 3 + Mote_GraserBeamBase + GraserBeam_End
  • - + WULA_Weapon_SustainedBeamGun - 投射一道持续存在的离子场,对作用范围内的所有敌人进行周期性灼烧。适合用于区域压制和清理大量轻甲目标。 + 投射一道持续存在的离子场,对作用范围内的所有敌人进行周期性灼烧,并引发连续的能量爆炸。
  • WulaFallenEmpire.Verb_Wula_SustainedBeam @@ -90,40 +89,27 @@ 30 - 20 + 15 15 - 240 + 240 0.5 - + + true + 25 + Wula_Dark_Matter_Flame + + + 10 + BlastFlame + Explosion_Flame - - Mote_GraserBeamBase - GraserBeam_End + BeamGraser_Shooting 9 - - - 3 - Flame - true - - - 0.1 - 0.1 - 0.4~0.6 - - - Fleck_Longspark - 0.5 - Fleck_BeamSpark - - -
  • (0, 0)
  • -
  • (0.5, 0.5)
  • -
  • (1, 0)
  • - - + 3 + Mote_GraserBeamBase + GraserBeam_End
    diff --git a/MCP/vector_cache/knowledge_cache.json b/MCP/vector_cache/knowledge_cache.json index 660b291d..d23da2d5 100644 --- a/MCP/vector_cache/knowledge_cache.json +++ b/MCP/vector_cache/knowledge_cache.json @@ -27939,5 +27939,2073 @@ ], "result": "--- 结果 1 (相似度: 1.000) ---\n文件路径: C:\\Steam\\steamapps\\common\\RimWorld\\Data\\dll1.6\\Verse\\Verb_ShootBeam.txt\n\npublic class Verb_ShootBeam : Verb\n{\n\tprivate List path = new List();\n\n\tprivate List tmpPath = new List();\n\n\tprivate int ticksToNextPathStep;\n\n\tprivate Vector3 initialTargetPosition;\n\n\tprivate MoteDualAttached mote;\n\n\tprivate Effecter endEffecter;\n\n\tprivate Sustainer sustainer;\n\n\tprivate HashSet pathCells = new HashSet();\n\n\tprivate HashSet tmpPathCells = new HashSet();\n\n\tprivate HashSet tmpHighlightCells = new HashSet();\n\n\tprivate HashSet tmpSecondaryHighlightCells = new HashSet();\n\n\tprivate HashSet hitCells = new HashSet();\n\n\tprivate const int NumSubdivisionsPerUnitLength = 1;\n\n\tprotected override int ShotsPerBurst => base.BurstShotCount;\n\n\tpublic float ShotProgress => (float)ticksToNextPathStep / (float)base.TicksBetweenBurstShots;\n\n\tpublic Vector3 InterpolatedPosition\n\t{\n\t\tget\n\t\t{\n\t\t\tVector3 vector = base.CurrentTarget.CenterVector3 - initialTargetPosition;\n\t\t\treturn Vector3.Lerp(path[burstShotsLeft], path[Mathf.Min(burstShotsLeft + 1, path.Count - 1)], ShotProgress) + vector;\n\t\t}\n\t}\n\n\tpublic override float? AimAngleOverride\n\t{\n\t\tget\n\t\t{\n\t\t\tif (state != VerbState.Bursting)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn (InterpolatedPosition - caster.DrawPos).AngleFlat();\n\t\t}\n\t}\n\n\tpublic override void DrawHighlight(LocalTargetInfo target)\n\t{\n\t\tbase.DrawHighlight(target);\n\t\tCalculatePath(target.CenterVector3, tmpPath, tmpPathCells, addRandomOffset: false);\n\t\tforeach (IntVec3 tmpPathCell in tmpPathCells)\n\t\t{\n\t\t\tShootLine resultingLine;\n\t\t\tbool flag = TryFindShootLineFromTo(caster.Position, target, out resultingLine);\n\t\t\tif ((verbProps.stopBurstWithoutLos && !flag) || !TryGetHitCell(resultingLine.Source, tmpPathCell, out var hitCell))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttmpHighlightCells.Add(hitCell);\n\t\t\tif (!verbProps.beamHitsNeighborCells)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach (IntVec3 beamHitNeighbourCell in GetBeamHitNeighbourCells(resultingLine.Source, hitCell))\n\t\t\t{\n\t\t\t\tif (!tmpHighlightCells.Contains(beamHitNeighbourCell))\n\t\t\t\t{\n\t\t\t\t\ttmpSecondaryHighlightCells.Add(beamHitNeighbourCell);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttmpSecondaryHighlightCells.RemoveWhere((IntVec3 x) => tmpHighlightCells.Contains(x));\n\t\tif (tmpHighlightCells.Any())\n\t\t{\n\t\t\tGenDraw.DrawFieldEdges(tmpHighlightCells.ToList(), verbProps.highlightColor ?? Color.white);\n\t\t}\n\t\tif (tmpSecondaryHighlightCells.Any())\n\t\t{\n\t\t\tGenDraw.DrawFieldEdges(tmpSecondaryHighlightCells.ToList(), verbProps.secondaryHighlightColor ?? Color.white);\n\t\t}\n\t\ttmpHighlightCells.Clear();\n\t\ttmpSecondaryHighlightCells.Clear();\n\t}\n\n\tprotected override bool TryCastShot()\n\t{\n\t\tif (currentTarget.HasThing && currentTarget.Thing.Map != caster.Map)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tShootLine resultingLine;\n\t\tbool flag = TryFindShootLineFromTo(caster.Position, currentTarget, out resultingLine);\n\t\tif (verbProps.stopBurstWithoutLos && !flag)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (base.EquipmentSource != null)\n\t\t{\n\t\t\tbase.EquipmentSource.GetComp()?.Notify_ProjectileLaunched();\n\t\t\tbase.EquipmentSource.GetComp()?.UsedOnce();\n\t\t}\n\t\tlastShotTick = Find.TickManager.TicksGame;\n\t\tticksToNextPathStep = base.TicksBetweenBurstShots;\n\t\tIntVec3 targetCell = InterpolatedPosition.Yto0().ToIntVec3();\n\t\tif (!TryGetHitCell(resultingLine.Source, targetCell, out var hitCell))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tHitCell(hitCell, resultingLine.Source);\n\t\tif (verbProps.beamHitsNeighborCells)\n\t\t{\n\t\t\thitCells.Add(hitCell);\n\t\t\tforeach (IntVec3 beamHitNeighbourCell in GetBeamHitNeighbourCells(resultingLine.Source, hitCell))\n\t\t\t{\n\t\t\t\tif (!hitCells.Contains(beamHitNeighbourCell))\n\t\t\t\t{\n\t\t\t\t\tfloat damageFactor = (pathCells.Contains(beamHitNeighbourCell) ? 1f : 0.5f);\n\t\t\t\t\tHitCell(beamHitNeighbourCell, resultingLine.Source, damageFactor);\n\t\t\t\t\thitCells.Add(beamHitNeighbourCell);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected bool TryGetHitCell(IntVec3 source, IntVec3 targetCell, out IntVec3 hitCell)\n\t{\n\t\tIntVec3 intVec = GenSight.LastPointOnLineOfSight(source, targetCell, (IntVec3 c) => c.InBounds(caster.Map) && c.CanBeSeenOverFast(caster.Map), skipFirstCell: true);\n\t\tif (verbProps.beamCantHitWithinMinRange && intVec.DistanceTo(source) < verbProps.minRange)\n\t\t{\n\t\t\thitCell = default(IntVec3);\n\t\t\treturn false;\n\t\t}\n\t\thitCell = (intVec.IsValid ? intVec : targetCell);\n\t\treturn intVec.IsValid;\n\t}\n\n\tprotected IntVec3 GetHitCell(IntVec3 source, IntVec3 targetCell)\n\t{\n\t\tTryGetHitCell(source, targetCell, out var hitCell);\n\t\treturn hitCell;\n\t}\n\n\tprotected IEnumerable GetBeamHitNeighbourCells(IntVec3 source, IntVec3 pos)\n\t{\n\t\tif (!verbProps.beamHitsNeighborCells)\n\t\t{\n\t\t\tyield break;\n\t\t}\n\t\tfor (int i = 0; i < 4; i++)\n\t\t{\n\t\t\tIntVec3 intVec = pos + GenAdj.CardinalDirections[i];\n\t\t\tif (intVec.InBounds(Caster.Map) && (!verbProps.beamHitsNeighborCellsRequiresLOS || GenSight.LineOfSight(source, intVec, caster.Map)))\n\t\t\t{\n\t\t\t\tyield return intVec;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic override bool TryStartCastOn(LocalTargetInfo castTarg, LocalTargetInfo destTarg, bool surpriseAttack = false, bool canHitNonTargetPawns = true, bool preventFriendlyFire = false, bool nonInterruptingSelfCast = false)\n\t{\n\t\treturn base.TryStartCastOn(verbProps.beamTargetsGround ? ((LocalTargetInfo)castTarg.Cell) : castTarg, destTarg, surpriseAttack, canHitNonTargetPawns, preventFriendlyFire, nonInterruptingSelfCast);\n\t}\n\n\tpublic override void BurstingTick()\n\t{\n\t\tticksToNextPathStep--;\n\t\tVector3 vector = InterpolatedPosition;\n\t\tIntVec3 intVec = vector.ToIntVec3();\n\t\tVector3 vector2 = InterpolatedPosition - caster.Position.ToVector3Shifted();\n\t\tfloat num = vector2.MagnitudeHorizontal();\n\t\tVector3 normalized = vector2.Yto0().normalized;\n\t\tIntVec3 intVec2 = GenSight.LastPointOnLineOfSight(caster.Position, intVec, (IntVec3 c) => c.CanBeSeenOverFast(caster.Map), skipFirstCell: true);\n\t\tif (intVec2.IsValid)\n\t\t{\n\t\t\tnum -= (intVec - intVec2).LengthHorizontal;\n\t\t\tvector = caster.Position.ToVector3Shifted() + normalized * num;\n\t\t\tintVec = vector.ToIntVec3();\n\t\t}\n\t\tVector3 offsetA = normalized * verbProps.beamStartOffset;\n\t\tVector3 vector3 = vector - intVec.ToVector3Shifted();\n\t\tif (mote != null)\n\t\t{\n\t\t\tmote.UpdateTargets(new TargetInfo(caster.Position, caster.Map), new TargetInfo(intVec, caster.Map), offsetA, vector3);\n\t\t\tmote.Maintain();\n\t\t}\n\t\tif (verbProps.beamGroundFleckDef != null && Rand.Chance(verbProps.beamFleckChancePerTick))\n\t\t{\n\t\t\tFleckMaker.Static(vector, caster.Map, verbProps.beamGroundFleckDef);\n\t\t}\n\t\tif (endEffecter == null && verbProps.beamEndEffecterDef != null)\n\t\t{\n\t\t\tendEffecter = verbProps.beamEndEffecterDef.Spawn(intVec, caster.Map, vector3);\n\t\t}\n\t\tif (endEffecter != null)\n\t\t{\n\t\t\tendEffecter.offset = vector3;\n\t\t\tendEffecter.EffectTick(new TargetInfo(intVec, caster.Map), TargetInfo.Invalid);\n\t\t\tendEffecter.ticksLeft--;\n\t\t}\n\t\tif (verbProps.beamLineFleckDef != null)\n\t\t{\n\t\t\tfloat num2 = 1f * num;\n\t\t\tfor (int i = 0; (float)i < num2; i++)\n\t\t\t{\n\t\t\t\tif (Rand.Chance(verbProps.beamLineFleckChanceCurve.Evaluate((float)i / num2)))\n\t\t\t\t{\n\t\t\t\t\tVector3 vector4 = i * normalized - normalized * Rand.Value + normalized / 2f;\n\t\t\t\t\tFleckMaker.Static(caster.Position.ToVector3Shifted() + vector4, caster.Map, verbProps.beamLineFleckDef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsustainer?.Maintain();\n\t}\n\n\tpublic override void WarmupComplete()\n\t{\n\t\tburstShotsLeft = ShotsPerBurst;\n\t\tstate = VerbState.Bursting;\n\t\tinitialTargetPosition = currentTarget.CenterVector3;\n\t\tCalculatePath(currentTarget.CenterVector3, path, pathCells);\n\t\thitCells.Clear();\n\t\tif (verbProps.beamMoteDef != null)\n\t\t{\n\t\t\tmote = MoteMaker.MakeInteractionOverlay(verbProps.beamMoteDef, caster, new TargetInfo(path[0].ToIntVec3(), caster.Map));\n\t\t}\n\t\tTryCastNextBurstShot();\n\t\tticksToNextPathStep = base.TicksBetweenBurstShots;\n\t\tendEffecter?.Cleanup();\n\t\tif (verbProps.soundCastBeam != null)\n\t\t{\n\t\t\tsustainer = verbProps.soundCastBeam.TrySpawnSustainer(SoundInfo.InMap(caster, MaintenanceType.PerTick));\n\t\t}\n\t}\n\n\tprivate void CalculatePath(Vector3 target, List pathList, HashSet pathCellsList, bool addRandomOffset = true)\n\t{\n\t\tpathList.Clear();\n\t\tVector3 vector = (target - caster.Position.ToVector3Shifted()).Yto0();\n\t\tfloat magnitude = vector.magnitude;\n\t\tVector3 normalized = vector.normalized;\n\t\tVector3 vector2 = normalized.RotatedBy(-90f);\n\t\tfloat num = ((verbProps.beamFullWidthRange > 0f) ? Mathf.Min(magnitude / verbProps.beamFullWidthRange, 1f) : 1f);\n\t\tfloat num2 = (verbProps.beamWidth + 1f) * num / (float)ShotsPerBurst;\n\t\tVector3 vector3 = target.Yto0() - vector2 * verbProps.beamWidth / 2f * num;\n\t\tpathList.Add(vector3);\n\t\tfor (int i = 0; i < ShotsPerBurst; i++)\n\t\t{\n\t\t\tVector3 vector4 = normalized * (Rand.Value * verbProps.beamMaxDeviation) - normalized / 2f;\n\t\t\tVector3 vector5 = Mathf.Sin(((float)i / (float)ShotsPerBurst + 0.5f) * MathF.PI * 57.29578f) * verbProps.beamCurvature * -normalized - normalized * verbProps.beamMaxDeviation / 2f;\n\t\t\tif (addRandomOffset)\n\t\t\t{\n\t\t\t\tpathList.Add(vector3 + (vector4 + vector5) * num);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpathList.Add(vector3 + vector5 * num);\n\t\t\t}\n\t\t\tvector3 += vector2 * num2;\n\t\t}\n\t\tpathCellsList.Clear();\n\t\tforeach (Vector3 path in pathList)\n\t\t{\n\t\t\tpathCellsList.Add(path.ToIntVec3());\n\t\t}\n\t}\n\n\tprivate bool CanHit(Thing thing)\n\t{\n\t\tif (!thing.Spawned)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn !CoverUtility.ThingCovered(thing, caster.Map);\n\t}\n\n\tprivate void HitCell(IntVec3 cell, IntVec3 sourceCell, float damageFactor = 1f)\n\t{\n\t\tif (cell.InBounds(caster.Map))\n\t\t{\n\t\t\tApplyDamage(VerbUtility.ThingsToHit(cell, caster.Map, CanHit).RandomElementWithFallback(), sourceCell, damageFactor);\n\t\t\tif (verbProps.beamSetsGroundOnFire && Rand.Chance(verbProps.beamChanceToStartFire))\n\t\t\t{\n\t\t\t\tFireUtility.TryStartFireIn(cell, caster.Map, 1f, caster);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void ApplyDamage(Thing thing, IntVec3 sourceCell, float damageFactor = 1f)\n\t{\n\t\tIntVec3 intVec = InterpolatedPosition.Yto0().ToIntVec3();\n\t\tIntVec3 intVec2 = GenSight.LastPointOnLineOfSight(sourceCell, intVec, (IntVec3 c) => c.InBounds(caster.Map) && c.CanBeSeenOverFast(caster.Map), skipFirstCell: true);\n\t\tif (intVec2.IsValid)\n\t\t{\n\t\t\tintVec = intVec2;\n\t\t}\n\t\tMap map = caster.Map;\n\t\tif (thing == null || verbProps.beamDamageDef == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tfloat angleFlat = (currentTarget.Cell - caster.Position).AngleFlat;\n\t\tBattleLogEntry_RangedImpact log = new BattleLogEntry_RangedImpact(caster, thing, currentTarget.Thing, base.EquipmentSource.def, null, null);\n\t\tDamageInfo dinfo;\n\t\tif (verbProps.beamTotalDamage > 0f)\n\t\t{\n\t\t\tfloat num = verbProps.beamTotalDamage / (float)pathCells.Count;\n\t\t\tnum *= damageFactor;\n\t\t\tdinfo = new DamageInfo(verbProps.beamDamageDef, num, verbProps.beamDamageDef.defaultArmorPenetration, angleFlat, caster, null, base.EquipmentSource.def, DamageInfo.SourceCategory.ThingOrUnknown, currentTarget.Thing);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfloat amount = (float)verbProps.beamDamageDef.defaultDamage * damageFactor;\n\t\t\tdinfo = new DamageInfo(verbProps.beamDamageDef, amount, verbProps.beamDamageDef.defaultArmorPenetration, angleFlat, caster, null, base.EquipmentSource.def, DamageInfo.SourceCategory.ThingOrUnknown, currentTarget.Thing);\n\t\t}\n\t\tthing.TakeDamage(dinfo).AssociateWithLog(log);\n\t\tif (thing.CanEverAttachFire())\n\t\t{\n\t\t\tfloat chance = ((verbProps.flammabilityAttachFireChanceCurve == null) ? verbProps.beamChanceToAttachFire : verbProps.flammabilityAttachFireChanceCurve.Evaluate(thing.GetStatValue(StatDefOf.Flammability)));\n\t\t\tif (Rand.Chance(chance))\n\t\t\t{\n\t\t\t\tthing.TryAttachFire(verbProps.beamFireSizeRange.RandomInRange, caster);\n\t\t\t}\n\t\t}\n\t\telse if (Rand.Chance(verbProps.beamChanceToStartFire))\n\t\t{\n\t\t\tFireUtility.TryStartFireIn(intVec, map, verbProps.beamFireSizeRange.RandomInRange, caster, verbProps.flammabilityAttachFireChanceCurve);\n\t\t}\n\t}\n\n\tpublic override void ExposeData()\n\t{\n\t\tbase.ExposeData();\n\t\tScribe_Collections.Look(ref path, \"path\", LookMode.Value);\n\t\tScribe_Values.Look(ref ticksToNextPathStep, \"ticksToNextPathStep\", 0);\n\t\tScribe_Values.Look(ref initialTargetPosition, \"initialTargetPosition\");\n\t\tif (Scribe.mode == LoadSaveMode.PostLoadInit && path == null)\n\t\t{\n\t\t\tpath = new List();\n\t\t}\n\t}\n}\n\n", "timestamp": "2025-08-27 17:00:53,942" + }, + "GenSight": { + "keywords": [ + "GenSight" + ], + "question": "GenSight class methods", + "embedding": [ + -0.023507792502641678, + 0.05879486724734306, + -0.011576191522181034, + -0.00473456084728241, + 0.03486396744847298, + 0.044950827956199646, + 0.019141335040330887, + 0.036082517355680466, + 0.07805467396974564, + 0.09321881085634232, + -0.014004822820425034, + -0.009909152053296566, + -0.01122924406081438, + 0.0034462017938494682, + 0.021561503410339355, + 0.03317154198884964, + -0.0030844458378851414, + -0.08665219694375992, + 0.02088453248143196, + -0.03689488023519516, + -0.006697774864733219, + 0.02051219902932644, + 0.020292183384299278, + -0.015299527905881405, + 0.03330693766474724, + 0.003209262154996395, + -0.010137629695236683, + 0.036150213330984116, + 0.007095494773238897, + -0.01837974227964878, + 0.05270213633775711, + -0.02931281365454197, + 0.05310831964015961, + -0.02052912302315235, + 0.004747253842651844, + 0.034931667149066925, + -0.0004881590430159122, + 0.01765199936926365, + 0.0016575193731114268, + -0.04979116469621658, + -0.060453444719314575, + -0.0028348129708319902, + -0.019107485190033913, + 0.04102439805865288, + 0.013827118091285229, + 0.019039789214730263, + -0.05097586289048195, + -0.07094648480415344, + -0.04664325341582298, + 0.024150915443897247, + 0.016399605199694633, + -0.00013499738997779787, + 0.045797038823366165, + -0.027197280898690224, + 0.006236588582396507, + 0.008000942878425121, + 0.010391493327915668, + -0.014969505369663239, + 0.0017548338510096073, + 0.034000832587480545, + 0.04376612976193428, + -0.0016829058295115829, + 0.012024684809148312, + -0.03469472751021385, + 0.050366587936878204, + 0.01476641371846199, + -0.006075808312743902, + 0.00602503539994359, + 0.020258335396647453, + -0.04664325341582298, + -0.01229547243565321, + 0.0007689959020353854, + 0.04390152171254158, + 0.008534056134521961, + 0.037368759512901306, + 0.045661646872758865, + -0.014715641736984253, + -0.04346149042248726, + -0.02966822311282158, + -0.0016977145569399, + -0.019462894648313522, + -0.0477602519094944, + -0.015214907005429268, + -0.014504088088870049, + -0.015773408114910126, + 0.01736428774893284, + -0.0050688148476183414, + -0.09673905372619629, + -0.013183996081352234, + 0.06410908699035645, + 0.0004878946056123823, + -0.007620146498084068, + 0.013107837177813053, + -0.03591327369213104, + 0.029431283473968506, + -0.01107692625373602, + -0.04593243449926376, + 0.003937005065381527, + -0.019124411046504974, + 0.003420815337449312, + -0.02086760848760605, + -0.005635777488350868, + -0.017685849219560623, + 0.04786179959774017, + 0.01720350794494152, + 0.0015496272826567292, + -0.08685528486967087, + -0.0071039567701518536, + -0.018142802640795708, + 0.007374744862318039, + -0.004006817936897278, + -0.04539085552096367, + -0.022763125598430634, + 0.027840401977300644, + -0.005441148765385151, + 0.013167072087526321, + -0.009062939323484898, + 0.05290522798895836, + 0.00914756115525961, + 0.021646125242114067, + -0.00886831060051918, + 0.030988315120339394, + -0.03716566786170006, + -0.021646125242114067, + 0.004133749753236771, + 0.026723401620984077, + 0.018819773569703102, + 0.042446035891771317, + -0.06641078740358353, + -0.028331205248832703, + -0.005838868673890829, + 0.0016966568073257804, + -0.0032959990203380585, + -0.02294929325580597, + 0.008335196413099766, + -0.004429924301803112, + 0.023050837218761444, + -0.01169466134160757, + -0.04061821848154068, + -0.011271554976701736, + -0.05046813562512398, + -0.005085739307105541, + -0.03909503296017647, + 0.004840337671339512, + -0.012177002616226673, + -0.007425517775118351, + -0.0007901512435637414, + 0.00681201322004199, + 0.00681201322004199, + -0.0064777592197060585, + -0.027112659066915512, + -0.021866140887141228, + -0.025792567059397697, + 0.06590306013822556, + 0.01487642154097557, + -0.04163367301225662, + 0.0003506494394969195, + -0.01793971285223961, + 0.0347624234855175, + -0.0576101690530777, + -0.004853030666708946, + -0.009629902429878712, + 0.011356176808476448, + 0.025792567059397697, + -0.035710182040929794, + -0.014419467188417912, + -0.024912506341934204, + -0.052735984325408936, + -0.027569614350795746, + -0.012363169342279434, + -0.015731096267700195, + -0.007484752684831619, + -0.006122349761426449, + -0.11955294758081436, + 0.038147274404764175, + -6.12760550211533e-06, + -0.006376213859766722, + 0.04478158429265022, + 0.020359881222248077, + -0.02751884236931801, + 0.028432751074433327, + 0.027552690356969833, + 0.014783338643610477, + -0.04583088681101799, + -0.0011709469836205244, + -0.05764402076601982, + 0.00900370441377163, + 0.00752283213660121, + 0.015223369002342224, + 0.011178472079336643, + 0.030988315120339394, + -0.04603397846221924, + -0.0011751780984923244, + 0.0049122655764222145, + -0.06065653637051582, + -0.037368759512901306, + -0.024540172889828682, + -0.02137533575296402, + 0.06630923599004745, + -0.07798697799444199, + -0.015197983011603355, + -0.002619028789922595, + -0.014131754636764526, + -0.021713821217417717, + 0.011203858070075512, + -0.0005201564636081457, + 0.009291416965425014, + -0.04972346872091293, + 0.016501151025295258, + 0.0021091855596750975, + 0.004068168345838785, + -0.0069177900440990925, + -0.004713405389338732, + -0.0510435588657856, + -0.011085388250648975, + -0.019564440473914146, + -0.03469472751021385, + -0.018244348466396332, + 0.019276728853583336, + 0.04227679222822189, + -0.03587942570447922, + 0.03594712167978287, + -0.020055243745446205, + 0.04985886067152023, + 0.019090561196208, + 0.013319389894604683, + 0.028872782364487648, + -0.012735503725707531, + 0.042716823518276215, + 0.03445778787136078, + -0.02680802345275879, + 0.03418700024485588, + -0.03709797188639641, + 0.025200217962265015, + 0.04383382573723793, + -0.04569549486041069, + -0.008952931500971317, + -0.028348131105303764, + -0.02259388379752636, + 0.014918732456862926, + -0.02215385250747204, + 0.02924511581659317, + -0.023270852863788605, + 0.01322630699723959, + -0.0051449742168188095, + -0.027501918375492096, + -0.027637312188744545, + -0.004527238663285971, + 0.0143686942756176, + -0.02888970635831356, + 0.03516860678792, + 0.03520245477557182, + 0.0029321275651454926, + -0.0038629616610705853, + 0.056594714522361755, + -0.009376038797199726, + -0.047658707946538925, + 0.035507090389728546, + 0.014250224456191063, + 0.010112243704497814, + -0.040144339203834534, + 0.003932774066925049, + -0.004874186124652624, + 0.0773100033402443, + -0.021358411759138107, + -0.03760569915175438, + 0.011136161163449287, + 0.02760346233844757, + -0.04366458207368851, + -0.06106271967291832, + -0.001601457828655839, + 0.04352919012308121, + 0.03601481765508652, + -0.0009165543015114963, + -0.015113361179828644, + -0.0043368409387767315, + -0.011593116447329521, + -0.008732916787266731, + 0.003249457338824868, + -0.03960276022553444, + 0.0063212099485099316, + 0.015849566087126732, + -0.00523805757984519, + 0.014385618269443512, + -0.011643888428807259, + 0.07270660996437073, + 0.02853429690003395, + 0.03926427662372589, + 0.006604691501706839, + 0.02430323325097561, + 0.014698716811835766, + 0.07446672767400742, + -0.0287373885512352, + 0.023473944514989853, + -0.004764178302139044, + 0.04427385702729225, + 0.002798849018290639, + 0.02660493180155754, + -0.0050688148476183414, + -0.007899397052824497, + -0.006947407498955727, + -0.015959573909640312, + -0.010163016617298126, + 0.03320539370179176, + -0.011212320066988468, + -0.018176652491092682, + -0.0018680148059502244, + -0.1900932490825653, + 0.017076576128602028, + -0.09761911630630493, + 0.040279731154441833, + -0.005999648943543434, + 0.028940480202436447, + -0.02245848812162876, + 0.011474646627902985, + 0.015849566087126732, + -0.05876101925969124, + -0.007793620228767395, + -0.017685849219560623, + -0.016306521371006966, + -0.029905162751674652, + -0.02824658527970314, + 0.030852921307086945, + 0.01104307733476162, + 0.002221308648586273, + -0.019259804859757423, + -0.0032938835211098194, + 0.0151218231767416, + -0.016069581732153893, + 0.022695427760481834, + -0.0007584182894788682, + 0.014774876646697521, + -0.005986955948174, + 0.02496327832341194, + -0.08435049653053284, + 0.04769255593419075, + 0.010636895895004272, + 0.011576191522181034, + 0.0014808725100010633, + 0.0003919023147318512, + -0.013674799352884293, + 0.058084048330783844, + 0.03767339512705803, + -0.0302436463534832, + -0.01627267338335514, + 0.014174065552651882, + -0.0015062588499858975, + 0.04999425634741783, + 0.05046813562512398, + 0.002413822105154395, + 0.0006261974922381341, + 0.004878417123109102, + 0.017127348110079765, + 0.03361157327890396, + 0.0039708539843559265, + -0.03899348899722099, + 0.025014052167534828, + 0.020833760499954224, + -0.022780049592256546, + -0.019073637202382088, + -0.0042627970688045025, + -0.005779633764177561, + -0.010789213702082634, + 0.09822838753461838, + 0.022204624488949776, + 0.018904395401477814, + -0.034576255828142166, + 0.04220909625291824, + -0.04654170572757721, + 0.02944820746779442, + 0.005830406676977873, + -0.028872782364487648, + -0.00925756897777319, + 0.020427579060196877, + -0.02773885801434517, + 0.0602165050804615, + -0.022204624488949776, + -0.04017818719148636, + 0.011855442076921463, + 0.02430323325097561, + 0.09436965733766556, + 0.04356303811073303, + -0.03274843841791153, + -0.020072169601917267, + 0.017169658094644547, + -0.01311629917472601, + -0.006617384497076273, + -0.03212223947048187, + 0.030920617282390594, + -0.04410461336374283, + 0.03466087952256203, + 0.008652525953948498, + -0.019547516480088234, + 0.006287361495196819, + -0.02338932268321514, + 0.019276728853583336, + -0.01139848679304123, + 0.028618918731808662, + 0.009528356604278088, + 0.008500208146870136, + -0.013708648271858692, + -5.860684905201197e-05, + -0.02332162670791149, + -0.01665346883237362, + 0.0008076044032350183, + -0.043292250484228134, + -0.0206645168364048, + -0.05124665051698685, + -0.015908801928162575, + 0.003137334017083049, + -0.0600811131298542, + 0.014317921362817287, + 0.05138204246759415, + 0.0022826590575277805, + 0.028263509273529053, + -0.016331907361745834, + -0.001806664397008717, + -0.004309338983148336, + -0.0009398251422680914, + 0.020359881222248077, + -0.01365787535905838, + 0.06468451023101807, + -0.04285221919417381, + 0.031648360192775726, + -0.011779283173382282, + 0.009096788242459297, + 0.009054477326571941, + 0.026503385975956917, + -0.003414468839764595, + 0.021764595061540604, + 0.00929987896233797, + -0.009316803887486458, + -0.03068367764353752, + 0.012287010438740253, + -0.06204432621598244, + -0.005508845672011375, + -0.006676619406789541, + 0.018261272460222244, + -0.018278198316693306, + -0.036285605281591415, + -0.042141400277614594, + -0.01629805937409401, + 0.014715641736984253, + -0.023423172533512115, + 0.020292183384299278, + -0.033510029315948486, + 0.03733491152524948, + -0.023355474695563316, + 0.002062643878161907, + -0.020342957228422165, + -0.03002363257110119, + 0.0035244764294475317, + -0.027874251827597618, + 0.025911036878824234, + -0.03533784672617912, + 0.05249904468655586, + -0.05832098796963692, + -0.004277606029063463, + -0.021916912868618965, + 0.0012640304630622268, + -0.007586298044770956, + 0.051009710878133774, + -0.014884883537888527, + 0.036861032247543335, + -0.008424049243330956, + 0.012642419897019863, + 0.021290715783834457, + 0.024574020877480507, + -0.05862562730908394, + -0.032849982380867004, + -0.004806488752365112, + -0.011982373893260956, + 0.04203985258936882, + -0.0038841168861836195, + 0.039298124611377716, + -0.02995593473315239, + 0.007197040133178234, + 0.03902733698487282, + 0.014436391182243824, + 0.006498914677649736, + 0.002580949105322361, + 0.014529475010931492, + 0.004971500486135483, + -0.0060842703096568584, + -0.0822518914937973, + -0.04860646650195122, + -0.01858283393085003, + -0.03865500167012215, + 0.02503097616136074, + -0.008525594137609005, + 0.018819773569703102, + 0.0057457853108644485, + 0.0111530851572752, + -0.013107837177813053, + -0.033780816942453384, + 0.023998595774173737, + -0.0003932245308533311, + 0.08996935188770294, + -0.009012166410684586, + 0.0083817383274436, + -0.016103429719805717, + 0.004137980751693249, + -0.07351896911859512, + -0.03396698459982872, + 0.014842573553323746, + 0.016213437542319298, + -0.02081683650612831, + -0.00914756115525961, + -0.04112594574689865, + -0.01873515173792839, + -0.006046190857887268, + 0.02352471649646759, + 0.0417352169752121, + -0.008944469504058361, + 0.03726721554994583, + 0.005805020220577717, + 0.003924312070012093, + 0.013937125913798809, + -0.0019325385801494122, + -0.006498914677649736, + 0.022847747430205345, + -0.029431283473968506, + -0.0030569438822567463, + 0.015849566087126732, + -0.02195076085627079, + 0.043935369700193405, + 0.014952581375837326, + 0.040652066469192505, + 0.027789629995822906, + -0.0012619149638339877, + 0.04048282280564308, + 0.04410461336374283, + -0.017127348110079765, + -0.018058182671666145, + 0.06630923599004745, + -0.02401551976799965, + 0.04542470723390579, + -0.014546399004757404, + 0.043359946459531784, + 0.04532315954566002, + 0.0024561327882111073, + 0.0031690672039985657, + 0.003958160523325205, + 0.0030696371104568243, + -0.005517307668924332, + 0.00044373286073096097, + 0.03560863807797432, + -0.043935369700193405, + -0.02152765542268753, + -0.00843674223870039, + -0.032646890729665756, + 0.013818656094372272, + 0.026757249608635902, + -0.03130987659096718, + 0.01634036935865879, + -0.022763125598430634, + -0.019276728853583336, + 0.058524079620838165, + -0.007374744862318039, + 0.048234131187200546, + -0.021036852151155472, + -0.030074404552578926, + 0.0010017044842243195, + -0.018261272460222244, + 0.004212024621665478, + 0.009553742595016956, + 0.025707947090268135, + 0.006008111406117678, + -0.03682718425989151, + -0.005982724949717522, + -0.08123643696308136, + 0.029905162751674652, + -0.05913335457444191, + 0.01319245807826519, + -0.017254279926419258, + 0.0166957788169384, + -0.03581172600388527, + -0.0025069054681807756, + 0.07656534016132355, + 0.03395006060600281, + -0.027501918375492096, + 0.007827469147741795, + -0.02438785508275032, + 0.027264978736639023, + 0.030345192179083824, + -0.01866745576262474, + 0.026554159820079803, + -0.06414293497800827, + -0.005754247307777405, + -0.009502970613539219, + 0.06113041564822197, + -0.019412122666835785, + -0.04691404104232788, + -0.0006420639692805707, + -0.0011476761428639293, + 0.05053583160042763, + -0.02968514710664749, + 0.00774284778162837, + -0.04769255593419075, + 0.050028104335069656, + -0.018193576484918594, + -0.0025724871084094048, + 0.03405160456895828, + -0.03848576173186302, + -0.012253162451088428, + 0.02674032561480999, + -0.0191582590341568, + -0.008559443056583405, + 0.019039789214730263, + -0.0255894772708416, + -0.03417007625102997, + 0.03190222382545471, + 0.025132521986961365, + -0.012633957900106907, + -0.02731575071811676, + 0.019479820504784584, + 0.01001069787889719, + 0.015011816285550594, + -0.03774109482765198, + 0.016399605199694633, + 0.012413942255079746, + 0.002589411335065961, + 0.051009710878133774, + -0.018853621557354927, + 0.027789629995822906, + -0.03327308967709541, + -0.005796558223664761, + 0.002437093062326312, + 0.011643888428807259, + -0.030565207824110985, + -0.047794099897146225, + -0.027620388194918633, + -0.00914756115525961, + -0.005398837849497795, + 0.032206859439611435, + 0.009350651875138283, + 0.007531294133514166, + 0.0002495005610398948, + 0.007488983683288097, + -0.015206445008516312, + 0.04004279151558876, + 0.0012344130082055926, + -0.024607868865132332, + -0.00032103198464028537, + -0.01958136446774006, + 0.05314216762781143, + 0.041295185685157776, + -0.025623325258493423, + -0.038181122392416, + -0.0037529540713876486, + 0.038925789296627045, + 0.04410461336374283, + 0.024472475051879883, + -0.002225539879873395, + -0.033069998025894165, + -0.030192874372005463, + -0.012354707345366478, + -0.06525993347167969, + 0.0016966568073257804, + -0.0030950235668569803, + -0.02674032561480999, + 0.045661646872758865, + -0.020478351041674614, + 0.031360648572444916, + -0.010222251527011395, + 0.03889194130897522, + -0.016128817573189735, + 0.038147274404764175, + 0.007484752684831619, + 0.011237706989049911, + -0.052295953035354614, + -0.022864671424031258, + -0.01216007862240076, + -0.049012649804353714, + 0.048098739236593246, + 0.029295889660716057, + -0.04403691738843918, + -0.047895647585392, + 0.07189424335956573, + 0.022695427760481834, + 0.03237610310316086, + -0.02587718889117241, + 0.00047202809946611524, + 0.009494507685303688, + 0.011034615337848663, + 0.028703540563583374, + 0.001199506688863039, + 0.027908099815249443, + -0.07832545787096024, + 0.021679973229765892, + 0.034491635859012604, + -0.04539085552096367, + 0.027637312188744545, + 0.02008909359574318, + -0.0892246812582016, + -0.013124761171638966, + -0.01208391971886158, + -0.01673809066414833, + 0.0032748437952250242, + 0.04011048749089241, + 0.03709797188639641, + 0.011982373893260956, + -0.06915251165628433, + 0.010865372605621815, + 0.045221615582704544, + 0.009460659697651863, + 0.003541400656104088, + 0.003391197882592678, + -0.006130812224000692, + 0.03103908710181713, + 0.03767339512705803, + -0.00965528842061758, + 0.04681249335408211, + 0.003750838339328766, + 0.015570316463708878, + -0.002072163624688983, + -0.005855793133378029, + 0.0173135157674551, + -0.02110454812645912, + 0.0029215498361736536, + 0.006126581225544214, + 0.004916496574878693, + 0.012752427719533443, + 0.0059784939512610435, + 0.03862115368247032, + 0.015274141915142536, + 0.007010873407125473, + -0.0160103477537632, + -0.004688019398599863, + 0.0029003946110606194, + 0.001582417986355722, + -0.008859848603606224, + 0.015561854466795921, + -0.019039789214730263, + -0.031783755868673325, + 0.0038248819764703512, + -0.0353039987385273, + -0.019767532125115395, + -0.007307047955691814, + -0.043224550783634186, + -0.0353039987385273, + -0.024624794721603394, + 0.049588073045015335, + -0.04928343743085861, + 0.06586920469999313, + 0.0061604296788573265, + -0.035067059099674225, + 0.06932175904512405, + 0.03611636534333229, + -0.01711888611316681, + 0.027417296543717384, + 0.036793336272239685, + 0.06292438507080078, + -0.030480585992336273, + -0.034153152257204056, + -0.01986907795071602, + 0.041362885385751724, + 0.04112594574689865, + 0.022407716140151024, + 0.04210755228996277, + 0.03009132854640484, + -0.024607868865132332, + -0.014064057730138302, + 0.013497094623744488, + -0.044510796666145325, + 0.020833760499954224, + 0.025200217962265015, + -0.007772464770823717, + -0.033848512917757034, + -0.004772640299052, + -0.03347618132829666, + -0.007472059223800898, + 0.03784263879060745, + 0.024777112528681755, + 0.003541400656104088, + 0.027857327833771706, + 0.006003879941999912, + -0.01218546461313963, + -0.00484456866979599, + -0.038011882454156876, + 0.03423777222633362, + 0.030446738004684448, + 0.002576718106865883, + -0.0005222719628363848, + 0.018785925582051277, + -0.013370162807404995, + 0.004920727573335171, + 0.03254534676671028, + 0.018058182671666145, + 0.02108762413263321, + 0.026147976517677307, + 0.020190639421343803, + 0.009587591513991356, + 0.05219440907239914, + -0.06217971816658974, + -0.0050942013040184975, + 0.005386144854128361, + -0.019124411046504974, + 0.02724805288016796, + -0.012210851535201073, + 0.036150213330984116, + -0.1397266685962677, + -0.05172052979469299, + -0.05913335457444191, + 0.0009588649263605475, + -0.0061096567660570145, + -0.013260154984891415, + 0.022475413978099823, + -0.057813260704278946, + -0.038282670080661774, + -0.01333631481975317, + -0.02438785508275032, + 0.031919147819280624, + 0.03533784672617912, + -0.017288127914071083, + 0.0041295187547802925, + -0.04542470723390579, + -0.013615564443171024, + 0.016619620844721794, + -0.010738440789282322, + 0.0021155320573598146, + 0.020004471763968468, + 0.019462894648313522, + 0.019649062305688858, + 0.022560033947229385, + -0.03510090708732605, + 0.024421703070402145, + -0.005390375852584839, + 0.00441723084077239, + 0.004611860029399395, + 0.029786692932248116, + 0.010002235881984234, + 0.008098256774246693, + 0.036488696932792664, + -0.0036683327052742243, + -0.014698716811835766, + -0.026131052523851395, + -0.005606160033494234, + -0.003262150567024946, + 0.04241218790411949, + -0.03838421404361725, + 0.010205326601862907, + 0.006858555134385824, + -0.03953506425023079, + -0.032697662711143494, + 0.010137629695236683, + -0.019818304106593132, + 0.017719697207212448, + -0.03574403002858162, + -0.023152383044362068, + 0.01025609951466322, + 0.011322327889502048, + -0.009215258061885834, + 0.02117224596440792, + -0.04711713269352913, + 0.0011677737347781658, + -0.0019346540793776512, + -0.03359464928507805, + -0.011779283173382282, + 0.01229547243565321, + -0.019107485190033913, + -0.00911371223628521, + 0.02352471649646759, + 0.008394431322813034, + -0.008330965414643288, + -0.014851035550236702, + 0.011085388250648975, + 0.019479820504784584, + 0.002070048125460744, + 0.0027057656552642584, + 0.02145995758473873, + 0.06011496111750603, + 0.032782286405563354, + 0.01491027045994997, + 0.04985886067152023, + -0.009105250239372253, + -0.04082130640745163, + 0.019767532125115395, + 0.026723401620984077, + 0.004235295113176107, + -0.047150980681180954, + -0.03432239219546318, + 0.010509963147342205, + -0.045729342848062515, + 0.01995369978249073, + -0.006249282043427229, + -0.0029173188377171755, + 0.022204624488949776, + -0.02489558234810829, + 0.012270086444914341, + 0.04525546357035637, + 0.04082130640745163, + 0.029803616926074028, + -8.462128607789055e-05, + 0.020681442692875862, + -0.025640249252319336, + -0.02059682086110115, + 0.06069038435816765, + -0.0038925791159272194, + -0.061604294925928116, + -0.005860024131834507, + -0.04109209403395653, + 0.035777878016233444, + -0.012507026083767414, + 0.00671892985701561, + -0.04860646650195122, + -0.031343724578619, + -0.02731575071811676, + 0.010188402608036995, + 0.040584366768598557, + -0.007340896409004927, + 0.04261527955532074, + 0.023829353973269463, + 0.007590529043227434, + -0.02215385250747204, + 0.028652766719460487, + -0.049080345779657364, + 0.08861541002988815, + 0.03540554642677307, + -0.02195076085627079, + 0.015257217921316624, + 0.0020414884202182293, + 0.06041959673166275, + 0.005775402765721083, + 0.045797038823366165, + 0.016907332465052605, + -0.03144526854157448, + -0.0012777814408764243, + -0.028229661285877228, + -0.0014174064854159951, + -0.014614095911383629, + 0.02631722018122673, + 0.030345192179083824, + 0.04562779515981674, + -0.0017759891925379634, + 0.027484992519021034, + -0.004275490529835224, + -0.07365436851978302, + -0.029143569990992546, + -0.027552690356969833, + 0.015079513192176819, + -0.05442840978503227, + -0.019919849932193756, + 0.002578833606094122, + 0.05310831964015961, + 0.018142802640795708, + 0.023930899798870087, + -0.04085515812039375, + 0.039941247552633286, + 0.0006129754474386573, + -0.036150213330984116, + -0.021781519055366516, + 0.004599167034029961, + -0.022272322326898575, + 0.0204614270478487, + 0.019699834287166595, + 0.037504155188798904, + -0.08089794963598251, + 0.015248755924403667, + -0.026300296187400818, + 0.058524079620838165, + -0.008995242416858673, + 0.01665346883237362, + -0.06492144614458084, + 0.05185592174530029, + -0.02208615466952324, + -0.013006291352212429, + 0.020749138668179512, + -0.006376213859766722, + -0.003249457338824868, + -0.0038375752046704292, + 0.031056011095643044, + 0.006122349761426449, + -0.05192362144589424, + 0.0023630494251847267, + -0.08049176633358002, + -0.04095670208334923, + -0.028009645640850067, + 0.014605633914470673, + -0.01090768352150917, + -0.02301698923110962, + 0.030192874372005463, + -0.00802632886916399, + 0.002807311015203595, + 0.018616681918501854, + -0.024709414690732956, + 0.03203761950135231, + -0.020613744854927063, + 0.004216255620121956, + -0.01623036153614521, + 0.019784456118941307, + -0.02530176378786564, + 0.002415937604382634, + -0.028720464557409286, + 0.022255398333072662, + 0.0143686942756176, + -0.029854388907551765, + -0.029854388907551765, + 0.005623084492981434, + -0.006016573403030634, + -0.02059682086110115, + 0.030006706714630127, + -0.00768784387037158, + 0.0010720458813011646, + 0.018108954653143883, + 0.023761656135320663, + -0.022543109953403473, + -0.008842924609780312, + -0.039433520287275314, + -0.0700664222240448, + 0.01689887046813965, + 0.011491570621728897, + 0.010814600624144077, + -0.05557925999164581, + 0.04413846135139465, + -0.045661646872758865, + -0.034440863877534866, + -0.009892228059470654, + -0.010679205879569054, + -0.004425693303346634, + -0.023947823792696, + -0.00523805757984519, + -0.024421703070402145, + 0.01580725610256195 + ], + "result": "--- 结果 1 (相似度: 1.000) ---\n文件路径: C:\\Steam\\steamapps\\common\\RimWorld\\Data\\dll1.6\\Verse\\GenSight.txt\n\npublic static class GenSight\n{\n\tprivate static readonly List tmpCells = new List();\n\n\tprivate static List tmpGoodCells = new List();\n\n\tprivate static List tmpBadCells = new List();\n\n\tprivate static List tmpViewCells = new List();\n\n\tprivate static readonly Color InViewCol = new Color(1f, 1f, 1f, 0.7f);\n\n\tpublic static bool LineOfSight(IntVec3 start, IntVec3 end, Map map, bool skipFirstCell = false, Func validator = null, int halfXOffset = 0, int halfZOffset = 0)\n\t{\n\t\tif (!start.InBounds(map) || !end.InBounds(map))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tbool flag = ((start.x != end.x) ? (start.x < end.x) : (start.z < end.z));\n\t\tint num = Mathf.Abs(end.x - start.x);\n\t\tint num2 = Mathf.Abs(end.z - start.z);\n\t\tint num3 = start.x;\n\t\tint num4 = start.z;\n\t\tint num5 = 1 + num + num2;\n\t\tint num6 = ((end.x > start.x) ? 1 : (-1));\n\t\tint num7 = ((end.z > start.z) ? 1 : (-1));\n\t\tnum *= 4;\n\t\tnum2 *= 4;\n\t\tnum += halfXOffset * 2;\n\t\tnum2 += halfZOffset * 2;\n\t\tint num8 = num / 2 - num2 / 2;\n\t\tIntVec3 intVec = default(IntVec3);\n\t\twhile (num5 > 1)\n\t\t{\n\t\t\tintVec.x = num3;\n\t\t\tintVec.z = num4;\n\t\t\tif (!skipFirstCell || intVec != start)\n\t\t\t{\n\t\t\t\tif (!intVec.CanBeSeenOverFast(map))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (validator != null && !validator(intVec))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (num8 > 0 || (num8 == 0 && flag))\n\t\t\t{\n\t\t\t\tnum3 += num6;\n\t\t\t\tnum8 -= num2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnum4 += num7;\n\t\t\t\tnum8 += num;\n\t\t\t}\n\t\t\tnum5--;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static bool LineOfSight(IntVec3 start, IntVec3 end, Map map, CellRect startRect, CellRect endRect, Func validator = null, bool forLeaning = false)\n\t{\n\t\tif (!start.InBounds(map) || !end.InBounds(map))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tbool flag = ((start.x != end.x) ? (start.x < end.x) : (start.z < end.z));\n\t\tint num = Mathf.Abs(end.x - start.x);\n\t\tint num2 = Mathf.Abs(end.z - start.z);\n\t\tint num3 = start.x;\n\t\tint num4 = start.z;\n\t\tint num5 = 1 + num + num2;\n\t\tint num6 = ((end.x > start.x) ? 1 : (-1));\n\t\tint num7 = ((end.z > start.z) ? 1 : (-1));\n\t\tint num8 = num - num2;\n\t\tnum *= 2;\n\t\tnum2 *= 2;\n\t\tIntVec3 intVec = default(IntVec3);\n\t\twhile (num5 > 1)\n\t\t{\n\t\t\tintVec.x = num3;\n\t\t\tintVec.z = num4;\n\t\t\tif (endRect.Contains(intVec))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (!startRect.Contains(intVec))\n\t\t\t{\n\t\t\t\tif (!intVec.CanBeSeenOverFast(map))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (validator != null && !validator(intVec))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (num8 > 0 || (num8 == 0 && flag))\n\t\t\t{\n\t\t\t\tnum3 += num6;\n\t\t\t\tnum8 -= num2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnum4 += num7;\n\t\t\t\tnum8 += num;\n\t\t\t}\n\t\t\tnum5--;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static bool LineOfSight(IntVec3 start, IntVec3 end, Map map)\n\t{\n\t\treturn LineOfSight(start, end, map, CellRect.SingleCell(start), CellRect.SingleCell(end));\n\t}\n\n\tpublic static IEnumerable PointsOnLineOfSight(IntVec3 start, IntVec3 end)\n\t{\n\t\tbool sideOnEqual = ((start.x != end.x) ? (start.x < end.x) : (start.z < end.z));\n\t\tint dx = Mathf.Abs(end.x - start.x);\n\t\tint dz = Mathf.Abs(end.z - start.z);\n\t\tint x = start.x;\n\t\tint z = start.z;\n\t\tint n = 1 + dx + dz;\n\t\tint x_inc = ((end.x > start.x) ? 1 : (-1));\n\t\tint z_inc = ((end.z > start.z) ? 1 : (-1));\n\t\tint error = dx - dz;\n\t\tdx *= 2;\n\t\tdz *= 2;\n\t\tIntVec3 c = default(IntVec3);\n\t\twhile (n > 0)\n\t\t{\n\t\t\tc.x = x;\n\t\t\tc.z = z;\n\t\t\tyield return c;\n\t\t\tif (error > 0 || (error == 0 && sideOnEqual))\n\t\t\t{\n\t\t\t\tx += x_inc;\n\t\t\t\terror -= dz;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tz += z_inc;\n\t\t\t\terror += dx;\n\t\t\t}\n\t\t\tint num = n - 1;\n\t\t\tn = num;\n\t\t}\n\t}\n\n\tpublic static void PointsOnLineOfSight(IntVec3 start, IntVec3 end, Action visitor)\n\t{\n\t\tbool flag = ((start.x != end.x) ? (start.x < end.x) : (start.z < end.z));\n\t\tint num = Mathf.Abs(end.x - start.x);\n\t\tint num2 = Mathf.Abs(end.z - start.z);\n\t\tint num3 = start.x;\n\t\tint num4 = start.z;\n\t\tint num5 = 1 + num + num2;\n\t\tint num6 = ((end.x > start.x) ? 1 : (-1));\n\t\tint num7 = ((end.z > start.z) ? 1 : (-1));\n\t\tint num8 = num - num2;\n\t\tnum *= 2;\n\t\tnum2 *= 2;\n\t\tIntVec3 obj = default(IntVec3);\n\t\twhile (num5 > 1)\n\t\t{\n\t\t\tobj.x = num3;\n\t\t\tobj.z = num4;\n\t\t\tvisitor(obj);\n\t\t\tif (num8 > 0 || (num8 == 0 && flag))\n\t\t\t{\n\t\t\t\tnum3 += num6;\n\t\t\t\tnum8 -= num2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnum4 += num7;\n\t\t\t\tnum8 += num;\n\t\t\t}\n\t\t\tnum5--;\n\t\t}\n\t}\n\n\tpublic static IntVec3 LastPointOnLineOfSight(IntVec3 start, IntVec3 end, Func validator, bool skipFirstCell = false)\n\t{\n\t\tforeach (IntVec3 item in PointsOnLineOfSight(start, end))\n\t\t{\n\t\t\tif (!skipFirstCell || !(item == start))\n\t\t\t{\n\t\t\t\tif (item == end)\n\t\t\t\t{\n\t\t\t\t\treturn end;\n\t\t\t\t}\n\t\t\t\tif (!validator(item))\n\t\t\t\t{\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn IntVec3.Invalid;\n\t}\n\n\tpublic static bool LineOfSightToEdges(IntVec3 start, IntVec3 end, Map map, bool skipFirstCell = false, Func validator = null)\n\t{\n\t\tif (LineOfSight(start, end, map, skipFirstCell, validator))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tint num = (start * 2).DistanceToSquared(end * 2);\n\t\tfor (int i = 0; i < 4; i++)\n\t\t{\n\t\t\tif ((start * 2).DistanceToSquared(end * 2 + GenAdj.CardinalDirections[i]) <= num && LineOfSight(start, end, map, skipFirstCell, validator, GenAdj.CardinalDirections[i].x, GenAdj.CardinalDirections[i].z))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic static bool LineOfSightToThing(IntVec3 start, Thing t, Map map, bool skipFirstCell = false, Func validator = null)\n\t{\n\t\tif (t.def.size == IntVec2.One)\n\t\t{\n\t\t\treturn LineOfSight(start, t.Position, map);\n\t\t}\n\t\tforeach (IntVec3 item in t.OccupiedRect())\n\t\t{\n\t\t\tif (LineOfSight(start, item, map, skipFirstCell, validator))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic static List BresenhamCellsBetween(IntVec3 a, IntVec3 b)\n\t{\n\t\treturn BresenhamCellsBetween(a.x, a.z, b.x, b.z);\n\t}\n\n\tpublic static List BresenhamCellsBetween(int x0, int y0, int x1, int y1)\n\t{\n\t\ttmpCells.Clear();\n\t\tint num = Mathf.Abs(x1 - x0);\n\t\tint num2 = ((x0 < x1) ? 1 : (-1));\n\t\tint num3 = -Mathf.Abs(y1 - y0);\n\t\tint num4 = ((y0 < y1) ? 1 : (-1));\n\t\tint num5 = num + num3;\n\t\tint num6 = 1000;\n\t\twhile (true)\n\t\t{\n\t\t\ttmpCells.Add(new IntVec3(x0, 0, y0));\n\t\t\tif (x0 == x1 && y0 == y1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint num7 = 2 * num5;\n\t\t\tif (num7 >= num3)\n\t\t\t{\n\t\t\t\tnum5 += num3;\n\t\t\t\tx0 += num2;\n\t\t\t}\n\t\t\tif (num7 <= num)\n\t\t\t{\n\t\t\t\tnum5 += num;\n\t\t\t\ty0 += num4;\n\t\t\t}\n\t\t\tnum6--;\n\t\t\tif (num6 <= 0)\n\t\t\t{\n\t\t\t\tLog.Error(\"BresenhamCellsBetween exceeded iterations limit of 1000.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn tmpCells;\n\t}\n\n\tpublic static void DebugDrawFOVSymmetry_Update()\n\t{\n\t\tPawn pawn = Find.Selector.SelectedPawns.FirstOrDefault();\n\t\tif (pawn == null || !pawn.Spawned)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tforeach (IntVec3 item in GenRadial.RadialCellsAround(pawn.Position, 25f, useCenter: true))\n\t\t{\n\t\t\tif (item.InBounds(Find.CurrentMap))\n\t\t\t{\n\t\t\t\tif (LineOfSight(pawn.Position, item, Find.CurrentMap, skipFirstCell: true))\n\t\t\t\t{\n\t\t\t\t\ttmpViewCells.Add(item);\n\t\t\t\t}\n\t\t\t\tif (ShootLeanUtility.CellCanSeeCell(pawn.Position, item, pawn.Map) != ShootLeanUtility.CellCanSeeCell(item, pawn.Position, pawn.Map))\n\t\t\t\t{\n\t\t\t\t\ttmpBadCells.Add(item);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttmpGoodCells.Add(item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tGenDraw.DrawFieldEdges(tmpGoodCells, Color.cyan);\n\t\tGenDraw.DrawFieldEdges(tmpBadCells, Color.magenta);\n\t\tGenDraw.DrawFieldEdges(tmpViewCells, InViewCol);\n\t\ttmpGoodCells.Clear();\n\t\ttmpBadCells.Clear();\n\t\ttmpViewCells.Clear();\n\t}\n}\n\n", + "timestamp": "2025-08-27 18:11:18,850" + }, + "FleckDefOf": { + "keywords": [ + "FleckDefOf" + ], + "question": "FleckDefOf class", + "embedding": [ + -0.053710948675870895, + 0.039304424077272415, + 0.03000594489276409, + -0.04716530814766884, + -0.05095810815691948, + -0.03584808111190796, + 0.03961029276251793, + 0.0685150995850563, + 0.005784785374999046, + 0.06160241737961769, + 0.005582145880907774, + -0.014727688394486904, + -0.026656657457351685, + -0.05869664251804352, + 0.07524426281452179, + -0.008594974875450134, + 0.04835820570588112, + -0.13813133537769318, + -0.011875441297888756, + -0.07041150331497192, + -0.03468577191233635, + 0.03474694490432739, + 0.008648502640426159, + 0.03593984246253967, + -0.018245205283164978, + -0.003448695410043001, + 0.012311307713389397, + -0.012196606025099754, + 0.020325127989053726, + 0.043525442481040955, + 0.015492365695536137, + -0.003867356339469552, + 0.014054772444069386, + 0.010919594205915928, + -0.02534141205251217, + 0.01803109608590603, + 0.04481010138988495, + 0.030281228944659233, + 0.021670959889888763, + -0.04245489463210106, + -0.041904326528310776, + -0.031122373417019844, + -0.03358463570475578, + -0.0323917381465435, + -0.05774844437837601, + -0.003999263513833284, + 0.0464618057012558, + -0.03184117004275322, + 0.0083120446652174, + -0.0247755516320467, + -0.01240306906402111, + 0.0046339454129338264, + -0.016104107722640038, + 0.04242430627346039, + -0.013205979950726032, + -0.00339134456589818, + 0.014666514471173286, + -0.023552067577838898, + 0.021640373393893242, + -0.011087823659181595, + 0.017740517854690552, + 0.0002685929648578167, + -0.05799314007163048, + -0.006564756389707327, + 0.06089891493320465, + -0.0031982637010514736, + -0.0012540711322799325, + 0.04441246762871742, + 0.05095810815691948, + -0.048541728407144547, + -0.003028122941032052, + -0.029791835695505142, + -0.03844798356294632, + 0.0033378172665834427, + -0.04065025597810745, + 0.017526408657431602, + -0.010537255555391312, + 0.02615197002887726, + -0.05074399709701538, + -0.05872723087668419, + 0.013443030416965485, + -0.016685262322425842, + 0.0036857454106211662, + 0.012991870753467083, + 0.04722648113965988, + 0.036888040602207184, + 0.002070364309474826, + -0.08325808495283127, + 0.0043242513202130795, + 0.006205358076840639, + -0.05095810815691948, + 0.01627233624458313, + 0.006469171494245529, + -0.017021721228957176, + 0.04533008113503456, + 0.08827436715364456, + -0.06459995359182358, + 0.02583080530166626, + -0.026931941509246826, + 0.054353274405002594, + 0.0032288506627082825, + -0.06527286767959595, + -0.04156786948442459, + 0.015224728733301163, + -0.03441048786044121, + 0.06337647140026093, + -0.03046475164592266, + -0.004817468114197254, + -0.03636806085705757, + -0.02575433813035488, + -0.021288622170686722, + 0.018398139625787735, + -0.006098303012549877, + 0.03749978542327881, + 0.013802428729832172, + 0.04224078357219696, + -0.017740517854690552, + -0.0011231200769543648, + 0.015400604344904423, + 0.06019541248679161, + 0.05710611492395401, + 0.006251238286495209, + -0.00957376230508089, + -0.050621651113033295, + 0.028247186914086342, + 0.02740604057908058, + 0.05634143576025963, + 0.05420034006237984, + -0.021349795162677765, + 0.011080176569521427, + -0.06374351680278778, + -0.010629016906023026, + 0.03233056515455246, + 0.04670650139451027, + -0.04481010138988495, + -0.039059724658727646, + 0.0015417810063809156, + 0.00724914250895381, + -0.048725251108407974, + 0.008227929472923279, + -0.05337448790669441, + -0.010529609397053719, + -0.029011864215135574, + 0.017342885956168175, + 0.016608795151114464, + -0.018948707729578018, + -0.011126057244837284, + 0.0009730521123856306, + -0.011217818595468998, + -0.00992551352828741, + 0.02076864056289196, + -0.0072988467290997505, + -0.015438838861882687, + 0.047562938183546066, + 0.022221527993679047, + -0.010781952179968357, + 0.0003505568311084062, + -0.023903818801045418, + 0.03593984246253967, + 0.016822904348373413, + 0.008380865678191185, + -0.035725731402635574, + -0.011844854801893234, + 0.004599534906446934, + 0.006354469805955887, + -0.01624174974858761, + -0.03826446086168289, + 0.026029622182250023, + -0.06484465301036835, + -0.051325153559446335, + 0.018704012036323547, + 0.01133252028375864, + -0.027253106236457825, + -0.052946269512176514, + 0.04147610813379288, + -0.03162706270813942, + 0.006771218962967396, + 0.0030548865906894207, + 0.0018208882538601756, + -0.038845617324113846, + 0.020676879212260246, + -0.0083120446652174, + 0.06227533519268036, + -0.0004408843524288386, + 0.03991616517305374, + -0.03936559706926346, + 0.03318700194358826, + 0.03236114978790283, + 0.023185022175312042, + -0.01933104731142521, + -0.03661275655031204, + -0.02934832125902176, + 0.025876685976982117, + 0.033645808696746826, + -0.06998328119516373, + 0.017419353127479553, + -0.02344501204788685, + 0.04600299894809723, + 0.016822904348373413, + 0.018887534737586975, + 0.002596080070361495, + -0.004098671488463879, + -0.020233366638422012, + 0.048939358443021774, + 0.018642837181687355, + -0.002880922518670559, + 0.04269959032535553, + 0.019591037184000015, + 0.0012645854149013758, + 0.011646037921309471, + 0.0247755516320467, + -0.0067597487941384315, + 0.01648644730448723, + -0.03936559706926346, + -0.025112008675932884, + -0.004312781151384115, + -0.05505678057670593, + -0.008388511836528778, + -0.012372481636703014, + -0.006373587064445019, + -0.01595117338001728, + -0.013427737168967724, + 0.017205243930220604, + 0.04077260568737984, + -0.03471635654568672, + -0.01103429589420557, + -0.015262962318956852, + -0.03679627925157547, + -0.025999033823609352, + -0.02003454975783825, + 0.04643121734261513, + 0.040956124663352966, + -0.06423290818929672, + 0.02206859178841114, + 0.040925540030002594, + 0.0008153373491950333, + -0.012815995141863823, + -0.04312780871987343, + 0.0012139255413785577, + 0.013695374131202698, + -0.05585204437375069, + 0.03401285409927368, + -0.09261773526668549, + 0.0631929486989975, + 0.007707949262112379, + 0.02775779366493225, + -0.032177627086639404, + 0.03471635654568672, + 0.016012346372008324, + -0.009038488380610943, + -0.03792800381779671, + 0.0037029506638646126, + -0.0019709563348442316, + 0.048266444355249405, + 0.04178197681903839, + 0.015691181644797325, + -0.014184767380356789, + 0.028247186914086342, + -0.034563422203063965, + -0.0194992758333683, + -0.018749892711639404, + -0.0063009425066411495, + 0.005394799634814262, + 0.03254467248916626, + 0.037866830825805664, + -0.014720041304826736, + 0.013420090079307556, + 0.004404542502015829, + -0.005983601324260235, + -0.0561579167842865, + 0.00127414392773062, + 0.04291370138525963, + 0.004209549631923437, + 0.008870258927345276, + 0.0025406409986317158, + 0.03535868600010872, + 0.016088813543319702, + -0.0083120446652174, + -0.053925056010484695, + -0.017312297597527504, + -0.02480613812804222, + -0.014781216159462929, + 0.0468900240957737, + 0.021487437188625336, + -0.0008855921332724392, + 0.030969439074397087, + 0.05034636706113815, + 0.011722506023943424, + 0.015308842994272709, + -0.00604477571323514, + 0.020585117861628532, + 0.04009968787431717, + 0.006155653856694698, + -0.002743280492722988, + 0.011225465685129166, + 0.036551583558321, + -0.014712395146489143, + 0.033431701362133026, + 0.009252597577869892, + 0.03979381546378136, + -0.04037497192621231, + 0.04153728112578392, + 0.01137075386941433, + 0.0710844174027443, + 0.007119147572666407, + -0.024790843948721886, + -0.023032085970044136, + -0.07377608120441437, + 0.044748928397893906, + -0.06814806163311005, + -0.022267408668994904, + -0.0005022975383326411, + -0.03288113325834274, + 0.023001499474048615, + 0.01697584055364132, + 0.012273074127733707, + -0.03392109274864197, + -0.009046134538948536, + 0.029547138139605522, + 0.005918603856116533, + -0.05389447137713432, + -0.012204253114759922, + 0.013427737168967724, + -0.008380865678191185, + 0.020936869084835052, + 0.013771841302514076, + 0.01936163380742073, + -0.021181566640734673, + 0.009856692515313625, + 0.021059218794107437, + 0.01581353135406971, + -0.0041292584501206875, + 0.004786881152540445, + 0.01056019589304924, + 0.035725731402635574, + 0.053466249257326126, + 0.004232489969581366, + 0.0017979479162022471, + -0.0049168760888278484, + 0.005000990815460682, + -0.02846129611134529, + 0.06741397082805634, + 0.008702029474079609, + -0.0499793216586113, + 0.03373757004737854, + 0.009344358928501606, + 0.008694383315742016, + 0.00909966230392456, + 0.0054368567653000355, + 0.03477753326296806, + -0.008472627028822899, + -0.00433189794421196, + 0.0002886657603085041, + 0.01567588932812214, + 0.030984731391072273, + -0.01738876663148403, + -0.02112039178609848, + 0.03159647434949875, + 0.004951286595314741, + -0.0002838865329977125, + -0.03746919706463814, + 0.008877906017005444, + -0.019652212038636208, + 0.022129766643047333, + 0.05193689465522766, + -0.008250869810581207, + 0.0016440566396340728, + 0.04383131489157677, + 0.010881360620260239, + 0.0631929486989975, + 0.04407601058483124, + -0.055607348680496216, + -0.022114472463726997, + 0.029853008687496185, + -0.04948992654681206, + 0.048541728407144547, + -0.03278937190771103, + 0.0007350462255999446, + 0.045207735151052475, + -0.005486560985445976, + 0.11304991692304611, + 0.02280268259346485, + -0.000920958467759192, + 0.027421334758400917, + 0.0025597577914595604, + -0.016471153125166893, + 0.003033858025446534, + -0.007623834535479546, + 0.016333511099219322, + -0.031045906245708466, + 0.018229911103844643, + -0.009382592514157295, + -0.04829702898859978, + 0.0061059496365487576, + 0.06374351680278778, + 0.0012368658790364861, + -0.00018997456936631352, + 0.012364835478365421, + 0.030938850715756416, + -0.0050812819972634315, + -0.04575829952955246, + 0.006381233688443899, + -0.02550964057445526, + -0.023705001920461655, + 0.005926250480115414, + -0.02618255652487278, + -0.0014978119870647788, + 0.04575829952955246, + -0.008472627028822899, + 0.011340167373418808, + -0.03783624246716499, + 0.011638391762971878, + 0.07041150331497192, + -0.039273835718631744, + -0.019239285960793495, + 0.01275482028722763, + -0.052762746810913086, + 0.0019413250265643, + -0.002588433213531971, + -0.033615224063396454, + 0.006327706389129162, + -0.027329573407769203, + -0.007738536223769188, + -0.04866407439112663, + -0.05401681736111641, + -0.03707156330347061, + -0.07811944931745529, + 0.007302670273929834, + 0.036001015454530716, + -0.005983601324260235, + -0.06875979900360107, + 0.035725731402635574, + -0.08362513035535812, + 0.026855474337935448, + -0.02027924731373787, + -0.06429408490657806, + -0.012196606025099754, + 0.0394267700612545, + 0.035909254103899, + -0.018015801906585693, + -0.06325412541627884, + 0.009665523655712605, + 0.04838879033923149, + -0.02284856326878071, + -0.020233366638422012, + -0.027176637202501297, + -0.005253334529697895, + -0.005635673180222511, + 0.023460306227207184, + -0.017404058948159218, + 0.002972683636471629, + 0.015148261561989784, + -0.012800700962543488, + 0.04435129463672638, + -0.030036531388759613, + 0.024928485974669456, + -0.01511002704501152, + -0.03029652312397957, + 0.03933500871062279, + -0.0023743235506117344, + 0.055117953568696976, + 0.04288311302661896, + -0.005501854699105024, + 0.025631990283727646, + 0.01697584055364132, + 0.010759011842310429, + -0.013764195144176483, + 0.022405050694942474, + -0.0024660849012434483, + -0.0033779628574848175, + -0.023108553141355515, + 0.05007108300924301, + 0.05377212166786194, + 0.004905405919998884, + -0.01676173135638237, + 0.023888524621725082, + -0.005566852167248726, + 0.01238777581602335, + -0.018688717857003212, + 0.0400690995156765, + 0.054414451122283936, + 0.023842643946409225, + 0.06135772168636322, + -0.027635443955659866, + -0.05667789652943611, + -0.010621370747685432, + 0.01989690773189068, + 0.00028603716054931283, + 0.08766262978315353, + 0.042852528393268585, + 0.06307060271501541, + 0.029287148267030716, + 3.378321343916468e-05, + -0.027543682605028152, + -0.007967939600348473, + -0.00707326689735055, + 0.0019766914192587137, + 0.014597693458199501, + 0.012020730413496494, + -0.04364779219031334, + -0.004186609294265509, + 0.02905774489045143, + -0.07334786653518677, + -0.003169588278979063, + 0.01760287582874298, + 0.007287376560270786, + 0.0022080063354223967, + 0.03682686761021614, + -0.005872723180800676, + -0.008793790824711323, + -0.013787135481834412, + -0.015859412029385567, + 0.019239285960793495, + 0.009176129475235939, + -0.056524958461523056, + 0.00622829794883728, + 0.028965983539819717, + 0.0027279870118945837, + -0.0007063708617351949, + -0.05169219896197319, + -0.000566817179787904, + -0.049887560307979584, + -0.022817976772785187, + -0.003674275241792202, + -0.078853540122509, + 0.01679231785237789, + -0.04630886763334274, + 0.03229997679591179, + 0.02263445407152176, + -0.01960633136332035, + -0.0044274828396737576, + 0.018336966633796692, + 0.01402418501675129, + -0.023077966645359993, + -0.010200797580182552, + 0.07359255850315094, + 0.018856946378946304, + 0.010101390071213245, + -0.01813814975321293, + 0.03398226946592331, + 0.02431674487888813, + -0.0017310386756435037, + -0.00017551738710608333, + 0.014865330420434475, + 0.028981277719140053, + 0.04196549952030182, + 0.011691918596625328, + -0.02729898691177368, + 0.005383329465985298, + 0.004240136593580246, + -0.007696479093283415, + 0.010973121970891953, + -0.039304424077272415, + -0.03465518355369568, + 0.018260497599840164, + -0.005628026556223631, + -0.013963011093437672, + -0.015293549746274948, + -0.006817099638283253, + 0.01971338503062725, + 0.004224843345582485, + -0.0245614405721426, + 0.00046979874605312943, + -0.023062672466039658, + -0.023001499474048615, + -0.010131976567208767, + -0.010850773192942142, + 0.008847318589687347, + 0.014597693458199501, + -0.008182048797607422, + -0.041200824081897736, + 0.007138264365494251, + 0.006962388753890991, + -0.007360020652413368, + 0.06166359409689903, + -0.026840180158615112, + 0.001936545711942017, + -0.011852500960230827, + 0.09604348987340927, + 0.0035653088707476854, + -0.04181256517767906, + 0.0034869294613599777, + -0.029256559908390045, + -0.002309326082468033, + -0.0296236053109169, + -0.013267154805362225, + 0.029042450711131096, + 0.008342631161212921, + 0.02997535839676857, + -0.004236313514411449, + -0.0040413206443190575, + -0.019392220303416252, + 0.006209181156009436, + -0.0034161966759711504, + 0.006610637065023184, + -0.028354240581393242, + -0.02534141205251217, + 0.020569823682308197, + 0.020126311108469963, + 0.07145146280527115, + 0.008419099263846874, + -0.06557874381542206, + -0.04557477682828903, + 0.016104107722640038, + 0.03165764734148979, + -0.03450224921107292, + -0.003121795831248164, + 0.00943612027913332, + 0.014093006029725075, + -0.011829560622572899, + 0.04245489463210106, + 0.03939618542790413, + -0.028981277719140053, + -0.011829560622572899, + -0.03450224921107292, + 0.015316490083932877, + -0.0050812819972634315, + -0.016088813543319702, + -0.04536066949367523, + 0.03138236328959465, + -0.03746919706463814, + 0.009642583318054676, + -0.02534141205251217, + -0.028965983539819717, + -0.01968279853463173, + -0.0398549921810627, + 0.031994108110666275, + 0.001891620922833681, + -0.044687751680612564, + -0.014001244679093361, + 0.018000507727265358, + 0.04792998358607292, + 0.013878896832466125, + 0.028415415436029434, + -0.0033320821821689606, + -0.017939334735274315, + 0.00035820360062643886, + -0.01897929608821869, + 0.017832279205322266, + 0.06080715358257294, + -0.014070065692067146, + 0.04578888788819313, + 0.041659630835056305, + -0.010430200956761837, + -0.04138434678316116, + -0.01352714467793703, + -0.018749892711639404, + -0.022160353139042854, + 0.0232309028506279, + -0.030525924637913704, + 0.0486946627497673, + -0.004595711827278137, + 0.035511624068021774, + 0.01372596062719822, + 0.025983741506934166, + -0.019346339628100395, + 0.029745955020189285, + 0.046339455991983414, + -0.00026811505085788667, + 0.009038488380610943, + -0.011447221972048283, + -0.002594168297946453, + -0.018994588404893875, + 0.05358859896659851, + -0.01971338503062725, + -0.015048853121697903, + -0.016394685953855515, + -0.00927553791552782, + 0.020049843937158585, + -0.0009429429192095995, + -0.03468577191233635, + -0.009053781628608704, + -0.02550964057445526, + 0.033156417310237885, + -0.035022228956222534, + 0.018444020301103592, + -0.0038883851375430822, + -0.0081514623016119, + -0.036551583558321, + -0.020585117861628532, + -0.0045880647376179695, + -0.02393440529704094, + -0.07457134872674942, + -0.03606219217181206, + -0.04126199707388878, + 0.02428615652024746, + -0.02913421206176281, + 0.09102720767259598, + -0.026197850704193115, + 0.013657139614224434, + 0.0559438057243824, + -0.04594182223081589, + 0.04621710628271103, + 0.05992012843489647, + 0.003072091843932867, + -0.008296750485897064, + -0.013007164001464844, + 0.0012158371973782778, + -0.019346339628100395, + 0.004006910137832165, + 0.023659121245145798, + 0.000999815878458321, + 0.005505677778273821, + 0.022573279216885567, + 0.021885069087147713, + 0.018245205283164978, + -0.02618255652487278, + -0.025387292727828026, + -0.0247755516320467, + -0.018887534737586975, + -0.07047268003225327, + -0.04175139218568802, + -0.045452430844306946, + -0.0020665409974753857, + -0.009352006018161774, + -0.012708939611911774, + 0.03896796330809593, + 0.007252966053783894, + 0.001089665456674993, + -0.0330340676009655, + -0.028201306238770485, + -0.005807725712656975, + 0.026136675849556923, + -0.03731626272201538, + -0.05104986950755119, + -0.017862865701317787, + -0.02368970960378647, + -0.01386360265314579, + 0.048969946801662445, + 0.04792998358607292, + -0.04031379893422127, + -0.012120137922465801, + 0.0008636076236143708, + 0.012112491764128208, + -0.011294286698102951, + -0.03863150626420975, + -0.0264272540807724, + -0.024699082598090172, + 0.001982426503673196, + -0.0011403253301978111, + 0.007486192509531975, + 0.005616556387394667, + 0.0326058492064476, + -0.012196606025099754, + -0.006713868584483862, + -0.01384830940514803, + -0.06625165790319443, + 0.006545639131218195, + 0.015981759876012802, + -0.039977338165044785, + 0.012036023661494255, + 0.05120280385017395, + -0.019483981654047966, + -0.08203460276126862, + -0.03162706270813942, + 0.02420968934893608, + -0.004320427775382996, + 0.007367667742073536, + 0.004175139125436544, + 0.018887534737586975, + 0.0005524794687516987, + 0.03318700194358826, + 0.002791072940453887, + 0.023292075842618942, + 0.02101333811879158, + 0.004133081994950771, + -0.040956124663352966, + 0.036949217319488525, + 0.001554206945002079, + 0.02745192125439644, + -0.025142595171928406, + -0.03165764734148979, + 0.035756319761276245, + 0.019560450688004494, + 0.0073447274044156075, + 0.006476818583905697, + 0.018153443932533264, + -0.01054490264505148, + -0.015186495147645473, + -0.014245941303670406, + 0.023628534749150276, + 0.016532327979803085, + 0.01019315142184496, + -0.014681807719171047, + 0.021839188411831856, + -0.03171882405877113, + -0.030587099492549896, + 0.0038826500531286, + -0.0023552067577838898, + -0.010674897581338882, + -0.004416012670844793, + 0.0024584380444139242, + 0.03135177865624428, + -0.013901837170124054, + 0.008159108459949493, + -0.016455858945846558, + -0.03707156330347061, + 0.009535528719425201, + -0.01287716906517744, + 0.02160978503525257, + 0.015905292704701424, + -0.0557296946644783, + -0.02020278014242649, + -0.04670650139451027, + -0.024836724624037743, + -0.04508538544178009, + -0.0032422326039522886, + 0.03587866947054863, + 0.0015398693503811955, + -0.03288113325834274, + 0.03060239367187023, + 0.01558412704616785, + -0.01462063379585743, + -0.002655342686921358, + 0.024821432307362556, + -0.009642583318054676, + -0.0706562027335167, + 0.022359170019626617, + -0.0024699082132428885, + -0.007115324027836323, + -0.014528872445225716, + -0.0010198885574936867, + 0.0071038538590073586, + 0.0017578024417161942, + -0.004389248788356781, + -0.0014404612593352795, + 0.049673449248075485, + -0.03805035352706909, + 0.03560338541865349, + -0.018673423677682877, + 0.012624825350940228, + 0.007868531160056591, + -0.0216862540692091, + 0.04392307624220848, + -0.026090795174241066, + 0.012624825350940228, + 0.0247755516320467, + -0.02618255652487278, + -0.01613469421863556, + -0.018856946378946304, + 0.001324803801253438, + 0.035481035709381104, + 0.010942534543573856, + 0.046155933290719986, + -0.033125828951597214, + 0.033615224063396454, + -0.00836557149887085, + -0.005123339127749205, + -0.02723781205713749, + 0.011867794208228588, + -0.012364835478365421, + 0.048939358443021774, + -0.01462063379585743, + -0.018948707729578018, + 0.012081904336810112, + 0.014177120290696621, + -0.0334622859954834, + 0.04462657868862152, + 0.022619159892201424, + 0.021273327991366386, + -0.008472627028822899, + -0.00321929226629436, + 0.003154294565320015, + 0.008717323653399944, + -0.06619048118591309, + 0.06955506652593613, + 0.02368970960378647, + 0.0083120446652174, + -0.020998043939471245, + -0.019392220303416252, + 0.02762015163898468, + 0.0900484248995781, + 0.013756548054516315, + -0.03486929461359978, + 0.0022940323688089848, + 0.0245614405721426, + 0.0034200199879705906, + -0.0072988467290997505, + 0.007050326559692621, + 0.048969946801662445, + 0.008778497576713562, + -0.00480599794536829, + -0.011233112774789333, + -0.01291540265083313, + -0.026488428935408592, + -0.005635673180222511, + -0.016777023673057556, + -0.011646037921309471, + 0.0014978119870647788, + -0.03988557681441307, + -0.02745192125439644, + -0.03896796330809593, + 0.04031379893422127, + 0.009642583318054676, + -0.03554220870137215, + -0.010644311085343361, + -0.041139647364616394, + -0.02417910285294056, + -0.02688606083393097, + -0.03474694490432739, + 0.014268881641328335, + -0.00994845386594534, + 0.10265030711889267, + -0.043036047369241714, + 0.02312384732067585, + 0.016960546374320984, + 0.000896584358997643, + -0.019346339628100395, + -0.01616528257727623, + 0.012433655560016632, + 0.020829815417528152, + -0.015438838861882687, + 0.010521962307393551, + -0.0594613216817379, + -0.04630886763334274, + 0.00945141352713108, + -0.05450621247291565, + 0.041904326528310776, + 0.011646037921309471, + -0.03113766759634018, + 0.0178475733846426, + 0.012747174128890038, + 0.020080430433154106, + -0.025677870959043503, + -0.00673680892214179, + -0.030770622193813324, + -0.08099464327096939, + -0.02434733137488365, + -0.017648756504058838, + 0.03257526084780693, + -0.006461524870246649, + 0.055576760321855545, + 0.08380865305662155, + 0.05695318058133125, + -0.002886657603085041, + 0.0035958958324044943, + 0.02945537678897381, + -0.04441246762871742, + 0.025800218805670738, + -0.040252622216939926, + -0.014689454808831215, + -0.057197876274585724, + -0.007172674871981144, + -0.04034438356757164, + -0.008235576562583447, + -0.0063468231819570065, + -0.003498399630188942, + -0.015545893460512161, + -0.0003292892361059785, + 0.019759265705943108, + -0.03872326761484146, + 0.002791072940453887, + -0.011041942983865738, + 0.014154179953038692, + -0.0499793216586113, + -0.0166240893304348, + -0.01971338503062725, + -0.025846099480986595, + 0.03309524059295654, + -0.019774559885263443, + 0.03783624246716499, + 0.03306465595960617, + -0.005268627777695656, + -0.0652116984128952, + 0.032636433839797974, + 0.007665891665965319, + -0.00987198669463396, + 0.057442571967840195, + 0.024836724624037743, + 0.02892010286450386, + 0.0033301704097539186, + 0.02667195163667202, + -0.01335126906633377, + -0.057901378720998764, + 0.02368970960378647, + 0.0779971033334732, + -0.042332544922828674, + -0.015331783331930637, + 0.02101333811879158, + 0.010759011842310429, + -0.005180689971894026, + 0.0464618057012558, + 0.032177627086639404, + -0.013756548054516315, + -0.015484719537198544, + -0.008877906017005444, + 0.04903111979365349, + 0.022542692720890045, + 0.054169751703739166, + 0.018856946378946304, + -0.006622107233852148, + -0.03746919706463814, + -0.022435637190937996, + 0.03437989950180054, + 0.010300206020474434, + 0.007138264365494251, + 0.04728765785694122, + -0.001651703380048275, + -0.007876178249716759, + 0.04737941920757294, + 0.005425386596471071, + 0.027773085981607437, + -0.00246799667365849, + 0.018964001908898354, + 0.0022596220951527357, + -0.0032842897344380617, + -0.05426151305437088, + 0.02699311636388302, + -0.03798917680978775, + 0.007711772341281176, + 0.02737545408308506, + -0.006916508078575134, + 0.05612732842564583, + 0.004863348789513111, + -0.002592256758362055, + -0.011523690074682236, + 0.0021410968620330095, + 0.01676173135638237, + 0.0010189327877014875, + -5.143650923855603e-05, + -0.027115464210510254, + 0.018291085958480835, + -0.02783426083624363, + 0.034532833844423294 + ], + "result": "--- 结果 1 (相似度: 1.000) ---\n文件路径: C:\\Steam\\steamapps\\common\\RimWorld\\Data\\dll1.6\\RimWorld\\FleckDefOf.txt\n\npublic static class FleckDefOf\n{\n\tpublic static FleckDef Meditating;\n\n\tpublic static FleckDef Heart;\n\n\tpublic static FleckDef HealingCross;\n\n\tpublic static FleckDef SleepZ;\n\n\tpublic static FleckDef SleepZ_Small;\n\n\tpublic static FleckDef SleepZ_Tiny;\n\n\tpublic static FleckDef IncapIcon;\n\n\tpublic static FleckDef PsycastAreaEffect;\n\n\tpublic static FleckDef FeedbackGoto;\n\n\tpublic static FleckDef FeedbackShoot;\n\n\tpublic static FleckDef FeedbackMelee;\n\n\tpublic static FleckDef FeedbackEquip;\n\n\tpublic static FleckDef ExplosionFlash;\n\n\tpublic static FleckDef ShotFlash;\n\n\tpublic static FleckDef ShotHit_Dirt;\n\n\tpublic static FleckDef MetaPuff;\n\n\tpublic static FleckDef AirPuff;\n\n\tpublic static FleckDef DustPuff;\n\n\tpublic static FleckDef DustPuffThick;\n\n\tpublic static FleckDef TornadoDustPuff;\n\n\tpublic static FleckDef Smoke;\n\n\tpublic static FleckDef FireGlow;\n\n\tpublic static FleckDef MicroSparks;\n\n\tpublic static FleckDef MicroSparksFast;\n\n\tpublic static FleckDef HeatGlow;\n\n\tpublic static FleckDef LightningGlow;\n\n\tpublic static FleckDef Footprint;\n\n\tpublic static FleckDef Horseshoe;\n\n\tpublic static FleckDef Stone;\n\n\tpublic static FleckDef LineEMP;\n\n\tpublic static FleckDef WaterSplash;\n\n\tpublic static FleckDef WaterRipple;\n\n\tpublic static FleckDef PsycastSkipFlashEntry;\n\n\tpublic static FleckDef PsycastSkipInnerExit;\n\n\tpublic static FleckDef PsycastSkipOuterRingExit;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef FishShadow;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef FishShadowReverse;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef LavaSmoke;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef GravshipThrusterExhaust;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef SulfurCloud;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef AncientSmoke;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef AncientToxicCloud;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef AncientVentHeatGlow;\n\n\t[MayRequireOdyssey]\n\tpublic static FleckDef AncientVentHeatShimmer;\n\n\t[MayRequireRoyalty]\n\tpublic static FleckDef WaterskipSplashParticles;\n\n\t[MayRequireRoyalty]\n\tpublic static FleckDef BroadshieldActivation;\n\n\t[MayRequireRoyalty]\n\tpublic static FleckDef EntropyPulse;\n\n\t[MayRequireBiotech]\n\tpublic static FleckDef FlashHollow;\n\n\t[MayRequireBiotech]\n\tpublic static FleckDef Fleck_WastePackDissolutionSource;\n\n\t[MayRequireBiotech]\n\tpublic static FleckDef Fleck_ToxifierPollutionSource;\n\n\t[MayRequireBiotech]\n\tpublic static FleckDef FleckBabyCrying;\n\n\t[MayRequireAnomaly]\n\tpublic static FleckDef FleckShamblerDecay;\n}\n\n", + "timestamp": "2025-08-27 18:17:21,928" } } \ No newline at end of file diff --git a/Source/WulaFallenEmpire/VerbProperties_Wula_IonicBeam.cs b/Source/WulaFallenEmpire/VerbProperties_Wula_IonicBeam.cs index e396eb66..dbbfca19 100644 --- a/Source/WulaFallenEmpire/VerbProperties_Wula_IonicBeam.cs +++ b/Source/WulaFallenEmpire/VerbProperties_Wula_IonicBeam.cs @@ -1,4 +1,5 @@ using RimWorld; +using Verse; namespace WulaFallenEmpire { @@ -13,5 +14,18 @@ namespace WulaFallenEmpire public float sustainedDamagePerTick = 15f; public int tickInterval = 10; public int duration = 120; + + // --- NEW: Explosion Path Properties (for both modes) --- + public bool explosionEnabled = false; + public int explosionTickInterval = 15; + public DamageDef explosionDamageDef; + public float explosionEnergyCostRatio = 0.5f; // Only for Breaching Beam + + // Manual explosion effect properties + public float explosionHeatEnergyPerCell = 0; + public FleckDef explosionCellFleck; + public Color explosionColorCenter = Color.white; + public Color explosionColorEdge = Color.white; + public SoundDef soundExplosion; } } \ No newline at end of file diff --git a/Source/WulaFallenEmpire/Verb_Wula_BreachingBeam.cs b/Source/WulaFallenEmpire/Verb_Wula_BreachingBeam.cs index 33a88e7f..f7b3fb7e 100644 --- a/Source/WulaFallenEmpire/Verb_Wula_BreachingBeam.cs +++ b/Source/WulaFallenEmpire/Verb_Wula_BreachingBeam.cs @@ -18,7 +18,9 @@ namespace WulaFallenEmpire // --- Our custom state --- private Vector3 beamEndPoint; private int ticksLeft; - private bool beamHitMapEdge; // NEW: Flag to check if the beam reached the map edge + private bool beamHitMapEdge; + private int explosionTicks; + private float beamEnergy; private VerbProperties_Wula_IonicBeam BeamProps => (VerbProperties_Wula_IonicBeam)verbProps; @@ -28,14 +30,14 @@ namespace WulaFallenEmpire { base.WarmupComplete(); - // --- Custom Damage Logic --- - beamHitMapEdge = true; // Assume it will hit the edge unless stopped + // --- Initial Damage and Path Calculation --- + beamHitMapEdge = true; float shotAngle = (currentTarget.Cell - caster.Position).AngleFlat; beamEndPoint = GetMapEdgePoint(caster.Position, shotAngle); - var cellsOnPath = WulaBeamUtility.GetCellsInBeamArea(caster.Position, beamEndPoint.ToIntVec3(), verbProps.beamWidth); - var beamEnergy = BeamProps.breachingDamage; // Local variable for calculation + var cellsOnPath = WulaBeamUtility.GetCellsInBeamArea(caster.Position, beamEndPoint.ToIntVec3(), (int)verbProps.beamWidth); + this.beamEnergy = BeamProps.breachingDamage; - // This loop calculates the final beam end point based on energy depletion + // This loop calculates the final beam end point based on the initial piercing damage foreach (var cell in cellsOnPath) { if (!cell.InBounds(caster.Map)) continue; @@ -46,7 +48,7 @@ namespace WulaFallenEmpire if (beamEnergy <= 0) break; float damageToDeal = Mathf.Min(beamEnergy, thing.HitPoints); - var dinfo = new DamageInfo(verbProps.beamDamageDef ?? DamageDefOf.Burn, damageToDeal, BeamProps.armorPenetration, shotAngle, caster, EquipmentSource); + var dinfo = new DamageInfo(verbProps.beamDamageDef ?? DamageDefOf.Burn, damageToDeal, BeamProps.armorPenetration, shotAngle, caster, null, EquipmentSource?.def); thing.TakeDamage(dinfo); beamEnergy -= thing.HitPoints; @@ -54,13 +56,13 @@ namespace WulaFallenEmpire if (beamEnergy <= 0) { - beamEndPoint = cell.ToVector3Shifted(); // The beam stops here - beamHitMapEdge = false; // It was stopped, so it didn't hit the edge + beamEndPoint = cell.ToVector3Shifted(); + beamHitMapEdge = false; break; } } - // --- Copied Effect Logic --- + // --- Start Visual Effects --- if (verbProps.beamMoteDef != null) { mote = MoteMaker.MakeInteractionOverlay(verbProps.beamMoteDef, caster, new TargetInfo(beamEndPoint.ToIntVec3(), caster.Map)); @@ -75,7 +77,7 @@ namespace WulaFallenEmpire { if (ticksLeft > 0) { - // --- Copied Effect Logic --- + // --- Maintain Visual Effects --- if (mote != null) { mote.UpdateTargets(new TargetInfo(caster.Position, caster.Map), new TargetInfo(beamEndPoint.ToIntVec3(), caster.Map), Vector3.zero, Vector3.zero); @@ -91,6 +93,17 @@ namespace WulaFallenEmpire } sustainer?.Maintain(); + // --- Path Explosion Logic --- + if (BeamProps.explosionEnabled) + { + explosionTicks--; + if (explosionTicks <= 0) + { + ApplyPathExplosionDamage(); + explosionTicks = BeamProps.explosionTickInterval; + } + } + ticksLeft--; if (ticksLeft <= 0) { @@ -101,18 +114,18 @@ namespace WulaFallenEmpire protected override bool TryCastShot() { - // The actual "shot" is just starting the effects, damage is pre-calculated in WarmupComplete this.state = VerbState.Bursting; - // NEW: Set duration based on whether it hit the map edge if (beamHitMapEdge) { this.ticksLeft = BeamProps.breachingBeamDuration; } else { - this.ticksLeft = 1; // Disappears almost instantly if blocked + this.ticksLeft = 1; } + + this.explosionTicks = 0; return true; } @@ -125,12 +138,49 @@ namespace WulaFallenEmpire sustainer?.End(); } + private void ApplyPathExplosionDamage() + { + if (this.beamEnergy <= 0 || BeamProps.explosionDamageDef == null) return; + + var pathCells = WulaBeamUtility.GetCellsInBeamArea(caster.Position, beamEndPoint.ToIntVec3(), (int)verbProps.beamWidth); + var shotAngle = (beamEndPoint - caster.DrawPos).AngleFlat(); + var explosionDamageDef = BeamProps.explosionDamageDef; + + foreach (var cell in pathCells) + { + if (this.beamEnergy <= 0) break; + if (!cell.InBounds(caster.Map)) continue; + + // Performance optimization: don't create explosions on every single cell of the path + if (cell.GetHashCode() % 2 != 0) continue; + + var thingsToHit = cell.GetThingList(caster.Map).Where(t => CanHit(t)).ToList(); + foreach (var thing in thingsToHit) + { + if (this.beamEnergy <= 0) break; + + var dinfo = new DamageInfo(explosionDamageDef, explosionDamageDef.defaultDamage, explosionDamageDef.defaultArmorPenetration, shotAngle, caster, null, EquipmentSource?.def); + float damageDealt = Mathf.Min(thing.HitPoints, dinfo.Amount); + thing.TakeDamage(dinfo); + + this.beamEnergy -= damageDealt * BeamProps.explosionEnergyCostRatio; + } + + if(explosionDamageDef?.explosionCellMote != null) + { + FleckMaker.Static(cell, caster.Map, explosionDamageDef.explosionCellMote); + } + } + } + public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref beamEndPoint, "beamEndPoint"); Scribe_Values.Look(ref ticksLeft, "ticksLeft"); Scribe_Values.Look(ref beamHitMapEdge, "beamHitMapEdge"); + Scribe_Values.Look(ref explosionTicks, "explosionTicks"); + Scribe_Values.Look(ref beamEnergy, "beamEnergy"); } private bool CanHit(Thing t) diff --git a/Source/WulaFallenEmpire/Verb_Wula_SustainedBeam.cs b/Source/WulaFallenEmpire/Verb_Wula_SustainedBeam.cs index bad2a63c..9afb4235 100644 --- a/Source/WulaFallenEmpire/Verb_Wula_SustainedBeam.cs +++ b/Source/WulaFallenEmpire/Verb_Wula_SustainedBeam.cs @@ -17,8 +17,9 @@ namespace WulaFallenEmpire // --- Our custom state --- private int ticksLeft; private int ticksToNextDamage; + private int explosionTicks; private Vector3 beamEnd; - + private VerbProperties_Wula_IonicBeam BeamProps => (VerbProperties_Wula_IonicBeam)verbProps; public override float? AimAngleOverride => (state == VerbState.Bursting) ? (beamEnd - caster.DrawPos).AngleFlat() : (float?)null; @@ -27,11 +28,9 @@ namespace WulaFallenEmpire { base.WarmupComplete(); - // For sustained beam, it always reaches its max range var shotAngle = (currentTarget.Cell - caster.Position).AngleFlat; beamEnd = GetMapEdgePoint(caster.Position, shotAngle); - // --- Copied Effect Logic --- if (verbProps.beamMoteDef != null) { mote = MoteMaker.MakeInteractionOverlay(verbProps.beamMoteDef, caster, new TargetInfo(beamEnd.ToIntVec3(), caster.Map)); @@ -44,10 +43,9 @@ namespace WulaFallenEmpire public override void BurstingTick() { - // This verb is not a standard "burst", but we use the state to manage the effect if (ticksLeft > 0) { - // --- Copied Effect Logic --- + // --- Maintain Visual Effects --- if (mote != null) { mote.UpdateTargets(new TargetInfo(caster.Position, caster.Map), new TargetInfo(beamEnd.ToIntVec3(), caster.Map), Vector3.zero, Vector3.zero); @@ -63,15 +61,26 @@ namespace WulaFallenEmpire } sustainer?.Maintain(); - // --- Custom Damage Logic --- - ticksLeft--; + // --- Beam Damage Logic --- ticksToNextDamage--; if (ticksToNextDamage <= 0) { - ApplyDamage(); + ApplyBeamDamage(); ticksToNextDamage = BeamProps.tickInterval; } + + // --- Path Explosion Logic --- + if (BeamProps.explosionEnabled) + { + explosionTicks--; + if (explosionTicks <= 0) + { + ApplyPathExplosionDamage(); + explosionTicks = BeamProps.explosionTickInterval; + } + } + ticksLeft--; if (ticksLeft <= 0) { StopBeam(); @@ -83,16 +92,25 @@ namespace WulaFallenEmpire { this.state = VerbState.Bursting; this.ticksLeft = BeamProps.duration; - this.ticksToNextDamage = 0; // First damage tick happens immediately + this.ticksToNextDamage = 0; + this.explosionTicks = 0; return true; } - private void ApplyDamage() + private void StopBeam() + { + this.state = VerbState.Idle; + mote?.Destroy(); + endEffecter?.Cleanup(); + sustainer?.End(); + } + + private void ApplyBeamDamage() { var shotAngle = (beamEnd - caster.DrawPos).AngleFlat(); - var dinfo = new DamageInfo(verbProps.beamDamageDef ?? DamageDefOf.Burn, BeamProps.sustainedDamagePerTick, BeamProps.armorPenetration, shotAngle, caster, EquipmentSource); - var cellsInBeam = WulaBeamUtility.GetCellsInBeamArea(caster.Position, beamEnd.ToIntVec3(), verbProps.beamWidth); + var dinfo = new DamageInfo(verbProps.beamDamageDef ?? DamageDefOf.Burn, BeamProps.sustainedDamagePerTick, BeamProps.armorPenetration, shotAngle, caster, null, EquipmentSource?.def); + var cellsInBeam = WulaBeamUtility.GetCellsInBeamArea(caster.Position, beamEnd.ToIntVec3(), (int)verbProps.beamWidth); foreach (var cell in cellsInBeam) { @@ -105,13 +123,38 @@ namespace WulaFallenEmpire } } } - - private void StopBeam() + + private void ApplyPathExplosionDamage() { - this.state = VerbState.Idle; - mote?.Destroy(); - endEffecter?.Cleanup(); - sustainer?.End(); + if (BeamProps.explosionDamageDef == null) return; + + var pathCells = WulaBeamUtility.GetCellsInBeamArea(caster.Position, beamEnd.ToIntVec3(), (int)verbProps.beamWidth); + var shotAngle = (beamEnd - caster.DrawPos).AngleFlat(); + var explosionDamageDef = BeamProps.explosionDamageDef; + + foreach (var cell in pathCells) + { + if (!cell.InBounds(caster.Map)) continue; + + if (cell.GetHashCode() % 3 != 0) continue; + + var thingsToHit = cell.GetThingList(caster.Map).Where(t => CanHit(t)).ToList(); + foreach (var thing in thingsToHit) + { + var dinfo = new DamageInfo(explosionDamageDef, explosionDamageDef.defaultDamage, explosionDamageDef.defaultArmorPenetration, shotAngle, caster, null, EquipmentSource?.def); + thing.TakeDamage(dinfo); + } + + if(BeamProps.explosionCellFleck != null) + { + FleckMaker.Static(cell, caster.Map, BeamProps.explosionCellFleck); + } + if (BeamProps.soundExplosion != null) + { + BeamProps.soundExplosion.PlayOneShot(new TargetInfo(cell, caster.Map)); + } + GenTemperature.PushHeat(cell, caster.Map, BeamProps.explosionHeatEnergyPerCell); + } } public override void ExposeData() @@ -119,6 +162,7 @@ namespace WulaFallenEmpire base.ExposeData(); Scribe_Values.Look(ref ticksLeft, "ticksLeft", 0); Scribe_Values.Look(ref ticksToNextDamage, "ticksToNextDamage", 0); + Scribe_Values.Look(ref explosionTicks, "explosionTicks"); Scribe_Values.Look(ref beamEnd, "beamEnd"); } @@ -131,7 +175,7 @@ namespace WulaFallenEmpire { float mapSize = Mathf.Max(caster.Map.Size.x, caster.Map.Size.z) * 1.5f; Vector3 direction = Quaternion.AngleAxis(angle, Vector3.up) * Vector3.forward; - return start.toVector3() + direction * mapSize; + return start.ToVector3() + direction * mapSize; } } } \ No newline at end of file diff --git a/Source/WulaFallenEmpire/WulaBeamUtility.cs b/Source/WulaFallenEmpire/WulaBeamUtility.cs index 464f8dbc..e8cbc062 100644 --- a/Source/WulaFallenEmpire/WulaBeamUtility.cs +++ b/Source/WulaFallenEmpire/WulaBeamUtility.cs @@ -13,12 +13,12 @@ namespace WulaFallenEmpire // A more advanced method to get all cells in a rectangular area public static IEnumerable GetCellsInBeamArea(IntVec3 start, IntVec3 end, int width) { + var beamLine = GenSight.PointsOnLineOfSight(start, end); if (width <= 1) { - return GenGrid.PointsOnLine(start, end).Distinct(); + return beamLine.Distinct(); } - var beamLine = GenGrid.PointsOnLine(start, end).ToList(); var allCells = new HashSet(beamLine); var halfWidth = (width - 1) / 2; diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index 5db85c5c..2cce854c 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -1,5 +1,6 @@  - + Debug @@ -185,11 +186,15 @@ - + + + + +