mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-25 02:39:06 +00:00
Potential fix for missing icons (#49)
This commit is contained in:
parent
24e39c59cb
commit
93a6d8500e
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,10 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
|||
Slot slot = await this.GetSlotFromBody();
|
||||
if (slot == null) return this.BadRequest(); // if the level cant be parsed then it obviously cant be uploaded
|
||||
|
||||
if (string.IsNullOrEmpty(slot.RootLevel)) return this.BadRequest();
|
||||
|
||||
if (string.IsNullOrEmpty(slot.ResourceCollection)) slot.ResourceCollection = slot.RootLevel;
|
||||
|
||||
// Republish logic
|
||||
if (slot.SlotId != 0)
|
||||
{
|
||||
|
@ -44,6 +48,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
|||
if (oldSlot.CreatorId != user.UserId) return this.BadRequest();
|
||||
}
|
||||
|
||||
slot.ResourceCollection += "," + slot.IconHash; // tells LBP to upload icon after we process resources here
|
||||
|
||||
string resources = slot.Resources.Where
|
||||
(hash => !FileHelper.ResourceExists(hash))
|
||||
.Aggregate("", (current, hash) => current + LbpSerializer.StringElement("resource", hash));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue