예제 #1
0
        public override void SpawnSetup(Map currentGame, bool respawningAfterLoad)
        {
            base.SpawnSetup(currentGame, respawningAfterLoad);

            mapFishTracker   = this.Map.GetComponent <FishStuffTrackerComponent>();
            fishStatAffector = this.TryGetComp <CompFishingStatAffector>();

            HealthToEmpty = (int)(this.MaxHitPoints * 0.2f);
            terrainDef    = this.Map.terrainGrid.TerrainAt(this.Position);

            if (!respawningAfterLoad)
            {
                RefreshCatchTimer(Find.TickManager.TicksGame);
                LastOpenTick = Find.TickManager.TicksGame;
            }
        }
        public override void SpawnSetup(Map map, bool respawningAfterLoad)
        {
            base.SpawnSetup(map, respawningAfterLoad);

            fishingSpotCell  = this.Position;
            mapFishTracker   = this.Map.GetComponent <FishStuffTrackerComponent>();
            fishStatAffector = this.TryGetComp <CompFishingStatAffector>();

            fishStockRespawnInterval = mapFishTracker.FishSpawnInterval;
            maxFishStock             = mapFishTracker.MaxFishStock;

            if (!respawningAfterLoad)
            {
                fishStock            = 0;
                lastFishingStartTick = Find.TickManager.TicksGame;
            }

            UpdateFish();
        }