Skip to content

Commit edcfbaf

Browse files
committed
Merge branch 'dev': hide Velvet on the Chinese game version
# Conflicts: # repo.json
2 parents 31cdad5 + 3386105 commit edcfbaf

18 files changed

Lines changed: 43 additions & 7 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77

88
<PropertyGroup Label="Identity">
9-
<Version>1.0.0.1</Version>
9+
<Version>1.0.0.2</Version>
1010
<Authors>XeldarAlz</Authors>
1111
<Copyright>Copyright (c) XeldarAlz</Copyright>
1212
<PackageProjectUrl>https://github.com/XeldarAlz/FFXIV-Aetherphone</PackageProjectUrl>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ https://raw.githubusercontent.com/XeldarAlz/DalamudPlugins/main/repo.json
6868

6969
Tick **Enabled**, click **+**, then **Save and Close**. Open `/xlplugins`**All Plugins**, search for **Aetherphone**, and install.
7070

71-
Playing the Chinese game version? The phone detects it, hides the apps that can't work there (Music, AetherStream, News), and signs you in through your Rising Stones (石之家) profile instead of the Lodestone.
71+
Playing the Chinese game version? The phone detects it, hides the apps that are unavailable there (Music, AetherStream, News, Velvet), and signs you in through your Rising Stones (石之家) profile instead of the Lodestone.
7272

7373
## Commands
7474

repo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Author": "XeldarAlz",
44
"Name": "Aetherphone",
55
"InternalName": "Aetherphone",
6-
"AssemblyVersion": "1.0.0.1",
7-
"TestingAssemblyVersion": "1.0.0.1",
6+
"AssemblyVersion": "1.0.0.2",
7+
"TestingAssemblyVersion": "1.0.0.2",
88
"Description": "An in-game smartphone that puts everything you do into a single window: one device, endless things to do.",
99
"Punchline": "A smartphone, built for you.",
1010
"RepoUrl": "https://github.com/XeldarAlz/FFXIV-Aetherphone",

src/Aetherphone/Apps/Velvet/VelvetShell.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,9 @@ public void Draw(in PhoneContext context)
222222
TourHolds.Hold(Id);
223223
store.EnsureMe();
224224
TickHeartbeat();
225+
var reason = store.RegionBlocked ? L.Velvet.UnavailableRegionBody : L.Velvet.UnavailableBody;
225226
EmptyState.Draw(context.Content, ui, FontAwesomeIcon.Ban, Loc.T(L.Velvet.UnavailableTitle),
226-
Loc.T(L.Velvet.UnavailableBody));
227+
Loc.T(reason));
227228
return;
228229
}
229230

src/Aetherphone/Apps/Velvet/VelvetStore.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Aetherphone.Core.Aethernet.Contracts;
55
using Aetherphone.Core.Crypto;
66
using Aetherphone.Core.Home;
7+
using Aetherphone.Core.Localization;
78
using Aetherphone.Core.Media;
89
using Aetherphone.Core.Message;
910
using Aetherphone.Core.Net;
@@ -33,6 +34,7 @@ internal sealed class VelvetStore : ChatThreadStoreBase<VelvetMessageDto, Velvet
3334
private volatile VelvetProfileDto? me;
3435
private volatile bool loadingMe;
3536
private volatile bool accessBlocked;
37+
private volatile bool regionBlocked;
3638
private volatile bool avatarBusy;
3739
private volatile AvatarUploadOutcome avatarFailure = AvatarUploadOutcome.Unreachable;
3840
private volatile bool introBusy;
@@ -161,6 +163,7 @@ private void OnVelvetPinged()
161163

162164
public VelvetProfileDto? Me => me;
163165
public bool AccessBlocked => accessBlocked;
166+
public bool RegionBlocked => regionBlocked;
164167
public bool HasProfile => me is not null;
165168
public bool AvatarBusy => avatarBusy;
166169

@@ -252,6 +255,7 @@ protected override void OnAccountSwitched()
252255
discoverEpoch++;
253256
me = null;
254257
accessBlocked = false;
258+
regionBlocked = false;
255259
meGate.Reset();
256260
discoverResults = Array.Empty<VelvetProfileDto>();
257261

@@ -526,7 +530,9 @@ public void EnsureMe()
526530
work.Run("profile load", async token =>
527531
{
528532
var status = 0;
529-
var profile = await client.MeAsync(token, code => status = code).ConfigureAwait(false);
533+
var refusal = AepFailure.None;
534+
var profile = await client.MeAsync(token, code => status = code, failure => refusal = failure)
535+
.ConfigureAwait(false);
530536
if (epoch != accountEpoch)
531537
{
532538
return;
@@ -536,10 +542,12 @@ public void EnsureMe()
536542
{
537543
me = profile;
538544
accessBlocked = false;
545+
regionBlocked = false;
539546
}
540547
else if (status == 403)
541548
{
542549
accessBlocked = true;
550+
regionBlocked = refusal.Code == FailureCodes.VelvetRegionBlocked;
543551
}
544552
}, () => loadingMe = false);
545553
}

src/Aetherphone/Core/Aethernet/AppAvailability.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal sealed class AppAvailability : IDisposable
1010

