mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-31 17:28:39 +00:00
Add support to show missing icon hashes
This commit is contained in:
parent
552acd8124
commit
823b1e1fa2
3 changed files with 9 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
@using LBPUnion.ProjectLighthouse
|
||||
@using LBPUnion.ProjectLighthouse.Types
|
||||
@using LBPUnion.ProjectLighthouse.Types.Settings
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@model LBPUnion.ProjectLighthouse.Types.Levels.Slot
|
||||
|
||||
|
@ -22,9 +23,12 @@
|
|||
|
||||
string callbackUrl = (string)ViewData["CallbackUrl"];
|
||||
bool showLink = (bool?)ViewData["ShowLink"] ?? false;
|
||||
|
||||
string iconHash = Model.IconHash;
|
||||
if (string.IsNullOrWhiteSpace(iconHash) || iconHash.StartsWith('g')) iconHash = ServerSettings.Instance.MissingIconHash;
|
||||
}
|
||||
<div style="display: flex; width: 100%;">
|
||||
<div style="margin-right: 10px; background-image: url('/gameAssets/@Model.IconHash'); height: 100px; width: 100px; background-size: cover; background-position: center; border-radius: 100%;">
|
||||
<div style="margin-right: 10px; background-image: url('/gameAssets/@iconHash'); height: 100px; width: 100px; background-size: cover; background-position: center; border-radius: 100%;">
|
||||
</div>
|
||||
<div style="height: fit-content; vertical-align: center; align-self: center">
|
||||
@if (showLink)
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace LBPUnion.ProjectLighthouse.Types.Settings;
|
|||
[Serializable]
|
||||
public class ServerSettings
|
||||
{
|
||||
public const int CurrentConfigVersion = 17; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE!
|
||||
public const int CurrentConfigVersion = 18; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE!
|
||||
private static FileSystemWatcher fileWatcher;
|
||||
static ServerSettings()
|
||||
{
|
||||
|
@ -145,6 +145,8 @@ public class ServerSettings
|
|||
|
||||
public bool ConfigReloading { get; set; } = true;
|
||||
|
||||
public string MissingIconHash { get; set; } = "";
|
||||
|
||||
#region Meta
|
||||
|
||||
[NotNull]
|
||||
|
|
|
@ -33,6 +33,7 @@ public class User
|
|||
if (string.IsNullOrWhiteSpace(avatarHash) || this.IconHash.StartsWith('g')) avatarHash = this.YayHash;
|
||||
if (string.IsNullOrWhiteSpace(avatarHash)) avatarHash = this.MehHash;
|
||||
if (string.IsNullOrWhiteSpace(avatarHash)) avatarHash = this.BooHash;
|
||||
if (string.IsNullOrWhiteSpace(avatarHash)) avatarHash = ServerSettings.Instance.MissingIconHash;
|
||||
|
||||
return avatarHash;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue