Fix description in config for chatoverheads, as well as fix handling of health/mana item usage for SSC
This commit is contained in:
parent
01263424ae
commit
fe00e3a195
2 changed files with 4 additions and 4 deletions
|
|
@ -169,7 +169,7 @@ namespace TShockAPI
|
||||||
"Changes ingame chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message"
|
"Changes ingame chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message"
|
||||||
)] public string ChatFormat = "{1}{2}{3}: {4}";
|
)] public string ChatFormat = "{1}{2}{3}: {4}";
|
||||||
|
|
||||||
[Description("Change the player name when using chat above heads. This begins with a player name wrapped in brackets, as per Terraria's formatting. Same formatting as ChatFormat(minus the text).")] public string ChatAboveHeadsFormat = "{2}";
|
[Description("Change the player name when using chat above heads. This begins with a player name wrapped in brackets, as per Terraria's formatting. Same formatting as ChatFormat(minus the text aka {4}).")] public string ChatAboveHeadsFormat = "{2}";
|
||||||
|
|
||||||
[Description("Force the world time to be normal, day, or night.")] public string ForceTime = "normal";
|
[Description("Force the world time to be normal, day, or night.")] public string ForceTime = "normal";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2242,19 +2242,19 @@ namespace TShockAPI
|
||||||
args.TPlayer.inventory[item].name), Color.Red);
|
args.TPlayer.inventory[item].name), Color.Red);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.TPlayer.inventory[item].name == "Mana Crystal" && args.Player.PlayerData.maxMana <= 180)
|
if (args.TPlayer.inventory[item].name == "Mana Crystal" && args.Player.TPlayer.statManaMax <= 180)
|
||||||
{
|
{
|
||||||
args.Player.TPlayer.statMana += 20;
|
args.Player.TPlayer.statMana += 20;
|
||||||
args.Player.TPlayer.statManaMax += 20;
|
args.Player.TPlayer.statManaMax += 20;
|
||||||
args.Player.PlayerData.maxMana += 20;
|
args.Player.PlayerData.maxMana += 20;
|
||||||
}
|
}
|
||||||
else if (args.TPlayer.inventory[item].name == "Life Crystal" && args.Player.PlayerData.maxHealth <= 380)
|
else if (args.TPlayer.inventory[item].name == "Life Crystal" && args.Player.TPlayer.statLifeMax <= 380)
|
||||||
{
|
{
|
||||||
args.TPlayer.statLife += 20;
|
args.TPlayer.statLife += 20;
|
||||||
args.TPlayer.statLifeMax += 20;
|
args.TPlayer.statLifeMax += 20;
|
||||||
args.Player.PlayerData.maxHealth += 20;
|
args.Player.PlayerData.maxHealth += 20;
|
||||||
}
|
}
|
||||||
else if (args.TPlayer.inventory[item].name == "Life Fruit" && args.Player.PlayerData.maxHealth >= 400)
|
else if (args.TPlayer.inventory[item].name == "Life Fruit" && args.Player.TPlayer.statLifeMax >= 400 && args.Player.TPlayer.statLifeMax <= 480)
|
||||||
{
|
{
|
||||||
args.TPlayer.statLife += 5;
|
args.TPlayer.statLife += 5;
|
||||||
args.TPlayer.statLifeMax += 5;
|
args.TPlayer.statLifeMax += 5;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue