Skip to content

Commit

Permalink
Removed Early Access restriction from Forspoken functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Kizari committed Mar 11, 2023
1 parent 693f4db commit 56c7ba3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 46 deletions.
13 changes: 0 additions & 13 deletions Flagrum.Web/Features/AssetExplorer/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,6 @@

protected override void OnInitialized()
{
if (Profile.Current.Type == LuminousGame.Forspoken && !Profile.IsEarlyAccessEnabled)
{
throw new Exception("Cannot access Asset Explorer for Forspoken without early access!");
}

if (Profile.Current.Type == LuminousGame.FFXV)
{
if (Context.AssetExplorerNodes.Any(n => n.Name == "sdk:"))
{
throw new Exception("Cannot access Asset Explorer for Forspoken without early access!");
}
}

CurrentView = Context.GetEnum<AssetExplorerView>(StateKey.CurrentAssetExplorerView);
}
}
21 changes: 6 additions & 15 deletions Flagrum.Web/Features/ModManager/Editor.razor
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
<div class="flex-grow h-full flex flex-col">
<div class="box p-6 mb-6 flex flex-row items-center">
<h4 class="text-grey-200 flex-grow">@Mod.Name</h4>
@if (Profile.Current.Type == LuminousGame.FFXV || Profile.IsEarlyAccessEnabled)
{
<Button Icon="save" Text="@Localizer["Save"]" CssClass="mr-3" OnClickAsync="Save"/>
}
<Button Icon="save" Text="@Localizer["Save"]" CssClass="mr-3" OnClickAsync="Save"/>
@if (ModId != null && ModManagerService.HasAnyCachedFiles(Mod))
{
<Button Icon="folder_off" Text="@Localizer["ClearCache"]" OnClick="ClearCache" CssClass="mr-3"/>
Expand All @@ -34,11 +31,8 @@
</div>
<div class="box flex flex-row items-center p-6 border-b border-black">
<h5 class="text-grey-200 flex-grow">@Localizer["BuildList"]</h5>
@if (Profile.Current.Type == LuminousGame.FFXV || Profile.IsEarlyAccessEnabled)
{
<Button Icon="folder" Text="@Localizer["ReplaceAsset"]" CssClass="mr-3" OnClick="OpenReplaceModal"/>
<Button Icon="block" Text="@Localizer["RemoveAsset"]" OnClick="OpenRemoveModal"/>
}
<Button Icon="folder" Text="@Localizer["ReplaceAsset"]" CssClass="mr-3" OnClick="OpenReplaceModal"/>
<Button Icon="block" Text="@Localizer["RemoveAsset"]" OnClick="OpenRemoveModal"/>
</div>
<div class="box flex flex-row items-center px-4 py-2 border-b border-black">
<span class="material-icons text-accent1-200 mr-3">filter_alt</span>
Expand Down Expand Up @@ -128,14 +122,11 @@
}
</div>
<div class="ml-8">
@if (Profile.Current.Type == LuminousGame.FFXV || Profile.IsEarlyAccessEnabled)
@if (replacement.Type is EarcFileChangeType.Add or EarcFileChangeType.Replace or EarcFileChangeType.AddToTextureArray)
{
if (replacement.Type is EarcFileChangeType.Add or EarcFileChangeType.Replace or EarcFileChangeType.AddToTextureArray)
{
<span class="material-icons text-accent1-200 cursor-pointer mr-3" @onclick="() => UpdateReplacementPath(replacement)">edit</span>
}
<span class="material-icons text-accent1-200 cursor-pointer" @onclick="() => RemoveReplacement(earc, replacement)">delete</span>
<span class="material-icons text-accent1-200 cursor-pointer mr-3" @onclick="() => UpdateReplacementPath(replacement)">edit</span>
}
<span class="material-icons text-accent1-200 cursor-pointer" @onclick="() => RemoveReplacement(earc, replacement)">delete</span>
</div>
</div>
</Virtualize>
Expand Down
5 changes: 1 addition & 4 deletions Flagrum.Web/Features/ModManager/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@
<DropdownButtonItem Text="@Localizer["CategoryOther"]" OnClick="() => { SetCategory((int)ModCategory.Other); return Task.CompletedTask; }"/>
</DropdownButton>
<div class="flex-grow"></div>
@if (Profile.Current.Type == LuminousGame.FFXV || Profile.IsEarlyAccessEnabled)
{
<Button Icon="add" Text=@Localizer["CreateMod"] CssClass="mr-4" OnClick="@(() => ModCardModal.Open(0))"/>
}
<Button Icon="add" Text=@Localizer["CreateMod"] CssClass="mr-4" OnClick="@(() => ModCardModal.Open(0))"/>
<Button Icon="upload" Text=@Localizer["InstallFromZip"] OnClickAsync="Install"/>
<div class="row rounded text-sm font-bold text-grey-100 pl-1 pr-1.5 pt-1 pb-1 ml-4 cursor-pointer select-none" style="background-color: #107ef4;" @onclick="OpenModWorkshop">
<img alt="MWS" src="/branding/mws_logo_white.svg" style="width: 16px; height: 16px;"/>
Expand Down
15 changes: 6 additions & 9 deletions Flagrum.Web/Features/ModManager/ModCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,12 @@
<div class="p-4">
<div class="row mb-2">
<strong class="block text-grey-200 flex-grow font-display" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px;">@Mod.Name</strong>
@if (Profile.Current.Type == LuminousGame.FFXV || Profile.IsEarlyAccessEnabled)
{
<span class="material-icons ml-3 text-accent1-200 cursor-pointer hover:text-white"
style="font-size: 0.95rem;"
@onclick="() => Parent.ShowModCardModal(Mod.Id)"
@onclick:stopPropagation="true">
edit
</span>
}
<span class="material-icons ml-3 text-accent1-200 cursor-pointer hover:text-white"
style="font-size: 0.95rem;"
@onclick="() => Parent.ShowModCardModal(Mod.Id)"
@onclick:stopPropagation="true">
edit
</span>
</div>
<div class="block text-grey-200 flex-grow mb-2 flex flex-row items-center">
<span class="material-icons text-grey-200 mr-2">person</span>
Expand Down
6 changes: 1 addition & 5 deletions Flagrum.Web/Layout/MainMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
<Bootstrapper/>
<div class="h-full bg-dark flex flex-col border-dark-550 border-r" style="flex: 0 0 195px">
<MenuItem Icon="apps" Text="@L["ModManager"]" DefaultActive="true" Uri="/"/>

@if (Profile.Current.Type == LuminousGame.FFXV || Profile.IsEarlyAccessEnabled)
{
<MenuItem Icon="videogame_asset" Text="@L["AssetExplorer"]" Uri="/assets"/>
}
<MenuItem Icon="videogame_asset" Text="@L["AssetExplorer"]" Uri="/assets"/>

@if (Profile.Current.Type == LuminousGame.FFXV)
{
Expand Down

0 comments on commit 56c7ba3

Please sign in to comment.