Update baserom, add creation timestamp to seed fetch results
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
namespace ALttPRandomizer.Azure {
|
||||
using global::Azure.Storage.Blobs;
|
||||
using global::Azure.Storage.Blobs.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -62,5 +63,11 @@
|
||||
|
||||
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])]
|
||||
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")]
|
||||
[ForbiddenSetting([Apr2025], EntranceShuffle.Swapped)]
|
||||
public EntranceShuffle EntranceShuffle { get; set; } = EntranceShuffle.Vanilla;
|
||||
@@ -57,6 +62,11 @@
|
||||
[NoSettingName([Apr2025])]
|
||||
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")]
|
||||
[RequiredSetting([Apr2025], KeyLocations.Dungeon, KeyLocations.Wild)]
|
||||
[NoSettingName([Apr2025])]
|
||||
@@ -135,6 +145,10 @@
|
||||
[RequiredSetting([Apr2025], FollowerShuffle.Vanilla)]
|
||||
public FollowerShuffle FollowerShuffle { get; set; } = FollowerShuffle.Vanilla;
|
||||
|
||||
[SettingName("damage_challenge")]
|
||||
[NoSettingName([Apr2025])]
|
||||
public DamageChallengeMode DamageChallenge { get; set; } = DamageChallengeMode.Normal;
|
||||
|
||||
[NoSettingName]
|
||||
public Hints Hints { get; set; } = Hints.Off;
|
||||
}
|
||||
@@ -186,6 +200,24 @@
|
||||
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 {
|
||||
Vanilla,
|
||||
Full,
|
||||
@@ -221,6 +253,11 @@
|
||||
Mimics,
|
||||
}
|
||||
|
||||
public enum DamageTableShuffle {
|
||||
Vanilla,
|
||||
Randomized,
|
||||
}
|
||||
|
||||
public enum KeyLocations {
|
||||
[SettingName("none")] Dungeon,
|
||||
[AdditionalSetting([Apr2025], "--keysanity")] Wild,
|
||||
@@ -325,6 +362,12 @@
|
||||
[AdditionalSetting("--shuffle_followers")] Shuffled,
|
||||
}
|
||||
|
||||
public enum DamageChallengeMode {
|
||||
Normal,
|
||||
OHKO,
|
||||
Gloom,
|
||||
}
|
||||
|
||||
public enum Hints {
|
||||
Off,
|
||||
[AdditionalSetting("--hints")] On,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace ALttPRandomizer.Service {
|
||||
using global::Azure;
|
||||
using ALttPRandomizer.Azure;
|
||||
using ALttPRandomizer.Model;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -49,6 +50,13 @@
|
||||
}
|
||||
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)) {
|
||||
var json = JsonDocument.Parse(metaData.ToString());
|
||||
result["meta"] = json;
|
||||
|
||||
Submodule BaseRandomizer updated: 04270990cb...94fe0475b9
Reference in New Issue
Block a user