public void RollRandomCharacter()
        {
            currentCharacter = CharacterSettings.RandomizeCharacterSettings(currentCharacter.Species);

            //Randomises player accents. (Italian, Scottish, etc)


            //Randomises character skin tones.
            randomizeSkinTones();

            //Randomises character clothes, cat ears, moth wings, etc.
            randomizeAppearance();

            //Refresh the player character's sheet so they can see their new changes.
            RefreshAll();
        }
Пример #2
0
    /// <summary>
    /// Spawns an assistant dummy
    /// </summary>
    public static void ServerSpawnDummy(Transform spawnTransform = null)
    {
        if (spawnTransform == null)
        {
            spawnTransform = SpawnPoint.GetRandomPointForJob(JobType.ASSISTANT);
        }
        if (spawnTransform != null)
        {
            var dummy = ServerCreatePlayer(spawnTransform.position.RoundToInt());

            CharacterSettings randomSettings = CharacterSettings.RandomizeCharacterSettings();

            ServerTransferPlayer(null, dummy, null, Event.PlayerSpawned, randomSettings);


            //fire all hooks
            var info = SpawnInfo.Player(OccupationList.Instance.Get(JobType.ASSISTANT), randomSettings, CustomNetworkManager.Instance.humanPlayerPrefab,
                                        SpawnDestination.At(spawnTransform.gameObject));
            Spawn._ServerFireClientServerSpawnHooks(SpawnResult.Single(info, dummy));
        }
    }