private static string HicBurp(Match m)
    {
        string x       = m.ToString();
        string hicburp = "";

        if (DMMath.Prob(10))
        {
            int hicburptext = Random.Range(1, 4);
            switch (hicburptext)
            {
            case 1:
                hicburp = "- burp... ";
                break;

            case 2:
                hicburp = "- hic- ";
                break;

            case 3:
                hicburp = "- hic! ";
                break;

            case 4:
                hicburp = "- buuuurp... ";
                break;
            }
        }
        else
        {
            hicburp = x;
        }
        return(hicburp);
    }
Beispiel #2
0
        /// <summary>
        /// Applies trauma damage to the body part, checks if it has enough protective armor to cancel the trauma damage
        /// and automatically checks how big is the body part's cut size.
        /// </summary>
        public void ApplyTraumaDamage(float tramuaDamage, TraumaticDamageTypes damageType = TraumaticDamageTypes.SLASH)
        {
            //We use dismember protection chance because it's the most logical value.
            if (DMMath.Prob(SelfArmor.DismembermentProtectionChance * 100) == false)
            {
                if (damageType == TraumaticDamageTypes.SLASH)
                {
                    currentSlashCutDamage += MultiplyTraumaDamage(tramuaDamage);
                }
                if (damageType == TraumaticDamageTypes.PIERCE)
                {
                    currentPierceDamage += MultiplyTraumaDamage(tramuaDamage);
                }
                CheckCutSize();
            }
            //Burn and blunt damage checks for it's own armor damage type.
            if (damageType == TraumaticDamageTypes.BURN)
            {
                TakeBurnDamage(MultiplyTraumaDamage(tramuaDamage));
            }

            if (damageType == TraumaticDamageTypes.BLUNT)
            {
                if (DMMath.Prob(SelfArmor.Melee * 100) == false)
                {
                    TakeBluntDamage(tramuaDamage);
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// Try spark at world pos
        /// </summary>
        /// <returns>Null if the spark failed, else the new spark object.</returns>
        public static GameObject TrySpark(Vector3 worldPos, float chanceToSpark = 75, bool expose = true)
        {
            //Clamp just in case
            chanceToSpark = Mathf.Clamp(chanceToSpark, 1, 100);

            //E.g will have 25% chance to not spark when chanceToSpark = 75
            if (DMMath.Prob(100 - chanceToSpark))
            {
                return(null);
            }

            var result = Spawn.ServerPrefab(CommonPrefabs.Instance.SparkEffect, worldPos);

            if (result.Successful)
            {
                if (expose)
                {
                    //Try start fire if possible
                    var reactionManager = MatrixManager.AtPoint(worldPos.RoundToInt(), true).ReactionManager;
                    reactionManager.ExposeHotspotWorldPosition(worldPos.To2Int(), 1000);
                }

                SoundManager.PlayNetworkedAtPos(SingletonSOSounds.Instance.Sparks, worldPos);

                return(result.GameObject);
            }

            return(null);
        }
Beispiel #4
0
        private static void InternalSpark(GameObject gameObject, Vector3 worldPos, float chanceToSpark, bool expose)
        {
            //Clamp just in case
            chanceToSpark = Mathf.Clamp(chanceToSpark, 1, 100);

            //E.g will have 25% chance to not spark when chanceToSpark = 75
            if (DMMath.Prob(100 - chanceToSpark))
            {
                return;
            }

            var result = Spawn.ServerPrefab(CommonPrefabs.Instance.SparkEffect,
                                            worldPos,
                                            gameObject != null ? gameObject.transform.parent : null);

            if (result.Successful == false)
            {
                return;
            }

            if (expose)
            {
                //Try start fire if possible
                var reactionManager = MatrixManager.AtPoint(worldPos.RoundToInt(), true).ReactionManager;
                reactionManager.ExposeHotspotWorldPosition(worldPos.To2Int(), 1000);
            }

            SoundManager.PlayNetworkedAtPos(CommonSounds.Instance.Sparks, worldPos,
                                            sourceObj: gameObject.OrNull());
        }
Beispiel #5
0
        private void RollRandomPool(MatrixInfo matrixInfo)
        {
            for (int i = 0; i <= lootCount; i++)
            {
                PoolData pool = null;
                // Roll attempt is a safe check in the case the mapper did tables with low % and we can't find
                // anything to spawn in 5 attempts
                int rollAttempt = 0;

                while (pool == null)
                {
                    if (rollAttempt >= MaxAmountRolls)
                    {
                        continue;
                    }

                    var tryPool = poolList.PickRandom();
                    if (DMMath.Prob(tryPool.Probability))
                    {
                        pool = tryPool;
                    }
                    else
                    {
                        rollAttempt++;
                    }
                }

                SpawnItems(pool);
            }
        }
Beispiel #6
0
        /// <summary>
        /// Update Loop, runs every 1 second
        /// </summary>
        private void EmitterUpdate()
        {
            if (CustomNetworkManager.IsServer == false)
            {
                return;
            }

            if (isOn == false && alwaysShoot == false)
            {
                return;
            }

            if (voltage < minVoltage && alwaysShoot == false)
            {
                spriteHandler.ChangeSprite(2);
                return;
            }

            //Reset sprite if power is now available
            TogglePower(isOn);

            //Shoot 75% of the time, to add variation
            if (DMMath.Prob(25))
            {
                return;
            }

            ShootEmitter();
        }
    private void TrySpark()
    {
        //Has to be broken and have power to spark
        if (mState != LightMountState.Broken || powerState == PowerStates.Off)
        {
            return;
        }

        //25% chance to do effect and not already doing an effect
        if (DMMath.Prob(75) || currentSparkEffect != null)
        {
            return;
        }

        var worldPos = registerTile.WorldPositionServer;

        var result = Spawn.ServerPrefab(CommonPrefabs.Instance.SparkEffect, worldPos, gameObject.transform.parent);

        if (result.Successful)
        {
            currentSparkEffect = result.GameObject;

            //Try start fire if possible
            var reactionManager = MatrixManager.AtPoint(worldPos, true).ReactionManager;
            reactionManager.ExposeHotspotWorldPosition(worldPos.To2Int());

            SoundManager.PlayNetworkedAtPos(SingletonSOSounds.Instance.Sparks, worldPos, sourceObj: gameObject);
        }
    }
Beispiel #8
0
    public override void InternalDamageLogic()
    {
        if (!onCooldown)
        {
            if (RelatedPart.CurrentInternalBleedingDamage > RelatedPart.MaximumInternalBleedDamage / 2)
            {
                Chat.AddActionMsgToChat(RelatedPart.HealthMaster.gameObject,
                                        "You gasp for air; but you drown in your own blood from the inside!",
                                        $"{RelatedPart.HealthMaster.playerScript.visibleName} gasps for air!");
                RelatedPart.HealthMaster.HealthStateController.SetSuffocating(true);
            }
            else
            {
                RelatedPart.InternalBleedingLogic();
            }

            if (DMMath.Prob(coughChanceWhenInternallyBleeding))
            {
                Chat.AddActionMsgToChat(RelatedPart.HealthMaster.gameObject, "You cough up blood!",
                                        $"{RelatedPart.HealthMaster.playerScript.visibleName} coughs up blood!");
                RelatedPart.CurrentInternalBleedingDamage -= 4;

                //TODO: TAKE BLOOD
                var bloodLoss = new ReagentMix();
                RelatedPart.HealthMaster.CirculatorySystem.ReadyBloodPool.TransferTo(bloodLoss,
                                                                                     RelatedPart.CurrentInternalBleedingDamage);
                MatrixManager.ReagentReact(bloodLoss,
                                           RelatedPart.HealthMaster.gameObject.RegisterTile().WorldPositionServer);
            }

            onCooldown = true;
            StartCoroutine(CooldownTick());
        }
    }
Beispiel #9
0
        public void ServerPerformInteraction(HandApply interaction)
        {
            if (isReadyToBeHit == false)
            {
                isReadyToBeHit = true;
                Chat.AddExamineMsg(interaction.Performer, "You pull the tip of the nofruit and watch as multiple colors flash in front of you!");
                StartCoroutine(CycleSprites());
                return;
            }

            if (interaction.UsedObject == null || interaction.UsedObject.Item().Size < ItemSize.Medium)
            {
                var hasObject = interaction.UsedObject ? "a more" : "a";
                Chat.AddExamineMsg(interaction.Performer,
                                   $"You need {hasObject} blunt object to hit this!");
                return;
            }
            StopCoroutine(CycleSprites());
            if (DMMath.Prob(1f))
            {
                Spawn.ServerPrefab(facehugger, gameObject.AssumedWorldPosServer());
                return;
            }
            else
            {
                Spawn.ServerPrefab(chanceToSpawn[currentIndex].fruit, gameObject.AssumedWorldPosServer());
            }
            _ = Despawn.ServerSingle(gameObject);
        }
Beispiel #10
0
 /// <summary>
 /// Applies trauma damage to the body part, checks if it has enough protective armor to cancel the trauma damage
 /// and automatically checks how big is the body part's cut size.
 /// </summary>
 public void ApplyTraumaDamage(float tramuaDamage, TramuticDamageTypes damageType = TramuticDamageTypes.SLASH)
 {
     //We use dismember protection chance because it's the most logical value.
     if (DMMath.Prob(SelfArmor.DismembermentProtectionChance * 100) == false)
     {
         if (damageType == TramuticDamageTypes.SLASH)
         {
             currentSlashCutDamage += tramuaDamage;
         }
         if (damageType == TramuticDamageTypes.PIERCE)
         {
             currentPierceDamage += tramuaDamage;
         }
         CheckCutSize();
     }
     //Burn damage checks for it's own armor damage type.
     if (damageType == TramuticDamageTypes.BURN)
     {
         //Large cuts and parts in terrible condition means less protective flesh against fire.
         if (currentSlashDamageLevel == SlashDamageLevel.LARGE || Severity >= DamageSeverity.Critical)
         {
             TakeBurnDamage(tramuaDamage * 1.25f);
         }
         else
         {
             TakeBurnDamage(tramuaDamage);
         }
     }
 }
Beispiel #11
0
        protected override void OnAttackReceived(GameObject damagedBy = null)
        {
            if (damagedBy == null)
            {
                StartFleeing(damagedBy);
            }

            if (health.OverallHealth < -20f)
            {
                //30% chance the mob decides to flee:
                if (DMMath.Prob(fleeChance))
                {
                    StartFleeing(damagedBy, 5f);
                    return;
                }
            }

            if ((damagedBy is null) != false || damagedBy == mobMeleeAction.FollowTarget)
            {
                return;
            }
            //80% chance the mob decides to attack the new attacker
            if (DMMath.Prob(attackLastAttackerChance) == false)
            {
                return;
            }
            var playerScript = damagedBy.GetComponent <PlayerScript>();

            if (playerScript != null)
            {
                BeginAttack(damagedBy);
            }
        }
Beispiel #12
0
        private void FinishHack(HandApply interaction)
        {
            if (DMMath.Prob(chanceToFailHack))
            {
                Chat.AddActionMsgToChat(interaction.Performer, "Your attempt to hack the shuttle console failed",
                                        $"{interaction.Performer.ExpensiveName()} failed to hack the shuttle console");
                return;
            }

            Chat.AddActionMsgToChat(interaction.Performer, "You hack the shuttle console",
                                    $"{interaction.Performer.ExpensiveName()} hacked the shuttle console");

            beenEmagged = true;

            if (GameManager.Instance.ShuttleSent)
            {
                return;
            }

            Chat.AddSystemMsgToChat($"\n\n<color=#FF151F><size={ChatTemplates.LargeText}><b>Escape Shuttle Emergency Launch Triggered!</b></size></color>\n\n",
                                    MatrixManager.MainStationMatrix);

            Chat.AddSystemMsgToChat($"\n\n<color=#FF151F><size={ChatTemplates.LargeText}><b>Escape Shuttle Emergency Launch Triggered!</b></size></color>\n\n",
                                    GameManager.Instance.PrimaryEscapeShuttle.MatrixInfo);

            _ = SoundManager.PlayNetworked(CommonSounds.Instance.Notice1);

            GameManager.Instance.ForceSendEscapeShuttleFromStation(10);
        }
Beispiel #13
0
 private void AIObjectives()
 {
     if (DMMath.Prob(GameManager.Instance.MalfAIRecieveTheirIntendedObjectiveChance))
     {
         AddObjective(aiTraitorObjective);
     }
 }
Beispiel #14
0
        private void SpawnItems(PoolData poolData)
        {
            if (poolData == null)
            {
                return;
            }

            var itemPool = poolData.RandomItemPool;

            if (itemPool == null)
            {
                Logger.LogError($"Item pool was null in {gameObject.name}", Category.ItemSpawn);
                return;
            }

            var item   = poolData.RandomItemPool.Pool.PickRandom();
            var spread = fanOut ? Random.Range(-0.5f, 0.5f) : (float?)null;

            if (!DMMath.Prob(item.Probability))
            {
                return;
            }

            var maxAmt   = Random.Range(1, item.MaxAmount + 1);
            var worldPos = gameObject.RegisterTile().WorldPositionServer;

            Spawn.ServerPrefab(
                item.Prefab,
                worldPos,
                count: maxAmt,
                scatterRadius: spread);
        }
        public void TakeBluntDamage()
        {
            void TakeBluntLogic(BodyPart bodyPart)
            {
                if (bodyPart.currentBluntDamageLevel == TraumaDamageLevel.SMALL && DMMath.Prob(dislocationAutoHealPercent))
                {
                    bodyPart.currentBluntDamageLevel = TraumaDamageLevel.NONE;
                    AnnounceJointHealEvent();
                    return;
                }
                bodyPart.currentBluntDamageLevel += 1;
                AnnounceJointDislocationEvent();
            }

            foreach (ItemSlot slot in OrganStorage.GetIndexedSlots())
            {
                if (slot.IsEmpty)
                {
                    return;
                }
                if (slot.Item.gameObject.TryGetComponent <BodyPart>(out var bodyPart))
                {
                    if (bodyPart.CanBeBroken)
                    {
                        TakeBluntLogic(bodyPart);
                    }
                }
            }
        }
        /// <summary>
        /// Applies trauma damage to the body part, checks if it has enough protective armor to cancel the trauma damage
        /// </summary>
        public void ApplyTraumaDamage(TraumaticDamageTypes damageType = TraumaticDamageTypes.SLASH, bool ignoreSeverityCheck = false)
        {
            if (Severity < DamageSeverity.Bad && ignoreSeverityCheck == false)
            {
                return;
            }
            //We use dismember protection chance because it's the most logical value.
            if (DMMath.Prob(SelfArmor.DismembermentProtectionChance) == false)
            {
                if (damageType == TraumaticDamageTypes.SLASH)
                {
                    currentSlashDamageLevel += 1;
                }
                if (damageType == TraumaticDamageTypes.PIERCE)
                {
                    currentPierceDamageLevel += 1;
                }
            }
            //Burn and blunt damage checks for it's own armor damage type.
            if (damageType == TraumaticDamageTypes.BURN)
            {
                TakeBurnDamage();
            }

            if (damageType == TraumaticDamageTypes.BLUNT && DMMath.Prob(SelfArmor.Melee * 100) == false)
            {
                TakeBluntDamage();
            }
        }
        private void SignalStrengthHandler(SignalReceiver receiver, SignalEmitter emitter, SignalDataSO signalDataSo)
        {
            SignalStrength strength = GetStrength(receiver, emitter, signalDataSo.SignalRange);

            if (strength == SignalStrength.HEALTHY)
            {
                receiver.ReceiveSignal(strength);
            }
            if (strength == SignalStrength.TOOFAR)
            {
                emitter.SignalFailed();
            }


            if (strength == SignalStrength.DELAYED)
            {
                StartCoroutine(DelayedSignalRecevie(receiver.DelayTime, receiver, strength));
                return;
            }
            if (strength == SignalStrength.WEAK)
            {
                Random chance = new Random();
                if (DMMath.Prob(chance.Next(0, 100)))
                {
                    StartCoroutine(DelayedSignalRecevie(receiver.DelayTime, receiver, strength));
                }
                emitter.SignalFailed();
            }
        }
Beispiel #18
0
        private void DestroyObjects(IEnumerable <Vector3Int> coords)
        {
            var damage = 100;

            if (CurrentStage == SingularityStages.Stage5 || CurrentStage == SingularityStages.Stage4)
            {
                damage *= (int)CurrentStage;
            }

            foreach (var coord in coords)
            {
                var objects = MatrixManager.GetAt <RegisterTile>(coord, true);

                foreach (var objectToMove in objects)
                {
                    if (objectToMove.gameObject == gameObject)
                    {
                        continue;
                    }

                    if (objectToMove.ObjectType == ObjectType.Player && objectToMove.TryGetComponent <PlayerHealthV2>(out var health) && health != null)
                    {
                        if (health.RegisterPlayer.PlayerScript != null &&
                            health.RegisterPlayer.PlayerScript.mind != null &&
                            health.RegisterPlayer.PlayerScript.mind.occupation != null &&
                            health.RegisterPlayer.PlayerScript.mind.occupation == OccupationList.Instance.Get(JobType.CLOWN))
                        {
                            health.Gib();
                            ChangePoints(DMMath.Prob(50) ? -1000 : 1000);
                            return;
                        }

                        health.Gib();
                        ChangePoints(100);
                    }
Beispiel #19
0
 public void OnTeleportEnd()
 {
     if (DMMath.Prob(10))
     {
         Spawn.ServerPrefab(mutatedFood, gameObject.AssumedWorldPosServer());
         _ = Despawn.ServerSingle(gameObject);
     }
 }
Beispiel #20
0
        /// <summary>
        /// Generates a set of valid objectives for a player based on their antag type.
        /// Will set them up and ensure all targets are unique.
        /// Amount to generate does not include the escape objective.
        /// </summary>
        /// <param name="player">The player receiving these objectives</param>
        /// <param name="antag">The antag type</param>
        /// <param name="amount">How many objectives to generate, not including escape objectives</param>
        public List <Objective> GenerateObjectives(PlayerScript player, Antagonist antag)
        {
            int amount = antag.NumberOfObjectives;
            // Get all antag core and shared objectives which are possible for this player
            List <Objective> objPool = antag.CoreObjectives.Where(obj => obj.IsPossible(player)).ToList();

            if (antag.CanUseSharedObjectives)
            {
                objPool = objPool.Concat(SharedObjectives).Where(obj => obj.IsPossible(player)).ToList();
            }

            if (objPool.Count == 0)
            {
                amount = 0;
                Logger.LogWarning($"No objectives available, only assigning escape type objective", Category.Antags);
            }

            List <Objective> generatedObjs = new List <Objective>();
            Objective        newObjective;

            for (int i = 0; i < amount; i++)
            {
                // Select objective and perform setup e.g. assign owner and targets
                newObjective = PickRandomObjective(ref objPool);
                newObjective.DoSetup(player.mind);
                generatedObjs.Add(newObjective);

                // Trim any objectives which aren't possible
                // Should be done everytime an objective is assigned and setup,
                // otherwise all targets could be taken already!
                objPool = objPool.Where(obj => obj.IsPossible(player)).ToList();

                if (objPool.Count == 0)
                {
                    // No objectives left to give so stop assigning
                    break;
                }
            }

            if (antag.NeedsEscapeObjective)
            {
                // Add one escape type objective if needed
                // Be careful not to remove all escape objectives from AntagData
                newObjective = PickRandomObjective(ref EscapeObjectives, false);
                newObjective.DoSetup(player.mind);
                generatedObjs.Add(newObjective);
            }

            if (antag.ChanceForGimmickObjective != 0 && DMMath.Prob(antag.ChanceForGimmickObjective))
            {
                // Add one gimmick objective
                newObjective = PickRandomObjective(ref GimmickObjectives, false);
                newObjective.DoSetup(player.mind);
                generatedObjs.Add(newObjective);
            }

            return(generatedObjs);
        }
Beispiel #21
0
        protected override void DoRandomAction()
        {
            if (DMMath.Prob(5))
            {
                StartCoroutine(ChaseTail(Random.Range(1, 4)));
            }

            StartFleeing(gameObject, 10f);
        }
Beispiel #22
0
        protected override void Start()
        {
            base.Start();

            if (DMMath.Prob(10))
            {
                itemAttributes.ServerSetArticleName("spess cube");
            }
        }
Beispiel #23
0
 private void OnThrown(ThrowInfo info)
 {
     if (DMMath.Prob(chanceToBreak))
     {
         Spawn.ServerPrefab(brokenItem, gameObject.AssumedWorldPosServer());
         SoundManager.PlayNetworkedAtPos(useCustomSound ? customSound : SingletonSOSounds.Instance.GlassBreak01, gameObject.AssumedWorldPosServer());
         Despawn.ServerSingle(gameObject);
     }
 }
 public void OnEmp(int EmpStrength = 0)
 {
     foreach (Cable cable in Cables)
     {
         if (DMMath.Prob(50))
         {
             cable.Impulse();
         }
     }
 }
Beispiel #25
0
    public void OnEmp(int EmpStrength)
    {
        Watts -= EmpStrength * 100;
        Mathf.Clamp(Watts, 0, MaxWatts);

        if (EmpStrength > 50 && DMMath.Prob(25))
        {
            isBroken = true;
        }
    }
 public void TakeBluntLogic(LivingHealthMasterBase healthmaster, BodyPart containedIn)
 {
     if (currentBluntDamageLevel == TraumaDamageLevel.SMALL && DMMath.Prob(dislocationAutoHealPercent))
     {
         currentBluntDamageLevel = TraumaDamageLevel.NONE;
         AnnounceJointHealEvent(healthmaster, containedIn);
         return;
     }
     currentBluntDamageLevel += 1;
     AnnounceJointDislocationEvent(healthmaster, containedIn);
 }
Beispiel #27
0
 private void UpdateSignalStatusStatus()
 {
     if (pizza.IsArmed)
     {
         status.Value         = "Awaiting Signal..";
         status.Element.color = dangerColor;
         return;
     }
     status.Value         = DMMath.Prob(25f) ? "Ready to oga some bogas" : "Explosive Unarmed..";
     status.Element.color = safeColor;
 }
Beispiel #28
0
 public void OnEmp(int EmpStrength)
 {
     if (CurrentCharge > 10000000 && DMMath.Prob(25) && isExploding == false)
     {
         isExploding = true;
         TrySpark();
         Chat.AddLocalMsgToChat($"<color=red>{gameObject.ExpensiveName()} starts to spit out sparks and smoke! No way this can end good...", gameObject);
         StartCoroutine(Emp());
     }
     batterySupplyingModule.CurrentCapacity -= EmpStrength * 1000;
 }
Beispiel #29
0
    /// <summary>
    /// Placeholder method to add some effects for breathing plasma. Eventually this behavior should be
    /// handled with interfaces we can implement so different species react differently.
    /// </summary>
    /// <param name="plasmaAmount"></param>
    private float HandleBreathingPlasma(GasMix gasMix)
    {
        float plasmaPressure = gasMix.GetPressure(Gas.Plasma);

        float plasmaConsumed = 0;

        plasmaConsumed = gasMix.GetMoles(Gas.Plasma) * AtmosConstants.BREATH_VOLUME;
        // there is some plasma in the ambient but it is still safe
        if (plasmaPressure <= PLASMA_SAFE_MAX && plasmaPressure > PLASMA_WARNING_LEVEL)
        {
            if (DMMath.Prob(90))
            {
                return(plasmaConsumed);
            }

            // 10% chances of message
            var theirPronoun = gameObject.Player() != null
                                ? gameObject.Player().Script.characterSettings.TheirPronoun(gameObject.Player().Script)
                                : "its";

            Chat.AddActionMsgToChat(
                gameObject,
                plasmaLowYouMessages.PickRandom(),
                string.Format(
                    plasmaLowOthersMessages.PickRandom(),
                    gameObject.ExpensiveName(),
                    string.Format(plasmaLowOthersMessages.PickRandom(), gameObject.ExpensiveName(), theirPronoun))
                );
        }
        // enough plasma to be visible and damage us!
        else if (plasmaPressure > PLASMA_SAFE_MAX)
        {
            var plasmaDamage = (gasMix.GetMoles(Gas.Plasma) / PLASMA_SAFE_MAX) * 10;
            bloodSystem.ToxinLevel = Mathf.Clamp(bloodSystem.ToxinLevel + Mathf.Clamp(plasmaDamage, MIN_TOXIN_DMG, MAX_TOXIN_DMG), 0, 200);

            if (DMMath.Prob(90))
            {
                return(plasmaConsumed);
            }

            // 10% chances of message
            var theirPronoun = gameObject.Player() != null
                                ? gameObject.Player().Script.characterSettings.TheirPronoun(gameObject.Player().Script)
                                : "its";

            Chat.AddActionMsgToChat(
                gameObject,
                plasmaHighYouMessages.PickRandom(),
                string.Format(plasmaHighOthersMessages.PickRandom(), gameObject.ExpensiveName(), theirPronoun)
                );
        }
        return(plasmaConsumed);
    }
Beispiel #30
0
        private IEnumerator HatchChick()
        {
            yield return(WaitFor.Seconds(Random.Range(hatchingTime.x, hatchingTime.y)));

            if (forceFertilized == false && DMMath.Prob(fertilizedChance) == false)
            {
                yield break;
            }

            Spawn.ServerPrefab(chick, gameObject.RegisterTile().WorldPosition);
            Despawn.ServerSingle(gameObject);
        }