Пример #1
0
        private IResult BuildItem(INonPlayerCharacter craftsman, IMobileObject performer, Equipment.AvalableItemPosition position, int level, string keyword, string sentenceDescription, string shortDescription, string lookDescription, string examineDescription, IEquipment equipment)
        {
            IResult result = null;

            result = CheckMoney(craftsman, performer, level, equipment);
            if (result != null)
            {
                return(result);
            }

            equipment.ItemPosition = position;
            equipment.KeyWords.Add(keyword);
            equipment.SentenceDescription = sentenceDescription;
            equipment.ShortDescription    = shortDescription;
            equipment.LookDescription     = lookDescription;
            equipment.ExamineDescription  = examineDescription;

            equipment.FinishLoad();

            DateTime      completionDate = DateTime.UtcNow.AddMinutes(equipment.Level); //make it take 1 hour game for each level
            IGameDateTime gameDateTime   = GlobalReference.GlobalValues.GameDateTime.GetDateTime(completionDate);

            craftsman.EnqueueCommand($"Tell {performer.KeyWords[0]} I will have this finished for you on {gameDateTime}.");


            result = new Result("", false);

            return(result);
        }