no message

This commit is contained in:
SilicaAndPina 2020-12-25 22:08:08 +13:00
parent 75ca6a2a5c
commit efc21b7b5b
6 changed files with 71 additions and 8 deletions

View file

@ -88,6 +88,14 @@
"end_of_meta":"^Z",
"back_to_map":"^M",
"long_full_line":"^L",
"quest_log":{
"header_meta":"^ATYour Horse Isle Adventure Log^H",
"quest_format":"%TITLE% (%QUESTPOINTS%qp) [%DIFFICULTY%] %COMPLETION%<BR>",
"not_complete":"<FONT COLOR='#880000'><B>NOT DONE</B></FONT>",
"not_avalible":"<FONT COLOR='#888888'><B>UNAVAILABLE</B></FONT>",
"completed":"<FONT COLOR='#008800'><B>COMPLETED</B></FONT>",
"footer_format":"<BR>You have completed <B>%TOTALCOMPLETED%</B> of <B>%TOTALQUESTS%</B> total adventures (<B>%TOTALPERCENT%%</B>)<BR>You have earned <B>%YOURQP%qp</B> of <B>%MAXQP%qp</B> total (<B>%QPERCENT%%</B>)<BR>(qp = quest points, they are a score of difficulty for each adventure)",
},
"stats_page":{
"stats_bar_format":"^ATPlayer %USERNAME%'s Details^H",
"stats_area_format":"Currently %AREA%",

View file

@ -7,8 +7,6 @@ namespace HISP.Game
public static int RequiredChatViolations;
public static int DefaultInventoryMax;
// Tools
public static string BinocularsNothing;
public static string MagnifyNothing;
@ -57,6 +55,16 @@ namespace HISP.Game
public static string[] StatPlayerFormats;
// Quests Completed Page
public static string QuestLogHeader;
public static string QuestFormat;
public static string QuestNotCompleted;
public static string QuestNotAvalible;
public static string QuestCompleted;
public static string QuestFooterFormat;
// Announcements
public static string NewUserMessage;
public static string WelcomeFormat;
@ -216,6 +224,16 @@ namespace HISP.Game
// Click
public static string NothingInterestingHere;
public static string FormatQuestFooter(int totalQuestsComplete, int totalQuests, int questPoints, int totalQuestPoints)
{
return QuestFooterFormat.Replace("%TOTALCOMPLETED%", totalQuestsComplete.ToString("N0")).Replace("%TOTALQUESTS%", totalQuests.ToString("N0")).Replace("%TOTALPERCENT%", ((totalQuestsComplete / totalQuests) * 100).ToString()).Replace("%YOURQP%", questPoints.ToString("N0")).Replace("%YOURQP%", totalQuestPoints.ToString("N0")).Replace("%QPERCENT%", ((totalQuestsComplete / totalQuests) * 100).ToString());
}
public static string FormatQuestLogQuest(string questTitle, int questPoints, string difficulty, string completionStatus)
{
return QuestFormat.Replace("%TITLE%", questTitle).Replace("%QUESTPOINTS%", questPoints.ToString("N0")).Replace("%DIFFICULTY%", difficulty).Replace("%COMPLETION%", completionStatus);
}
public static string FormatPrivateNotes(string privateNotes)
{
return PrivateNotesMetaFormat.Replace("%PRIVATENOTES%", privateNotes);

View file

@ -309,6 +309,15 @@ namespace HISP.Game
return message;
}
public static string BuildQuestLog(User user)
{
string message = "";
message += Messages.QuestLogHeader;
Quest.QuestEntry[] questList = Quest.GetPublicQuestList();
foreach (Quest.QuestEntry quest in questList)
}
public static string BuildSpecialTileInfo(User user, World.SpecialTile specialTile)
{
string message = "";

View file

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace HISP.Game
{

View file

@ -1,5 +1,5 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using HISP.Player;
using HISP.Server;
@ -60,6 +60,27 @@ namespace HISP.Game
public static List<QuestEntry> QuestList = new List<QuestEntry>();
public static int GetTotalQuestPoints()
{
int totalQp = 0;
QuestEntry[] quests = GetPublicQuestList();
foreach(QuestEntry quest in quests)
{
totalQp += quest.QuestPointsEarned;
}
return totalQp;
}
public static QuestEntry[] GetPublicQuestList()
{
List<QuestEntry> quests = QuestList.OrderBy(o => o.Title).ToList();
foreach(QuestEntry quest in quests)
{
if (quest.Title == null)
quests.Remove(quest);
}
return quests.ToArray();
}
public static bool ActivateQuest(User user, QuestEntry quest, bool npcActivation = false)
{

View file

@ -438,6 +438,16 @@ namespace HISP.Server
Messages.StatPlayerFormats = gameData.messages.meta.stats_page.player_stats.ToObject<string[]>();
Messages.RandomMovement = gameData.messages.random_movement;
// Quests Log
Messages.QuestLogHeader = gameData.messages.meta.quest_log.meta.header_meta;
Messages.QuestFormat = gameData.messages.meta.quest_log.meta.quest_format;
Messages.QuestNotCompleted = gameData.messages.meta.quest_log.not_complete;
Messages.QuestNotAvalible = gameData.messages.meta.quest_log.not_avalible;
Messages.QuestCompleted = gameData.messages.meta.quest_log.completed;
Messages.QuestFooterFormat = gameData.messages.meta.quest_log.footer_format;
// Transport
Messages.CantAffordTransport = gameData.messages.transport.not_enough_money;