diff --git a/1.6/1.6/Defs/ThingDefs_Buildings/Building_WULA_ArmedShuttleWithPocket.xml b/1.6/1.6/Defs/ThingDefs_Buildings/Building_WULA_ArmedShuttleWithPocket.xml index 21bb662d..ead296f8 100644 --- a/1.6/1.6/Defs/ThingDefs_Buildings/Building_WULA_ArmedShuttleWithPocket.xml +++ b/1.6/1.6/Defs/ThingDefs_Buildings/Building_WULA_ArmedShuttleWithPocket.xml @@ -128,6 +128,7 @@
  • ShuttleIdle_Ambience
  • +
  • diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_PocketShuttle.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_PocketShuttle.xml index c794653d..fe8d3ce5 100644 --- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_PocketShuttle.xml +++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/WULA_PocketShuttle.xml @@ -7,6 +7,9 @@ 未初始化 + 初始化内部空间 + 初始化穿梭机的内部口袋空间。这将在穿梭机内部创建维度储存空间。 + 进入内部空间 进入穿梭机的内部口袋空间。无需骇入即可直接访问。选中的殖民者将被传送到内部空间。 @@ -16,6 +19,11 @@ + 无法初始化内部空间。 + 内部空间已经初始化。 + 内部空间初始化成功。 + 内部空间初始化失败。 + 无法进入内部空间。 访问被拒绝。 穿梭机未部署。 diff --git a/1.6/1.6/Languages/English/Keyed/WULA_PocketShuttle.xml b/1.6/1.6/Languages/English/Keyed/WULA_PocketShuttle.xml index 6a906de2..bbf8e202 100644 --- a/1.6/1.6/Languages/English/Keyed/WULA_PocketShuttle.xml +++ b/1.6/1.6/Languages/English/Keyed/WULA_PocketShuttle.xml @@ -8,6 +8,9 @@ Stored items: {0} + Initialize pocket space + Initialize the shuttle's internal pocket space. This will create the dimensional storage space inside the shuttle. + Enter pocket space Enter the shuttle's internal pocket space. Direct access without hacking required. Selected colonists will be transported to the internal space. @@ -18,6 +21,11 @@ Open internal container management interface to view and retrieve items stored in the pocket space. + Cannot initialize pocket space. + Pocket space already initialized. + Pocket space initialized successfully. + Pocket space initialization failed. + Cannot enter pocket space. Access denied. Transport functionality disabled (shuttle in flight). diff --git a/MCP/vector_cache/knowledge_cache.json b/MCP/vector_cache/knowledge_cache.json index 38282d29..8b43e0b6 100644 --- a/MCP/vector_cache/knowledge_cache.json +++ b/MCP/vector_cache/knowledge_cache.json @@ -5173,5 +5173,2075 @@ ], "result": "--- 结果 1 (相似度: 1.000) ---\n文件路径: C:\\Steam\\steamapps\\common\\RimWorld\\Data\\dll1.6\\Verse\\Map.txt\n\npublic sealed class Map : IIncidentTarget, ILoadReferenceable, IThingHolder, IExposable, IDisposable\n{\n\tpublic MapFileCompressor compressor;\n\n\tprivate List loadedFullThings;\n\n\tpublic MapGeneratorDef generatorDef;\n\n\tpublic int uniqueID = -1;\n\n\tpublic int generationTick;\n\n\tpublic bool wasSpawnedViaGravShipLanding;\n\n\tprivate Color? fogOfWarColor;\n\n\tprivate OrbitalDebrisDef orbitalDebris;\n\n\tprivate int generatedId;\n\n\tpublic MapInfo info = new MapInfo();\n\n\tpublic MapEvents events;\n\n\tpublic List components = new List();\n\n\tpublic ThingOwner spawnedThings;\n\n\tpublic CellIndices cellIndices;\n\n\tpublic ListerThings listerThings;\n\n\tpublic ListerBuildings listerBuildings;\n\n\tpublic MapPawns mapPawns;\n\n\tpublic DynamicDrawManager dynamicDrawManager;\n\n\tpublic MapDrawer mapDrawer;\n\n\tpublic PawnDestinationReservationManager pawnDestinationReservationManager;\n\n\tpublic TooltipGiverList tooltipGiverList;\n\n\tpublic ReservationManager reservationManager;\n\n\tpublic EnrouteManager enrouteManager;\n\n\tpublic PhysicalInteractionReservationManager physicalInteractionReservationManager;\n\n\tpublic DesignationManager designationManager;\n\n\tpublic LordManager lordManager;\n\n\tpublic PassingShipManager passingShipManager;\n\n\tpublic HaulDestinationManager haulDestinationManager;\n\n\tpublic DebugCellDrawer debugDrawer;\n\n\tpublic GameConditionManager gameConditionManager;\n\n\tpublic WeatherManager weatherManager;\n\n\tpublic ZoneManager zoneManager;\n\n\tpublic PlanManager planManager;\n\n\tpublic ResourceCounter resourceCounter;\n\n\tpublic MapTemperature mapTemperature;\n\n\tpublic TemperatureVacuumCache TemperatureVacuumCache;\n\n\tpublic AreaManager areaManager;\n\n\tpublic AttackTargetsCache attackTargetsCache;\n\n\tpublic AttackTargetReservationManager attackTargetReservationManager;\n\n\tpublic VoluntarilyJoinableLordsStarter lordsStarter;\n\n\tpublic FleckManager flecks;\n\n\tpublic DeferredSpawner deferredSpawner;\n\n\tpublic ThingGrid thingGrid;\n\n\tpublic CoverGrid coverGrid;\n\n\tpublic EdificeGrid edificeGrid;\n\n\tpublic BlueprintGrid blueprintGrid;\n\n\tpublic FogGrid fogGrid;\n\n\tpublic RegionGrid regionGrid;\n\n\tpublic GlowGrid glowGrid;\n\n\tpublic TerrainGrid terrainGrid;\n\n\tpublic Pathing pathing;\n\n\tpublic RoofGrid roofGrid;\n\n\tpublic FertilityGrid fertilityGrid;\n\n\tpublic SnowGrid snowGrid;\n\n\tpublic DeepResourceGrid deepResourceGrid;\n\n\tpublic ExitMapGrid exitMapGrid;\n\n\tpublic AvoidGrid avoidGrid;\n\n\tpublic GasGrid gasGrid;\n\n\tpublic PollutionGrid pollutionGrid;\n\n\tpublic SubstructureGrid substructureGrid;\n\n\tpublic WaterBodyTracker waterBodyTracker;\n\n\tpublic SandGrid sandGrid;\n\n\tpublic LinkGrid linkGrid;\n\n\tpublic PowerNetManager powerNetManager;\n\n\tpublic PowerNetGrid powerNetGrid;\n\n\tpublic RegionMaker regionMaker;\n\n\tpublic PathFinder pathFinder;\n\n\tpublic PawnPathPool pawnPathPool;\n\n\tpublic RegionAndRoomUpdater regionAndRoomUpdater;\n\n\tpublic RegionLinkDatabase regionLinkDatabase;\n\n\tpublic MoteCounter moteCounter;\n\n\tpublic GatherSpotLister gatherSpotLister;\n\n\tpublic WindManager windManager;\n\n\tpublic ListerBuildingsRepairable listerBuildingsRepairable;\n\n\tpublic ListerHaulables listerHaulables;\n\n\tpublic ListerMergeables listerMergeables;\n\n\tpublic ListerArtificialBuildingsForMeditation listerArtificialBuildingsForMeditation;\n\n\tpublic ListerBuldingOfDefInProximity listerBuldingOfDefInProximity;\n\n\tpublic ListerBuildingWithTagInProximity listerBuildingWithTagInProximity;\n\n\tpublic ListerFilthInHomeArea listerFilthInHomeArea;\n\n\tpublic Reachability reachability;\n\n\tpublic ItemAvailability itemAvailability;\n\n\tpublic AutoBuildRoofAreaSetter autoBuildRoofAreaSetter;\n\n\tpublic RoofCollapseBufferResolver roofCollapseBufferResolver;\n\n\tpublic RoofCollapseBuffer roofCollapseBuffer;\n\n\tpublic WildAnimalSpawner wildAnimalSpawner;\n\n\tpublic WildPlantSpawner wildPlantSpawner;\n\n\tpublic SteadyEnvironmentEffects steadyEnvironmentEffects;\n\n\tpublic TempTerrainManager tempTerrain;\n\n\tpublic FreezeManager freezeManager;\n\n\tpublic SkyManager skyManager;\n\n\tpublic OverlayDrawer overlayDrawer;\n\n\tpublic FloodFiller floodFiller;\n\n\tpublic WeatherDecider weatherDecider;\n\n\tpublic FireWatcher fireWatcher;\n\n\tpublic DangerWatcher dangerWatcher;\n\n\tpublic DamageWatcher damageWatcher;\n\n\tpublic StrengthWatcher strengthWatcher;\n\n\tpublic WealthWatcher wealthWatcher;\n\n\tpublic RegionDirtyer regionDirtyer;\n\n\tpublic MapCellsInRandomOrder cellsInRandomOrder;\n\n\tpublic RememberedCameraPos rememberedCameraPos;\n\n\tpublic MineStrikeManager mineStrikeManager;\n\n\tpublic StoryState storyState;\n\n\tpublic RoadInfo roadInfo;\n\n\tpublic WaterInfo waterInfo;\n\n\tpublic RetainedCaravanData retainedCaravanData;\n\n\tpublic TemporaryThingDrawer temporaryThingDrawer;\n\n\tpublic AnimalPenManager animalPenManager;\n\n\tpublic MapPlantGrowthRateCalculator plantGrowthRateCalculator;\n\n\tpublic AutoSlaughterManager autoSlaughterManager;\n\n\tpublic TreeDestructionTracker treeDestructionTracker;\n\n\tpublic StorageGroupManager storageGroups;\n\n\tpublic EffecterMaintainer effecterMaintainer;\n\n\tpublic PostTickVisuals postTickVisuals;\n\n\tpublic List layoutStructureSketches = new List();\n\n\tpublic ThingListChangedCallbacks thingListChangedCallbacks = new ThingListChangedCallbacks();\n\n\tpublic List landingBlockers = new List();\n\n\tpublic Tile pocketTileInfo;\n\n\tpublic const string ThingSaveKey = \"thing\";\n\n\t[TweakValue(\"Graphics_Shadow\", 0f, 100f)]\n\tprivate static bool AlwaysRedrawShadows;\n\n\tprivate MixedBiomeMapComponent mixedBiomeComp;\n\n\tpublic int Index => Find.Maps.IndexOf(this);\n\n\tpublic IntVec3 Size => info.Size;\n\n\tpublic IntVec3 Center => new IntVec3(Size.x / 2, 0, Size.z / 2);\n\n\tpublic Faction ParentFaction => info.parent?.Faction;\n\n\tpublic int Area => Size.x * Size.z;\n\n\tpublic IThingHolder ParentHolder => info.parent;\n\n\tpublic bool DrawMapClippers => !generatorDef.disableMapClippers;\n\n\tpublic bool CanEverExit\n\t{\n\t\tget\n\t\t{\n\t\t\tif (!info.isPocketMap)\n\t\t\t{\n\t\t\t\treturn Biome.canExitMap;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic Color? FogOfWarColor\n\t{\n\t\tget\n\t\t{\n\t\t\treturn fogOfWarColor ?? Biome.fogOfWarColor;\n\t\t}\n\t\tset\n\t\t{\n\t\t\tfogOfWarColor = value;\n\t\t}\n\t}\n\n\tpublic OrbitalDebrisDef OrbitalDebris\n\t{\n\t\tget\n\t\t{\n\t\t\treturn orbitalDebris ?? Biome.orbitalDebris;\n\t\t}\n\t\tset\n\t\t{\n\t\t\torbitalDebris = value;\n\t\t}\n\t}\n\n\tpublic Material MapEdgeMaterial\n\t{\n\t\tget\n\t\t{\n\t\t\tif (ModsConfig.AnomalyActive && generatorDef == MapGeneratorDefOf.MetalHell)\n\t\t\t{\n\t\t\t\treturn MapEdgeClipDrawer.ClipMatMetalhell;\n\t\t\t}\n\t\t\tWorldObject parent = Parent;\n\t\t\tif (parent != null && parent.def.MapEdgeMaterial != null)\n\t\t\t{\n\t\t\t\treturn parent.def.MapEdgeMaterial;\n\t\t\t}\n\t\t\treturn MapEdgeClipDrawer.ClipMat;\n\t\t}\n\t}\n\n\tpublic bool Disposed { get; private set; }\n\n\tpublic IEnumerable AllCells\n\t{\n\t\tget\n\t\t{\n\t\t\tfor (int z = 0; z < Size.z; z++)\n\t\t\t{\n\t\t\t\tfor (int y = 0; y < Size.y; y++)\n\t\t\t\t{\n\t\t\t\t\tfor (int x = 0; x < Size.x; x++)\n\t\t\t\t\t{\n\t\t\t\t\t\tyield return new IntVec3(x, y, z);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic bool IsPlayerHome\n\t{\n\t\tget\n\t\t{\n\t\t\tif (!wasSpawnedViaGravShipLanding)\n\t\t\t{\n\t\t\t\tif (info?.parent != null && info.parent.Faction == Faction.OfPlayer)\n\t\t\t\t{\n\t\t\t\t\treturn info.parent.def.canBePlayerHome;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tpublic bool TreatAsPlayerHomeForThreatPoints\n\t{\n\t\tget\n\t\t{\n\t\t\tif (IsPlayerHome)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (info.parent != null && info.parent.def.treatAsPlayerHome)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic bool IsTempIncidentMap => info.parent.def.isTempIncidentMapOwner;\n\n\tpublic PlanetTile Tile => info.Tile;\n\n\tpublic Tile TileInfo\n\t{\n\t\tget\n\t\t{\n\t\t\tif (!IsPocketMap)\n\t\t\t{\n\t\t\t\treturn Find.WorldGrid[Tile];\n\t\t\t}\n\t\t\treturn pocketTileInfo;\n\t\t}\n\t}\n\n\tpublic BiomeDef Biome => TileInfo.PrimaryBiome;\n\n\tpublic IEnumerable Biomes => TileInfo.Biomes;\n\n\tpublic MixedBiomeMapComponent MixedBiomeComp => mixedBiomeComp ?? (mixedBiomeComp = GetComponent());\n\n\tpublic bool IsStartingMap => Find.GameInfo.startingTile == Tile;\n\n\tpublic bool IsPocketMap => info.isPocketMap;\n\n\tpublic StoryState StoryState => storyState;\n\n\tpublic GameConditionManager GameConditionManager => gameConditionManager;\n\n\tpublic float PlayerWealthForStoryteller\n\t{\n\t\tget\n\t\t{\n\t\t\tif (TreatAsPlayerHomeForThreatPoints)\n\t\t\t{\n\t\t\t\tif (Find.Storyteller.difficulty.fixedWealthMode)\n\t\t\t\t{\n\t\t\t\t\treturn StorytellerUtility.FixedWealthModeMapWealthFromTimeCurve.Evaluate(AgeInDays * Find.Storyteller.difficulty.fixedWealthTimeFactor);\n\t\t\t\t}\n\t\t\t\treturn wealthWatcher.WealthItems + wealthWatcher.WealthBuildings * 0.5f + wealthWatcher.WealthPawns;\n\t\t\t}\n\t\t\tfloat num = 0f;\n\t\t\tforeach (Pawn item in mapPawns.PawnsInFaction(Faction.OfPlayer))\n\t\t\t{\n\t\t\t\tif (item.IsFreeColonist)\n\t\t\t\t{\n\t\t\t\t\tnum += WealthWatcher.GetEquipmentApparelAndInventoryWealth(item);\n\t\t\t\t}\n\t\t\t\tif (item.IsAnimal)\n\t\t\t\t{\n\t\t\t\t\tnum += item.MarketValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn num;\n\t\t}\n\t}\n\n\tpublic IEnumerable PlayerPawnsForStoryteller => mapPawns.PawnsInFaction(Faction.OfPlayer);\n\n\tpublic FloatRange IncidentPointsRandomFactorRange => FloatRange.One;\n\n\tpublic MapParent Parent => info.parent;\n\n\tpublic PocketMapParent PocketMapParent\n\t{\n\t\tget\n\t\t{\n\t\t\tif (!IsPocketMap)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn Parent as PocketMapParent;\n\t\t}\n\t}\n\n\tpublic IEnumerable ChildPocketMaps\n\t{\n\t\tget\n\t\t{\n\t\t\tforeach (PocketMapParent pocketMap in Find.World.pocketMaps)\n\t\t\t{\n\t\t\t\tif (pocketMap.sourceMap == this)\n\t\t\t\t{\n\t\t\t\t\tyield return pocketMap.Map;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic float AgeInDays => (float)(Find.TickManager.TicksGame - generationTick) / 60000f;\n\n\tpublic int NextGenSeed => HashCode.Combine(TileInfo.tile.Valid ? TileInfo.tile.GetHashCode() : uniqueID, generatedId++, Find.World.info.Seed);\n\n\tpublic int ConstantRandSeed => uniqueID ^ 0xFDA252;\n\n\tpublic IEnumerator GetEnumerator()\n\t{\n\t\tforeach (IntVec3 allCell in AllCells)\n\t\t{\n\t\t\tyield return allCell;\n\t\t}\n\t}\n\n\tpublic IEnumerable IncidentTargetTags()\n\t{\n\t\treturn info.parent?.IncidentTargetTags() ?? Enumerable.Empty();\n\t}\n\n\tpublic void ConstructComponents()\n\t{\n\t\tspawnedThings = new ThingOwner(this);\n\t\tcellIndices = new CellIndices(this);\n\t\tlisterThings = new ListerThings(ListerThingsUse.Global, thingListChangedCallbacks);\n\t\tlisterBuildings = new ListerBuildings();\n\t\tmapPawns = new MapPawns(this);\n\t\tdynamicDrawManager = new DynamicDrawManager(this);\n\t\tmapDrawer = new MapDrawer(this);\n\t\ttooltipGiverList = new TooltipGiverList();\n\t\tpawnDestinationReservationManager = new PawnDestinationReservationManager();\n\t\treservationManager = new ReservationManager(this);\n\t\tenrouteManager = new EnrouteManager(this);\n\t\tphysicalInteractionReservationManager = new PhysicalInteractionReservationManager();\n\t\tdesignationManager = new DesignationManager(this);\n\t\tlordManager = new LordManager(this);\n\t\tdebugDrawer = new DebugCellDrawer();\n\t\tpassingShipManager = new PassingShipManager(this);\n\t\thaulDestinationManager = new HaulDestinationManager(this);\n\t\tgameConditionManager = new GameConditionManager(this);\n\t\tweatherManager = new WeatherManager(this);\n\t\tzoneManager = new ZoneManager(this);\n\t\tplanManager = new PlanManager(this);\n\t\tresourceCounter = new ResourceCounter(this);\n\t\tmapTemperature = new MapTemperature(this);\n\t\tTemperatureVacuumCache = new TemperatureVacuumCache(this);\n\t\tareaManager = new AreaManager(this);\n\t\tattackTargetsCache = new AttackTargetsCache(this);\n\t\tattackTargetReservationManager = new AttackTargetReservationManager(this);\n\t\tlordsStarter = new VoluntarilyJoinableLordsStarter(this);\n\t\tflecks = new FleckManager(this);\n\t\tdeferredSpawner = new DeferredSpawner(this);\n\t\tthingGrid = new ThingGrid(this);\n\t\tcoverGrid = new CoverGrid(this);\n\t\tedificeGrid = new EdificeGrid(this);\n\t\tblueprintGrid = new BlueprintGrid(this);\n\t\tfogGrid = new FogGrid(this);\n\t\tglowGrid = new GlowGrid(this);\n\t\tregionGrid = new RegionGrid(this);\n\t\tterrainGrid = new TerrainGrid(this);\n\t\tpathing = new Pathing(this);\n\t\troofGrid = new RoofGrid(this);\n\t\tfertilityGrid = new FertilityGrid(this);\n\t\tsnowGrid = new SnowGrid(this);\n\t\tgasGrid = new GasGrid(this);\n\t\tpollutionGrid = new PollutionGrid(this);\n\t\tdeepResourceGrid = new DeepResourceGrid(this);\n\t\texitMapGrid = new ExitMapGrid(this);\n\t\tavoidGrid = new AvoidGrid(this);\n\t\tlinkGrid = new LinkGrid(this);\n\t\tpowerNetManager = new PowerNetManager(this);\n\t\tpowerNetGrid = new PowerNetGrid(this);\n\t\tregionMaker = new RegionMaker(this);\n\t\tpathFinder = new PathFinder(this);\n\t\tpawnPathPool = new PawnPathPool(this);\n\t\tregionAndRoomUpdater = new RegionAndRoomUpdater(this);\n\t\tregionLinkDatabase = new RegionLinkDatabase();\n\t\tmoteCounter = new MoteCounter();\n\t\tgatherSpotLister = new GatherSpotLister();\n\t\twindManager = new WindManager(this);\n\t\tlisterBuildingsRepairable = new ListerBuildingsRepairable();\n\t\tlisterHaulables = new ListerHaulables(this);\n\t\tlisterMergeables = new ListerMergeables(this);\n\t\tlisterFilthInHomeArea = new ListerFilthInHomeArea(this);\n\t\tlisterArtificialBuildingsForMeditation = new ListerArtificialBuildingsForMeditation(this);\n\t\tlisterBuldingOfDefInProximity = new ListerBuldingOfDefInProximity(this);\n\t\tlisterBuildingWithTagInProximity = new ListerBuildingWithTagInProximity(this);\n\t\treachability = new Reachability(this);\n\t\titemAvailability = new ItemAvailability(this);\n\t\tautoBuildRoofAreaSetter = new AutoBuildRoofAreaSetter(this);\n\t\troofCollapseBufferResolver = new RoofCollapseBufferResolver(this);\n\t\troofCollapseBuffer = new RoofCollapseBuffer();\n\t\twildAnimalSpawner = new WildAnimalSpawner(this);\n\t\twildPlantSpawner = new WildPlantSpawner(this);\n\t\tsteadyEnvironmentEffects = new SteadyEnvironmentEffects(this);\n\t\ttempTerrain = new TempTerrainManager(this);\n\t\tskyManager = new SkyManager(this);\n\t\toverlayDrawer = new OverlayDrawer();\n\t\tfloodFiller = new FloodFiller(this);\n\t\tweatherDecider = new WeatherDecider(this);\n\t\tfireWatcher = new FireWatcher(this);\n\t\tdangerWatcher = new DangerWatcher(this);\n\t\tdamageWatcher = new DamageWatcher();\n\t\tstrengthWatcher = new StrengthWatcher(this);\n\t\twealthWatcher = new WealthWatcher(this);\n\t\tregionDirtyer = new RegionDirtyer(this);\n\t\tcellsInRandomOrder = new MapCellsInRandomOrder(this);\n\t\trememberedCameraPos = new RememberedCameraPos(this);\n\t\tmineStrikeManager = new MineStrikeManager();\n\t\tstoryState = new StoryState(this);\n\t\tretainedCaravanData = new RetainedCaravanData(this);\n\t\ttemporaryThingDrawer = new TemporaryThingDrawer();\n\t\tanimalPenManager = new AnimalPenManager(this);\n\t\tplantGrowthRateCalculator = new MapPlantGrowthRateCalculator();\n\t\tautoSlaughterManager = new AutoSlaughterManager(this);\n\t\ttreeDestructionTracker = new TreeDestructionTracker(this);\n\t\tstorageGroups = new StorageGroupManager(this);\n\t\teffecterMaintainer = new EffecterMaintainer(this);\n\t\tpostTickVisuals = new PostTickVisuals(this);\n\t\tif (ModsConfig.OdysseyActive)\n\t\t{\n\t\t\tsubstructureGrid = new SubstructureGrid(this);\n\t\t\twaterBodyTracker = new WaterBodyTracker(this);\n\t\t\tfreezeManager = new FreezeManager(this);\n\t\t\tsandGrid = new SandGrid(this);\n\t\t}\n\t\tcomponents.Clear();\n\t\tFillComponents();\n\t}\n\n\tpublic void ExposeData()\n\t{\n\t\tif (Scribe.mode == LoadSaveMode.LoadingVars)\n\t\t{\n\t\t\tevents = new MapEvents(this);\n\t\t}\n\t\tScribe_Values.Look(ref uniqueID, \"uniqueID\", -1);\n\t\tScribe_Values.Look(ref generationTick, \"generationTick\", 0);\n\t\tScribe_Values.Look(ref wasSpawnedViaGravShipLanding, \"wasSpawnedViaGravShipLanding\", defaultValue: false);\n\t\tScribe_Values.Look(ref fogOfWarColor, \"fogOfWarColor\");\n\t\tScribe_Values.Look(ref generatedId, \"generatedId\", 0);\n\t\tScribe_Defs.Look(ref orbitalDebris, \"orbitalDebris\");\n\t\tScribe_Defs.Look(ref generatorDef, \"generatorDef\");\n\t\tScribe_Deep.Look(ref pocketTileInfo, \"pocketTileInfo\");\n\t\tScribe_Deep.Look(ref info, \"mapInfo\");\n\t\tScribe_Collections.Look(ref layoutStructureSketches, \"layoutStructureSketches\", LookMode.Deep);\n\t\tScribe_Collections.Look(ref landingBlockers, \"landingBlockers\", LookMode.Undefined);\n\t\tif (Scribe.mode == LoadSaveMode.Saving)\n\t\t{\n\t\t\tcompressor = new MapFileCompressor(this);\n\t\t\tcompressor.BuildCompressedString();\n\t\t\tExposeComponents();\n\t\t\tcompressor.ExposeData();\n\t\t\tHashSet hashSet = new HashSet();\n\t\t\tif (Scribe.EnterNode(\"things\"))\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tforeach (Thing allThing in listerThings.AllThings)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (allThing.def.isSaveable && !allThing.IsSaveCompressible())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!hashSet.Add(allThing.ThingID))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tLog.Error(\"Saving Thing with already-used ID \" + allThing.ThingID);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thashSet.Add(allThing.ThingID);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tThing target = allThing;\n\t\t\t\t\t\t\t\tScribe_Deep.Look(ref target, \"thing\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (OutOfMemoryException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (Exception arg)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLog.Error($\"Exception saving {allThing}: {arg}\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tScribe.ExitNode();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tLog.Error(\"Could not enter the things node while saving.\");\n\t\t\t}\n\t\t\tcompressor = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (Scribe.mode == LoadSaveMode.LoadingVars)\n\t\t\t{\n\t\t\t\tConstructComponents();\n\t\t\t\tregionAndRoomUpdater.Enabled = false;\n\t\t\t\tcompressor = new MapFileCompressor(this);\n\t\t\t}\n\t\t\telse if (Scribe.mode == LoadSaveMode.PostLoadInit && landingBlockers == null)\n\t\t\t{\n\t\t\t\tlandingBlockers = new List();\n\t\t\t}\n\t\t\tExposeComponents();\n\t\t\tDeepProfiler.Start(\"Load compressed things\");\n\t\t\tcompressor.ExposeData();\n\t\t\tDeepProfiler.End();\n\t\t\tDeepProfiler.Start(\"Load non-compressed things\");\n\t\t\tScribe_Collections.Look(ref loadedFullThings, \"things\", LookMode.Deep);\n\t\t\tDeepProfiler.End();\n\t\t}\n\t\tBackCompatibility.PostExposeData(this);\n\t}\n\n\tprivate void FillComponents()\n\t{\n\t\tcomponents.RemoveAll((MapComponent component) => component == null);\n\t\tforeach (Type item3 in typeof(MapComponent).AllSubclassesNonAbstract())\n\t\t{\n\t\t\tif (!typeof(CustomMapComponent).IsAssignableFrom(item3) && GetComponent(item3) == null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tMapComponent item = (MapComponent)Activator.CreateInstance(item3, this);\n\t\t\t\t\tcomponents.Add(item);\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tLog.Error(\"Could not instantiate a MapComponent of type \" + item3?.ToString() + \": \" + ex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (generatorDef?.customMapComponents != null)\n\t\t{\n\t\t\tforeach (Type customMapComponent in generatorDef.customMapComponents)\n\t\t\t{\n\t\t\t\tif (GetComponent(customMapComponent) == null)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tMapComponent item2 = (MapComponent)Activator.CreateInstance(customMapComponent, this);\n\t\t\t\t\t\tcomponents.Add(item2);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception ex2)\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.Error(\"Could not instantiate a MapComponent of type \" + customMapComponent?.ToString() + \": \" + ex2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\troadInfo = GetComponent();\n\t\twaterInfo = GetComponent();\n\t}\n\n\tpublic void FinalizeLoading()\n\t{\n\t\tregionAndRoomUpdater.Enabled = true;\n\t\tList list = compressor.ThingsToSpawnAfterLoad().ToList();\n\t\tcompressor = null;\n\t\tDeepProfiler.Start(\"Merge compressed and non-compressed thing lists\");\n\t\tList list2 = new List(loadedFullThings.Count + list.Count);\n\t\tforeach (Thing item in loadedFullThings.Concat(list))\n\t\t{\n\t\t\tlist2.Add(item);\n\t\t}\n\t\tloadedFullThings.Clear();\n\t\tDeepProfiler.End();\n\t\tDeepProfiler.Start(\"Spawn everything into the map\");\n\t\tBackCompatibility.PreCheckSpawnBackCompatibleThingAfterLoading(this);\n\t\tforeach (Thing item2 in list2)\n\t\t{\n\t\t\tif (item2 is Building)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (!BackCompatibility.CheckSpawnBackCompatibleThingAfterLoading(item2, this))\n\t\t\t\t{\n\t\t\t\t\tGenSpawn.Spawn(item2, item2.Position, this, item2.Rotation, WipeMode.FullRefund, respawningAfterLoad: true);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLog.Error(\"Exception spawning loaded thing \" + item2.ToStringSafe() + \": \" + ex);\n\t\t\t}\n\t\t}\n\t\tforeach (Building item3 in from t in list2.OfType()\n\t\t\torderby t.def.size.Magnitude\n\t\t\tselect t)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tGenSpawn.SpawnBuildingAsPossible(item3, this, respawningAfterLoad: true);\n\t\t\t}\n\t\t\tcatch (Exception ex2)\n\t\t\t{\n\t\t\t\tLog.Error(\"Exception spawning loaded thing \" + item3.ToStringSafe() + \": \" + ex2);\n\t\t\t}\n\t\t}\n\t\tBackCompatibility.PostCheckSpawnBackCompatibleThingAfterLoading(this);\n\t\tDeepProfiler.End();\n\t\tFinalizeInit();\n\t}\n\n\tpublic void FinalizeInit()\n\t{\n\t\tDeepProfiler.Start(\"Finalize geometry\");\n\t\tpathing.RecalculateAllPerceivedPathCosts();\n\t\tregionAndRoomUpdater.Enabled = true;\n\t\tregionAndRoomUpdater.RebuildAllRegionsAndRooms();\n\t\tpowerNetManager.UpdatePowerNetsAndConnections_First();\n\t\tTemperatureVacuumCache.TemperatureVacuumSaveLoad.ApplyLoadedDataToRegions();\n\t\tavoidGrid.Regenerate();\n\t\tanimalPenManager.RebuildAllPens();\n\t\tplantGrowthRateCalculator.BuildFor(this);\n\t\tgasGrid.RecalculateEverHadGas();\n\t\tDeepProfiler.End();\n\t\tDeepProfiler.Start(\"Thing.PostMapInit()\");\n\t\tforeach (Thing item in listerThings.AllThings.ToList())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\titem.PostMapInit();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLog.Error(\"Error in PostMapInit() for \" + item.ToStringSafe() + \": \" + ex);\n\t\t\t}\n\t\t}\n\t\tDeepProfiler.End();\n\t\tDeepProfiler.Start(\"listerFilthInHomeArea.RebuildAll()\");\n\t\tlisterFilthInHomeArea.RebuildAll();\n\t\tDeepProfiler.End();\n\t\tif (ModsConfig.OdysseyActive)\n\t\t{\n\t\t\tGetComponent().SetDrawerDirty();\n\t\t}\n\t\tLongEventHandler.ExecuteWhenFinished(delegate\n\t\t{\n\t\t\tmapDrawer.RegenerateEverythingNow();\n\t\t});\n\t\tDeepProfiler.Start(\"resourceCounter.UpdateResourceCounts()\");\n\t\tresourceCounter.UpdateResourceCounts();\n\t\tDeepProfiler.End();\n\t\tDeepProfiler.Start(\"wealthWatcher.ForceRecount()\");\n\t\twealthWatcher.ForceRecount(allowDuringInit: true);\n\t\tDeepProfiler.End();\n\t\tif (ModsConfig.OdysseyActive)\n\t\t{\n\t\t\tusing (new ProfilerBlock(\"WaterBodyTracker.ConstructBodies()\"))\n\t\t\t{\n\t\t\t\twaterBodyTracker?.ConstructBodies();\n\t\t\t}\n\t\t}\n\t\tMapComponentUtility.FinalizeInit(this);\n\t\tLongEventHandler.ExecuteWhenFinished(delegate\n\t\t{\n\t\t\tFind.MusicManagerPlay.CheckTransitions();\n\t\t});\n\t}\n\n\tprivate void ExposeComponents()\n\t{\n\t\tScribe_Deep.Look(ref weatherManager, \"weatherManager\", this);\n\t\tScribe_Deep.Look(ref reservationManager, \"reservationManager\", this);\n\t\tScribe_Deep.Look(ref enrouteManager, \"enrouteManager\", this);\n\t\tScribe_Deep.Look(ref physicalInteractionReservationManager, \"physicalInteractionReservationManager\");\n\t\tScribe_Deep.Look(ref planManager, \"planManager\", this);\n\t\tScribe_Deep.Look(ref designationManager, \"designationManager\", this);\n\t\tScribe_Deep.Look(ref pawnDestinationReservationManager, \"pawnDestinationReservationManager\");\n\t\tScribe_Deep.Look(ref lordManager, \"lordManager\", this);\n\t\tScribe_Deep.Look(ref passingShipManager, \"visitorManager\", this);\n\t\tScribe_Deep.Look(ref gameConditionManager, \"gameConditionManager\", this);\n\t\tScribe_Deep.Look(ref fogGrid, \"fogGrid\", this);\n\t\tScribe_Deep.Look(ref roofGrid, \"roofGrid\", this);\n\t\tScribe_Deep.Look(ref terrainGrid, \"terrainGrid\", this);\n\t\tScribe_Deep.Look(ref zoneManager, \"zoneManager\", this);\n\t\tScribe_Deep.Look(ref TemperatureVacuumCache, \"temperatureCache\", this);\n\t\tScribe_Deep.Look(ref snowGrid, \"snowGrid\", this);\n\t\tScribe_Deep.Look(ref gasGrid, \"gasGrid\", this);\n\t\tScribe_Deep.Look(ref pollutionGrid, \"pollutionGrid\", this);\n\t\tScribe_Deep.Look(ref waterBodyTracker, \"waterBodyTracker\", this);\n\t\tScribe_Deep.Look(ref areaManager, \"areaManager\", this);\n\t\tScribe_Deep.Look(ref lordsStarter, \"lordsStarter\", this);\n\t\tScribe_Deep.Look(ref attackTargetReservationManager, \"attackTargetReservationManager\", this);\n\t\tScribe_Deep.Look(ref deepResourceGrid, \"deepResourceGrid\", this);\n\t\tScribe_Deep.Look(ref weatherDecider, \"weatherDecider\", this);\n\t\tScribe_Deep.Look(ref damageWatcher, \"damageWatcher\");\n\t\tScribe_Deep.Look(ref rememberedCameraPos, \"rememberedCameraPos\", this);\n\t\tScribe_Deep.Look(ref mineStrikeManager, \"mineStrikeManager\");\n\t\tScribe_Deep.Look(ref retainedCaravanData, \"retainedCaravanData\", this);\n\t\tScribe_Deep.Look(ref storyState, \"storyState\", this);\n\t\tScribe_Deep.Look(ref tempTerrain, \"tempTerrain\", this);\n\t\tScribe_Deep.Look(ref wildPlantSpawner, \"wildPlantSpawner\", this);\n\t\tScribe_Deep.Look(ref temporaryThingDrawer, \"temporaryThingDrawer\");\n\t\tScribe_Deep.Look(ref flecks, \"flecks\", this);\n\t\tScribe_Deep.Look(ref deferredSpawner, \"deferredSpawner\", this);\n\t\tScribe_Deep.Look(ref autoSlaughterManager, \"autoSlaughterManager\", this);\n\t\tScribe_Deep.Look(ref treeDestructionTracker, \"treeDestructionTracker\", this);\n\t\tScribe_Deep.Look(ref storageGroups, \"storageGroups\", this);\n\t\tScribe_Deep.Look(ref sandGrid, \"sandGrid\", this);\n\t\tScribe_Collections.Look(ref components, \"components\", LookMode.Deep, this);\n\t\tif (Scribe.mode == LoadSaveMode.PostLoadInit)\n\t\t{\n\t\t\tif (planManager == null)\n\t\t\t{\n\t\t\t\tplanManager = new PlanManager(this);\n\t\t\t}\n\t\t\tif (ModsConfig.BiotechActive && pollutionGrid == null)\n\t\t\t{\n\t\t\t\tpollutionGrid = new PollutionGrid(this);\n\t\t\t}\n\t\t\tif (ModsConfig.OdysseyActive)\n\t\t\t{\n\t\t\t\tif (sandGrid == null)\n\t\t\t\t{\n\t\t\t\t\tsandGrid = new SandGrid(this);\n\t\t\t\t}\n\t\t\t\tif (substructureGrid == null)\n\t\t\t\t{\n\t\t\t\t\tsubstructureGrid = new SubstructureGrid(this);\n\t\t\t\t}\n\t\t\t\tif (waterBodyTracker == null)\n\t\t\t\t{\n\t\t\t\t\twaterBodyTracker = new WaterBodyTracker(this);\n\t\t\t\t}\n\t\t\t\tif (freezeManager == null)\n\t\t\t\t{\n\t\t\t\t\tfreezeManager = new FreezeManager(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFillComponents();\n\t\tBackCompatibility.PostExposeData(this);\n\t}\n\n\tpublic void MapPreTick()\n\t{\n\t\titemAvailability.Tick();\n\t\tlisterHaulables.ListerHaulablesTick();\n\t\ttry\n\t\t{\n\t\t\tautoBuildRoofAreaSetter.AutoBuildRoofAreaSetterTick_First();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tLog.Error(ex.ToString());\n\t\t}\n\t\troofCollapseBufferResolver.CollapseRoofsMarkedToCollapse();\n\t\twindManager.WindManagerTick();\n\t\ttry\n\t\t{\n\t\t\tmapTemperature.MapTemperatureTick();\n\t\t}\n\t\tcatch (Exception ex2)\n\t\t{\n\t\t\tLog.Error(ex2.ToString());\n\t\t}\n\t\ttemporaryThingDrawer.Tick();\n\t\ttry\n\t\t{\n\t\t\tpathFinder.PathFinderTick();\n\t\t}\n\t\tcatch (Exception ex3)\n\t\t{\n\t\t\tLog.Error(ex3.ToString());\n\t\t}\n\t}\n\n\tpublic void MapPostTick()\n\t{\n\t\ttry\n\t\t{\n\t\t\twildAnimalSpawner.WildAnimalSpawnerTick();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tLog.Error(ex.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\twildPlantSpawner.WildPlantSpawnerTick();\n\t\t}\n\t\tcatch (Exception ex2)\n\t\t{\n\t\t\tLog.Error(ex2.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tpowerNetManager.PowerNetsTick();\n\t\t}\n\t\tcatch (Exception ex3)\n\t\t{\n\t\t\tLog.Error(ex3.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tsteadyEnvironmentEffects.SteadyEnvironmentEffectsTick();\n\t\t}\n\t\tcatch (Exception ex4)\n\t\t{\n\t\t\tLog.Error(ex4.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\ttempTerrain.Tick();\n\t\t}\n\t\tcatch (Exception ex5)\n\t\t{\n\t\t\tLog.Error(ex5.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tgasGrid.Tick();\n\t\t}\n\t\tcatch (Exception ex6)\n\t\t{\n\t\t\tLog.Error(ex6.ToString());\n\t\t}\n\t\tif (ModsConfig.BiotechActive)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tpollutionGrid.PollutionTick();\n\t\t\t}\n\t\t\tcatch (Exception ex7)\n\t\t\t{\n\t\t\t\tLog.Error(ex7.ToString());\n\t\t\t}\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tdeferredSpawner.DeferredSpawnerTick();\n\t\t}\n\t\tcatch (Exception ex8)\n\t\t{\n\t\t\tLog.Error(ex8.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tlordManager.LordManagerTick();\n\t\t}\n\t\tcatch (Exception ex9)\n\t\t{\n\t\t\tLog.Error(ex9.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tpassingShipManager.PassingShipManagerTick();\n\t\t}\n\t\tcatch (Exception ex10)\n\t\t{\n\t\t\tLog.Error(ex10.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tdebugDrawer.DebugDrawerTick();\n\t\t}\n\t\tcatch (Exception ex11)\n\t\t{\n\t\t\tLog.Error(ex11.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tlordsStarter.VoluntarilyJoinableLordsStarterTick();\n\t\t}\n\t\tcatch (Exception ex12)\n\t\t{\n\t\t\tLog.Error(ex12.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tgameConditionManager.GameConditionManagerTick();\n\t\t}\n\t\tcatch (Exception ex13)\n\t\t{\n\t\t\tLog.Error(ex13.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tweatherManager.WeatherManagerTick();\n\t\t}\n\t\tcatch (Exception ex14)\n\t\t{\n\t\t\tLog.Error(ex14.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tresourceCounter.ResourceCounterTick();\n\t\t}\n\t\tcatch (Exception ex15)\n\t\t{\n\t\t\tLog.Error(ex15.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tweatherDecider.WeatherDeciderTick();\n\t\t}\n\t\tcatch (Exception ex16)\n\t\t{\n\t\t\tLog.Error(ex16.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tfireWatcher.FireWatcherTick();\n\t\t}\n\t\tcatch (Exception ex17)\n\t\t{\n\t\t\tLog.Error(ex17.ToString());\n\t\t}\n\t\tif (ModsConfig.OdysseyActive)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\twaterBodyTracker?.Tick();\n\t\t\t}\n\t\t\tcatch (Exception ex18)\n\t\t\t{\n\t\t\t\tLog.Error(ex18.ToString());\n\t\t\t}\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tflecks.FleckManagerTick();\n\t\t}\n\t\tcatch (Exception ex19)\n\t\t{\n\t\t\tLog.Error(ex19.ToString());\n\t\t}\n\t\ttry\n\t\t{\n\t\t\teffecterMaintainer.EffecterMaintainerTick();\n\t\t}\n\t\tcatch (Exception ex20)\n\t\t{\n\t\t\tLog.Error(ex20.ToString());\n\t\t}\n\t\tMapComponentUtility.MapComponentTick(this);\n\t\ttry\n\t\t{\n\t\t\tforeach (TileMutatorDef mutator in TileInfo.Mutators)\n\t\t\t{\n\t\t\t\tmutator.Worker?.Tick(this);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex21)\n\t\t{\n\t\t\tLog.Error(ex21.ToString());\n\t\t}\n\t}\n\n\tpublic void MapUpdate()\n\t{\n\t\tif (Disposed)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tbool drawingMap = WorldRendererUtility.DrawingMap;\n\t\tskyManager.SkyManagerUpdate();\n\t\tpowerNetManager.UpdatePowerNetsAndConnections_First();\n\t\tregionGrid.UpdateClean();\n\t\tregionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms();\n\t\tglowGrid.GlowGridUpdate_First();\n\t\tlordManager.LordManagerUpdate();\n\t\tpostTickVisuals.ProcessPostTickVisuals();\n\t\tif (drawingMap && Find.CurrentMap == this)\n\t\t{\n\t\t\tif (AlwaysRedrawShadows)\n\t\t\t{\n\t\t\t\tmapDrawer.WholeMapChanged(MapMeshFlagDefOf.Things);\n\t\t\t}\n\t\t\tGlobalRendererUtility.UpdateGlobalShadersParams();\n\t\t\tPlantFallColors.SetFallShaderGlobals(this);\n\t\t\twaterInfo.SetTextures();\n\t\t\tavoidGrid.DebugDrawOnMap();\n\t\t\tBreachingGridDebug.DebugDrawAllOnMap(this);\n\t\t\tmapDrawer.MapMeshDrawerUpdate_First();\n\t\t\tpowerNetGrid.DrawDebugPowerNetGrid();\n\t\t\tDoorsDebugDrawer.DrawDebug();\n\t\t\tmapDrawer.DrawMapMesh();\n\t\t\tdynamicDrawManager.DrawDynamicThings();\n\t\t\tgameConditionManager.GameConditionManagerDraw(this);\n\t\t\tMapEdgeClipDrawer.DrawClippers(this);\n\t\t\tdesignationManager.DrawDesignations();\n\t\t\toverlayDrawer.DrawAllOverlays();\n\t\t\ttemporaryThingDrawer.Draw();\n\t\t\tflecks.FleckManagerDraw();\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tareaManager.AreaManagerUpdate();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tLog.Error(ex.ToString());\n\t\t}\n\t\tweatherManager.WeatherManagerUpdate();\n\t\ttry\n\t\t{\n\t\t\tflecks.FleckManagerUpdate();\n\t\t}\n\t\tcatch (Exception ex2)\n\t\t{\n\t\t\tLog.Error(ex2.ToString());\n\t\t}\n\t\tMapComponentUtility.MapComponentUpdate(this);\n\t}\n\n\tpublic T GetComponent() where T : MapComponent\n\t{\n\t\tfor (int i = 0; i < components.Count; i++)\n\t\t{\n\t\t\tif (components[i] is T result)\n\t\t\t{\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic MapComponent GetComponent(Type type)\n\t{\n\t\tfor (int i = 0; i < components.Count; i++)\n\t\t{\n\t\t\tif (type.IsInstanceOfType(components[i]))\n\t\t\t{\n\t\t\t\treturn components[i];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tpublic void MapOnGUI()\n\t{\n\t\tDevGUISketches();\n\t\tDevRoadPaths();\n\t\tpathFinder.OnGUI();\n\t}\n\n\tprivate static void DevRoadPaths()\n\t{\n\t\tif (!DebugViewSettings.drawRoadPaths)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 0; i < GenStep_Roads.paths.Count; i++)\n\t\t{\n\t\t\tforeach (IntVec3 item in GenStep_Roads.paths[i])\n\t\t\t{\n\t\t\t\tVector2 vector = item.ToVector3Shifted().MapToUIPosition();\n\t\t\t\tDevGUI.DrawRect(new Rect(vector.x, vector.y, 5f, 5f), (i % 2 == 0) ? Color.yellow : Color.blue);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void DevGUISketches()\n\t{\n\t\tif ((!DebugViewSettings.drawMapGraphs && !DebugViewSettings.drawMapRooms) || layoutStructureSketches.NullOrEmpty())\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tforeach (LayoutStructureSketch layoutStructureSketch in layoutStructureSketches)\n\t\t{\n\t\t\tDebugGUILayoutStructure(layoutStructureSketch);\n\t\t}\n\t}\n\n\tprivate void DebugGUILayoutStructure(LayoutStructureSketch layoutStructureSketch)\n\t{\n\t\tDevDrawOutline(layoutStructureSketch.structureLayout.container, Color.yellow);\n\t\tVector2 pos = (layoutStructureSketch.structureLayout.container.Min - IntVec3.South).ToVector3().MapToUIPosition();\n\t\tDevDrawLabel(layoutStructureSketch.layoutDef.defName, pos);\n\t\tif (DebugViewSettings.drawMapGraphs && layoutStructureSketch.structureLayout?.neighbours != null)\n\t\t{\n\t\t\tforeach (KeyValuePair> connection in layoutStructureSketch.structureLayout.neighbours.connections)\n\t\t\t{\n\t\t\t\tforeach (Vector2 item in connection.Value)\n\t\t\t\t{\n\t\t\t\t\tVector2 vector = layoutStructureSketch.center.ToVector2();\n\t\t\t\t\tVector2 vector2 = vector + connection.Key;\n\t\t\t\t\tVector2 vector3 = vector + item;\n\t\t\t\t\tVector2 start = new Vector3(vector2.x, 0f, vector2.y).MapToUIPosition();\n\t\t\t\t\tVector2 end = new Vector3(vector3.x, 0f, vector3.y).MapToUIPosition();\n\t\t\t\t\tDevGUI.DrawLine(start, end, Color.green, 2f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!DebugViewSettings.drawMapRooms || layoutStructureSketch.structureLayout?.Rooms == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tforeach (LayoutRoom room in layoutStructureSketch.structureLayout.Rooms)\n\t\t{\n\t\t\tstring name = \"NA\";\n\t\t\tif (!room.defs.NullOrEmpty())\n\t\t\t{\n\t\t\t\tname = room.defs.Select((LayoutRoomDef x) => x.defName).ToCommaList();\n\t\t\t}\n\t\t\tDevDrawLabel(name, room.rects[0].CenterVector3.MapToUIPosition());\n\t\t\tforeach (CellRect rect in room.rects)\n\t\t\t{\n\t\t\t\tDevDrawOutline(rect, Color.blue);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate static void DevDrawLabel(string name, Vector2 pos)\n\t{\n\t\tfloat widthCached = name.GetWidthCached();\n\t\tDevGUI.Label(new Rect(pos.x - widthCached / 2f, pos.y, widthCached, 20f), name);\n\t}\n\n\tprivate static void DevDrawOutline(CellRect r, Color color)\n\t{\n\t\tIntVec3 min = r.Min;\n\t\tIntVec3 intVec = r.Max + new IntVec3(1, 0, 1);\n\t\tIntVec3 a = new IntVec3(min.x, 0, min.z);\n\t\tIntVec3 intVec2 = new IntVec3(intVec.x, 0, min.z);\n\t\tIntVec3 intVec3 = new IntVec3(min.x, 0, intVec.z);\n\t\tIntVec3 b = new IntVec3(intVec.x, 0, intVec.z);\n\t\tDevDrawLine(a, intVec2, color);\n\t\tDevDrawLine(a, intVec3, color);\n\t\tDevDrawLine(intVec3, b, color);\n\t\tDevDrawLine(intVec2, b, color);\n\t}\n\n\tprivate static void DevDrawLine(IntVec3 a, IntVec3 b, Color color)\n\t{\n\t\tVector2 start = a.ToVector3().MapToUIPosition();\n\t\tVector2 end = b.ToVector3().MapToUIPosition();\n\t\tDevGUI.DrawLine(start, end, color, 2f);\n\t}\n\n\tpublic string GetUniqueLoadID()\n\t{\n\t\treturn \"Map_\" + uniqueID;\n\t}\n\n\tpublic override string ToString()\n\t{\n\t\tstring text = \"Map-\" + uniqueID;\n\t\tif (IsPlayerHome)\n\t\t{\n\t\t\ttext += \"-PlayerHome\";\n\t\t}\n\t\treturn text;\n\t}\n\n\tpublic ThingOwner GetDirectlyHeldThings()\n\t{\n\t\treturn spawnedThings;\n\t}\n\n\tpublic void GetChildHolders(List outChildren)\n\t{\n\t\tThingOwnerUtility.AppendThingHoldersFromThings(outChildren, listerThings.ThingsInGroup(ThingRequestGroup.ThingHolder));\n\t\tList passingShips = passingShipManager.passingShips;\n\t\tfor (int i = 0; i < passingShips.Count; i++)\n\t\t{\n\t\t\tif (passingShips[i] is IThingHolder item)\n\t\t\t{\n\t\t\t\toutChildren.Add(item);\n\t\t\t}\n\t\t}\n\t\tfor (int j = 0; j < components.Count; j++)\n\t\t{\n\t\t\tif (components[j] is IThingHolder item2)\n\t\t\t{\n\t\t\t\toutChildren.Add(item2);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic void Dispose()\n\t{\n\t\tif (Disposed)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tDisposed = true;\n\t\tforeach (MapComponent component in components)\n\t\t{\n\t\t\tif (component is IDisposable disposable)\n\t\t\t{\n\t\t\t\tdisposable.Dispose();\n\t\t\t}\n\t\t}\n\t\tif (regionAndRoomUpdater != null)\n\t\t{\n\t\t\tregionAndRoomUpdater.Enabled = false;\n\t\t}\n\t\tpathFinder?.Dispose();\n\t\tlordManager?.Dispose();\n\t\tfogGrid?.Dispose();\n\t\tsnowGrid?.Dispose();\n\t\tglowGrid?.Dispose();\n\t\tsandGrid?.Dispose();\n\t\tavoidGrid?.Dispose();\n\t\tlisterBuildings?.Dispose();\n\t\tlisterThings?.Clear();\n\t\tregionDirtyer?.SetAllDirty();\n\t\tregionGrid?.Dispose();\n\t\tpathing?.Dispose();\n\t\tmapDrawer?.Dispose();\n\t\tResources.UnloadUnusedAssets();\n\t\tMapGenerator.ClearDebugMode();\n\t}\n}\n\n", "timestamp": "2025-08-25 11:41:03,392" + }, + "Thing-class-definition": { + "keywords": [ + "Thing", + "class", + "definition" + ], + "question": "Thing class definition", + "embedding": [ + -0.03260350599884987, + 0.02423495054244995, + 0.021687297150492668, + -0.0035957377403974533, + -0.038440532982349396, + -0.006014395505189896, + -0.03369996324181557, + 0.0753331258893013, + 0.057306062430143356, + 0.10796888172626495, + -0.06514251232147217, + -0.039601489901542664, + -0.012843072414398193, + -0.0421491414308548, + 0.06291735172271729, + -0.03266800194978714, + 0.0012244454119354486, + -0.08120240271091461, + -0.015938954427838326, + -0.02213877998292446, + 0.031523171812295914, + 0.07765503227710724, + 0.004659947007894516, + 0.04437430575489998, + 0.04353583976626396, + 0.008449177257716656, + -0.004825221840292215, + 0.04705095291137695, + -0.030555708333849907, + -0.05395219102501869, + -0.003035415429621935, + -0.004514827858656645, + -0.016479121521115303, + 0.012480273842811584, + -0.01504405029118061, + 0.014713500626385212, + -0.017027350142598152, + 0.004958248231559992, + 0.017478832975029945, + -0.011222572065889835, + 0.019252514466643333, + -0.000278397579677403, + -0.03389345481991768, + -0.013600918464362621, + -0.028330544009804726, + 0.025782890617847443, + 0.00896515790373087, + -0.057725295424461365, + -0.019510505720973015, + 0.08262134343385696, + -0.0044906409457325935, + 0.030555708333849907, + -0.013705726712942123, + -0.023364232853055, + 0.002277569379657507, + 0.014310391619801521, + 0.04830865561962128, + -0.018285052850842476, + 0.0028197518549859524, + 0.03582838177680969, + 0.023380357772111893, + 0.024380069226026535, + -0.044535551220178604, + -0.011891733855009079, + 0.09100602567195892, + -0.022300023585557938, + 0.022944999858736992, + 0.01805931143462658, + 0.056499842554330826, + -0.029862361028790474, + -0.011456375010311604, + 0.07900948077440262, + -0.06939934939146042, + 0.024444567039608955, + -0.056435346603393555, + 0.04008521884679794, + -0.006252230145037174, + -0.009190899319946766, + -0.028443414717912674, + -0.01547134667634964, + 0.01181111205369234, + 0.011948169209063053, + -0.008392741903662682, + 0.002870140364393592, + 0.04443880543112755, + 0.038988761603832245, + 0.011770800687372684, + -0.07384967803955078, + -0.011150011792778969, + 0.07720354944467545, + -0.02342873066663742, + 0.007421248126775026, + 0.019881365820765495, + 0.009779439307749271, + 0.010400228202342987, + 0.06488452106714249, + -0.05543563514947891, + 0.01738208718597889, + -0.02146155573427677, + 0.047502435743808746, + -0.0262021254748106, + -0.054468169808387756, + -0.021364809945225716, + 0.04134292155504227, + 0.024186577647924423, + 0.08629770576953888, + -0.04508377984166145, + -0.010150300338864326, + -0.022025909274816513, + -0.01235934067517519, + 0.0018784907879307866, + 0.03002360463142395, + -0.012657641433179379, + 0.03850502893328667, + -0.007868699729442596, + 0.07197925448417664, + -0.05085630714893341, + -0.010101926513016224, + 0.045825500041246414, + 0.004369708243757486, + -0.0008641662425361574, + -0.04266512021422386, + -0.012722139246761799, + -0.022042034193873405, + 0.010255108587443829, + 0.00850561261177063, + 0.06446529179811478, + -0.0032450323924422264, + -0.0024287353735417128, + -0.016688738018274307, + -0.03918225318193436, + -0.0026302901096642017, + 0.028443414717912674, + -0.01893002726137638, + -0.012899507768452168, + -0.018043186515569687, + 0.036344364285469055, + 0.005349264480173588, + -0.06185314059257507, + 0.007010076195001602, + -0.02362222410738468, + -0.013270368799567223, + -0.0237995907664299, + 0.030249346047639847, + 0.0679159089922905, + -0.03927899897098541, + 0.010771089233458042, + -0.057048071175813675, + -0.0004847393138334155, + 0.0024105955380946398, + -0.02181629277765751, + -0.057983286678791046, + -0.014302329160273075, + 0.0071511645801365376, + 0.021735670045018196, + -0.006909298710525036, + 0.0016537571791559458, + -0.04185890033841133, + 0.02046184428036213, + -0.04289086163043976, + 0.018849406391382217, + -0.011093576438724995, + -0.03070082888007164, + -0.01762395165860653, + -0.02255801483988762, + -0.03395795449614525, + -0.02995910681784153, + 0.05246874690055847, + -0.06804490089416504, + -0.011109701357781887, + 0.042374882847070694, + -0.009739127941429615, + -0.015551968477666378, + -0.002868124982342124, + 0.020171605050563812, + 0.001337316120043397, + 0.03241001442074776, + 0.008932908996939659, + 0.02238064631819725, + -0.046825211495161057, + 0.02349322848021984, + 0.011698241345584393, + 0.07081829756498337, + 0.0011942122364416718, + -0.006167577113956213, + -0.016543619334697723, + -0.016737110912799835, + 0.017494957894086838, + 0.030071977525949478, + 0.011198384687304497, + -0.04766368120908737, + 0.002444859826937318, + 0.02908838912844658, + 0.05617735534906387, + -0.07913848012685776, + -0.03360321745276451, + 0.006917361170053482, + 0.031103936955332756, + -0.0035816289018839598, + -0.040536701679229736, + -0.005889431573450565, + 0.028798149898648262, + 0.013987903483211994, + 0.008562047965824604, + 0.04134292155504227, + -0.03518340736627579, + -0.005357326939702034, + -0.0012365387519821525, + 0.00786063726991415, + -0.002368269022554159, + 0.00965044368058443, + -0.025782890617847443, + 0.019897490739822388, + -0.013536420650780201, + -0.025799015536904335, + -0.023348107933998108, + -0.06024070084095001, + 0.007336595095694065, + -0.027701692655682564, + -0.018655912950634956, + -0.029539871960878372, + 0.029120638966560364, + 0.010005180723965168, + 0.04440655559301376, + 0.027217961847782135, + -0.01085171103477478, + 0.01731758937239647, + 0.01565677672624588, + -0.015560030937194824, + -0.0010314567480236292, + -0.017704574391245842, + 0.033925704658031464, + -0.0882326290011406, + 0.04147191718220711, + 0.03731182590126991, + 0.0014330546837300062, + -0.02428332343697548, + -0.010674342513084412, + 0.0316682904958725, + 0.02004260942339897, + -0.01007774006575346, + 0.04079469293355942, + -0.06182089075446129, + 0.06314308941364288, + -0.00825568474829197, + -0.008836162276566029, + -0.050211332738399506, + -0.027330832555890083, + 0.05450041964650154, + -0.016978977248072624, + -0.008521737530827522, + 0.0014542179415002465, + -0.05011458694934845, + -0.023267487064003944, + -0.04179440438747406, + 0.04253612458705902, + -0.016471058130264282, + 0.01652749441564083, + 0.0024408285971730947, + -0.006219981238245964, + -0.015955079346895218, + -0.011077452450990677, + 0.0020619055721908808, + -0.027169587090611458, + -0.03311948478221893, + 0.004974372684955597, + -0.00293665356002748, + -0.0421491414308548, + -0.11448313295841217, + 0.0033296854235231876, + -0.015890581533312798, + 0.031232932582497597, + 0.00927958358079195, + -0.029620494693517685, + -0.01973624713718891, + 0.02786293625831604, + 0.01652749441564083, + 0.058950748294591904, + -0.07997694611549377, + -0.012085226364433765, + -0.0075784604996442795, + 0.012843072414398193, + 0.010085802525281906, + -0.04205239564180374, + -0.0032006902620196342, + 0.023396482691168785, + 0.02360609918832779, + 0.006913329940289259, + 0.03747307136654854, + -0.0031341772992163897, + 0.010932332836091518, + 0.0055669439025223255, + -0.02700834348797798, + -0.010488912463188171, + -0.01060178317129612, + 0.00507111893966794, + -0.0006580764311365783, + -0.0017656200798228383, + 0.003998847212642431, + 0.03592512756586075, + 0.00510336784645915, + 0.01245608739554882, + -0.007022169418632984, + -0.00439389469102025, + 0.04895363003015518, + 0.012754388153553009, + -0.00882003828883171, + -0.09384391456842422, + -0.009110277518630028, + -0.09055454283952713, + 0.0011387846898287535, + -0.01174661424010992, + -0.007002014201134443, + -0.008666856214404106, + 0.01659199222922325, + 0.010932332836091518, + -0.03902101144194603, + -0.01418139599263668, + -0.011311255395412445, + 0.012472211383283138, + -0.03292599320411682, + -0.006598904263228178, + 0.0430198572576046, + 0.016309814527630806, + -0.0083524314686656, + 0.00902965571731329, + 0.05311372131109238, + 0.00850561261177063, + -0.01768844947218895, + -0.014294266700744629, + -0.0001568348379805684, + 0.004889719653874636, + 0.02157442644238472, + -0.008392741903662682, + 0.012875321321189404, + -0.004728475585579872, + -0.008062192238867283, + 0.032281018793582916, + -0.01755945384502411, + 0.011238696053624153, + -0.012036853469908237, + 0.06307858973741531, + 0.018043186515569687, + -0.029862361028790474, + 0.01818830519914627, + -0.03076532483100891, + -0.010182549245655537, + 0.03271637484431267, + -0.021864665672183037, + 0.021219689399003983, + -0.008126690052449703, + -0.014310391619801521, + -0.003769074799492955, + 0.02441231906414032, + 0.0021304343827068806, + -0.011262882500886917, + 0.018462419509887695, + 0.007223724387586117, + -0.01264151744544506, + -0.00168701377697289, + -0.017672324553132057, + 0.06843189150094986, + 0.01050503645092249, + 0.03889201581478119, + 0.05627410113811493, + 0.030410589650273323, + -0.006699681747704744, + 0.03808579593896866, + 0.018349548801779747, + 0.011835298500955105, + 0.023267487064003944, + -0.02644398994743824, + -0.03274862468242645, + 0.008481426164507866, + -0.029491499066352844, + -0.028314419090747833, + 0.01214166171848774, + 0.007630865089595318, + 0.016737110912799835, + 0.028459537774324417, + 0.06694844365119934, + 0.024815427139401436, + -6.172616122057661e-05, + -0.05862826108932495, + -0.009384391829371452, + 0.0036400798708200455, + 0.0421491414308548, + 0.005054994486272335, + 0.025508776307106018, + -0.04943736270070076, + 0.0679159089922905, + -0.007433341350406408, + 0.006280447822064161, + -0.009392454288899899, + 0.03789230436086655, + 0.014721563085913658, + 0.011859484948217869, + 0.023138491436839104, + 0.010698528960347176, + -0.012504460290074348, + 0.01506823766976595, + -0.025137916207313538, + -0.010996830649673939, + 0.027524324133992195, + -0.038376033306121826, + -0.0345061831176281, + 0.008235529065132141, + 0.026863224804401398, + 0.008424990810453892, + 0.04985659569501877, + -0.08597521483898163, + 0.03087819553911686, + 0.08874861150979996, + -0.014262017793953419, + -0.04260062426328659, + -0.01572933793067932, + -0.003057586494833231, + -0.015890581533312798, + 0.06959284096956253, + -0.026863224804401398, + 0.007292252965271473, + 0.022574137896299362, + 0.015890581533312798, + -0.007876762188971043, + -0.03437718749046326, + 0.011383815668523312, + -0.024122079834342003, + -0.00732047064229846, + 0.01278663706034422, + 0.0018281020456925035, + -0.06504576653242111, + -0.05856376513838768, + 0.02109069563448429, + 0.0644330382347107, + 0.013270368799567223, + -0.0469542071223259, + -0.0006228043348528445, + 0.0017918222583830357, + -0.030346091836690903, + -0.00786466896533966, + -0.0775260403752327, + -0.012835009954869747, + 0.015793833881616592, + -0.02373509481549263, + -0.036279864609241486, + -0.010553409345448017, + 0.019284764304757118, + -0.013060751371085644, + 0.011996542103588581, + -0.016446871683001518, + -0.018526917323470116, + 0.01645493507385254, + -0.001411891425959766, + 0.04131067171692848, + 0.013294555246829987, + 0.020735958591103554, + -0.010916207917034626, + -0.004514827858656645, + 0.002833860693499446, + -0.021671172231435776, + 0.019155768677592278, + -0.029942981898784637, + 0.012448024936020374, + 0.031410299241542816, + 0.007425278890877962, + -0.041149429976940155, + 0.008957095444202423, + -0.001743449131026864, + -0.023718969896435738, + -0.02902389131486416, + 0.026186000555753708, + 0.01368154026567936, + -0.013770224526524544, + 0.03137805312871933, + 0.013246181420981884, + -0.007183413486927748, + -0.00607083085924387, + -0.0038537278305739164, + 0.01507629919797182, + 0.06482002884149551, + 0.05746730789542198, + 0.011875608935952187, + 0.017027350142598152, + 0.007203568704426289, + -0.05740280821919441, + -0.03137805312871933, + -0.017043475061655045, + 0.01060178317129612, + 0.018655912950634956, + -0.052984725683927536, + 0.01954275369644165, + 0.006123234983533621, + 0.026669731363654137, + 0.022283898666501045, + -0.006868987809866667, + -0.02804030478000641, + -0.0006338898674584925, + 0.07243073731660843, + -0.006409442983567715, + -0.08803913742303848, + -0.04063344746828079, + 0.029733365401625633, + -0.06059543788433075, + 0.002835876075550914, + -0.004522889852523804, + 0.02065533585846424, + -0.004950186237692833, + 0.0034848826471716166, + -0.004045205190777779, + 0.025605522096157074, + 0.027201836928725243, + -0.022461267188191414, + 0.05572587251663208, + -0.03063633106648922, + -0.010561471804976463, + 0.01836567372083664, + 0.10596945136785507, + 0.01245608739554882, + 0.006651308387517929, + -0.007804201915860176, + -0.0037368261255323887, + -0.04069794714450836, + -0.028685279190540314, + -0.01794644072651863, + -0.05037257820367813, + 0.02768556773662567, + -0.01143218856304884, + -0.018720410764217377, + 0.0759781002998352, + -0.039923977106809616, + -0.008957095444202423, + 0.0017646122723817825, + 0.037569817155599594, + -0.0295882448554039, + -0.023073993623256683, + 0.038988761603832245, + 0.03299048915505409, + 0.011980418115854263, + -0.013544483110308647, + 0.09932620823383331, + 0.09887472540140152, + 0.035667140036821365, + 0.00459141843020916, + 0.03328073024749756, + 0.035409148782491684, + 0.006901236716657877, + 7.079612259985879e-05, + -0.041891150176525116, + 0.00705844908952713, + -0.03268412873148918, + -0.0028600627556443214, + 0.016414623707532883, + -0.029314130544662476, + -0.04208464175462723, + 0.040407706052064896, + 0.03107168897986412, + 0.014931180514395237, + 0.0005955944652669132, + 0.028217673301696777, + -0.03174891322851181, + -0.02454131282866001, + -0.018075434491038322, + -0.0469542071223259, + -0.03207140043377876, + 0.0052887978963553905, + 0.02083270438015461, + 0.02323523722589016, + 0.010650156065821648, + 0.04724444821476936, + -0.030991066247224808, + -0.03840828314423561, + 0.017801320180296898, + -0.02602475695312023, + 0.02329973503947258, + 0.04124617576599121, + 0.006772241555154324, + -0.006776272784918547, + -0.008376617915928364, + 0.09706879407167435, + 0.011109701357781887, + -0.028072552755475044, + 0.008513675071299076, + 0.021896913647651672, + -0.006219981238245964, + 0.0007785054622218013, + 0.020058734342455864, + 0.03921450302004814, + 0.0011327379615977407, + 0.02576676569879055, + -0.0027794407214969397, + -0.005865244660526514, + 0.013238119892776012, + -0.0390855073928833, + -0.016866106539964676, + -0.03194240480661392, + 0.01794644072651863, + 0.026911597698926926, + 0.016624240204691887, + 0.005736249964684248, + 0.04772817716002464, + 0.021687297150492668, + -0.04605124145746231, + -0.0048211910761892796, + 0.003075726330280304, + 0.009045779705047607, + -0.03149092197418213, + 0.005712063051760197, + -0.009045779705047607, + 0.007042325101792812, + 0.04011746868491173, + 0.06933484971523285, + 0.053468458354473114, + -0.04353583976626396, + 0.021558301523327827, + 0.0353768989443779, + -0.003380074165761471, + 0.0040391581133008, + 0.012512522749602795, + 0.02570226974785328, + -0.04630923271179199, + -0.039536990225315094, + 0.008134751580655575, + -0.001273826346732676, + -0.03302273899316788, + 0.006651308387517929, + -0.01152893528342247, + 0.026976095512509346, + -0.00555081944912672, + -0.057241566479206085, + -0.01525366771966219, + -0.021219689399003983, + 0.04637372866272926, + -0.02594413422048092, + 0.04085918888449669, + -0.022509640082716942, + 0.007155195809900761, + -0.005990209057927132, + 0.005143678747117519, + 0.0021949317306280136, + -0.023009495809674263, + 0.01762395165860653, + 0.007913041859865189, + 0.013576732017099857, + -0.03120068460702896, + 0.00274316081777215, + 0.006473940331488848, + -0.05340396240353584, + -0.03753756731748581, + 0.015624528750777245, + -0.02342873066663742, + 0.010521160438656807, + 0.02213877998292446, + 0.04224588721990585, + -0.0063368831761181355, + 0.03353872150182724, + 0.03207140043377876, + -0.04495478421449661, + 0.054468169808387756, + 0.020268350839614868, + -0.02749207615852356, + -0.038924265652894974, + -0.023073993623256683, + -0.024267198517918587, + -0.018268927931785583, + 0.03211977332830429, + 0.024686433374881744, + -0.017333712428808212, + -0.02218715287744999, + 0.01146443746984005, + 0.003253094619140029, + 0.00699798297137022, + -0.01880103163421154, + 0.02305787056684494, + -0.0310071911662817, + 0.015987327322363853, + 0.0478249229490757, + -0.08913559466600418, + -0.03989172726869583, + 0.04469679296016693, + 0.028878772631287575, + 0.002118340926244855, + 0.016108259558677673, + -0.014052401296794415, + -0.020687585696578026, + -0.02749207615852356, + 0.027653319761157036, + -0.021977536380290985, + 0.02028447575867176, + -0.06156289950013161, + 0.014665127731859684, + 0.0674644261598587, + -0.034989915788173676, + 0.02970111556351185, + 0.011907857842743397, + 0.028765901923179626, + -0.02755657397210598, + -0.02205815725028515, + -0.04163316264748573, + 0.003956520929932594, + 0.06810940057039261, + -0.007094729226082563, + 0.007651020307093859, + 0.049405112862586975, + 0.0067923967726528645, + 0.025734517723321915, + 0.009690755046904087, + -0.027750065550208092, + -0.04272961989045143, + 0.004889719653874636, + 0.04218139126896858, + 0.008892597630620003, + 0.012214221060276031, + 0.023444855585694313, + -0.010625969618558884, + -0.0007774976547807455, + 0.009803625755012035, + 0.020171605050563812, + -0.01910739578306675, + -0.037569817155599594, + -0.019526628777384758, + -0.03026546910405159, + -0.018704285845160484, + 0.03969823569059372, + 0.02299337275326252, + -0.052243005484342575, + -0.045535262674093246, + 0.018897779285907745, + -0.019091270864009857, + 0.008900660090148449, + 0.06798040866851807, + -0.01297206711024046, + -0.030233221128582954, + 0.0023158646654337645, + 0.012004604563117027, + 0.01069046650081873, + -0.049953341484069824, + 0.0039041165728121996, + -0.055016398429870605, + -0.0020467890426516533, + 0.0028318450786173344, + 0.018156057223677635, + -0.023815715685486794, + 0.004329397343099117, + -0.04211689159274101, + 0.05201726406812668, + -0.022606387734413147, + -0.04576100409030914, + 0.005865244660526514, + 0.0011851423187181354, + -0.026830974966287613, + -0.002674632240086794, + 0.015479409135878086, + -0.05037257820367813, + 0.019881365820765495, + -0.010166424326598644, + -0.006373162847012281, + 0.030652454122900963, + 0.004607542883604765, + -0.003172472584992647, + 0.046889711171388626, + -7.04182093613781e-05, + 0.022896625101566315, + 0.0013353006215766072, + 0.0600472092628479, + 0.003166425973176956, + 0.007703424897044897, + -0.0001686761825112626, + 0.024009209126234055, + -0.005272673908621073, + -0.0325390063226223, + -0.03321623057126999, + -0.018543042242527008, + -0.007586522959172726, + 0.07694556564092636, + -0.0012415775563567877, + -0.004575293976813555, + 0.005913618020713329, + 0.01232709176838398, + -0.0040351273491978645, + -0.016180820763111115, + 0.017236966639757156, + -0.0030031665228307247, + -0.04672846570611, + -0.010996830649673939, + 0.029378628358244896, + 0.032393887639045715, + -0.03934349864721298, + 0.04801841825246811, + 0.0019873303826898336, + -0.005720125511288643, + 0.0006495103589259088, + -0.015519720502197742, + 0.032942116260528564, + 0.023589974269270897, + 0.029572121798992157, + -0.0019530660938471556, + -0.029862361028790474, + 0.036408860236406326, + 0.046825211495161057, + 0.022961122915148735, + 0.05314597114920616, + -0.026298871263861656, + 0.05182377249002457, + -0.024138202890753746, + -0.011424126103520393, + 0.038730770349502563, + -3.287862637080252e-05, + -0.009319894015789032, + 0.019494380801916122, + -0.021848540753126144, + 0.01794644072651863, + 0.00405125180259347, + -0.020913327112793922, + -0.02279987931251526, + -0.0014421246014535427, + -0.04037545993924141, + -0.003922256641089916, + -0.00789288617670536, + -0.026250498369336128, + 0.04647047445178032, + 0.01954275369644165, + 0.031523171812295914, + 0.008900660090148449, + 0.0025033107958734035, + 0.008171032182872295, + -0.006187732331454754, + 0.02539590559899807, + -0.04179440438747406, + 0.002299740444868803, + 0.03205527737736702, + 0.058660510927438736, + 0.022767631337046623, + -0.050630565732717514, + 0.005139647517353296, + 0.0022191184107214212, + -0.017672324553132057, + -0.05579037219285965, + -0.006111141759902239, + 0.0399562232196331, + 0.005929742474108934, + -0.02120356634259224, + 0.007618771865963936, + -0.005441979970782995, + -0.007900948636233807, + -0.04414856433868408, + 0.023364232853055, + 0.004333428107202053, + -0.03274862468242645, + -0.021122943609952927, + -0.056628838181495667, + 0.019284764304757118, + 0.030894320458173752, + 0.006844801362603903, + 0.012794699519872665, + -0.002307802438735962, + 0.04637372866272926, + -0.020203853026032448, + -0.017494957894086838, + 0.0018956229323521256, + 0.0055911303497850895, + -0.027072841301560402, + 0.012254532426595688, + -0.025750642642378807, + 0.019929738715291023, + -0.022283898666501045, + 0.0063368831761181355, + 0.010053553618490696, + 0.021977536380290985, + 0.0014945288421586156, + -0.02655686065554619, + 0.05108204856514931, + 0.04043995589017868, + -0.025073418393731117, + 0.02410595491528511, + -0.010166424326598644, + 0.02607312984764576, + -0.02854016050696373, + 0.03176503628492355, + 0.010101926513016224, + 0.05227525532245636, + 0.004345521796494722, + -0.039601489901542664, + 0.02854016050696373, + -0.016817733645439148, + 0.012625393457710743, + -0.02207428216934204, + 0.03373221307992935, + -0.032700251787900925, + -0.04253612458705902, + 0.037086084485054016, + -0.011819173581898212, + -0.01335099060088396, + -0.03224876895546913, + 0.029314130544662476, + -0.02742757834494114, + 0.0023219112772494555, + 0.006941547617316246, + -0.020074859261512756, + -0.02133256010711193, + -0.02404145710170269, + 0.021219689399003983, + -0.06765791773796082, + 0.021671172231435776, + -0.031152311712503433, + 0.005478259641677141, + 0.02607312984764576, + -0.05134003981947899, + -0.013326804153621197, + -0.05991821363568306, + 0.02908838912844658, + -0.0028499849140644073, + 0.01991361565887928, + 0.023928586393594742, + 0.007026200648397207, + -0.019381510093808174, + -0.029620494693517685, + -0.024380069226026535, + 0.035731635987758636, + 0.001526777632534504, + -0.05201726406812668, + 0.04424531012773514, + 0.01880103163421154, + -0.014471635222434998, + -0.01694672740995884, + 0.01831730082631111, + 0.00838468037545681, + -0.044535551220178604, + 0.06785140931606293, + -0.03168441727757454, + 0.05843476951122284, + 0.030652454122900963, + 0.04408406838774681, + 0.037086084485054016, + 0.0027451764326542616, + -0.000567880691960454, + -0.011794987134635448, + -0.015697088092565536, + -0.009303770028054714, + 0.026605233550071716, + -0.02496054768562317, + 0.018720410764217377, + -0.04414856433868408, + 0.021977536380290985, + -0.007848544046282768, + 0.050017841160297394, + 0.016801608726382256, + -0.01039216574281454, + -0.024138202890753746, + 0.0561128593981266, + -0.004418081138283014, + 0.01257701963186264, + -0.04914712533354759, + -0.016180820763111115, + -0.004514827858656645, + -0.04095593839883804, + -0.019091270864009857, + 0.0049139061011374, + -0.053049225360155106, + -0.01371378917247057, + -0.03311948478221893, + 0.0364733561873436, + 0.024831552058458328, + 0.02644398994743824, + -0.051501285284757614, + 0.03210365027189255, + 0.002547652693465352, + -0.05017908290028572, + -0.02607312984764576, + 0.003793261479586363, + 0.02520241215825081, + -0.02823379635810852, + 0.03453843295574188, + -0.008130720816552639, + -0.05221075564622879, + -0.01891390234231949, + 0.04308435693383217, + -0.013834722340106964, + -0.04085918888449669, + -0.03207140043377876, + -0.0044785477221012115, + 0.020993947982788086, + 0.021558301523327827, + -0.0001853044523159042, + 0.01941375806927681, + -0.02546040341258049, + -0.025347532704472542, + 0.017091847956180573, + -0.003454649355262518, + 0.029056141152977943, + -0.0258796364068985, + 0.007348688319325447, + -0.04598674550652504, + -0.01688223145902157, + -0.01781744509935379, + -0.018946152180433273, + -0.01075496431440115, + -0.004272961989045143, + -0.03889201581478119, + 0.04530952125787735, + 0.013770224526524544, + -0.02502504549920559, + 0.07081829756498337, + -0.026363369077444077, + -0.007699393667280674, + 7.614992500748485e-05, + -0.004494672175496817, + -0.06888337433338165, + -0.0031059596221894026, + -0.005216238554567099, + -0.039665985852479935, + 0.05046932399272919, + 0.012931756675243378, + 0.0011750644771382213, + 0.005599192343652248, + 0.01764007657766342, + 0.014229768887162209, + -0.03976273164153099, + -0.012560895644128323, + 0.007284190505743027, + 0.013802473433315754, + -0.03789230436086655, + 0.045535262674093246, + -0.03315173462033272, + 0.0007538149948231876 + ], + "result": "--- 结果 1 (相似度: 1.000) ---\n文件路径: C:\\Steam\\steamapps\\common\\RimWorld\\Data\\dll1.6\\Verse\\Thing.txt\n\npublic class Thing : Entity, ISelectable, ILoadReferenceable, ISignalReceiver, IExposable, IEquatable\n{\n\tpublic ThingDef def;\n\n\tpublic int thingIDNumber = -1;\n\n\tprivate sbyte mapIndexOrState = -1;\n\n\tprivate IntVec3 positionInt = IntVec3.Invalid;\n\n\tprivate Rot4 rotationInt = Rot4.North;\n\n\tpublic int stackCount = 1;\n\n\tprotected Faction factionInt;\n\n\tprivate ThingDef stuffInt;\n\n\tprivate Graphic graphicInt;\n\n\tprotected Graphic styleGraphicInt;\n\n\tprivate int hitPointsInt = -1;\n\n\tpublic ThingOwner holdingOwner;\n\n\tpublic List questTags;\n\n\tpublic int spawnedTick = -1;\n\n\tpublic int despawnedTick = -1;\n\n\tpublic int? overrideGraphicIndex;\n\n\tpublic bool debugRotLocked;\n\n\tprivate bool beingTransportedOnGravship;\n\n\tprivate int tickDelta;\n\n\tprivate bool beenRevealed;\n\n\tpublic bool shouldHighlightCached;\n\n\tpublic int shouldHighlightCachedTick;\n\n\tpublic Color highlightColorCached;\n\n\tpublic int highlightColorCachedTick;\n\n\tprotected const sbyte UnspawnedState = -1;\n\n\tprivate const sbyte MemoryState = -2;\n\n\tprivate const sbyte DiscardedState = -3;\n\n\tprivate List tmpHolders;\n\n\tpublic static bool allowDestroyNonDestroyable = false;\n\n\tprivate static Dictionary facIDsCached = new Dictionary();\n\n\tprivate static List tmpDeteriorationReasons = new List();\n\n\tpublic static HashSet showingGizmosForRitualsTmp = new HashSet();\n\n\tprivate static List tmpIdeoNames = new List();\n\n\tpublic const float SmeltCostRecoverFraction = 0.25f;\n\n\tpublic virtual int HitPoints\n\t{\n\t\tget\n\t\t{\n\t\t\treturn hitPointsInt;\n\t\t}\n\t\tset\n\t\t{\n\t\t\thitPointsInt = value;\n\t\t}\n\t}\n\n\tpublic int MaxHitPoints => Mathf.RoundToInt(this.GetStatValue(StatDefOf.MaxHitPoints, applyPostProcess: true, 10));\n\n\tpublic virtual float MarketValue => this.GetStatValue(StatDefOf.MarketValue);\n\n\tpublic virtual float RoyalFavorValue => this.GetStatValue(StatDefOf.RoyalFavorValue);\n\n\tpublic virtual int? OverrideGraphicIndex => overrideGraphicIndex;\n\n\tpublic virtual Texture UIIconOverride => null;\n\n\tpublic bool EverSeenByPlayer\n\t{\n\t\tget\n\t\t{\n\t\t\treturn this.GetEverSeenByPlayer();\n\t\t}\n\t\tset\n\t\t{\n\t\t\tthis.SetEverSeenByPlayer(value);\n\t\t}\n\t}\n\n\tpublic virtual ThingStyleDef StyleDef\n\t{\n\t\tget\n\t\t{\n\t\t\treturn this.GetStyleDef();\n\t\t}\n\t\tset\n\t\t{\n\t\t\tstyleGraphicInt = null;\n\t\t\tthis.SetStyleDef(value);\n\t\t}\n\t}\n\n\tpublic Precept_ThingStyle StyleSourcePrecept\n\t{\n\t\tget\n\t\t{\n\t\t\treturn this.GetStyleSourcePrecept();\n\t\t}\n\t\tset\n\t\t{\n\t\t\tthis.SetStyleSourcePrecept(value);\n\t\t}\n\t}\n\n\tpublic bool FlammableNow\n\t{\n\t\tget\n\t\t{\n\t\t\tif (this.GetStatValue(StatDefOf.Flammability) < 0.01f)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (Spawned && !FireBulwark)\n\t\t\t{\n\t\t\t\tList thingList = Position.GetThingList(Map);\n\t\t\t\tif (thingList != null)\n\t\t\t\t{\n\t\t\t\t\tfor (int i = 0; i < thingList.Count; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (thingList[i].FireBulwark)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tpublic virtual bool FireBulwark => def.Fillage == FillCategory.Full;\n\n\tpublic bool Destroyed\n\t{\n\t\tget\n\t\t{\n\t\t\tif (mapIndexOrState != -2)\n\t\t\t{\n\t\t\t\treturn mapIndexOrState == -3;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tpublic bool Discarded => mapIndexOrState == -3;\n\n\tpublic bool Spawned\n\t{\n\t\tget\n\t\t{\n\t\t\tif (mapIndexOrState < 0 || Find.Maps == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (mapIndexOrState < Find.Maps.Count)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tLog.ErrorOnce($\"Thing {ThingID} is associated with invalid map index {mapIndexOrState}\", 64664487);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic bool SpawnedOrAnyParentSpawned => SpawnedParentOrMe != null;\n\n\tpublic Thing SpawnedParentOrMe\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif (ParentHolder != null)\n\t\t\t{\n\t\t\t\treturn ThingOwnerUtility.SpawnedParentOrMe(ParentHolder);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic int TickSpawned => spawnedTick;\n\n\tpublic int TickDeSpawned => despawnedTick;\n\n\tpublic Map Map\n\t{\n\t\tget\n\t\t{\n\t\t\tif (mapIndexOrState >= 0)\n\t\t\t{\n\t\t\t\treturn Find.Maps?[mapIndexOrState];\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tpublic Map MapHeld\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn Map;\n\t\t\t}\n\t\t\tif (ParentHolder == null)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn ThingOwnerUtility.GetRootMap(ParentHolder);\n\t\t}\n\t}\n\n\tpublic IntVec3 Position\n\t{\n\t\tget\n\t\t{\n\t\t\treturn positionInt;\n\t\t}\n\t\tset\n\t\t{\n\t\t\tif (value == positionInt)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\tif (def.AffectsRegions)\n\t\t\t\t{\n\t\t\t\t\tLog.Warning(\"Changed position of a spawned thing which affects regions. This is not supported.\");\n\t\t\t\t}\n\t\t\t\tDirtyMapMesh(Map);\n\t\t\t\tRegionListersUpdater.DeregisterInRegions(this, Map);\n\t\t\t\tMap.thingGrid.Deregister(this);\n\t\t\t\tMap.coverGrid.DeRegister(this);\n\t\t\t}\n\t\t\tpositionInt = value;\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\tMap.thingGrid.Register(this);\n\t\t\t\tMap.coverGrid.Register(this);\n\t\t\t\tMap.gasGrid.Notify_ThingSpawned(this);\n\t\t\t\tRegionListersUpdater.RegisterInRegions(this, Map);\n\t\t\t\tDirtyMapMesh(Map);\n\t\t\t\tif (def.AffectsReachability)\n\t\t\t\t{\n\t\t\t\t\tMap.reachability.ClearCache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic IntVec3 PositionHeld\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn Position;\n\t\t\t}\n\t\t\tIntVec3 rootPosition = ThingOwnerUtility.GetRootPosition(ParentHolder);\n\t\t\tif (rootPosition.IsValid)\n\t\t\t{\n\t\t\t\treturn rootPosition;\n\t\t\t}\n\t\t\treturn Position;\n\t\t}\n\t}\n\n\tpublic Rot4 Rotation\n\t{\n\t\tget\n\t\t{\n\t\t\treturn rotationInt;\n\t\t}\n\t\tset\n\t\t{\n\t\t\tif (value == rotationInt || debugRotLocked)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (Spawned && (def.size.x != 1 || def.size.z != 1))\n\t\t\t{\n\t\t\t\tif (def.AffectsRegions)\n\t\t\t\t{\n\t\t\t\t\tLog.Warning(\"Changed rotation of a spawned non-single-cell thing which affects regions. This is not supported.\");\n\t\t\t\t}\n\t\t\t\tRegionListersUpdater.DeregisterInRegions(this, Map);\n\t\t\t\tMap.thingGrid.Deregister(this);\n\t\t\t}\n\t\t\trotationInt = value;\n\t\t\tif (Spawned && (def.size.x != 1 || def.size.z != 1))\n\t\t\t{\n\t\t\t\tMap.thingGrid.Register(this);\n\t\t\t\tRegionListersUpdater.RegisterInRegions(this, Map);\n\t\t\t\tMap.gasGrid.Notify_ThingSpawned(this);\n\t\t\t\tif (def.AffectsReachability)\n\t\t\t\t{\n\t\t\t\t\tMap.reachability.ClearCache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic bool Smeltable\n\t{\n\t\tget\n\t\t{\n\t\t\tif (this.IsRelic())\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (def.smeltable)\n\t\t\t{\n\t\t\t\tif (def.MadeFromStuff)\n\t\t\t\t{\n\t\t\t\t\treturn Stuff.smeltable;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic bool BurnableByRecipe\n\t{\n\t\tget\n\t\t{\n\t\t\tif (def.burnableByRecipe)\n\t\t\t{\n\t\t\t\tif (def.MadeFromStuff)\n\t\t\t\t{\n\t\t\t\t\treturn Stuff.burnableByRecipe;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic IThingHolder ParentHolder => holdingOwner?.Owner;\n\n\tpublic Faction Faction => factionInt;\n\n\tpublic string ThingID\n\t{\n\t\tget\n\t\t{\n\t\t\tif (def.HasThingIDNumber)\n\t\t\t{\n\t\t\t\treturn def.defName + thingIDNumber;\n\t\t\t}\n\t\t\treturn def.defName;\n\t\t}\n\t\tset\n\t\t{\n\t\t\tthingIDNumber = IDNumberFromThingID(value);\n\t\t}\n\t}\n\n\tpublic IntVec2 RotatedSize\n\t{\n\t\tget\n\t\t{\n\t\t\tif (!rotationInt.IsHorizontal)\n\t\t\t{\n\t\t\t\treturn def.size;\n\t\t\t}\n\t\t\treturn new IntVec2(def.size.z, def.size.x);\n\t\t}\n\t}\n\n\tpublic virtual CellRect? CustomRectForSelector => null;\n\n\tpublic override string Label\n\t{\n\t\tget\n\t\t{\n\t\t\tif (stackCount > 1)\n\t\t\t{\n\t\t\t\treturn LabelNoCount + \" x\" + stackCount.ToStringCached();\n\t\t\t}\n\t\t\treturn LabelNoCount;\n\t\t}\n\t}\n\n\tpublic virtual string LabelNoCount => GenLabel.ThingLabel(this, 1);\n\n\tpublic override string LabelCap => Label.CapitalizeFirst(def);\n\n\tpublic virtual string LabelCapNoCount => LabelNoCount.CapitalizeFirst(def);\n\n\tpublic override string LabelShort => LabelNoCount;\n\n\tpublic virtual string LabelNoParenthesis => GenLabel.ThingLabel(this, 1, includeHp: false, includeQuality: false);\n\n\tpublic string LabelNoParenthesisCap => LabelNoParenthesis.CapitalizeFirst();\n\n\tpublic virtual ModContentPack ContentSource => def.modContentPack;\n\n\tpublic virtual bool IngestibleNow\n\t{\n\t\tget\n\t\t{\n\t\t\tif (this.IsBurning())\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn def.IsIngestible;\n\t\t}\n\t}\n\n\tpublic ThingDef Stuff => stuffInt;\n\n\tpublic Graphic DefaultGraphic\n\t{\n\t\tget\n\t\t{\n\t\t\tif (graphicInt == null)\n\t\t\t{\n\t\t\t\tif (def.graphicData == null)\n\t\t\t\t{\n\t\t\t\t\treturn BaseContent.BadGraphic;\n\t\t\t\t}\n\t\t\t\tgraphicInt = def.graphicData.GraphicColoredFor(this);\n\t\t\t}\n\t\t\treturn graphicInt;\n\t\t}\n\t}\n\n\tpublic virtual Graphic Graphic\n\t{\n\t\tget\n\t\t{\n\t\t\tThingStyleDef styleDef = StyleDef;\n\t\t\tif (styleDef?.Graphic != null)\n\t\t\t{\n\t\t\t\tif (styleGraphicInt == null)\n\t\t\t\t{\n\t\t\t\t\tif (styleDef.graphicData != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tstyleGraphicInt = styleDef.graphicData.GraphicColoredFor(this);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tstyleGraphicInt = styleDef.Graphic;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn styleGraphicInt;\n\t\t\t}\n\t\t\treturn DefaultGraphic;\n\t\t}\n\t}\n\n\tpublic virtual List InteractionCells => ThingUtility.InteractionCellsWhenAt(def, Position, Rotation, Map, allowFallbackCell: true);\n\n\tpublic virtual IntVec3 InteractionCell => ThingUtility.InteractionCellWhenAt(def, Position, Rotation, Map);\n\n\tpublic float AmbientTemperature\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn GenTemperature.GetTemperatureForCell(Position, Map);\n\t\t\t}\n\t\t\tif (ParentHolder != null)\n\t\t\t{\n\t\t\t\tfor (IThingHolder parentHolder = ParentHolder; parentHolder != null; parentHolder = parentHolder.ParentHolder)\n\t\t\t\t{\n\t\t\t\t\tif (ThingOwnerUtility.TryGetFixedTemperature(parentHolder, this, out var temperature))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn temperature;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (SpawnedOrAnyParentSpawned)\n\t\t\t{\n\t\t\t\treturn GenTemperature.GetTemperatureForCell(PositionHeld, MapHeld);\n\t\t\t}\n\t\t\tif (Tile.Valid)\n\t\t\t{\n\t\t\t\treturn GenTemperature.GetTemperatureAtTile(Tile);\n\t\t\t}\n\t\t\treturn 21f;\n\t\t}\n\t}\n\n\tpublic PlanetTile Tile\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn Map.Tile;\n\t\t\t}\n\t\t\tif (ParentHolder != null)\n\t\t\t{\n\t\t\t\treturn ThingOwnerUtility.GetRootTile(ParentHolder);\n\t\t\t}\n\t\t\treturn PlanetTile.Invalid;\n\t\t}\n\t}\n\n\tpublic virtual bool Suspended\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (ParentHolder != null)\n\t\t\t{\n\t\t\t\treturn ThingOwnerUtility.ContentsSuspended(ParentHolder);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic bool InCryptosleep\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (ParentHolder != null)\n\t\t\t{\n\t\t\t\treturn ThingOwnerUtility.ContentsInCryptosleep(ParentHolder);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic virtual string DescriptionDetailed => def.DescriptionDetailed;\n\n\tpublic virtual string DescriptionFlavor => def.description;\n\n\tpublic bool IsOnHoldingPlatform\n\t{\n\t\tget\n\t\t{\n\t\t\tif (ModsConfig.AnomalyActive)\n\t\t\t{\n\t\t\t\treturn ParentHolder is Building_HoldingPlatform;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic TerrainAffordanceDef TerrainAffordanceNeeded => def.GetTerrainAffordanceNeed(stuffInt);\n\n\tpublic bool BeingTransportedOnGravship => beingTransportedOnGravship;\n\n\tprotected virtual int MinTickIntervalRate => 1;\n\n\tprotected virtual int MaxTickIntervalRate => 15;\n\n\tprotected virtual int UpdateRateTickOffset => this.HashOffset();\n\n\tpublic virtual int UpdateRateTicks => GenTicks.GetCameraUpdateRate(this);\n\n\tpublic Vector3? DrawPosHeld\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Spawned)\n\t\t\t{\n\t\t\t\treturn DrawPos;\n\t\t\t}\n\t\t\treturn ThingOwnerUtility.SpawnedParentOrMe(ParentHolder)?.DrawPos;\n\t\t}\n\t}\n\n\tpublic virtual Vector3 DrawPos => this.TrueCenter();\n\n\tpublic virtual Vector2 DrawSize\n\t{\n\t\tget\n\t\t{\n\t\t\tif (def.graphicData != null)\n\t\t\t{\n\t\t\t\treturn def.graphicData.drawSize;\n\t\t\t}\n\t\t\treturn Vector2.one;\n\t\t}\n\t}\n\n\tpublic virtual Color DrawColor\n\t{\n\t\tget\n\t\t{\n\t\t\tif (Stuff != null)\n\t\t\t{\n\t\t\t\treturn def.GetColorForStuff(Stuff);\n\t\t\t}\n\t\t\tif (def.graphicData != null)\n\t\t\t{\n\t\t\t\treturn def.graphicData.color;\n\t\t\t}\n\t\t\treturn Color.white;\n\t\t}\n\t\tset\n\t\t{\n\t\t\tLog.Error($\"Cannot set instance color on non-ThingWithComps {LabelCap} at {Position}.\");\n\t\t}\n\t}\n\n\tpublic virtual Color DrawColorTwo\n\t{\n\t\tget\n\t\t{\n\t\t\tif (def.graphicData != null)\n\t\t\t{\n\t\t\t\treturn def.graphicData.colorTwo;\n\t\t\t}\n\t\t\treturn Color.white;\n\t\t}\n\t}\n\n\tpublic virtual IEnumerable DescriptionHyperlinks\n\t{\n\t\tget\n\t\t{\n\t\t\tif (def.descriptionHyperlinks != null)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < def.descriptionHyperlinks.Count; i++)\n\t\t\t\t{\n\t\t\t\t\tyield return def.descriptionHyperlinks[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic static int IDNumberFromThingID(string thingID)\n\t{\n\t\tstring value = Regex.Match(thingID, \"\\\\d+$\").Value;\n\t\tint result = 0;\n\t\ttry\n\t\t{\n\t\t\tCultureInfo invariantCulture = CultureInfo.InvariantCulture;\n\t\t\tresult = Convert.ToInt32(value, invariantCulture);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tLog.Error(\"Could not convert id number from thingID=\" + thingID + \", numString=\" + value + \" Exception=\" + ex);\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic void DoTick()\n\t{\n\t\tif (Destroyed)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (def.tickerType == TickerType.Normal)\n\t\t{\n\t\t\tusing (ProfilerBlock.Scope(\"DoTick()\"))\n\t\t\t{\n\t\t\t\tusing (ProfilerBlock.Scope(\"Tick()\"))\n\t\t\t\t{\n\t\t\t\t\tTick();\n\t\t\t\t}\n\t\t\t\tif (Destroyed)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttickDelta++;\n\t\t\t\tint num = Mathf.Min(Mathf.Max(UpdateRateTicks, MinTickIntervalRate), MaxTickIntervalRate);\n\t\t\t\tif (tickDelta >= num || GenTicks.IsTickInterval(UpdateRateTickOffset, num))\n\t\t\t\t{\n\t\t\t\t\tusing (ProfilerBlock.Scope(\"TickInterval()\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tTickInterval(tickDelta);\n\t\t\t\t\t}\n\t\t\t\t\ttickDelta = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (Destroyed || !(this is IThingHolder thingHolder) || this is IThingHolderTickable { ShouldTickContents: false })\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (tmpHolders == null)\n\t\t{\n\t\t\ttmpHolders = new List(8);\n\t\t}\n\t\ttmpHolders.Add(thingHolder);\n\t\tthingHolder.GetChildHolders(tmpHolders);\n\t\tfor (int i = 0; i < tmpHolders.Count; i++)\n\t\t{\n\t\t\tThingOwner directlyHeldThings = tmpHolders[i].GetDirectlyHeldThings();\n\t\t\tif (directlyHeldThings != null)\n\t\t\t{\n\t\t\t\tdirectlyHeldThings.DoTick();\n\t\t\t\tif (Destroyed)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttmpHolders.Clear();\n\t}\n\n\tpublic virtual void PostMake()\n\t{\n\t\tThingIDMaker.GiveIDTo(this);\n\t\tif (def.useHitPoints)\n\t\t{\n\t\t\tHitPoints = Mathf.RoundToInt((float)MaxHitPoints * Mathf.Clamp01(def.startingHpRange.RandomInRange));\n\t\t}\n\t}\n\n\tpublic virtual void PostPostMake()\n\t{\n\t\tif (!def.randomStyle.NullOrEmpty() && Rand.Chance(def.randomStyleChance))\n\t\t{\n\t\t\tStyleDef = def.randomStyle.RandomElementByWeight((ThingStyleChance x) => x.Chance).StyleDef;\n\t\t}\n\t}\n\n\tpublic virtual void PostQualitySet()\n\t{\n\t}\n\n\tpublic string GetUniqueLoadID()\n\t{\n\t\treturn \"Thing_\" + ThingID;\n\t}\n\n\tpublic override void SpawnSetup(Map map, bool respawningAfterLoad)\n\t{\n\t\tif (Destroyed)\n\t\t{\n\t\t\tLog.Error(\"Spawning destroyed thing \" + this?.ToString() + \" at \" + Position.ToString() + \". Correcting.\");\n\t\t\tmapIndexOrState = -1;\n\t\t\tif (HitPoints <= 0 && def.useHitPoints)\n\t\t\t{\n\t\t\t\tHitPoints = 1;\n\t\t\t}\n\t\t}\n\t\tif (Spawned)\n\t\t{\n\t\t\tLog.Error(\"Tried to spawn already-spawned thing \" + this?.ToString() + \" at \" + Position.ToString());\n\t\t\treturn;\n\t\t}\n\t\tint num = Find.Maps.IndexOf(map);\n\t\tif (num < 0)\n\t\t{\n\t\t\tLog.Error(\"Tried to spawn thing \" + this?.ToString() + \", but the map provided does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (stackCount > def.stackLimit)\n\t\t{\n\t\t\tLog.Error(\"Spawned \" + this?.ToString() + \" with stackCount \" + stackCount + \" but stackLimit is \" + def.stackLimit + \". Truncating.\");\n\t\t\tstackCount = def.stackLimit;\n\t\t}\n\t\tmapIndexOrState = (sbyte)num;\n\t\tRegionListersUpdater.RegisterInRegions(this, map);\n\t\tif (!map.spawnedThings.TryAdd(this, canMergeWithExistingStacks: false))\n\t\t{\n\t\t\tLog.Error(\"Couldn't add thing \" + this?.ToString() + \" to spawned things.\");\n\t\t}\n\t\tmap.listerThings.Add(this);\n\t\tmap.thingGrid.Register(this);\n\t\tmap.gasGrid.Notify_ThingSpawned(this);\n\t\tmap.mapTemperature.Notify_ThingSpawned(this);\n\t\tif (map.IsPlayerHome)\n\t\t{\n\t\t\tEverSeenByPlayer = true;\n\t\t}\n\t\tif (Find.TickManager != null)\n\t\t{\n\t\t\tFind.TickManager.RegisterAllTickabilityFor(this);\n\t\t}\n\t\tDirtyMapMesh(map);\n\t\tif (def.drawerType != DrawerType.MapMeshOnly)\n\t\t{\n\t\t\tmap.dynamicDrawManager.RegisterDrawable(this);\n\t\t}\n\t\tmap.tooltipGiverList.Notify_ThingSpawned(this);\n\t\tif (def.CanAffectLinker)\n\t\t{\n\t\t\tmap.linkGrid.Notify_LinkerCreatedOrDestroyed(this);\n\t\t\tmap.mapDrawer.MapMeshDirty(Position, MapMeshFlagDefOf.Things, regenAdjacentCells: true, regenAdjacentSections: false);\n\t\t}\n\t\tif (!def.CanOverlapZones)\n\t\t{\n\t\t\tmap.zoneManager.Notify_NoZoneOverlapThingSpawned(this);\n\t\t}\n\t\tif (def.AffectsRegions)\n\t\t{\n\t\t\tmap.regionDirtyer.Notify_ThingAffectingRegionsSpawned(this);\n\t\t}\n\t\tif (def.pathCost != 0 || def.passability == Traversability.Impassable)\n\t\t{\n\t\t\tmap.pathing.RecalculatePerceivedPathCostUnderThing(this);\n\t\t}\n\t\tif (def.AffectsReachability)\n\t\t{\n\t\t\tmap.reachability.ClearCache();\n\t\t}\n\t\tmap.coverGrid.Register(this);\n\t\tif (def.category == ThingCategory.Item)\n\t\t{\n\t\t\tmap.listerHaulables.Notify_Spawned(this);\n\t\t\tmap.listerMergeables.Notify_Spawned(this);\n\t\t}\n\t\tmap.attackTargetsCache.Notify_ThingSpawned(this);\n\t\tmap.regionGrid.GetValidRegionAt_NoRebuild(Position)?.Room?.Notify_ContainedThingSpawnedOrDespawned(this);\n\t\tStealAIDebugDrawer.Notify_ThingChanged(this);\n\t\tif (this is IHaulDestination haulDestination)\n\t\t{\n\t\t\tmap.haulDestinationManager.AddHaulDestination(haulDestination);\n\t\t}\n\t\tif (this is IHaulSource source)\n\t\t{\n\t\t\tmap.haulDestinationManager.AddHaulSource(source);\n\t\t}\n\t\tif (this is IThingHolder && Find.ColonistBar != null)\n\t\t{\n\t\t\tFind.ColonistBar.MarkColonistsDirty();\n\t\t}\n\t\tif (def.category == ThingCategory.Item)\n\t\t{\n\t\t\tISlotGroupParent slotGroupParent = Position.GetSlotGroup(map)?.parent;\n\t\t\tif (slotGroupParent != null)\n\t\t\t{\n\t\t\t\tslotGroupParent.Notify_ReceivedThing(this);\n\t\t\t\tGenThing.TryDirtyAdjacentGroupContainers(slotGroupParent, map);\n\t\t\t}\n\t\t}\n\t\tif (def.receivesSignals)\n\t\t{\n\t\t\tFind.SignalManager.RegisterReceiver(this);\n\t\t}\n\t\tif (!BeingTransportedOnGravship)\n\t\t{\n\t\t\tdef.soundSpawned?.PlayOneShot(this);\n\t\t\tif (!respawningAfterLoad)\n\t\t\t{\n\t\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"Spawned\", this.Named(\"SUBJECT\"));\n\t\t\t\tspawnedTick = Find.TickManager.TicksGame;\n\t\t\t\tdespawnedTick = -1;\n\t\t\t\tif (AnomalyUtility.ShouldNotifyCodex(this, EntityDiscoveryType.Spawn, out var entries))\n\t\t\t\t{\n\t\t\t\t\tFind.EntityCodex.SetDiscovered(entries, def, this);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tFind.HiddenItemsManager.SetDiscovered(def);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmap.events.Notify_ThingSpawned(this);\n\t}\n\n\tpublic bool DeSpawnOrDeselect(DestroyMode mode = DestroyMode.Vanish)\n\t{\n\t\tbool flag = Current.ProgramState == ProgramState.Playing && Find.Selector.IsSelected(this);\n\t\tif (Spawned)\n\t\t{\n\t\t\tDeSpawn(mode);\n\t\t}\n\t\telse if (flag)\n\t\t{\n\t\t\tFind.Selector.Deselect(this);\n\t\t\tFind.MainButtonsRoot.tabs.Notify_SelectedObjectDespawned();\n\t\t}\n\t\treturn flag;\n\t}\n\n\tpublic override void DeSpawn(DestroyMode mode = DestroyMode.Vanish)\n\t{\n\t\tif (Destroyed)\n\t\t{\n\t\t\tLog.Error(\"Tried to despawn \" + this.ToStringSafe() + \" which is already destroyed.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Spawned)\n\t\t{\n\t\t\tLog.Error(\"Tried to despawn \" + this.ToStringSafe() + \" which is not spawned.\");\n\t\t\treturn;\n\t\t}\n\t\tMap map = Map;\n\t\tmap.overlayDrawer.DisposeHandle(this);\n\t\tRegionListersUpdater.DeregisterInRegions(this, map);\n\t\tmap.spawnedThings.Remove(this);\n\t\tmap.listerThings.Remove(this);\n\t\tmap.thingGrid.Deregister(this);\n\t\tmap.coverGrid.DeRegister(this);\n\t\tif (def.receivesSignals)\n\t\t{\n\t\t\tFind.SignalManager.DeregisterReceiver(this);\n\t\t}\n\t\tmap.tooltipGiverList.Notify_ThingDespawned(this);\n\t\tif (def.CanAffectLinker)\n\t\t{\n\t\t\tmap.linkGrid.Notify_LinkerCreatedOrDestroyed(this);\n\t\t\tmap.mapDrawer.MapMeshDirty(Position, MapMeshFlagDefOf.Things, regenAdjacentCells: true, regenAdjacentSections: false);\n\t\t}\n\t\tif (Find.Selector.IsSelected(this))\n\t\t{\n\t\t\tFind.Selector.Deselect(this);\n\t\t\tFind.MainButtonsRoot.tabs.Notify_SelectedObjectDespawned();\n\t\t}\n\t\tDirtyMapMesh(map);\n\t\tif (def.drawerType != DrawerType.MapMeshOnly)\n\t\t{\n\t\t\tmap.dynamicDrawManager.DeRegisterDrawable(this);\n\t\t}\n\t\tmap.regionGrid.GetValidRegionAt_NoRebuild(Position)?.Room?.Notify_ContainedThingSpawnedOrDespawned(this);\n\t\tif (def.AffectsRegions)\n\t\t{\n\t\t\tmap.regionDirtyer.Notify_ThingAffectingRegionsDespawned(this);\n\t\t}\n\t\tif (def.pathCost != 0 || def.passability == Traversability.Impassable)\n\t\t{\n\t\t\tmap.pathing.RecalculatePerceivedPathCostUnderThing(this);\n\t\t}\n\t\tif (def.AffectsReachability)\n\t\t{\n\t\t\tmap.reachability.ClearCache();\n\t\t}\n\t\tFind.TickManager.DeRegisterAllTickabilityFor(this);\n\t\tmapIndexOrState = -1;\n\t\tif (def.category == ThingCategory.Item)\n\t\t{\n\t\t\tmap.listerHaulables.Notify_DeSpawned(this);\n\t\t\tmap.listerMergeables.Notify_DeSpawned(this);\n\t\t}\n\t\tmap.attackTargetsCache.Notify_ThingDespawned(this);\n\t\tmap.physicalInteractionReservationManager.ReleaseAllForTarget(this);\n\t\tif (this is IHaulEnroute thing)\n\t\t{\n\t\t\tmap.enrouteManager.Notify_ContainerDespawned(thing);\n\t\t}\n\t\tStealAIDebugDrawer.Notify_ThingChanged(this);\n\t\tif (this is IHaulDestination haulDestination)\n\t\t{\n\t\t\tmap.haulDestinationManager.RemoveHaulDestination(haulDestination);\n\t\t}\n\t\tif (this is IHaulSource source)\n\t\t{\n\t\t\tmap.haulDestinationManager.RemoveHaulSource(source);\n\t\t}\n\t\tif (this is IThingHolder && Find.ColonistBar != null)\n\t\t{\n\t\t\tFind.ColonistBar.MarkColonistsDirty();\n\t\t}\n\t\tif (def.category == ThingCategory.Item)\n\t\t{\n\t\t\tISlotGroupParent slotGroupParent = Position.GetSlotGroup(map)?.parent;\n\t\t\tif (slotGroupParent != null)\n\t\t\t{\n\t\t\t\tslotGroupParent.Notify_LostThing(this);\n\t\t\t\tGenThing.TryDirtyAdjacentGroupContainers(slotGroupParent, map);\n\t\t\t}\n\t\t}\n\t\tQuestUtility.SendQuestTargetSignals(questTags, \"Despawned\", this.Named(\"SUBJECT\"));\n\t\tspawnedTick = -1;\n\t\tdespawnedTick = Find.TickManager.TicksGame;\n\t\tmap.events.Notify_ThingDespawned(this);\n\t}\n\n\tpublic virtual void Kill(DamageInfo? dinfo = null, Hediff exactCulprit = null)\n\t{\n\t\tDestroy(DestroyMode.KillFinalize);\n\t}\n\n\tpublic virtual void Destroy(DestroyMode mode = DestroyMode.Vanish)\n\t{\n\t\tif (!allowDestroyNonDestroyable && !def.destroyable)\n\t\t{\n\t\t\tLog.Error(\"Tried to destroy non-destroyable thing \" + this);\n\t\t\treturn;\n\t\t}\n\t\tif (Destroyed)\n\t\t{\n\t\t\tLog.Error(\"Tried to destroy already-destroyed thing \" + this);\n\t\t\treturn;\n\t\t}\n\t\tbool spawned = Spawned;\n\t\tMap map = Map;\n\t\tif (StyleSourcePrecept != null)\n\t\t{\n\t\t\tStyleSourcePrecept.Notify_ThingLost(this, spawned);\n\t\t}\n\t\tif (Spawned)\n\t\t{\n\t\t\tDeSpawn(mode);\n\t\t}\n\t\telse if (Current.ProgramState == ProgramState.Playing && Find.Selector.IsSelected(this))\n\t\t{\n\t\t\tFind.Selector.Deselect(this);\n\t\t\tFind.MainButtonsRoot.tabs.Notify_SelectedObjectDespawned();\n\t\t}\n\t\tmapIndexOrState = -2;\n\t\tif (def.DiscardOnDestroyed)\n\t\t{\n\t\t\tDiscard();\n\t\t}\n\t\tCompExplosive compExplosive = this.TryGetComp();\n\t\tif (spawned)\n\t\t{\n\t\t\tList list = new List();\n\t\t\tGenLeaving.DoLeavingsFor(this, map, mode, list);\n\t\t\tcompExplosive?.AddThingsIgnoredByExplosion(list);\n\t\t\tNotify_KilledLeavingsLeft(list);\n\t\t}\n\t\tif (holdingOwner != null)\n\t\t{\n\t\t\tholdingOwner.Notify_ContainedItemDestroyed(this);\n\t\t}\n\t\tRemoveAllReservationsAndDesignationsOnThis();\n\t\tif (!(this is Pawn))\n\t\t{\n\t\t\tstackCount = 0;\n\t\t}\n\t\tif (mode != DestroyMode.QuestLogic)\n\t\t{\n\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"Destroyed\", this.Named(\"SUBJECT\"));\n\t\t}\n\t\tif (mode == DestroyMode.KillFinalize)\n\t\t{\n\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"Killed\", this.Named(\"SUBJECT\"), map.Named(\"MAP\"));\n\t\t}\n\t}\n\n\tpublic virtual void PreTraded(TradeAction action, Pawn playerNegotiator, ITrader trader)\n\t{\n\t}\n\n\tpublic virtual void PostGeneratedForTrader(TraderKindDef trader, PlanetTile forTile, Faction forFaction)\n\t{\n\t\tif (def.colorGeneratorInTraderStock != null)\n\t\t{\n\t\t\tthis.SetColor(def.colorGeneratorInTraderStock.NewRandomizedColor());\n\t\t}\n\t}\n\n\tpublic virtual float GetBeauty(bool outside)\n\t{\n\t\tif (!outside || !def.StatBaseDefined(StatDefOf.BeautyOutdoors))\n\t\t{\n\t\t\treturn this.GetStatValue(StatDefOf.Beauty);\n\t\t}\n\t\treturn this.GetStatValue(StatDefOf.BeautyOutdoors);\n\t}\n\n\tpublic virtual void Notify_MyMapRemoved()\n\t{\n\t\tif (def.receivesSignals)\n\t\t{\n\t\t\tFind.SignalManager.DeregisterReceiver(this);\n\t\t}\n\t\tif (StyleSourcePrecept != null)\n\t\t{\n\t\t\tStyleSourcePrecept.Notify_ThingLost(this);\n\t\t}\n\t\tif (!ThingOwnerUtility.AnyParentIs(this))\n\t\t{\n\t\t\tmapIndexOrState = -3;\n\t\t}\n\t\tThingOwner thingOwner = holdingOwner;\n\t\tif (thingOwner != null && thingOwner.Owner is Map)\n\t\t{\n\t\t\tholdingOwner = null;\n\t\t}\n\t\tRemoveAllReservationsAndDesignationsOnThis();\n\t}\n\n\tpublic virtual void Notify_LordDestroyed()\n\t{\n\t}\n\n\tpublic virtual void Notify_AbandonedAtTile(PlanetTile tile)\n\t{\n\t}\n\n\tpublic virtual void Notify_KilledLeavingsLeft(List leavings)\n\t{\n\t}\n\n\tpublic virtual void Notify_Studied(Pawn studier, float amount, KnowledgeCategoryDef category = null)\n\t{\n\t}\n\n\tpublic virtual void Notify_Unfogged()\n\t{\n\t\tif (!beenRevealed)\n\t\t{\n\t\t\tbeenRevealed = true;\n\t\t\tif (ModsConfig.AnomalyActive && AnomalyUtility.ShouldNotifyCodex(this, EntityDiscoveryType.Unfog, out var entries))\n\t\t\t{\n\t\t\t\tFind.EntityCodex.SetDiscovered(entries, def, this);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFind.HiddenItemsManager.SetDiscovered(def);\n\t\t\t}\n\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"Unfogged\", this);\n\t\t\tCompLetterOnRevealed compLetterOnRevealed = this.TryGetComp();\n\t\t\tif (compLetterOnRevealed != null)\n\t\t\t{\n\t\t\t\tFind.LetterStack.ReceiveLetter(compLetterOnRevealed.Props.label, compLetterOnRevealed.Props.text, compLetterOnRevealed.Props.letterDef, this);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic void ForceSetStateToUnspawned()\n\t{\n\t\tmapIndexOrState = -1;\n\t}\n\n\tpublic void DecrementMapIndex()\n\t{\n\t\tif (mapIndexOrState <= 0)\n\t\t{\n\t\t\tLog.Warning(\"Tried to decrement map index for \" + this?.ToString() + \", but mapIndexOrState=\" + mapIndexOrState);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmapIndexOrState--;\n\t\t}\n\t}\n\n\tprivate void RemoveAllReservationsAndDesignationsOnThis()\n\t{\n\t\tif (def.category == ThingCategory.Mote)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tList maps = Find.Maps;\n\t\tfor (int i = 0; i < maps.Count; i++)\n\t\t{\n\t\t\tmaps[i].reservationManager.ReleaseAllForTarget(this);\n\t\t\tmaps[i].physicalInteractionReservationManager.ReleaseAllForTarget(this);\n\t\t\tif (this is IAttackTarget target)\n\t\t\t{\n\t\t\t\tmaps[i].attackTargetReservationManager.ReleaseAllForTarget(target);\n\t\t\t}\n\t\t\tmaps[i].designationManager.RemoveAllDesignationsOn(this);\n\t\t}\n\t}\n\n\tpublic virtual void ExposeData()\n\t{\n\t\tScribe_Defs.Look(ref def, \"def\");\n\t\tScribe_Values.Look(ref tickDelta, \"tickDelta\", 0);\n\t\tif (def.HasThingIDNumber)\n\t\t{\n\t\t\tstring value = ThingID;\n\t\t\tScribe_Values.Look(ref value, \"id\");\n\t\t\tif (Scribe.mode != LoadSaveMode.Saving)\n\t\t\t{\n\t\t\t\tThingID = value;\n\t\t\t}\n\t\t}\n\t\tScribe_Values.Look(ref mapIndexOrState, \"map\", -1);\n\t\tif (Scribe.mode == LoadSaveMode.LoadingVars && mapIndexOrState >= 0)\n\t\t{\n\t\t\tmapIndexOrState = -1;\n\t\t}\n\t\tScribe_Values.Look(ref positionInt, \"pos\", IntVec3.Invalid);\n\t\tScribe_Values.Look(ref rotationInt, \"rot\", Rot4.North);\n\t\tScribe_Values.Look(ref debugRotLocked, \"debugRotLocked\", defaultValue: false);\n\t\tif (def.useHitPoints)\n\t\t{\n\t\t\tScribe_Values.Look(ref hitPointsInt, \"health\", -1);\n\t\t}\n\t\tbool flag = def.tradeability != 0 && def.category == ThingCategory.Item;\n\t\tif (def.stackLimit > 1 || flag)\n\t\t{\n\t\t\tScribe_Values.Look(ref stackCount, \"stackCount\", 0, forceSave: true);\n\t\t}\n\t\tScribe_Defs.Look(ref stuffInt, \"stuff\");\n\t\tstring facID = ((factionInt != null) ? factionInt.GetUniqueLoadID() : \"null\");\n\t\tScribe_Values.Look(ref facID, \"faction\", \"null\");\n\t\tif (Scribe.mode == LoadSaveMode.LoadingVars)\n\t\t{\n\t\t\tif (facID == \"null\")\n\t\t\t{\n\t\t\t\tfactionInt = null;\n\t\t\t}\n\t\t\telse if (Find.World != null && Find.FactionManager != null)\n\t\t\t{\n\t\t\t\tfactionInt = Find.FactionManager.AllFactions.FirstOrDefault((Faction fa) => fa.GetUniqueLoadID() == facID);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfacIDsCached.SetOrAdd(this, facID);\n\t\t\t}\n\t\t}\n\t\tif (Scribe.mode == LoadSaveMode.ResolvingCrossRefs)\n\t\t{\n\t\t\tif (facID == \"null\" && facIDsCached.TryGetValue(this, out facID))\n\t\t\t{\n\t\t\t\tfacIDsCached.Remove(this);\n\t\t\t}\n\t\t\tif (facID != \"null\")\n\t\t\t{\n\t\t\t\tfactionInt = Find.FactionManager.AllFactions.FirstOrDefault((Faction fa) => fa.GetUniqueLoadID() == facID);\n\t\t\t}\n\t\t}\n\t\tif (Scribe.mode == LoadSaveMode.PostLoadInit)\n\t\t{\n\t\t\tfacIDsCached.Clear();\n\t\t}\n\t\tScribe_Collections.Look(ref questTags, \"questTags\", LookMode.Value);\n\t\tScribe_Values.Look(ref overrideGraphicIndex, \"overrideGraphicIndex\");\n\t\tScribe_Values.Look(ref spawnedTick, \"spawnedTick\", -1);\n\t\tScribe_Values.Look(ref despawnedTick, \"despawnedTick\", 0);\n\t\tScribe_Values.Look(ref beenRevealed, \"beenRevealed\", defaultValue: false);\n\t\tBackCompatibility.PostExposeData(this);\n\t}\n\n\tpublic virtual void PostMapInit()\n\t{\n\t}\n\n\tpublic void DrawNowAt(Vector3 drawLoc, bool flip = false)\n\t{\n\t\tDynamicDrawPhaseAt(DrawPhase.Draw, drawLoc, flip);\n\t}\n\n\tpublic void DynamicDrawPhase(DrawPhase phase)\n\t{\n\t\tif (def.drawerType != DrawerType.MapMeshOnly)\n\t\t{\n\t\t\tDynamicDrawPhaseAt(phase, DrawPos);\n\t\t}\n\t}\n\n\tpublic virtual void DynamicDrawPhaseAt(DrawPhase phase, Vector3 drawLoc, bool flip = false)\n\t{\n\t\tif (phase == DrawPhase.Draw)\n\t\t{\n\t\t\tDrawAt(drawLoc, flip);\n\t\t}\n\t}\n\n\tprotected virtual void DrawAt(Vector3 drawLoc, bool flip = false)\n\t{\n\t\tif (def.drawerType == DrawerType.RealtimeOnly || !Spawned)\n\t\t{\n\t\t\tGraphic.Draw(drawLoc, flip ? Rotation.Opposite : Rotation, this);\n\t\t}\n\t\tSilhouetteUtility.DrawGraphicSilhouette(this, drawLoc);\n\t}\n\n\tpublic virtual void Print(SectionLayer layer)\n\t{\n\t\tif (!def.dontPrint)\n\t\t{\n\t\t\tGraphic.Print(layer, this, 0f);\n\t\t}\n\t}\n\n\tpublic void DirtyMapMesh(Map map)\n\t{\n\t\tif (def.drawerType == DrawerType.RealtimeOnly)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tforeach (IntVec3 item in this.OccupiedRect())\n\t\t{\n\t\t\tmap.mapDrawer.MapMeshDirty(item, MapMeshFlagDefOf.Things);\n\t\t}\n\t}\n\n\tpublic virtual void DrawGUIOverlay()\n\t{\n\t\tif (Find.CameraDriver.CurrentZoom == CameraZoomRange.Closest)\n\t\t{\n\t\t\tQualityCategory qc;\n\t\t\tif (def.stackLimit > 1)\n\t\t\t{\n\t\t\t\tGenMapUI.DrawThingLabel(this, stackCount.ToStringCached());\n\t\t\t}\n\t\t\telse if (def.drawGUIOverlayQuality && this.TryGetQuality(out qc))\n\t\t\t{\n\t\t\t\tGenMapUI.DrawThingLabel(this, qc.GetLabelShort());\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic virtual void DrawExtraSelectionOverlays()\n\t{\n\t\tif (def.specialDisplayRadius > 0.1f)\n\t\t{\n\t\t\tGenDraw.DrawRadiusRing(Position, def.specialDisplayRadius);\n\t\t}\n\t\tif (def.drawPlaceWorkersWhileSelected && def.PlaceWorkers != null)\n\t\t{\n\t\t\tfor (int i = 0; i < def.PlaceWorkers.Count; i++)\n\t\t\t{\n\t\t\t\tdef.PlaceWorkers[i].DrawGhost(def, Position, Rotation, Color.white, this);\n\t\t\t}\n\t\t}\n\t\tGenDraw.DrawInteractionCells(def, Position, rotationInt);\n\t}\n\n\tpublic virtual string GetInspectString()\n\t{\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tQuestUtility.AppendInspectStringsFromQuestParts(stringBuilder, this);\n\t\treturn stringBuilder.ToString();\n\t}\n\n\tpublic virtual string GetInspectStringLowPriority()\n\t{\n\t\tstring result = null;\n\t\ttmpDeteriorationReasons.Clear();\n\t\tfloat f = SteadyEnvironmentEffects.FinalDeteriorationRate(this, tmpDeteriorationReasons);\n\t\tif (tmpDeteriorationReasons.Count != 0)\n\t\t{\n\t\t\tresult = string.Format(\"{0}: {1} ({2})\", \"DeterioratingBecauseOf\".Translate(), tmpDeteriorationReasons.ToCommaList().CapitalizeFirst(), \"PerDay\".Translate(f.ToStringByStyle(ToStringStyle.FloatMaxTwo)));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic virtual IEnumerable GetGizmos()\n\t{\n\t\tGizmo gizmo = ContainingSelectionUtility.SelectContainingThingGizmo(this);\n\t\tif (gizmo != null)\n\t\t{\n\t\t\tyield return gizmo;\n\t\t}\n\t\tshowingGizmosForRitualsTmp.Clear();\n\t\tforeach (Ideo ideo in Faction.OfPlayer.ideos.AllIdeos)\n\t\t{\n\t\t\tfor (int i = 0; i < ideo.PreceptsListForReading.Count; i++)\n\t\t\t{\n\t\t\t\tPrecept precept = ideo.PreceptsListForReading[i];\n\t\t\t\tif (!(precept is Precept_Ritual ritual) || (precept.def.mergeRitualGizmosFromAllIdeos && showingGizmosForRitualsTmp.Contains(ritual.sourcePattern)) || !ritual.ShouldShowGizmo(this))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tforeach (Gizmo item in ritual.GetGizmoFor(this))\n\t\t\t\t{\n\t\t\t\t\tyield return item;\n\t\t\t\t\tshowingGizmosForRitualsTmp.Add(ritual.sourcePattern);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList activeRituals = Find.IdeoManager.GetActiveRituals(MapHeld);\n\t\tforeach (LordJob_Ritual item2 in activeRituals)\n\t\t{\n\t\t\tif (item2.selectedTarget == this)\n\t\t\t{\n\t\t\t\tyield return item2.GetCancelGizmo();\n\t\t\t}\n\t\t}\n\t\tif (ModsConfig.AnomalyActive)\n\t\t{\n\t\t\tGizmo gizmo2 = AnomalyUtility.OpenCodexGizmo(this);\n\t\t\tif (gizmo2 != null)\n\t\t\t{\n\t\t\t\tyield return gizmo2;\n\t\t\t}\n\t\t}\n\t\tif (DebugSettings.ShowDevGizmos && this.HasAttachment(ThingDefOf.Fire))\n\t\t{\n\t\t\tyield return new Command_Action\n\t\t\t{\n\t\t\t\tdefaultLabel = \"DEV: Extinguish\",\n\t\t\t\taction = delegate\n\t\t\t\t{\n\t\t\t\t\tthis.GetAttachment(ThingDefOf.Fire)?.Destroy();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic virtual IEnumerable GetFloatMenuOptions(Pawn selPawn)\n\t{\n\t\treturn Enumerable.Empty();\n\t}\n\n\tpublic virtual IEnumerable GetMultiSelectFloatMenuOptions(IEnumerable selPawns)\n\t{\n\t\treturn Enumerable.Empty();\n\t}\n\n\tpublic virtual IEnumerable GetInspectTabs()\n\t{\n\t\treturn def.inspectorTabsResolved;\n\t}\n\n\tpublic virtual string GetCustomLabelNoCount(bool includeHp = true)\n\t{\n\t\treturn GenLabel.ThingLabel(this, 1, includeHp);\n\t}\n\n\tpublic DamageWorker.DamageResult TakeDamage(DamageInfo dinfo)\n\t{\n\t\tif (Destroyed)\n\t\t{\n\t\t\treturn new DamageWorker.DamageResult();\n\t\t}\n\t\tif (dinfo.Amount == 0f)\n\t\t{\n\t\t\treturn new DamageWorker.DamageResult();\n\t\t}\n\t\tif (def.damageMultipliers != null)\n\t\t{\n\t\t\tfor (int i = 0; i < def.damageMultipliers.Count; i++)\n\t\t\t{\n\t\t\t\tif (def.damageMultipliers[i].damageDef == dinfo.Def)\n\t\t\t\t{\n\t\t\t\t\tint num = Mathf.RoundToInt(dinfo.Amount * def.damageMultipliers[i].multiplier);\n\t\t\t\t\tdinfo.SetAmount(num);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tPreApplyDamage(ref dinfo, out var absorbed);\n\t\tif (absorbed)\n\t\t{\n\t\t\treturn new DamageWorker.DamageResult();\n\t\t}\n\t\tbool spawnedOrAnyParentSpawned = SpawnedOrAnyParentSpawned;\n\t\tMap mapHeld = MapHeld;\n\t\tDamageWorker.DamageResult damageResult = dinfo.Def.Worker.Apply(dinfo, this);\n\t\tif (dinfo.Def.harmsHealth && spawnedOrAnyParentSpawned)\n\t\t{\n\t\t\tmapHeld.damageWatcher.Notify_DamageTaken(this, damageResult.totalDamageDealt);\n\t\t}\n\t\tif (dinfo.Instigator is Pawn pawn)\n\t\t{\n\t\t\tforeach (Hediff hediff in pawn.health.hediffSet.hediffs)\n\t\t\t{\n\t\t\t\thediff.Notify_PawnDamagedThing(this, dinfo, damageResult);\n\t\t\t}\n\t\t}\n\t\tif (dinfo.Def.ExternalViolenceFor(this))\n\t\t{\n\t\t\tif (dinfo.SpawnFilth)\n\t\t\t{\n\t\t\t\tGenLeaving.DropFilthDueToDamage(this, damageResult.totalDamageDealt);\n\t\t\t}\n\t\t\tif (dinfo.Instigator != null)\n\t\t\t{\n\t\t\t\tif (dinfo.Instigator is Pawn pawn2)\n\t\t\t\t{\n\t\t\t\t\tpawn2.records.AddTo(RecordDefOf.DamageDealt, damageResult.totalDamageDealt);\n\t\t\t\t}\n\t\t\t\tif (dinfo.Instigator.Faction == Faction.OfPlayer)\n\t\t\t\t{\n\t\t\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"TookDamageFromPlayer\", this.Named(\"SUBJECT\"), dinfo.Instigator.Named(\"INSTIGATOR\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"TookDamage\", this.Named(\"SUBJECT\"), dinfo.Instigator.Named(\"INSTIGATOR\"), mapHeld.Named(\"MAP\"));\n\t\t}\n\t\tif (!Destroyed && FlammableNow && dinfo.Def.igniteChanceByTargetFlammability != null && Rand.Chance(dinfo.Def.igniteChanceByTargetFlammability.Evaluate(this.GetStatValue(StatDefOf.Flammability))))\n\t\t{\n\t\t\tthis.TryAttachFire(Rand.Range(0.55f, 0.85f), dinfo.Instigator);\n\t\t}\n\t\tPostApplyDamage(dinfo, damageResult.totalDamageDealt);\n\t\treturn damageResult;\n\t}\n\n\tpublic virtual void PreApplyDamage(ref DamageInfo dinfo, out bool absorbed)\n\t{\n\t\tabsorbed = false;\n\t}\n\n\tpublic virtual void PostApplyDamage(DamageInfo dinfo, float totalDamageDealt)\n\t{\n\t}\n\n\tpublic virtual bool CanStackWith(Thing other)\n\t{\n\t\tif (Destroyed || other.Destroyed)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (def.category != ThingCategory.Item)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (this.IsRelic() || other.IsRelic())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (def == other.def)\n\t\t{\n\t\t\treturn Stuff == other.Stuff;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic virtual bool TryAbsorbStack(Thing other, bool respectStackLimit)\n\t{\n\t\tif (!CanStackWith(other))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tint num = ThingUtility.TryAbsorbStackNumToTake(this, other, respectStackLimit);\n\t\tif (def.useHitPoints)\n\t\t{\n\t\t\tHitPoints = Mathf.CeilToInt((float)(HitPoints * stackCount + other.HitPoints * num) / (float)(stackCount + num));\n\t\t}\n\t\tstackCount += num;\n\t\tother.stackCount -= num;\n\t\tif (Map != null)\n\t\t{\n\t\t\tDirtyMapMesh(Map);\n\t\t}\n\t\tStealAIDebugDrawer.Notify_ThingChanged(this);\n\t\tif (Spawned)\n\t\t{\n\t\t\tMap.listerMergeables.Notify_ThingStackChanged(this);\n\t\t}\n\t\tif (other.stackCount <= 0)\n\t\t{\n\t\t\tother.Destroy();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic virtual Thing SplitOff(int count)\n\t{\n\t\tif (count <= 0)\n\t\t{\n\t\t\tthrow new ArgumentException(\"SplitOff with count <= 0\", \"count\");\n\t\t}\n\t\tif (count >= stackCount)\n\t\t{\n\t\t\tif (count > stackCount)\n\t\t\t{\n\t\t\t\tLog.Error(\"Tried to split off \" + count + \" of \" + this?.ToString() + \" but there are only \" + stackCount);\n\t\t\t}\n\t\t\tDeSpawnOrDeselect();\n\t\t\tholdingOwner?.Remove(this);\n\t\t\treturn this;\n\t\t}\n\t\tThing thing = ThingMaker.MakeThing(def, Stuff);\n\t\tthing.stackCount = count;\n\t\tstackCount -= count;\n\t\tif (Map != null)\n\t\t{\n\t\t\tDirtyMapMesh(Map);\n\t\t}\n\t\tif (Spawned)\n\t\t{\n\t\t\tMap.listerMergeables.Notify_ThingStackChanged(this);\n\t\t}\n\t\tif (def.useHitPoints)\n\t\t{\n\t\t\tthing.HitPoints = HitPoints;\n\t\t}\n\t\treturn thing;\n\t}\n\n\tpublic virtual IEnumerable SpecialDisplayStats()\n\t{\n\t\tif (Stuff != null)\n\t\t{\n\t\t\tyield return new StatDrawEntry(StatCategoryDefOf.BasicsImportant, \"Stat_Stuff_Name\".Translate(), Stuff.LabelCap, \"Stat_Stuff_Desc\".Translate(), 1100, null, new Dialog_InfoCard.Hyperlink[1]\n\t\t\t{\n\t\t\t\tnew Dialog_InfoCard.Hyperlink(Stuff)\n\t\t\t});\n\t\t}\n\t\tif (!ModsConfig.IdeologyActive || Find.IdeoManager.classicMode)\n\t\t{\n\t\t\tyield break;\n\t\t}\n\t\ttmpIdeoNames.Clear();\n\t\tStyleCategoryDef styleCategoryDef = StyleDef?.Category ?? def.dominantStyleCategory;\n\t\tif (styleCategoryDef == null)\n\t\t{\n\t\t\tyield break;\n\t\t}\n\t\tforeach (Ideo item in Find.IdeoManager.IdeosListForReading)\n\t\t{\n\t\t\tif (IdeoUtility.ThingSatisfiesIdeo(this, item))\n\t\t\t{\n\t\t\t\ttmpIdeoNames.Add(item.name.Colorize(item.Color));\n\t\t\t}\n\t\t}\n\t\tyield return new StatDrawEntry(StatCategoryDefOf.BasicsNonPawn, \"Stat_Thing_StyleDominanceCategory\".Translate(), styleCategoryDef.LabelCap, \"Stat_Thing_StyleDominanceCategoryDesc\".Translate() + \"\\n\\n\" + \"Stat_Thing_IdeosSatisfied\".Translate() + \":\" + \"\\n\" + tmpIdeoNames.ToLineList(\" - \"), 6005);\n\t}\n\n\tpublic virtual void Notify_ColorChanged()\n\t{\n\t\tgraphicInt = null;\n\t\tstyleGraphicInt = null;\n\t\tif (Spawned && (def.drawerType == DrawerType.MapMeshOnly || def.drawerType == DrawerType.MapMeshAndRealTime))\n\t\t{\n\t\t\tMap.mapDrawer.MapMeshDirty(Position, MapMeshFlagDefOf.Things);\n\t\t}\n\t}\n\n\tpublic virtual void Notify_Equipped(Pawn pawn)\n\t{\n\t}\n\n\tpublic virtual void Notify_Unequipped(Pawn pawn)\n\t{\n\t}\n\n\tpublic virtual void Notify_UsedVerb(Pawn pawn, Verb verb)\n\t{\n\t}\n\n\tpublic virtual void Notify_UsedWeapon(Pawn pawn)\n\t{\n\t}\n\n\tpublic virtual void Notify_DebugSpawned()\n\t{\n\t}\n\n\tpublic virtual void Notify_RecipeProduced(Pawn pawn)\n\t{\n\t}\n\n\tpublic virtual void Notify_SignalReceived(Signal signal)\n\t{\n\t}\n\n\tpublic virtual void Notify_Explosion(Explosion explosion)\n\t{\n\t}\n\n\tpublic virtual void Notify_BulletImpactNearby(BulletImpactData impactData)\n\t{\n\t}\n\n\tpublic virtual void Notify_ThingSelected()\n\t{\n\t}\n\n\tpublic virtual TipSignal GetTooltip()\n\t{\n\t\tstring text = LabelCap;\n\t\tif (def.useHitPoints)\n\t\t{\n\t\t\ttext = text + \"\\n\" + HitPoints + \" / \" + MaxHitPoints;\n\t\t}\n\t\treturn new TipSignal(text, thingIDNumber * 251235);\n\t}\n\n\tpublic virtual bool BlocksPawn(Pawn p)\n\t{\n\t\tif (def.passability == Traversability.Impassable)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tif (def.IsFence && p.def.race.FenceBlocked)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic void SetFactionDirect(Faction newFaction)\n\t{\n\t\tif (!def.CanHaveFaction)\n\t\t{\n\t\t\tLog.Error(\"Tried to SetFactionDirect on \" + this?.ToString() + \" which cannot have a faction.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfactionInt = newFaction;\n\t\t}\n\t}\n\n\tpublic virtual void SetFaction(Faction newFaction, Pawn recruiter = null)\n\t{\n\t\tif (!def.CanHaveFaction)\n\t\t{\n\t\t\tLog.Error(\"Tried to SetFaction on \" + this?.ToString() + \" which cannot have a faction.\");\n\t\t\treturn;\n\t\t}\n\t\tFaction previous = factionInt;\n\t\tfactionInt = newFaction;\n\t\tif (Spawned && this is IAttackTarget t)\n\t\t{\n\t\t\tMap.attackTargetsCache.UpdateTarget(t);\n\t\t}\n\t\tQuestUtility.SendQuestTargetSignals(questTags, \"ChangedFaction\", this.Named(\"SUBJECT\"), newFaction.Named(\"FACTION\"));\n\t\tif (newFaction != Faction.OfPlayer)\n\t\t{\n\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"ChangedFactionToNonPlayer\", this.Named(\"SUBJECT\"), newFaction.Named(\"FACTION\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tQuestUtility.SendQuestTargetSignals(questTags, \"ChangedFactionToPlayer\", this.Named(\"SUBJECT\"), newFaction.Named(\"FACTION\"));\n\t\t}\n\t\tif (Spawned)\n\t\t{\n\t\t\tMap.events.Notify_ThingFactionChanged(previous, factionInt);\n\t\t}\n\t}\n\n\tpublic virtual AcceptanceReport ClaimableBy(Faction by)\n\t{\n\t\treturn false;\n\t}\n\n\tpublic virtual bool AdoptableBy(Faction by, StringBuilder reason = null)\n\t{\n\t\treturn false;\n\t}\n\n\tpublic bool FactionPreventsClaimingOrAdopting(Faction faction, bool forClaim, out string reason)\n\t{\n\t\treason = null;\n\t\tif (faction == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (faction == Faction.OfInsects)\n\t\t{\n\t\t\tif (HiveUtility.AnyHivePreventsClaiming(this))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse if (faction == Faction.OfMechanoids)\n\t\t{\n\t\t\tforeach (IAttackTarget item in MapHeld.attackTargetsCache.TargetsHostileToFaction(Faction.OfPlayer))\n\t\t\t{\n\t\t\t\tif (item.Thing == null || item.Thing.Faction != faction)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (item.Thing is Pawn pawn)\n\t\t\t\t{\n\t\t\t\t\tif (GenHostility.IsActiveThreatToPlayer(pawn))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (forClaim)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treason = \"MessageCannotClaimWhenPawnThreatsAreNear\".Translate(this.Named(\"CLAIMABLE\"), pawn.Named(\"THREAT\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treason = \"MessageCannotAdoptWhilePawnThreatsAreNear\".Translate(this.Named(\"CLAIMABLE\"), pawn.Named(\"THREAT\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (forClaim)\n\t\t\t\t{\n\t\t\t\t\treason = \"MessageCannotClaimWhenThreatsAreNear\".Translate(this.Named(\"CLAIMABLE\"), item.Named(\"THREAT\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treason = \"MessageCannotAdoptWhileThreatsAreNear\".Translate(this.Named(\"CLAIMABLE\"), item.Named(\"THREAT\"));\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (faction == Faction.OfAncients && Spawned && !Map.IsPlayerHome && GenHostility.AnyHostileActiveThreatToPlayer(Map, countDormantPawnsAsHostile: true, canBeFogged: true))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (Spawned && faction != Faction.OfPlayer)\n\t\t\t{\n\t\t\t\tList list = Map.mapPawns.SpawnedPawnsInFaction(faction);\n\t\t\t\tfor (int i = 0; i < list.Count; i++)\n\t\t\t\t{\n\t\t\t\t\tif (list[i].RaceProps.ToolUser && GenHostility.IsPotentialThreat(list[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (forClaim)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treason = \"MessageCannotClaimWhenThreatsAreNear\".Translate(this.Named(\"CLAIMABLE\"), list[i].Named(\"THREAT\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treason = \"MessageCannotAdoptWhileThreatsAreNear\".Translate(this.Named(\"CLAIMABLE\"), list[i].Named(\"THREAT\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic void SetPositionDirect(IntVec3 newPos)\n\t{\n\t\tpositionInt = newPos;\n\t}\n\n\tpublic void SetStuffDirect(ThingDef newStuff)\n\t{\n\t\tstuffInt = newStuff;\n\t}\n\n\tpublic override string ToString()\n\t{\n\t\tif (def != null)\n\t\t{\n\t\t\treturn ThingID;\n\t\t}\n\t\treturn GetType().ToString();\n\t}\n\n\tpublic bool Equals(Thing other)\n\t{\n\t\tif (other == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (def.category == ThingCategory.Mote)\n\t\t{\n\t\t\treturn this == other;\n\t\t}\n\t\tif (thingIDNumber == other.thingIDNumber)\n\t\t{\n\t\t\treturn def.Equals(other.def);\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic override int GetHashCode()\n\t{\n\t\tif (thingIDNumber == -1)\n\t\t{\n\t\t\treturn base.GetHashCode();\n\t\t}\n\t\treturn thingIDNumber;\n\t}\n\n\tpublic virtual void Discard(bool silentlyRemoveReferences = false)\n\t{\n\t\tif (mapIndexOrState != -2)\n\t\t{\n\t\t\tLog.Warning(\"Tried to discard \" + this?.ToString() + \" whose state is \" + mapIndexOrState + \".\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmapIndexOrState = -3;\n\t\t}\n\t}\n\n\tpublic virtual void Notify_DefsHotReloaded()\n\t{\n\t\tgraphicInt = null;\n\t}\n\n\tpublic virtual IEnumerable ButcherProducts(Pawn butcher, float efficiency)\n\t{\n\t\tif (def.butcherProducts == null)\n\t\t{\n\t\t\tyield break;\n\t\t}\n\t\tfor (int i = 0; i < def.butcherProducts.Count; i++)\n\t\t{\n\t\t\tThingDefCountClass thingDefCountClass = def.butcherProducts[i];\n\t\t\tint num = GenMath.RoundRandom((float)thingDefCountClass.count * efficiency);\n\t\t\tif (num > 0)\n\t\t\t{\n\t\t\t\tThing thing = ThingMaker.MakeThing(thingDefCountClass.thingDef);\n\t\t\t\tthing.stackCount = num;\n\t\t\t\tyield return thing;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic virtual IEnumerable SmeltProducts(float efficiency)\n\t{\n\t\tList costListAdj = def.CostListAdjusted(Stuff);\n\t\tfor (int i = 0; i < costListAdj.Count; i++)\n\t\t{\n\t\t\tif (!costListAdj[i].thingDef.intricate && costListAdj[i].thingDef.smeltable)\n\t\t\t{\n\t\t\t\tint num = GenMath.RoundRandom((float)costListAdj[i].count * 0.25f);\n\t\t\t\tif (num > 0)\n\t\t\t\t{\n\t\t\t\t\tThing thing = ThingMaker.MakeThing(costListAdj[i].thingDef);\n\t\t\t\t\tthing.stackCount = num;\n\t\t\t\t\tyield return thing;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (def.smeltProducts != null)\n\t\t{\n\t\t\tfor (int i = 0; i < def.smeltProducts.Count; i++)\n\t\t\t{\n\t\t\t\tThingDefCountClass thingDefCountClass = def.smeltProducts[i];\n\t\t\t\tThing thing2 = ThingMaker.MakeThing(thingDefCountClass.thingDef);\n\t\t\t\tthing2.stackCount = thingDefCountClass.count;\n\t\t\t\tyield return thing2;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic float Ingested(Pawn ingester, float nutritionWanted)\n\t{\n\t\tif (Destroyed)\n\t\t{\n\t\t\tLog.Error(ingester?.ToString() + \" ingested destroyed thing \" + this);\n\t\t\treturn 0f;\n\t\t}\n\t\tif (!IngestibleNow)\n\t\t{\n\t\t\tLog.Error(ingester?.ToString() + \" ingested IngestibleNow=false thing \" + this);\n\t\t\treturn 0f;\n\t\t}\n\t\tingester.mindState.lastIngestTick = Find.TickManager.TicksGame;\n\t\tif (ingester.needs.mood != null)\n\t\t{\n\t\t\tList list = FoodUtility.ThoughtsFromIngesting(ingester, this, def);\n\t\t\tfor (int i = 0; i < list.Count; i++)\n\t\t\t{\n\t\t\t\tThought_Memory thought_Memory = ThoughtMaker.MakeThought(list[i].thought, list[i].fromPrecept);\n\t\t\t\tif (thought_Memory is Thought_FoodEaten thought_FoodEaten)\n\t\t\t\t{\n\t\t\t\t\tthought_FoodEaten.SetFood(this);\n\t\t\t\t}\n\t\t\t\tingester.needs.mood.thoughts.memories.TryGainMemory(thought_Memory);\n\t\t\t}\n\t\t}\n\t\tingester.needs.drugsDesire?.Notify_IngestedDrug(this);\n\t\tbool flag = FoodUtility.IsHumanlikeCorpseOrHumanlikeMeat(this, def);\n\t\tbool flag2 = FoodUtility.IsHumanlikeCorpseOrHumanlikeMeatOrIngredient(this);\n\t\tif (flag && ingester.IsColonist)\n\t\t{\n\t\t\tTaleRecorder.RecordTale(TaleDefOf.AteRawHumanlikeMeat, ingester);\n\t\t}\n\t\tif (flag2)\n\t\t{\n\t\t\tingester.mindState.lastHumanMeatIngestedTick = Find.TickManager.TicksGame;\n\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteHumanMeat, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\tif (flag)\n\t\t\t{\n\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteHumanMeatDirect, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t}\n\t\t}\n\t\telse if (ModsConfig.IdeologyActive && !FoodUtility.AcceptableCannibalNonHumanlikeMeatFood(def))\n\t\t{\n\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteNonCannibalFood, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t}\n\t\tif (def.ingestible.ateEvent != null)\n\t\t{\n\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(def.ingestible.ateEvent, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t}\n\t\tif (ModsConfig.IdeologyActive)\n\t\t{\n\t\t\tFoodKind foodKind = FoodUtility.GetFoodKind(this);\n\t\t\tif (foodKind != FoodKind.Any && !def.IsProcessedFood)\n\t\t\t{\n\t\t\t\tif (foodKind == FoodKind.Meat)\n\t\t\t\t{\n\t\t\t\t\tif (!flag2)\n\t\t\t\t\t{\n\t\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteMeat, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (!def.IsDrug && def.ingestible.CachedNutrition > 0f)\n\t\t\t\t{\n\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteNonMeat, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (FoodUtility.IsVeneratedAnimalMeatOrCorpseOrHasIngredients(this, ingester))\n\t\t\t{\n\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteVeneratedAnimalMeat, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t}\n\t\t\tif (def.thingCategories != null && def.thingCategories.Contains(ThingCategoryDefOf.PlantFoodRaw))\n\t\t\t{\n\t\t\t\tif (def.IsFungus)\n\t\t\t\t{\n\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteFungus, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteNonFungusPlant, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCompIngredients compIngredients = this.TryGetComp();\n\t\tif (compIngredients != null)\n\t\t{\n\t\t\tbool flag3 = false;\n\t\t\tbool flag4 = false;\n\t\t\tbool flag5 = false;\n\t\t\tbool flag6 = false;\n\t\t\tbool flag7 = false;\n\t\t\tfor (int j = 0; j < compIngredients.ingredients.Count; j++)\n\t\t\t{\n\t\t\t\tif (!flag3 && FoodUtility.GetMeatSourceCategory(compIngredients.ingredients[j]) == MeatSourceCategory.Humanlike)\n\t\t\t\t{\n\t\t\t\t\tingester.mindState.lastHumanMeatIngestedTick = Find.TickManager.TicksGame;\n\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteHumanMeatAsIngredient, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t\tflag3 = true;\n\t\t\t\t}\n\t\t\t\telse if (!flag4 && ingester.Ideo != null && compIngredients.ingredients[j].IsMeat && ingester.Ideo.IsVeneratedAnimal(compIngredients.ingredients[j].ingestible.sourceDef))\n\t\t\t\t{\n\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteVeneratedAnimalMeat, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t\tflag4 = true;\n\t\t\t\t}\n\t\t\t\tif (!flag5 && FoodUtility.GetMeatSourceCategory(compIngredients.ingredients[j]) == MeatSourceCategory.Insect)\n\t\t\t\t{\n\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteInsectMeatAsIngredient, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t\tflag5 = true;\n\t\t\t\t}\n\t\t\t\tif (ModsConfig.IdeologyActive && !flag6 && compIngredients.ingredients[j].thingCategories.Contains(ThingCategoryDefOf.PlantFoodRaw))\n\t\t\t\t{\n\t\t\t\t\tif (compIngredients.ingredients[j].IsFungus)\n\t\t\t\t\t{\n\t\t\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteFungusAsIngredient, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t\t\t\tflag6 = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tflag7 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ModsConfig.IdeologyActive && !flag6 && flag7)\n\t\t\t{\n\t\t\t\tFind.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.AteNonFungusMealWithPlants, ingester.Named(HistoryEventArgsNames.Doer)), canApplySelfTookThoughts: false);\n\t\t\t}\n\t\t}\n\t\tIngestedCalculateAmounts(ingester, nutritionWanted, out var numTaken, out var nutritionIngested);\n\t\tif (!ingester.Dead && ingester.needs.joy != null && Mathf.Abs(def.ingestible.joy) > 0.0001f && numTaken > 0)\n\t\t{\n\t\t\tingester.needs.joy.GainJoy((float)numTaken * def.ingestible.joy, def.ingestible.joyKind ?? JoyKindDefOf.Gluttonous);\n\t\t}\n\t\tfloat poisonChanceOverride;\n\t\tfloat chance = (FoodUtility.TryGetFoodPoisoningChanceOverrideFromTraits(ingester, this, out poisonChanceOverride) ? poisonChanceOverride : (this.GetStatValue(StatDefOf.FoodPoisonChanceFixedHuman) * FoodUtility.GetFoodPoisonChanceFactor(ingester)));\n\t\tif (ingester.RaceProps.Humanlike && Rand.Chance(chance))\n\t\t{\n\t\t\tFoodUtility.AddFoodPoisoningHediff(ingester, this, FoodPoisonCause.DangerousFoodType);\n\t\t}\n\t\tList hediffs = ingester.health.hediffSet.hediffs;\n\t\tfor (int k = 0; k < hediffs.Count; k++)\n\t\t{\n\t\t\thediffs[k].Notify_IngestedThing(this, numTaken);\n\t\t}\n\t\tingester.genes?.Notify_IngestedThing(this, numTaken);\n\t\tbool flag8 = false;\n\t\tif (numTaken > 0)\n\t\t{\n\t\t\tif (stackCount == 0)\n\t\t\t{\n\t\t\t\tLog.Error(this?.ToString() + \" stack count is 0.\");\n\t\t\t}\n\t\t\tif (numTaken == stackCount)\n\t\t\t{\n\t\t\t\tflag8 = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSplitOff(numTaken);\n\t\t\t}\n\t\t}\n\t\tPrePostIngested(ingester);\n\t\tif (flag8)\n\t\t{\n\t\t\tingester.carryTracker.innerContainer.Remove(this);\n\t\t}\n\t\tif (def.ingestible.outcomeDoers != null)\n\t\t{\n\t\t\tfor (int l = 0; l < def.ingestible.outcomeDoers.Count; l++)\n\t\t\t{\n\t\t\t\tdef.ingestible.outcomeDoers[l].DoIngestionOutcome(ingester, this, numTaken);\n\t\t\t}\n\t\t}\n\t\tif (flag8 && !Destroyed)\n\t\t{\n\t\t\tDestroy();\n\t\t}\n\t\tPostIngested(ingester);\n\t\treturn nutritionIngested;\n\t}\n\n\tprotected virtual void PrePostIngested(Pawn ingester)\n\t{\n\t}\n\n\tprotected virtual void PostIngested(Pawn ingester)\n\t{\n\t}\n\n\tprotected virtual void IngestedCalculateAmounts(Pawn ingester, float nutritionWanted, out int numTaken, out float nutritionIngested)\n\t{\n\t\tfloat num = FoodUtility.NutritionForEater(ingester, this);\n\t\tnumTaken = Mathf.CeilToInt(nutritionWanted / num);\n\t\tnumTaken = Mathf.Min(numTaken, stackCount);\n\t\tif (def.ingestible.maxNumToIngestAtOnce > 0)\n\t\t{\n\t\t\tnumTaken = Mathf.Min(numTaken, def.ingestible.maxNumToIngestAtOnce);\n\t\t}\n\t\tnumTaken = Mathf.Max(numTaken, 1);\n\t\tnutritionIngested = (float)numTaken * num;\n\t}\n\n\tpublic virtual bool PreventPlayerSellingThingsNearby(out string reason)\n\t{\n\t\treason = null;\n\t\treturn false;\n\t}\n\n\tpublic virtual void PreSwapMap()\n\t{\n\t\tbeingTransportedOnGravship = true;\n\t}\n\n\tpublic virtual void PostSwapMap()\n\t{\n\t\tbeingTransportedOnGravship = false;\n\t\tQuestUtility.SendQuestTargetSignals(questTags, \"SwappedMap\", this.Named(\"SUBJECT\"));\n\t}\n\n\tpublic void Notify_LeftBehind()\n\t{\n\t\tQuestUtility.SendQuestTargetSignals(questTags, \"LeftBehind\", this.Named(\"SUBJECT\"));\n\t\tif (!(this is IThingHolder thingHolder) || thingHolder.GetDirectlyHeldThings() == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tforeach (Thing item in (IEnumerable)thingHolder.GetDirectlyHeldThings())\n\t\t{\n\t\t\titem.Notify_LeftBehind();\n\t\t}\n\t}\n}\n\n", + "timestamp": "2025-08-25 14:10:31,694" + }, + "MapPortal": { + "keywords": [ + "MapPortal" + ], + "question": "MapPortal class definition", + "embedding": [ + -0.004828896373510361, + 0.044337302446365356, + 0.01690523698925972, + -0.03522060811519623, + -0.003080573631450534, + 0.00954301469027996, + -0.020119035616517067, + 0.042238496243953705, + 0.028497867286205292, + 0.07752469182014465, + 0.04843653738498688, + -0.0265138391405344, + -0.04653449356555939, + 0.0222342386841774, + -0.00924786925315857, + 0.03735221177339554, + -0.0023529597092419863, + -0.09300339967012405, + -0.06053747236728668, + 0.02067653089761734, + 0.003947561141103506, + 0.03761456161737442, + 0.04168099910020828, + -0.04633772745728493, + 0.004304194822907448, + 0.0005006188293918967, + 0.01136307418346405, + 0.017741480842232704, + 0.027546845376491547, + -0.01890566200017929, + -0.009001915343105793, + -0.009116694331169128, + 0.03535178676247597, + -0.03177725523710251, + 0.051748715341091156, + 0.00955941155552864, + -0.025382449850440025, + 0.018118608742952347, + 0.0207913089543581, + 0.005185529589653015, + -0.03349893167614937, + 0.002933001145720482, + -0.017610304057598114, + 0.010912158526480198, + -0.010469441302120686, + 0.006845719181001186, + 0.015560688450932503, + -0.029563667252659798, + -0.061029378324747086, + -0.015905024483799934, + -0.012863392941653728, + 0.022283431142568588, + 0.03243312984704971, + 0.013174934312701225, + 0.01875809021294117, + 0.015626275911927223, + 0.028973378241062164, + -0.0341712050139904, + 0.005070751067250967, + 0.03456473350524902, + 0.01906963251531124, + -0.005070751067250967, + -0.0457802340388298, + -0.00038891471922397614, + 0.016569100320339203, + -0.010641608387231827, + -0.00427959905937314, + 0.000527776253875345, + -0.02100447006523609, + -0.03574531152844429, + 0.03394164890050888, + 0.036761920899152756, + -0.021758727729320526, + 0.031301744282245636, + -0.014814628288149834, + 0.013388094492256641, + -0.01142866164445877, + -0.03640118986368179, + -0.01872529648244381, + -0.026907365769147873, + -0.02085689641535282, + 0.022267034277319908, + -0.01895485259592533, + -0.013757025822997093, + -0.0028100241906940937, + 0.05263414978981018, + 0.0419105589389801, + -0.007776245009154081, + 0.00847721379250288, + 0.02033219486474991, + 0.040926743298769, + -0.010576020926237106, + 0.012527256272733212, + -0.016454320400953293, + 0.02789118140935898, + 0.014429300092160702, + -0.023873932659626007, + -0.04709198698401451, + 0.01702001504600048, + 0.04017248377203941, + -0.04013969004154205, + -0.025644801557064056, + -0.06634198874235153, + 0.0024185474030673504, + -0.031137773767113686, + 0.01506058219820261, + -0.03931984305381775, + 0.030727850273251534, + -0.011928767897188663, + -0.015396718867123127, + 0.01890566200017929, + -0.055651187896728516, + -0.0064644902013242245, + 0.08021379262208939, + -0.012806003913283348, + 0.03768014907836914, + 0.032941434532403946, + 0.008854343555867672, + 0.0025415243580937386, + 0.04295996204018593, + 0.023168863728642464, + 0.01407676562666893, + 0.011149914003908634, + -0.025448037311434746, + -0.0132569195702672, + 0.04440288990736008, + -0.017987433820962906, + -0.0035007449332624674, + -0.028874997049570084, + 0.004304194822907448, + -0.01406036876142025, + -0.007099871523678303, + 0.0032937335781753063, + 0.002031169831752777, + -0.0279567688703537, + -0.03564693033695221, + 0.03213798627257347, + -0.04384539648890495, + -0.0680144727230072, + -0.005587254650890827, + -0.08919931203126907, + 0.009895548224449158, + -0.008846145123243332, + 0.003756946884095669, + 0.006214437074959278, + 0.006144750397652388, + -0.01900404319167137, + -0.021906301379203796, + -0.008095985278487206, + -0.004357484634965658, + -0.0066653527319431305, + 0.006370208226144314, + -0.02831750176846981, + 0.04699360579252243, + 0.01405217032879591, + -0.05502810329198837, + 0.009969334118068218, + -0.04459965601563454, + -0.004759209230542183, + -0.05827469378709793, + -0.029694844037294388, + 0.004078736994415522, + -0.023775551468133926, + -0.04305834323167801, + 0.005128140561282635, + 0.003418760374188423, + 0.01854492910206318, + 0.04564905911684036, + -0.022267034277319908, + -0.05289650335907936, + 0.01867610588669777, + -0.01726596988737583, + -0.014355514198541641, + -0.010084113106131554, + 0.08336199820041656, + -0.05210945010185242, + 0.009411838836967945, + 0.06034070998430252, + 0.025726785883307457, + -0.05981600657105446, + 0.014568673446774483, + 0.009977532550692558, + 0.09254427999258041, + -0.01705280877649784, + 0.019282791763544083, + -0.030481895431876183, + -0.04650169983506203, + 0.04692801833152771, + -0.006710444111377001, + 0.0012625637464225292, + 0.03561413660645485, + -0.019676318392157555, + -0.011281088925898075, + 0.010059517808258533, + -0.0633249506354332, + -0.025743182748556137, + 0.0068703144788742065, + -0.023611580953001976, + -0.034728702157735825, + -0.03781132400035858, + 0.012863392941653728, + 0.0170856025069952, + 0.010862966999411583, + 0.012625637464225292, + 0.04361584037542343, + 0.004664927255362272, + 0.01406036876142025, + -0.02090608887374401, + 0.014945803210139275, + -0.0074974969029426575, + 0.02082410268485546, + 0.01402757503092289, + 0.00839522946625948, + -0.017364351078867912, + -0.031268950551748276, + -0.02816992811858654, + -0.012879789806902409, + -0.025661198422312737, + 0.011764798313379288, + -0.007349924650043249, + -0.04374701529741287, + 0.049617115408182144, + 0.02830110490322113, + 0.004146374296396971, + 0.029120950028300285, + 0.051584746688604355, + 0.00612015463411808, + 0.011830386705696583, + 0.003224046668037772, + 0.011887775734066963, + 0.001663263770751655, + 0.008731366135179996, + -0.006821123417466879, + 0.06411200016736984, + 0.023841138929128647, + -0.0076983594335615635, + -0.007727053947746754, + -0.015257344581186771, + -0.013470079749822617, + 0.0003492034156806767, + -0.004751010797917843, + 0.03909028694033623, + 0.0012851095525547862, + 0.004832995589822531, + 0.022070270031690598, + -0.060996584594249725, + -0.015281940810382366, + 0.030990201979875565, + 0.0712282732129097, + -0.047879040241241455, + 0.04905961826443672, + -0.008714969269931316, + 0.01895485259592533, + 0.011723806150257587, + 0.04843653738498688, + -0.013174934312701225, + -0.011699210852384567, + -0.003918866626918316, + 0.05214224383234978, + -0.002838718704879284, + -0.005464277695864439, + 0.014667055569589138, + -0.01902044005692005, + 0.017479129135608673, + -0.0227261483669281, + -0.010018525645136833, + 0.00664075743407011, + 0.04476362466812134, + -0.018184198066592216, + -0.06253790110349655, + -0.013699636794626713, + 0.0419105589389801, + 0.02098807319998741, + -0.023267246782779694, + -0.03725383058190346, + -0.03522060811519623, + 0.012650232762098312, + -0.006017673760652542, + 0.0048944843001663685, + -0.030826231464743614, + -0.012018950656056404, + -0.003041630843654275, + -0.012478064745664597, + 0.03643398359417915, + -0.004927278030663729, + 0.017364351078867912, + 0.02423466555774212, + 0.022168651223182678, + 0.015650872141122818, + -0.027841990813612938, + 0.036663539707660675, + -0.010116906836628914, + 0.0170036181807518, + -0.002180791925638914, + -0.00925606768578291, + 0.03410561755299568, + -0.03764735534787178, + 0.04348466172814369, + -0.01893845573067665, + 0.00477970577776432, + -0.053749144077301025, + 0.006915405858308077, + -0.0037630959413945675, + 0.027415670454502106, + 0.04856771230697632, + -0.015511497855186462, + -0.006443994119763374, + -0.1269778460264206, + 0.07699999213218689, + -0.10133303701877594, + 0.03218717873096466, + 0.0013189282035455108, + -0.03895910829305649, + 0.028858600184321404, + 0.006427597254514694, + -0.04154982417821884, + -0.006218536291271448, + 0.018200594931840897, + -0.008608389645814896, + 0.024808557704091072, + -0.0340072363615036, + 0.0008879963424988091, + 0.06594845652580261, + 0.007349924650043249, + 0.04499318078160286, + -0.01893845573067665, + 0.005345399957150221, + 0.005718430038541555, + -0.008391129784286022, + -0.03800808638334274, + 0.0034966457169502974, + 0.019938668236136436, + -0.013388094492256641, + 0.04063159599900246, + -0.04722316190600395, + 0.027481257915496826, + 0.026759792119264603, + 0.01895485259592533, + 0.0008726242231205106, + -0.03225276619195938, + 0.020283004269003868, + 0.05470016598701477, + 0.021758727729320526, + -0.008665778674185276, + 0.03879513964056969, + 0.05824190005660057, + 0.053322821855545044, + 0.038532789796590805, + 0.0207913089543581, + 0.013847208581864834, + -0.06388244777917862, + 0.0004988253931514919, + 0.046009790152311325, + 0.04112350568175316, + 0.02033219486474991, + -0.01898764632642269, + 0.027120525017380714, + 0.004861690104007721, + -0.055224865674972534, + -0.00427959905937314, + -0.005517567507922649, + 0.015191757120192051, + -0.0025661198887974024, + 0.047682277858257294, + 0.04738713428378105, + 0.015544291585683823, + -0.04837094992399216, + 0.01410136092454195, + -0.0676865354180336, + 0.024956129491329193, + -0.009157686494290829, + -0.03131813928484917, + 0.012806003913283348, + 0.0316624753177166, + -0.05417546257376671, + 0.05460178107023239, + 0.007300734054297209, + 0.006538276560604572, + 0.01715118996798992, + 0.030908215790987015, + -0.011026936583220959, + -0.0014787983382120728, + -0.04197614639997482, + -0.05227341875433922, + -0.008714969269931316, + -0.026776188984513283, + -0.0024021505378186703, + -0.0068621160462498665, + 0.02443142794072628, + -0.06237392872571945, + 0.018331769853830338, + 0.00848541222512722, + 0.014806429855525494, + 0.0009694686159491539, + 0.008928129449486732, + 0.0013875903096050024, + 0.0006174469599500299, + 0.002326314803212881, + 0.033138200640678406, + -0.025070909410715103, + 0.008739564567804337, + -0.0057389261201024055, + 0.06558772921562195, + -0.015724657103419304, + 0.03564693033695221, + 0.01142866164445877, + -0.0013732430525124073, + 0.007362222298979759, + -0.015240947715938091, + -0.008243557065725327, + -0.016421526670455933, + 0.00306417653337121, + 0.04292716830968857, + 0.0016089489217847586, + -0.047715071588754654, + 0.016036199405789375, + 0.014248933643102646, + -0.0018712998135015368, + 0.01887286826968193, + -0.0023017192725092173, + 0.0036052754148840904, + 0.01724957302212715, + -0.021955491974949837, + -0.02420187182724476, + -0.0036483174189925194, + 0.0725400298833847, + -0.005743025336414576, + 0.005066651850938797, + 0.019479554146528244, + 0.004714117851108313, + 0.03512222692370415, + 0.0024820854887366295, + -0.008780556730926037, + 0.05273253098130226, + 0.019200807437300682, + -0.03003917820751667, + 0.027727210894227028, + -0.0244150310754776, + -0.02989160642027855, + -0.010936753824353218, + -0.06499743461608887, + -0.007759848143905401, + -0.010010327212512493, + -0.021397996693849564, + -0.04896123707294464, + -0.07194973528385162, + 0.030727850273251534, + 0.010141502134501934, + 0.04204173386096954, + 0.02466098591685295, + 0.011781195178627968, + 0.011904172599315643, + 0.06168525665998459, + -0.0028633142355829477, + 0.03361371159553528, + 0.04128747433423996, + -0.03146571293473244, + -0.03356451913714409, + -0.007202352397143841, + 0.027743607759475708, + 0.03912308067083359, + -0.019463157281279564, + -0.012978171929717064, + -0.02607112191617489, + -0.004746911581605673, + 0.007522092666476965, + 0.011789393611252308, + -0.009141289629042149, + -0.07837733626365662, + -0.05296209082007408, + -0.03525340184569359, + 0.036663539707660675, + 0.06148849427700043, + 0.0035417373292148113, + 0.02238181233406067, + -0.05279812216758728, + -0.036532364785671234, + 0.031301744282245636, + 0.009444632567465305, + 0.04066438972949982, + -0.026972953230142593, + 0.012469866313040257, + 0.011559836566448212, + -0.009411838836967945, + -0.09195399284362793, + -0.0802793800830841, + 0.012535454705357552, + -0.05620868131518364, + 0.04115629941225052, + 0.009747975505888462, + -0.05420825630426407, + -0.00926426611840725, + -0.00607506325468421, + 0.023988710716366768, + -0.044337302446365356, + 0.0013445484219118953, + 0.034761495888233185, + 0.03518781438469887, + 0.023267246782779694, + -0.008300947025418282, + 0.03397444263100624, + 0.013748827390372753, + 0.005968483164906502, + -0.018167801201343536, + -0.05791396275162697, + 0.0045911408960819244, + -0.03718824312090874, + 0.0009115669527091086, + -0.05663500353693962, + -0.004886285867542028, + 0.04095953702926636, + 0.038663964718580246, + 0.034400761127471924, + -0.009198678657412529, + -0.014339116401970387, + 0.01038745604455471, + 0.0414186492562294, + 0.03528619557619095, + -0.014175147749483585, + -0.025628404691815376, + -0.029465286061167717, + -0.0017339754849672318, + -0.011592631228268147, + -0.0132569195702672, + -0.047813452780246735, + 0.049879465252161026, + 0.007149062119424343, + 0.01607719250023365, + 0.0265958234667778, + 0.00043067566002719104, + -0.019938668236136436, + 0.05240459367632866, + -0.042238496243953705, + -0.02270974963903427, + 0.02592354826629162, + -0.004328790120780468, + -0.0004760234151035547, + 0.015191757120192051, + 0.03548296168446541, + 0.09851276874542236, + -0.01667567901313305, + -0.03587648645043373, + 0.0003909643564838916, + 0.005468376912176609, + 0.027563242241740227, + -0.019971463829278946, + 0.025907151401042938, + -0.017807068303227425, + -0.02034859172999859, + -0.013912796974182129, + 0.003256840631365776, + 0.0012164473300799727, + 0.016380535438656807, + -0.04004130885004997, + 0.014806429855525494, + -0.022037476301193237, + 0.00841162633150816, + 0.057323671877384186, + 0.018069418147206306, + 0.006985093001276255, + 0.01323232427239418, + -0.022955704480409622, + -0.031055789440870285, + 0.011740203015506268, + -0.01888926513493061, + 0.018216991797089577, + -0.003756946884095669, + -0.030514689162373543, + -0.03358091786503792, + 0.011518844403326511, + -0.055487215518951416, + 0.02254578098654747, + -0.025300465524196625, + -0.006796528119593859, + 0.047846246510744095, + 0.06814564764499664, + -0.047846246510744095, + 0.011732004582881927, + 0.034400761127471924, + 0.004345186986029148, + -0.009846357628703117, + 0.029694844037294388, + -0.040238071233034134, + -0.0457802340388298, + -0.019381172955036163, + 0.02246379666030407, + 0.01682325266301632, + -0.016249358654022217, + -0.006222635507583618, + -0.0728679671883583, + 0.029366904869675636, + 0.006911306641995907, + -0.04912520945072174, + -0.0074933976866304874, + -0.034794289618730545, + 0.04440288990736008, + 0.010772784240543842, + -0.014503085985779762, + 0.016733068972826004, + 0.0018405555747449398, + 0.004150473512709141, + 0.0005656941211782396, + -0.025234878063201904, + 0.005583155434578657, + -0.02462819218635559, + 0.0037712943740189075, + 0.01395378913730383, + 0.03225276619195938, + 0.025841563940048218, + -0.01627395488321781, + -0.042697612196207047, + 0.023185262456536293, + -0.06020953506231308, + -0.0020219467114657164, + 0.030678659677505493, + 0.008382931351661682, + 0.010477639734745026, + 0.04099233075976372, + -0.004035694990307093, + 0.010584219358861446, + 0.03143291920423508, + -0.015790244564414024, + 0.03340055048465729, + -0.023218056187033653, + 0.03800808638334274, + 0.03535178676247597, + 0.06788329780101776, + -0.011674615554511547, + -0.01222391240298748, + -0.005800414830446243, + -0.012043545953929424, + 0.007681962568312883, + -0.013740628957748413, + 0.04328789934515953, + 0.04905961826443672, + -0.007198253180831671, + -0.014757238328456879, + 0.00427549984306097, + 0.017479129135608673, + -0.033007021993398666, + -0.005960284732282162, + -0.02236541546881199, + 0.02828470803797245, + -0.01706920564174652, + -0.040238071233034134, + -0.02284092642366886, + -0.044107746332883835, + -0.031301744282245636, + -0.005017461255192757, + 0.006398902740329504, + 0.030514689162373543, + 0.048239775002002716, + 0.03604045510292053, + -0.011018738150596619, + -0.02218504808843136, + -0.015823038294911385, + -0.03361371159553528, + -0.03577810525894165, + -0.0009868902852758765, + -0.04391098394989967, + -0.036565158516168594, + 0.002383704064413905, + 0.01620836742222309, + 0.026808982715010643, + -0.038434408605098724, + 0.03325297683477402, + 0.015437711030244827, + -0.019249998033046722, + -0.010059517808258533, + 0.002838718704879284, + 0.0016468667890876532, + -0.02846507355570793, + 0.00030206222436390817, + 0.00424680532887578, + -0.0009412863873876631, + -0.04194335266947746, + -0.08395229279994965, + -0.014839223586022854, + 0.05476575344800949, + -0.019512349739670753, + 0.04256643354892731, + 0.06503023207187653, + -0.02789118140935898, + -0.0281207375228405, + -0.01687244325876236, + -0.020102638751268387, + -0.009870952926576138, + -0.007304833270609379, + -0.06548934429883957, + 0.030957406386733055, + 0.011961561627686024, + -0.026907365769147873, + 0.09483985602855682, + -0.01869250275194645, + -0.027169715613126755, + -0.028842203319072723, + -0.025562817230820656, + -0.04377980902791023, + 0.0037487484514713287, + 0.014617864973843098, + 0.01898764632642269, + -0.04679684340953827, + -0.002229982754215598, + -0.019791096448898315, + 0.017823465168476105, + -0.014544078148901463, + 0.03141652047634125, + -0.025021718814969063, + 0.008100084029138088, + 0.030744247138500214, + 0.032613497227430344, + 0.02229982800781727, + 0.06470229476690292, + -0.0024103489704430103, + 0.014453895390033722, + 0.03407282382249832, + 0.007755748927593231, + -0.0373850055038929, + -0.032875847071409225, + 0.00018856472161132842, + 0.017364351078867912, + -0.008169771172106266, + 0.019873080775141716, + 0.014306322671473026, + 0.005271613597869873, + 0.017725083976984024, + 0.02626788429915905, + -0.012748614884912968, + 0.016495313495397568, + 0.08368994295597076, + -0.023103276267647743, + -0.057159703224897385, + -0.03620442375540733, + -0.07536029815673828, + -0.042140115052461624, + -0.018233388662338257, + 0.009108495898544788, + -0.027514051645994186, + -0.025103703141212463, + -0.01400297973304987, + -0.013707835227251053, + -0.018216991797089577, + 0.04309113696217537, + -0.02434944361448288, + 0.0314985066652298, + -0.03928704932332039, + -0.04686243087053299, + 0.1089412122964859, + 0.0191024262458086, + -0.045616265386343, + 0.04466524347662926, + 0.055388834327459335, + 0.08093525469303131, + 0.009338052943348885, + 0.05424105003476143, + -0.011469653807580471, + 0.059422481805086136, + -0.00211930344812572, + -0.0025374251417815685, + 0.020069845020771027, + 0.037057064473629, + 0.0036134738475084305, + 0.009174083359539509, + 0.000812160549685359, + -0.0380408801138401, + 0.02610391564667225, + 0.01141226477921009, + 0.019446760416030884, + -0.04273040592670441, + 0.04538670554757118, + -0.03905749320983887, + -0.007977107539772987, + 0.03745059296488762, + 0.0412546806037426, + 0.0184465479105711, + 0.019479554146528244, + -0.03708985820412636, + 0.0191024262458086, + 0.011633623391389847, + 0.013174934312701225, + 0.004009049851447344, + 0.031104980036616325, + -0.05069931223988533, + -0.003211749019101262, + 0.02259497158229351, + -0.012010752223432064, + -0.027612432837486267, + 0.02056175284087658, + -0.005919292569160461, + 0.03715544566512108, + 0.023955916985869408, + -0.013494675047695637, + 0.047879040241241455, + 0.014125957153737545, + -0.025415243580937386, + -0.0070629785768687725, + 0.020086241886019707, + 0.05099445953965187, + 0.010133303701877594, + 0.025612007826566696, + 0.002242280403152108, + -0.07621294260025024, + 0.021725933998823166, + -0.03879513964056969, + 0.02082410268485546, + 0.0063620093278586864, + -0.0023734557908028364, + -0.013166735880076885, + -0.023709964007139206, + -0.04735434055328369, + 0.023054085671901703, + 0.03522060811519623, + 0.0170856025069952, + -0.011797592043876648, + -0.03230195492506027, + -0.01713479310274124, + -0.04187776520848274, + -0.003252741415053606, + -0.010985944420099258, + 0.009157686494290829, + -0.011330279521644115, + 0.0415826179087162, + 0.013027362525463104, + 0.0016601893585175276, + -0.008665778674185276, + 0.01021528895944357, + -0.024037901312112808, + 0.001562832505442202, + 0.03176085650920868, + -0.018036624416708946, + 0.01854492910206318, + -0.02033219486474991, + -0.05584795027971268, + 0.003154359757900238, + -0.021496377885341644, + 0.04673125594854355, + -0.015544291585683823, + 0.001519790617749095, + -0.0038245844189077616, + 0.020135432481765747, + 0.00786642823368311, + -0.017397144809365273, + -0.0035950273741036654, + -0.012822400778532028, + -0.029547270387411118, + -0.033072613179683685, + 0.028547057881951332, + -0.022070270031690598, + -0.01698722131550312, + 0.0058373077772557735, + 0.04128747433423996, + -0.04696081206202507, + -0.030875422060489655, + 0.05778278782963753, + -0.0038040881045162678, + 0.03558134287595749, + 0.015987008810043335, + -0.04459965601563454, + -0.023103276267647743, + 0.00663665821775794, + 0.0064644902013242245, + -0.038368821144104004, + 0.0017339754849672318, + -0.057454850524663925, + -0.03407282382249832, + 0.009354449808597565, + 0.07581941038370132, + 0.002084459876641631, + -0.007735252380371094, + -0.026972953230142593, + 0.019577937200665474, + -0.04518994316458702, + 0.003172806231305003, + -0.025989137589931488, + 0.03627001494169235, + 0.002125452272593975, + -0.03303981572389603, + 0.01110072247684002, + 0.04541949927806854, + -0.019709112122654915, + 0.0368930958211422, + -0.0095512131229043, + 0.016364138573408127, + -0.011248295195400715, + 0.016085390001535416, + 0.03505663946270943, + 0.025120100006461143, + -0.0010401803301647305, + 0.0013804166810587049, + -0.028760218992829323, + -0.007747550494968891, + -8.429047738900408e-05, + -0.004845293238759041, + -0.012592843733727932, + 0.010051319375634193, + -0.014863818883895874, + 0.032875847071409225, + -0.022988498210906982, + 0.007300734054297209, + -0.07004769146442413, + 0.027645226567983627, + -0.0323183536529541, + -0.00604636874049902, + -0.002723940182477236, + -0.008600190281867981, + -0.06404641270637512, + -0.03902469947934151, + -0.010994142852723598, + -0.03817205876111984, + -0.027005746960639954, + -0.006275925785303116, + 0.00476740812882781, + 0.05060093104839325, + 0.011043333448469639, + -0.020217416808009148, + -0.04840374365448952, + -0.02810434065759182, + 0.05096166580915451, + -0.029580064117908478, + 0.012887988239526749, + 0.008837946690618992, + -0.058963365852832794, + 0.061258938163518906, + -0.021070057526230812, + 0.029284920543432236, + -0.0005218836013227701, + -0.012018950656056404, + -0.011772996746003628, + 0.034794289618730545, + 0.02989160642027855, + 0.005476575344800949, + 0.06794888526201248, + 0.0208732932806015, + -0.015552490018308163, + 0.01037105917930603, + 0.01713479310274124, + -0.027317289263010025, + -0.014855620451271534, + -0.016421526670455933, + -0.024759367108345032, + 0.006677650380879641, + 0.013076553121209145, + 0.004177118185907602, + -0.016372336074709892, + 0.0003599638876039535, + 0.03561413660645485, + 0.023332834243774414, + -0.05630706250667572, + -0.014962200075387955, + 0.011715607717633247, + -0.04299275577068329, + -0.014716246165335178, + -0.04279599338769913, + -0.0452883243560791, + -0.0009136165608651936, + -0.0021992383990436792, + 0.02239820919930935, + 0.013650445267558098, + -0.023857535794377327, + -0.03205600008368492, + 0.042140115052461624, + 0.02610391564667225, + 0.01513436809182167, + -0.057389263063669205, + 0.042697612196207047, + -0.04256643354892731, + 0.013724232092499733, + 0.008259953930974007, + 0.000707630068063736, + 0.032908640801906586, + 0.03254790976643562, + 0.029071759432554245, + 0.02843227982521057, + -0.07162179797887802, + -0.034892670810222626, + -0.04489479959011078, + -0.025677595287561417, + -0.03522060811519623, + 0.014183346182107925, + -0.032925039529800415, + 0.017183983698487282, + 0.009600403718650341, + 0.05768440663814545, + 0.0017657446442171931, + -0.007374519947916269, + -0.014839223586022854, + 0.04538670554757118, + 0.02067653089761734, + 0.04351745545864105, + -0.05020740628242493, + -0.021988285705447197, + -0.05476575344800949, + 0.0036298707127571106, + 0.008665778674185276, + 0.0026808984111994505, + -0.02443142794072628, + -0.03225276619195938, + -0.04741992801427841, + 0.0017411492299288511, + 0.015199955552816391, + 0.0377129428088665, + 0.025530023500323296, + -0.021512774750590324, + -0.017364351078867912, + 0.015495100989937782, + 0.08539522439241409, + 0.026825379580259323, + -0.03349893167614937, + -0.04007410258054733, + -0.10139862447977066, + 0.03627001494169235, + 0.0013988632708787918, + 0.015790244564414024, + -0.00608736090362072, + 0.02051256224513054, + -0.009600403718650341, + -0.051978275179862976, + -0.004064389504492283, + 0.0007060928619466722, + -0.03218717873096466, + -0.04574744030833244, + 0.00665305508300662, + 0.004074637778103352, + 0.03994292765855789 + ], + "result": "--- 结果 1 (相似度: 1.000) ---\n文件路径: C:\\Steam\\steamapps\\common\\RimWorld\\Data\\dll1.6\\RimWorld\\MapPortal.txt\n\npublic class MapPortal : Building, IThingHolder\n{\n\tprivate static readonly Texture2D ViewPocketMapTex = ContentFinder.Get(\"UI/Commands/ViewCave\");\n\n\tprivate static readonly Texture2D CancelEnterTex = ContentFinder.Get(\"UI/Designators/Cancel\");\n\n\tprivate static readonly Texture2D DefaultEnterTex = ContentFinder.Get(\"UI/Commands/EnterCave\");\n\n\tprotected Map pocketMap;\n\n\tpublic PocketMapExit exit;\n\n\tprotected bool beenEntered;\n\n\tpublic List leftToLoad;\n\n\tpublic PortalContainerProxy containerProxy;\n\n\tpublic bool notifiedCantLoadMore;\n\n\tpublic Map PocketMap\n\t{\n\t\tget\n\t\t{\n\t\t\tMap map = pocketMap;\n\t\t\tif (map != null && map.Parent?.HasMap == false)\n\t\t\t{\n\t\t\t\tpocketMap = null;\n\t\t\t}\n\t\t\treturn pocketMap;\n\t\t}\n\t}\n\n\tpublic bool PocketMapExists => PocketMap != null;\n\n\tpublic virtual bool AutoDraftOnEnter => false;\n\n\tprotected virtual Texture2D EnterTex => DefaultEnterTex;\n\n\tpublic virtual string EnterString => \"EnterPortal\".Translate(Label);\n\n\tpublic virtual string CancelEnterString => \"CommandCancelEnterPortal\".Translate();\n\n\tpublic virtual string EnteringString => \"EnteringPortal\".Translate(Label);\n\n\tpublic bool LoadInProgress\n\t{\n\t\tget\n\t\t{\n\t\t\tif (leftToLoad != null)\n\t\t\t{\n\t\t\t\treturn leftToLoad.Any();\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic bool AnyPawnCanLoadAnythingNow\n\t{\n\t\tget\n\t\t{\n\t\t\tif (!LoadInProgress)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!base.Spawned)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tIReadOnlyList allPawnsSpawned = base.Map.mapPawns.AllPawnsSpawned;\n\t\t\tfor (int i = 0; i < allPawnsSpawned.Count; i++)\n\t\t\t{\n\t\t\t\tif (allPawnsSpawned[i].CurJobDef == JobDefOf.HaulToPortal && ((JobDriver_HaulToPortal)allPawnsSpawned[i].jobs.curDriver).MapPortal == this)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (allPawnsSpawned[i].CurJobDef == JobDefOf.EnterPortal && ((JobDriver_EnterPortal)allPawnsSpawned[i].jobs.curDriver).MapPortal == this)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int j = 0; j < allPawnsSpawned.Count; j++)\n\t\t\t{\n\t\t\t\tThing thing = allPawnsSpawned[j].mindState?.duty?.focus.Thing;\n\t\t\t\tif (thing != null && thing == this && allPawnsSpawned[j].CanReach(thing, PathEndMode.Touch, Danger.Deadly))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int k = 0; k < allPawnsSpawned.Count; k++)\n\t\t\t{\n\t\t\t\tif (allPawnsSpawned[k].IsColonist && EnterPortalUtility.HasJobOnPortal(allPawnsSpawned[k], this))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic override void ExposeData()\n\t{\n\t\tbase.ExposeData();\n\t\tMap map = pocketMap;\n\t\tif (map != null && map.Parent?.HasMap == false)\n\t\t{\n\t\t\tpocketMap = null;\n\t\t}\n\t\tScribe_References.Look(ref pocketMap, \"pocketMap\");\n\t\tScribe_References.Look(ref exit, \"exit\");\n\t\tScribe_Values.Look(ref beenEntered, \"beenEntered\", defaultValue: false);\n\t\tScribe_Collections.Look(ref leftToLoad, \"leftToLoad\", LookMode.Deep);\n\t\tif (Scribe.mode == LoadSaveMode.PostLoadInit)\n\t\t{\n\t\t\tleftToLoad?.RemoveAll((TransferableOneWay x) => x.AnyThing == null);\n\t\t}\n\t}\n\n\tpublic override void SpawnSetup(Map map, bool respawningAfterLoad)\n\t{\n\t\tbase.SpawnSetup(map, respawningAfterLoad);\n\t\tcontainerProxy = new PortalContainerProxy\n\t\t{\n\t\t\tportal = this\n\t\t};\n\t}\n\n\tprotected override void Tick()\n\t{\n\t\tbase.Tick();\n\t\tif (this.IsHashIntervalTick(60) && base.Spawned && LoadInProgress && !notifiedCantLoadMore && !AnyPawnCanLoadAnythingNow && leftToLoad[0]?.AnyThing != null)\n\t\t{\n\t\t\tnotifiedCantLoadMore = true;\n\t\t\tMessages.Message(\"MessageCantLoadMoreIntoPortal\".Translate(Label, Faction.OfPlayer.def.pawnsPlural, leftToLoad[0].AnyThing), this, MessageTypeDefOf.CautionInput);\n\t\t}\n\t}\n\n\tpublic void GetChildHolders(List outChildren)\n\t{\n\t}\n\n\tpublic ThingOwner GetDirectlyHeldThings()\n\t{\n\t\treturn containerProxy;\n\t}\n\n\tpublic void Notify_ThingAdded(Thing t)\n\t{\n\t\tSubtractFromToLoadList(t, t.stackCount);\n\t}\n\n\tpublic void AddToTheToLoadList(TransferableOneWay t, int count)\n\t{\n\t\tif (!t.HasAnyThing || count <= 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (leftToLoad == null)\n\t\t{\n\t\t\tleftToLoad = new List();\n\t\t}\n\t\tTransferableOneWay transferableOneWay = TransferableUtility.TransferableMatching(t.AnyThing, leftToLoad, TransferAsOneMode.PodsOrCaravanPacking);\n\t\tif (transferableOneWay != null)\n\t\t{\n\t\t\tfor (int i = 0; i < t.things.Count; i++)\n\t\t\t{\n\t\t\t\tif (!transferableOneWay.things.Contains(t.things[i]))\n\t\t\t\t{\n\t\t\t\t\ttransferableOneWay.things.Add(t.things[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (transferableOneWay.CanAdjustBy(count).Accepted)\n\t\t\t{\n\t\t\t\ttransferableOneWay.AdjustBy(count);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tTransferableOneWay transferableOneWay2 = new TransferableOneWay();\n\t\t\tleftToLoad.Add(transferableOneWay2);\n\t\t\ttransferableOneWay2.things.AddRange(t.things);\n\t\t\ttransferableOneWay2.AdjustTo(count);\n\t\t}\n\t}\n\n\tpublic int SubtractFromToLoadList(Thing t, int count)\n\t{\n\t\tif (leftToLoad == null)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tTransferableOneWay transferableOneWay = TransferableUtility.TransferableMatchingDesperate(t, leftToLoad, TransferAsOneMode.PodsOrCaravanPacking);\n\t\tif (transferableOneWay == null)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tif (transferableOneWay.CountToTransfer <= 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tint num = Mathf.Min(count, transferableOneWay.CountToTransfer);\n\t\ttransferableOneWay.AdjustBy(-num);\n\t\ttransferableOneWay.things.Remove(t);\n\t\tif (transferableOneWay.CountToTransfer <= 0)\n\t\t{\n\t\t\tleftToLoad.Remove(transferableOneWay);\n\t\t}\n\t\treturn num;\n\t}\n\n\tpublic void CancelLoad()\n\t{\n\t\tLord lord = base.Map.lordManager.lords.FirstOrDefault((Lord l) => l.LordJob is LordJob_LoadAndEnterPortal lordJob_LoadAndEnterPortal && lordJob_LoadAndEnterPortal.portal == this);\n\t\tif (lord != null)\n\t\t{\n\t\t\tbase.Map.lordManager.RemoveLord(lord);\n\t\t}\n\t\tleftToLoad.Clear();\n\t}\n\n\tpublic virtual bool IsEnterable(out string reason)\n\t{\n\t\treason = \"\";\n\t\treturn true;\n\t}\n\n\tpublic virtual Map GetOtherMap()\n\t{\n\t\tif (PocketMap == null)\n\t\t{\n\t\t\tGeneratePocketMap();\n\t\t}\n\t\treturn PocketMap;\n\t}\n\n\tpublic virtual IntVec3 GetDestinationLocation()\n\t{\n\t\treturn exit?.Position ?? IntVec3.Invalid;\n\t}\n\n\tpublic virtual void OnEntered(Pawn pawn)\n\t{\n\t\tNotify_ThingAdded(pawn);\n\t\tif (!beenEntered)\n\t\t{\n\t\t\tbeenEntered = true;\n\t\t\tif (!def.portal.enteredLetterLabel.NullOrEmpty())\n\t\t\t{\n\t\t\t\tFind.LetterStack.ReceiveLetter(def.portal.enteredLetterLabel, def.portal.enteredLetterText.Formatted(pawn.Named(\"PAWN\")), def.portal.enteredLetterDef, exit);\n\t\t\t}\n\t\t}\n\t\tif (Find.CurrentMap == base.Map)\n\t\t{\n\t\t\tdef.portal.traverseSound?.PlayOneShot(this);\n\t\t}\n\t\telse if (Find.CurrentMap == exit.Map)\n\t\t{\n\t\t\tdef.portal.traverseSound?.PlayOneShot(exit);\n\t\t}\n\t}\n\n\tpublic override IEnumerable GetGizmos()\n\t{\n\t\tforeach (Gizmo gizmo in base.GetGizmos())\n\t\t{\n\t\t\tyield return gizmo;\n\t\t}\n\t\tCommand_Action command_Action = new Command_Action();\n\t\tcommand_Action.action = delegate\n\t\t{\n\t\t\tDialog_EnterPortal window = new Dialog_EnterPortal(this);\n\t\t\tFind.WindowStack.Add(window);\n\t\t};\n\t\tcommand_Action.icon = EnterTex;\n\t\tcommand_Action.defaultLabel = EnterString + \"...\";\n\t\tcommand_Action.defaultDesc = \"CommandEnterPortalDesc\".Translate(Label);\n\t\tcommand_Action.Disabled = !IsEnterable(out var reason);\n\t\tcommand_Action.disabledReason = reason;\n\t\tyield return command_Action;\n\t\tif (LoadInProgress)\n\t\t{\n\t\t\tCommand_Action command_Action2 = new Command_Action();\n\t\t\tcommand_Action2.action = CancelLoad;\n\t\t\tcommand_Action2.icon = CancelEnterTex;\n\t\t\tcommand_Action2.defaultLabel = CancelEnterString;\n\t\t\tcommand_Action2.defaultDesc = \"CommandCancelEnterPortalDesc\".Translate();\n\t\t\tyield return command_Action2;\n\t\t}\n\t\tif (pocketMap != null)\n\t\t{\n\t\t\tyield return new Command_Action\n\t\t\t{\n\t\t\t\tdefaultLabel = \"CommandViewPocketMapLabel\".Translate(def.portal.pocketMapGenerator.label),\n\t\t\t\tdefaultDesc = \"CommandViewPocketMapDesc\".Translate(def.portal.pocketMapGenerator.label),\n\t\t\t\ticon = ViewPocketMapTex,\n\t\t\t\taction = delegate\n\t\t\t\t{\n\t\t\t\t\tCameraJumper.TryJumpAndSelect(exit);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\tprivate void GeneratePocketMap()\n\t{\n\t\tPocketMapUtility.currentlyGeneratingPortal = this;\n\t\tpocketMap = GeneratePocketMapInt();\n\t\tPocketMapUtility.currentlyGeneratingPortal = null;\n\t}\n\n\tprotected virtual Map GeneratePocketMapInt()\n\t{\n\t\treturn PocketMapUtility.GeneratePocketMap(new IntVec3(def.portal.pocketMapSize, 1, def.portal.pocketMapSize), def.portal.pocketMapGenerator, GetExtraGenSteps(), base.Map);\n\t}\n\n\tprotected virtual IEnumerable GetExtraGenSteps()\n\t{\n\t\treturn Enumerable.Empty();\n\t}\n}\n\n", + "timestamp": "2025-08-25 14:32:36,132" } } \ No newline at end of file diff --git a/Source/WulaFallenEmpire/WULA_Shuttle/PocketSpaceThingHolder.cs b/Source/WulaFallenEmpire/WULA_Shuttle/PocketSpaceThingHolder.cs new file mode 100644 index 00000000..291d1b22 --- /dev/null +++ b/Source/WulaFallenEmpire/WULA_Shuttle/PocketSpaceThingHolder.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using Verse; + +namespace WulaFallenEmpire +{ + /// + /// 用于武装穿梭机口袋空间的IThingHolder实现,与CompTransporter的容器分离 + /// + public class PocketSpaceThingHolder : IThingHolder, IExposable + { + /// 持有的物品容器 + public ThingOwner innerContainer; + + /// 该容器的拥有者(通常是Building_ArmedShuttleWithPocket) + private IThingHolder owner; + + /// 实现IThingHolder.ParentHolder属性 + public IThingHolder ParentHolder => owner; + + public PocketSpaceThingHolder() + { + innerContainer = new ThingOwner(this); + } + + public PocketSpaceThingHolder(IThingHolder owner) : this() + { + this.owner = owner; + } + + /// + /// 获取直接持有的物品 + /// + public ThingOwner GetDirectlyHeldThings() + { + return innerContainer; + } + + /// + /// 获取子持有者 + /// + public void GetChildHolders(List outChildren) + { + // 目前没有子持有者,留空 + } + + /// + /// 通知物品被添加 + /// + public void Notify_ThingAdded(Thing t) + { + // 这里可以添加逻辑来处理物品被添加到口袋空间的情况 + Log.Message($"[WULA] Item {t.LabelCap} added to pocket space container."); + } + + /// + /// 通知物品被移除 + /// + public void Notify_ThingRemoved(Thing t) + { + // 这里可以添加逻辑来处理物品被从口袋空间移除的情况 + Log.Message($"[WULA] Item {t.LabelCap} removed from pocket space container."); + } + + public void ExposeData() + { + Scribe_Deep.Look(ref innerContainer, "innerContainer", this); + // owner 通常在构造函数中设置,不需要序列化 + } + } +} \ No newline at end of file diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index c3516ee6..9bf45bed 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -173,6 +173,7 @@ +