Ejemplo n.º 1
0
        public void LoadCharacter(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                Logger.Warning("Trying to load a character without a name");
                return;
            }
            CustomPawn pawn = ColonistLoader.LoadFromFile(PrepareCarefully.Instance, name);

            if (pawn != null)
            {
                state.AddMessage("EdB.PC.Dialog.PawnPreset.Loaded".Translate(name));
            }
            else
            {
                state.AddError("Failed to load pawn");
                return;
            }
            bool colonyPawn = state.PawnListMode == PawnListMode.ColonyPawnsMaximized;

            pawn.Type = colonyPawn ? CustomPawnType.Colonist : CustomPawnType.World;
            PrepareCarefully.Instance.AddPawn(pawn);
            state.CurrentPawn = pawn;
            PawnAdded(pawn);
        }
        protected override void DoMapEntryInteraction(string colonistName)
        {
            bool result = ColonistLoader.LoadFromFile(PrepareCarefully.Instance, CharMakerPage, colonistName);

            if (result)
            {
                Messages.Message("EdB.LoadedColonist".Translate(new object[] {
                    colonistName
                }), MessageSound.Standard);
            }
            Close(true);
        }
Ejemplo n.º 3
0
        public void LoadCharacter(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                Log.Warning("Trying to load a character without a name");
                return;
            }
            CustomPawn pawn = ColonistLoader.LoadFromFile(PrepareCarefully.Instance, name);

            if (pawn != null)
            {
                state.AddMessage("EdB.PC.Dialog.PawnPreset.Loaded".Translate(new object[] { name }));
            }
            PrepareCarefully.Instance.AddPawn(pawn);
            state.CurrentPawn = pawn;
            PawnAdded(pawn);
        }