mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-19 06:48:21 +00:00
代码优化
This commit is contained in:
parent
dcb1ffc23b
commit
547b2dd4d8
@ -50,7 +50,7 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
builder.AppendLine($"{Id}. {Name}");
|
builder.AppendLine($"{Id}. {Name}");
|
||||||
if (ExpireTime.HasValue) builder.AppendLine($"限时购买:{ExpireTime.Value.ToString(General.GeneralDateTimeFormatChinese)} 截止");
|
if (ExpireTime.HasValue) builder.AppendLine($"限时购买:{ExpireTime.Value.ToString(General.GeneralDateTimeFormatChinese)} 截止");
|
||||||
builder.AppendLine($"商品描述:{Description}");
|
builder.AppendLine($"商品描述:{Description}");
|
||||||
builder.AppendLine($"商品售价:{(Prices.Count > 0 ? string.Join("、", Prices.Select(kv => $"{kv.Value} {kv.Key}")) : "免费")}");
|
builder.AppendLine($"商品售价:{(Prices.Count > 0 ? string.Join("、", Prices.Select(kv => $"{kv.Value:0.##} {kv.Key}")) : "免费")}");
|
||||||
builder.AppendLine($"包含物品:{string.Join("、", Items.Select(i => $"[{ItemSet.GetQualityTypeName(i.QualityType)}|{ItemSet.GetItemTypeName(i.ItemType)}] {i.Name}"))}");
|
builder.AppendLine($"包含物品:{string.Join("、", Items.Select(i => $"[{ItemSet.GetQualityTypeName(i.QualityType)}|{ItemSet.GetItemTypeName(i.ItemType)}] {i.Name}"))}");
|
||||||
int buyCount = 0;
|
int buyCount = 0;
|
||||||
if (user != null)
|
if (user != null)
|
||||||
|
|||||||
@ -26,9 +26,9 @@ namespace Milimoe.FunGame.Core.Model
|
|||||||
|
|
||||||
public List<User> GetUsers(string roomid) => [.. this[roomid].UserAndIsReady.Keys];
|
public List<User> GetUsers(string roomid) => [.. this[roomid].UserAndIsReady.Keys];
|
||||||
|
|
||||||
public List<User> GetReadyUserList(string roomid) => this[roomid].UserAndIsReady.Where(kv => kv.Value && kv.Key.Id != GetRoomMaster(roomid).Id).Select(kv => kv.Key).ToList();
|
public List<User> GetReadyUserList(string roomid) => [.. this[roomid].UserAndIsReady.Where(kv => kv.Value && kv.Key.Id != GetRoomMaster(roomid).Id).Select(kv => kv.Key)];
|
||||||
|
|
||||||
public List<User> GetNotReadyUserList(string roomid) => this[roomid].UserAndIsReady.Where(kv => !kv.Value && kv.Key.Id != GetRoomMaster(roomid).Id).Select(kv => kv.Key).ToList();
|
public List<User> GetNotReadyUserList(string roomid) => [.. this[roomid].UserAndIsReady.Where(kv => !kv.Value && kv.Key.Id != GetRoomMaster(roomid).Id).Select(kv => kv.Key)];
|
||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user