1111
private static readonly string[] AlwaysAvailable = { "appstore", "settings", "announcements" };
1212
private static readonly string[] HiddenUntilLaunched = { "muster", "coin", "casino" };
13-
private static readonly string[] UnavailableInChina = { "music", "aetherstream", "news" };
13+
private static readonly string[] UnavailableInChina = { "music", "aetherstream", "news", "velvet" };
1414

1515
private static AppAvailability? current;
1616

src/Aetherphone/Core/Changelog/ChangelogData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ internal static class ChangelogData
66
{
77
public static readonly IReadOnlyList<ChangelogEntry> Entries = new[]
88
{
9+
new ChangelogEntry("1.0.0.2", "2026-08-17", L.Changelog.Release1002),
910
new ChangelogEntry("1.0.0.1", "2026-08-17", L.Changelog.Release1001),
1011
new ChangelogEntry("1.0.0.0", "2026-08-16", L.Changelog.Release1000),
1112
new ChangelogEntry("0.9.9.9", "2026-08-07", L.Changelog.Release0999),

src/Aetherphone/Core/Localization/FailureText.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ internal static class FailureCodes
8484
public const string PhotoTagRejected = "photo_tag_rejected";
8585
public const string VelvetRequestsClosed = "velvet_requests_closed";
8686
public const string VelvetRequestsMutualsOnly = "velvet_requests_mutuals_only";
87+
public const string VelvetRegionBlocked = "velvet_region_blocked";
8788
public const string PatreonLinkExpired = "patreon_link_expired";
8889
public const string PatreonUnavailable = "patreon_unavailable";
8990
public const string PatreonAlreadyLinked = "patreon_already_linked";

src/Aetherphone/Core/Localization/L.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,11 @@ internal static class Settings
13381338

13391339
internal static class Changelog
13401340
{
1341+
public static readonly LocString[] Release1002 =
1342+
{
1343+
new("changelog.r1002.0", "A few changes specific to the Chinese game version"),
1344+
};
1345+
13411346
public static readonly LocString[] Release1001 =
13421347
{
13431348
new("changelog.r1001.0",
@@ -3207,6 +3212,8 @@ internal static class Velvet
32073212
public static readonly LocString UnavailableTitle = new("velvet.unavailableTitle", "Velvet is unavailable");
32083213
public static readonly LocString UnavailableBody = new("velvet.unavailableBody",
32093214
"Velvet is an adults only space and is not available on Lalafell characters. If you recently changed your race, this clears once the Lodestone reflects it.");
3215+
public static readonly LocString UnavailableRegionBody = new("velvet.unavailableRegionBody",
3216+
"Velvet is not available on the Chinese game version. Everything else on your phone works as normal.");
32103217
public static readonly LocString DiscoveryHeader = new("velvet.discoveryHeader", "Discovery");
32113218
public static readonly LocString DiscoverableHelp =
32123219
new("velvet.discoverableHelp", "When on, your profile can be found by others in Discover.");

src/Aetherphone/Localization/de.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,7 @@
21282128
"velvet.discoverableHelp": "Wenn aktiv, können andere dein Profil in Entdecken finden.",
21292129
"velvet.unavailableTitle": "Velvet ist nicht verfügbar",
21302130
"velvet.unavailableBody": "Velvet ist ein Bereich nur für Erwachsene und auf Lalafell-Charakteren nicht verfügbar. Wenn du kürzlich dein Volk geändert hast, verschwindet dies, sobald der Lodestone es übernimmt.",
2131+
"velvet.unavailableRegionBody": "Velvet ist auf der chinesischen Spielversion nicht verfügbar. Alles andere auf deinem Telefon funktioniert wie gewohnt.",
21312132
"velvet.whoCanMessage": "Wer dir schreiben darf",
21322133
"velvet.whoEveryone": "Alle",
21332134
"velvet.whoFriends": "Freunde",
@@ -4404,6 +4405,7 @@
44044405
"coin.rollupMore": "und {0} weitere",
44054406
"coin.settingsRow": "Aether Coin",
44064407
"coin.aboutWhat": "Ein kleines Dankeschön fürs Benutzen des Handys: einchecken, spielen, reden und in Optik investieren.",
4408+
"changelog.r1002.0": "Einige Änderungen speziell für die chinesische Spielversion",
44074409
"changelog.r1001.0": "Behoben, dass das Telefon nach einem Update bei manchen nicht mehr lud: Wenn AetherStream sich nicht an die Anzeige des Spiels hängen kann, startet das Telefon jetzt normal, statt alles mit sich zu reißen",
44084410
"changelog.r1001.1": "Eine fehlende Schriftdatei lässt das Telefon nicht mehr ohne Text zurück: Bis die Datei wieder da ist, greift das Telefon auf die Schrift des Spiels zurück",
44094411
"changelog.r1000.68": "Gamba hinzugefügt, eine neue Spielgeld-Casino-App: An der Kasse werden Coins zu Chips, und das ganze Haus spielt damit, von Blackjack an gemeinsamen Tischen über Live-Bingoräume, ein gemeinsames Rad, Spielautomaten, Rubbellose und eine Schicht hinter der Bar bis zum kostenlosen täglichen Dreh; jede Runde ist nachweisbar fair, der Verlauf hält jeden Einsatz und jede Auszahlung fest, Verlustlimits setzen das Haus wie du selbst, und echtes Geld ist nirgends im Spiel",

0 commit comments

Comments
 (0)