mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 05:05:53 +12:00
Add CompetitionItem support
This commit is contained in:
parent
eae1f4f119
commit
b1b6cf133d
11 changed files with 381 additions and 12 deletions
|
@ -18,7 +18,7 @@ namespace HISP.Game
|
|||
public string SpawnOnSpecialTile;
|
||||
public string SpawnNearSpecialTile;
|
||||
}
|
||||
public struct ItemInformation
|
||||
public class ItemInformation
|
||||
{
|
||||
public int Id;
|
||||
public string Name;
|
||||
|
@ -55,7 +55,6 @@ namespace HISP.Game
|
|||
public static int Telescope;
|
||||
public static int Pitchfork;
|
||||
|
||||
|
||||
public static bool IsThrowable(int id)
|
||||
{
|
||||
foreach(ThrowableItem itm in ThrowableItems)
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace HISP.Game
|
|||
|
||||
// Inventory
|
||||
public static string InventoryItemFormat;
|
||||
|
||||
public static string EquipItemFormat;
|
||||
public static string InventoryHeaderFormat;
|
||||
|
||||
public static string ItemDropButton;
|
||||
|
@ -114,6 +114,7 @@ namespace HISP.Game
|
|||
public static string ItemConsumeButton;
|
||||
public static string ItemThrowButton;
|
||||
public static string ItemUseButton;
|
||||
public static string ItemWearButton;
|
||||
public static string ItemReadButton;
|
||||
|
||||
public static string ShopEntryFormat;
|
||||
|
@ -240,7 +241,10 @@ namespace HISP.Game
|
|||
}
|
||||
|
||||
|
||||
|
||||
public static string FormatEquipItemMessage(string name)
|
||||
{
|
||||
return EquipItemFormat.Replace("%ITEM%", name);
|
||||
}
|
||||
public static string FormatYouEarnedAnItemMessage(string itemName)
|
||||
{
|
||||
return YouEarnedAnItemFormat.Replace("%ITEM%", itemName);
|
||||
|
@ -269,7 +273,10 @@ namespace HISP.Game
|
|||
{
|
||||
return ShopEntryFormat.Replace("%ICONID%", iconid.ToString()).Replace("%COUNT%", count).Replace("%TITLE%", name).Replace("%PRICE%", price.ToString());
|
||||
}
|
||||
|
||||
public static string FormatWearButton(int randomId)
|
||||
{
|
||||
return ItemWearButton.Replace("%RANDOMID%", randomId.ToString());
|
||||
}
|
||||
public static string FormatItemInformationByIdButton(int itemId)
|
||||
{
|
||||
return ItemInformationByIdButton.Replace("%ITEMID%", itemId.ToString());
|
||||
|
|
|
@ -336,6 +336,9 @@ namespace HISP.Game
|
|||
if (itemInfo.Id == Item.Present || itemInfo.Id == Item.DorothyShoes || itemInfo.Id == Item.Telescope)
|
||||
message += Messages.FormatItemUseButton(randomId);
|
||||
|
||||
if (itemInfo.Type == "CLOTHES")
|
||||
message += Messages.FormatWearButton(randomId);
|
||||
|
||||
if (itemInfo.Type == "TEXT")
|
||||
message += Messages.FormatItemReadButton(randomId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue