Merge branch 'issue-1485' of https://github.com/bartico6/TShock into issue-1485
This commit is contained in:
commit
a00950e480
5 changed files with 8 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Fixed /spawnmob not spawning negative IDs (@MarioE)
|
* Fixed /spawnmob not spawning negative IDs (@MarioE)
|
||||||
* Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ)
|
* Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ)
|
||||||
* Updated to new stat tracking system with more data so we can actually make informed software decisions (Jordan Coulam)
|
* Updated to new stat tracking system with more data so we can actually make informed software decisions (Jordan Coulam)
|
||||||
|
* Fixed /time display at the end of Terraria hours (@koneko-nyan)
|
||||||
|
|
||||||
## TShock 4.3.24
|
## TShock 4.3.24
|
||||||
* API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42)
|
* API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42)
|
||||||
|
|
|
||||||
1
PULL_REQUEST_TEMPLATE.md
Normal file
1
PULL_REQUEST_TEMPLATE.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<!-- Warning: If you create a pull request and wish to remain anonymous, you are highly advised to use Tails (https://tails.boum.org/) or a fresh git environment. We will *not* be able to help with anonymization after your pull request has been created. -->
|
||||||
|
|
@ -3872,7 +3872,7 @@ namespace TShockAPI
|
||||||
if (!Main.dayTime)
|
if (!Main.dayTime)
|
||||||
time += 15.0;
|
time += 15.0;
|
||||||
time = time % 24.0;
|
time = time % 24.0;
|
||||||
args.Player.SendInfoMessage("The current time is {0}:{1:D2}.", (int)Math.Floor(time), (int)Math.Round((time % 1.0) * 60.0));
|
args.Player.SendInfoMessage("The current time is {0}:{1:D2}.", (int)Math.Floor(time), (int)Math.Floor((time % 1.0) * 60.0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -895,14 +895,14 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Time the buff lasts
|
/// Time the buff lasts
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public short Time { get; set; }
|
public int Time { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PlayerBuff - Called when a player is buffed
|
/// PlayerBuff - Called when a player is buffed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandlerList<PlayerBuffEventArgs> PlayerBuff;
|
public static HandlerList<PlayerBuffEventArgs> PlayerBuff;
|
||||||
|
|
||||||
private static bool OnPlayerBuff(byte id, byte type, short time)
|
private static bool OnPlayerBuff(byte id, byte type, int time)
|
||||||
{
|
{
|
||||||
if (PlayerBuff == null)
|
if (PlayerBuff == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -911,7 +911,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
ID = id,
|
ID = id,
|
||||||
Type = type,
|
Type = type,
|
||||||
Time = time,
|
Time = time
|
||||||
};
|
};
|
||||||
PlayerBuff.Invoke(null, args);
|
PlayerBuff.Invoke(null, args);
|
||||||
return args.Handled;
|
return args.Handled;
|
||||||
|
|
@ -3425,7 +3425,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
var id = args.Data.ReadInt8();
|
var id = args.Data.ReadInt8();
|
||||||
var type = args.Data.ReadInt8();
|
var type = args.Data.ReadInt8();
|
||||||
var time = args.Data.ReadInt16();
|
var time = args.Data.ReadInt32();
|
||||||
|
|
||||||
if (OnPlayerBuff(id, type, time))
|
if (OnPlayerBuff(id, type, time))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -465,7 +465,7 @@ namespace TShockAPI
|
||||||
/// <returns>description</returns>
|
/// <returns>description</returns>
|
||||||
public string GetBuffDescription(int id)
|
public string GetBuffDescription(int id)
|
||||||
{
|
{
|
||||||
return (id > 0 && id < Main.maxBuffTypes) ? Lang.GetBuffName(id) : "null";
|
return (id > 0 && id < Main.maxBuffTypes) ? Lang.GetBuffDescription(id) : "null";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue