Skip to content

Commit c153616

Browse files
committed
docs
1 parent 89805f4 commit c153616

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

UncomplicatedCustomItems/API/Features/CustomThing.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ public CustomThing(Player player, ThingInfo info, SerializableThing serializable
3131
protected SerializableThing Serializable { get; }
3232

3333
/// <summary>
34-
/// Spawn custom item in hand
34+
/// Spawn custom item in hand if player is not null.
3535
/// </summary>
3636
public void Spawn(Vector3 position = default)
3737
{
3838
Item = Item.Create(Serializable.Model, Player);
3939
Item.Scale = Serializable.Scale;
4040
Info.Set(Item);
4141

42-
if (Player is not null)
42+
if (Player is not null && position == default)
4343
{
4444
Player.CurrentItem = Item;
4545
}

UncomplicatedCustomItems/API/Serializable/SerializableThing.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public abstract class SerializableThing
2626
[Description("Spawn properties")]
2727
public ItemSpawnPoint[] SpawnPoint { get; set; }
2828

29+
/// <summary>
30+
/// Return copy of custom item
31+
/// </summary>
32+
/// <param name="player"></param>
33+
/// <returns></returns>
2934
public abstract CustomThing Create(Player player);
3035
}
3136
}

UncomplicatedCustomItems/Commands/PlayerCommandBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
2020

2121
if (player is null)
2222
{
23-
response = "You must be in a game!";
23+
response = "You must be in the game!";
2424
return false;
2525
}
2626

UncomplicatedCustomItems/Config.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class Config : IConfig
1515
[Description("Is debug or not")]
1616
public bool Debug { get; set; }
1717

18+
[Description("List of custom keycards")]
1819
public Dictionary<int, SerializableCustomKeycard> CustomKeycards { get; set; } = new Dictionary<int, SerializableCustomKeycard>()
1920
{
2021
{

0 commit comments

Comments
 (0)