mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
d471b418b9
Targets Rec Room 2020.03.10 client (also serves 2020.03.06).
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces dorknet-clientpatch-{key}.zip
for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
dorknet-server-march_2020_03_10-win-x64.zip and
dorknet-clientpatch-march_2020_03_10.zip as Release assets.
Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
43 lines
1.6 KiB
C#
43 lines
1.6 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace DorkNet.Server.Data.Entities;
|
|
|
|
/// <summary>
|
|
/// One historical version of an <see cref="InventionEntity"/>. Each
|
|
/// time the creator uploads a new SpawnableTemplateData blob via
|
|
/// <c>POST api/inventions/v3/addversion</c>, we snapshot the prior
|
|
/// blob name into a new row here so the watch's "version history"
|
|
/// tab and `GET api/inventions/v1/versions?inventionId=X` can list
|
|
/// them. Indexed on (InventionId, VersionNumber DESC) for the
|
|
/// common "show me the version list" query.
|
|
/// </summary>
|
|
public class InventionVersionEntity
|
|
{
|
|
public long Id { get; set; }
|
|
public long InventionId { get; set; }
|
|
|
|
/// <summary>Mirrors <c>InventionVersion.ReplicationId</c> — opaque
|
|
/// GUID the client uses to deduplicate spawns of this specific
|
|
/// version across rooms.</summary>
|
|
[MaxLength(64)]
|
|
public string ReplicationId { get; set; } = string.Empty;
|
|
|
|
/// <summary>1-based version index. Auto-assigned to
|
|
/// max(VersionNumber) + 1 on insert.</summary>
|
|
public int VersionNumber { get; set; }
|
|
|
|
[MaxLength(128)]
|
|
public string BlobName { get; set; } = string.Empty;
|
|
|
|
/// <summary>Tokens it costs to spawn this version of the
|
|
/// invention (decompiled wire field
|
|
/// <c>InventionVersion.InstantiationCost</c>).</summary>
|
|
public int InstantiationCost { get; set; } = 0;
|
|
|
|
/// <summary>Watt budget the creation consumes
|
|
/// (<c>InventionVersion.LightsCost</c>).</summary>
|
|
public int LightsCost { get; set; } = 0;
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|