mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 05:05:53 +12:00
multiroom meta
This commit is contained in:
parent
6e671be0b5
commit
1a9de769bf
7 changed files with 173 additions and 23 deletions
|
@ -304,6 +304,13 @@ namespace HISP.Game
|
|||
public static string LongFullLine;
|
||||
public static string MetaTerminator;
|
||||
|
||||
// Birckpoet
|
||||
public static string LastPoetFormat;
|
||||
|
||||
// Multiroom
|
||||
public static string MultiroomPlayersParticipating;
|
||||
public static string MultiroomParticipentFormat;
|
||||
|
||||
// Inn
|
||||
public static string InnBuyMeal;
|
||||
public static string InnBuyRest;
|
||||
|
@ -331,6 +338,14 @@ namespace HISP.Game
|
|||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatLastPoet(string name)
|
||||
{
|
||||
return LastPoetFormat.Replace("%USERNAME%", name);
|
||||
}
|
||||
public static string FormatMultiroomParticipent(string name)
|
||||
{
|
||||
return MultiroomParticipentFormat.Replace("%USERNAME%", name);
|
||||
}
|
||||
public static string FormatVenusFlyTrapMeta(int money)
|
||||
{
|
||||
return VenusFlyTrapFormat.Replace("%MONEY%", money.ToString("N0"));
|
||||
|
|
|
@ -206,6 +206,29 @@ namespace HISP.Game
|
|||
|
||||
return message;
|
||||
}
|
||||
|
||||
private static string buildMultiroom(string id, User user)
|
||||
{
|
||||
string message = Messages.MultiroomPlayersParticipating;
|
||||
foreach(User userOnTile in GameServer.GetUsersOnSpecialTileCode("MULTIROOM-"+id))
|
||||
{
|
||||
if (userOnTile.Id == user.Id)
|
||||
continue;
|
||||
message += Messages.FormatMultiroomParticipent(userOnTile.Username);
|
||||
}
|
||||
if(id[0] == 'P') // Poet
|
||||
{
|
||||
int lastPoet = Database.GetLastPlayer(id);
|
||||
string username = "";
|
||||
if(lastPoet != -1)
|
||||
username = Database.GetUsername(lastPoet);
|
||||
|
||||
message += Messages.FormatLastPoet(username);
|
||||
}
|
||||
message += Messages.ExitThisPlace;
|
||||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
private static string buildEquippedCompetitionGear(User user)
|
||||
{
|
||||
string message = Messages.CompetitionGearSelected;
|
||||
|
@ -698,6 +721,11 @@ namespace HISP.Game
|
|||
{
|
||||
message += buildVenusFlyTrap(user);
|
||||
}
|
||||
if(TileCode == "MULTIROOM")
|
||||
{
|
||||
user.MetaPriority = false; // acturally want to track updates here >-<
|
||||
message += buildMultiroom(TileArg, user);
|
||||
}
|
||||
if(TileCode == "PASSWORD")
|
||||
{
|
||||
message += buildPassword();
|
||||
|
@ -721,6 +749,7 @@ namespace HISP.Game
|
|||
return message;
|
||||
}
|
||||
|
||||
|
||||
public static string BuildAbuseReportPage()
|
||||
{
|
||||
string reportReasons = "";
|
||||
|
|
|
@ -150,6 +150,8 @@ namespace HISP.Game.SwfModules
|
|||
{
|
||||
Logger.InfoPrint("Loading poetry room: " + room.ToString());
|
||||
poetryRooms.Add(getPoetryRoom(room));
|
||||
if (!Database.LastPlayerExist("P" + room))
|
||||
Database.AddLastPlayer("P" + room, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue