Mod: mining rig, graphics cards, trading terminal, nightly settlement

First playable slice, tested in game on the test save:
- Network upgrade "Mining Access" (300) delivers a trading terminal, a
  mining rig and an RZX 50.
- The rig is a machine with a battery slot and four card slots; each night
  it draws its total power from the battery and its cards mine PSCoin.
  Cards show hashrate, power draw and condition, wear every night and can
  burn out. All state lives on item tags or in the mod save data.
- Trading terminal with wallet, trade (four pairs, deposit credits as CRC,
  withdraw CRC through the compliance desk) and report pages.
- Nightly log lines; exchange opening and halving news on the paper.
- English and Chinese text; sprites generated by art/sprites.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Opus 5.5 committed 2026-11-03 09:11:46 +08:00
1 parent efc58888f3
commit 750b26e4b3
21 files changed
+1040

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
using System;
using UnityEngine;
namespace Decentralized
{
public static class ModInfo
{
public const string Id = "probably_decentralized";
public const string Name = "Probably Decentralized";
public const string Version = "0.1.0";
}
/// <summary>本地化:游戏的 mod 本地化表(ModFiles/Localization/*.csv),当前语言缺失时回退英文。</summary>
public static class L
{
public static string T(string key, params object[] args) => ModHelper.GetLocalized(ModInfo.Id, key, args);
}
public static class Log
{
public static void Info(string m) => Debug.Log($"[{ModInfo.Name}] {m}");
public static void Warn(string m) => Debug.LogWarning($"[{ModInfo.Name}] {m}");
public static void Error(string m) => Debug.LogError($"[{ModInfo.Name}] {m}");
public static void Guard(string what, Action a)
{
try { a(); }
catch (Exception ex) { Error($"{what}: {ex}"); }
}
}
public static class Fmt
{
public static string Num(double v) => Math.Abs(v) >= 100 ? v.ToString("N0") : Math.Abs(v) >= 1 ? v.ToString("0.##") : v.ToString("0.####");
public static string Credits(double v) => v.ToString("N0");
}
}