Update baserom, add creation timestamp to seed fetch results
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
namespace ALttPRandomizer.Azure {
|
namespace ALttPRandomizer.Azure {
|
||||||
using global::Azure.Storage.Blobs;
|
using global::Azure.Storage.Blobs;
|
||||||
|
using global::Azure.Storage.Blobs.Models;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -62,5 +63,11 @@
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<DateTimeOffset> GetFileCreation(string filename) {
|
||||||
|
var blob = this.BlobClient.GetBlobClient(filename);
|
||||||
|
var blobProperties = await blob.GetPropertiesAsync();
|
||||||
|
return blobProperties.Value.CreatedOn;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,11 @@
|
|||||||
[NoSettingName([Apr2025])]
|
[NoSettingName([Apr2025])]
|
||||||
public EntryRequirement CrystalsGT { get; set; } = EntryRequirement.Crystals7;
|
public EntryRequirement CrystalsGT { get; set; } = EntryRequirement.Crystals7;
|
||||||
|
|
||||||
|
[SettingName("ganon_item")]
|
||||||
|
[RequiredSetting([Apr2025], GanonItem.Silver)]
|
||||||
|
[NoSettingName([Apr2025])]
|
||||||
|
public GanonItem GanonItem { get; set; } = GanonItem.Silver;
|
||||||
|
|
||||||
[SettingName("shuffle")]
|
[SettingName("shuffle")]
|
||||||
[ForbiddenSetting([Apr2025], EntranceShuffle.Swapped)]
|
[ForbiddenSetting([Apr2025], EntranceShuffle.Swapped)]
|
||||||
public EntranceShuffle EntranceShuffle { get; set; } = EntranceShuffle.Vanilla;
|
public EntranceShuffle EntranceShuffle { get; set; } = EntranceShuffle.Vanilla;
|
||||||
@@ -57,6 +62,11 @@
|
|||||||
[NoSettingName([Apr2025])]
|
[NoSettingName([Apr2025])]
|
||||||
public EnemyShuffle EnemyShuffle { get; set; } = EnemyShuffle.Vanilla;
|
public EnemyShuffle EnemyShuffle { get; set; } = EnemyShuffle.Vanilla;
|
||||||
|
|
||||||
|
[SettingName("shuffle_damage_table")]
|
||||||
|
[RequiredSetting([Apr2025], DamageTableShuffle.Vanilla)]
|
||||||
|
[NoSettingName([Apr2025])]
|
||||||
|
public DamageTableShuffle DamageTableShuffle { get; set; } = DamageTableShuffle.Vanilla;
|
||||||
|
|
||||||
[SettingName("keyshuffle")]
|
[SettingName("keyshuffle")]
|
||||||
[RequiredSetting([Apr2025], KeyLocations.Dungeon, KeyLocations.Wild)]
|
[RequiredSetting([Apr2025], KeyLocations.Dungeon, KeyLocations.Wild)]
|
||||||
[NoSettingName([Apr2025])]
|
[NoSettingName([Apr2025])]
|
||||||
@@ -135,6 +145,10 @@
|
|||||||
[RequiredSetting([Apr2025], FollowerShuffle.Vanilla)]
|
[RequiredSetting([Apr2025], FollowerShuffle.Vanilla)]
|
||||||
public FollowerShuffle FollowerShuffle { get; set; } = FollowerShuffle.Vanilla;
|
public FollowerShuffle FollowerShuffle { get; set; } = FollowerShuffle.Vanilla;
|
||||||
|
|
||||||
|
[SettingName("damage_challenge")]
|
||||||
|
[NoSettingName([Apr2025])]
|
||||||
|
public DamageChallengeMode DamageChallenge { get; set; } = DamageChallengeMode.Normal;
|
||||||
|
|
||||||
[NoSettingName]
|
[NoSettingName]
|
||||||
public Hints Hints { get; set; } = Hints.Off;
|
public Hints Hints { get; set; } = Hints.Off;
|
||||||
}
|
}
|
||||||
@@ -186,6 +200,24 @@
|
|||||||
Random,
|
Random,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum GanonItem {
|
||||||
|
Silver,
|
||||||
|
Boomerang,
|
||||||
|
Hookshot,
|
||||||
|
Powder,
|
||||||
|
[SettingName("fire_rod")] FireRod,
|
||||||
|
[SettingName("ice_rod")] IceRod,
|
||||||
|
Bombos,
|
||||||
|
Ether,
|
||||||
|
Quake,
|
||||||
|
Hammer,
|
||||||
|
Bee,
|
||||||
|
Somaria,
|
||||||
|
Byrna,
|
||||||
|
Random,
|
||||||
|
None,
|
||||||
|
}
|
||||||
|
|
||||||
public enum EntranceShuffle {
|
public enum EntranceShuffle {
|
||||||
Vanilla,
|
Vanilla,
|
||||||
Full,
|
Full,
|
||||||
@@ -221,6 +253,11 @@
|
|||||||
Mimics,
|
Mimics,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum DamageTableShuffle {
|
||||||
|
Vanilla,
|
||||||
|
Randomized,
|
||||||
|
}
|
||||||
|
|
||||||
public enum KeyLocations {
|
public enum KeyLocations {
|
||||||
[SettingName("none")] Dungeon,
|
[SettingName("none")] Dungeon,
|
||||||
[AdditionalSetting([Apr2025], "--keysanity")] Wild,
|
[AdditionalSetting([Apr2025], "--keysanity")] Wild,
|
||||||
@@ -325,6 +362,12 @@
|
|||||||
[AdditionalSetting("--shuffle_followers")] Shuffled,
|
[AdditionalSetting("--shuffle_followers")] Shuffled,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum DamageChallengeMode {
|
||||||
|
Normal,
|
||||||
|
OHKO,
|
||||||
|
Gloom,
|
||||||
|
}
|
||||||
|
|
||||||
public enum Hints {
|
public enum Hints {
|
||||||
Off,
|
Off,
|
||||||
[AdditionalSetting("--hints")] On,
|
[AdditionalSetting("--hints")] On,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
namespace ALttPRandomizer.Service {
|
namespace ALttPRandomizer.Service {
|
||||||
|
using global::Azure;
|
||||||
using ALttPRandomizer.Azure;
|
using ALttPRandomizer.Azure;
|
||||||
using ALttPRandomizer.Model;
|
using ALttPRandomizer.Model;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@@ -49,6 +50,13 @@
|
|||||||
}
|
}
|
||||||
result["patch"] = Convert.ToBase64String(patchData.ToArray());
|
result["patch"] = Convert.ToBase64String(patchData.ToArray());
|
||||||
|
|
||||||
|
try {
|
||||||
|
var creationTime = await this.AzureStorage.GetFileCreation($"{seedId}/patch.bps");
|
||||||
|
result["created"] = creationTime.ToUnixTimeSeconds();
|
||||||
|
} catch (RequestFailedException e) {
|
||||||
|
this.Logger.LogError(e, "Failed to get creation timestamp for seed {seedId}", seedId);
|
||||||
|
}
|
||||||
|
|
||||||
if (files.TryGetValue("meta.json", out var metaData)) {
|
if (files.TryGetValue("meta.json", out var metaData)) {
|
||||||
var json = JsonDocument.Parse(metaData.ToString());
|
var json = JsonDocument.Parse(metaData.ToString());
|
||||||
result["meta"] = json;
|
result["meta"] = json;
|
||||||
|
|||||||
Submodule BaseRandomizer updated: 04270990cb...94fe0475b9
Reference in New Issue
Block a user