Feedback round: bots that keep working, Sky Mower, calmer HUD, faster menus, new map

- Robot docks and drone pads with no belt ship straight to Earth; robots widen
  their rings up to 4x once everything in reach is mown, travel 2.5x faster
  empty, hoppers 60/150 kg. Drone reach 70 m + 25 m per upgrade.
- New Sky Mower: a big mowing drone on a pad, 91 sectors, flies over the grass.
- Cut paint follows the blade as a strip, no disc ahead of the machine.
- Sector toasts aggregate, chimes and till sounds throttled, toasts moved and
  narrowed.
- Menus no longer rebuild on every money change (price tint follows the
  wallet), scroll position kept.
- Map drawn as one mesh, opens near the player, ME / + / - / GLOBE, scale bar.
- Key-art still (x_key) and -shotsize for the store stills; -demobots test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-11-09 15:38:37 +06:00
parent d1c3761e58
commit 27d075103b
44 changed files with 6801 additions and 5733 deletions

View File

@ -92,6 +92,9 @@ namespace GrassCutter
TeamState.Changed += Refresh;
Card.RegisterCallback<DetachFromPanelEvent>(_ => TeamState.Changed -= Refresh);
// the wallet moves all the time: it recolours the prices, the pill and the tab counts, it doesn't rebuild the tree
UIK.FollowWallet(Card);
Card.schedule.Execute(Wallet).Every(250);
// open on the first tree that has something affordable
// a single tree needs no tab row
if (TreeCount == 1) tabs.style.display = DisplayStyle.None;
@ -144,7 +147,7 @@ namespace GrassCutter
Vector2 NodeCenter(PerkDef d) => NodePos(d) + new Vector2(Node, Node) * 0.5f;
static Vector2 HubPos => new Vector2(CanvasW * 0.5f - Node * 0.5f, PadY);
void Rebuild(bool animate)
void Wallet()
{
var ts = Ts;
if (!ts) return;
@ -156,6 +159,13 @@ namespace GrassCutter
_tabBadges[i].text = n > 0 ? n.ToString() : "";
_tabBadges[i].style.display = n > 0 ? DisplayStyle.Flex : DisplayStyle.None;
}
}
void Rebuild(bool animate)
{
var ts = Ts;
if (!ts) return;
Wallet();
// nodes
foreach (var n in _nodes.Values) n.RemoveFromHierarchy();
@ -180,7 +190,8 @@ namespace GrassCutter
node.pickingMode = PickingMode.Position;
var pos = NodePos(d);
node.style.left = pos.x; node.style.top = pos.y;
node.AddToClassList(maxed ? "node-maxed" : lvl > 0 ? "node-owned" : !avail ? "node-locked" : afford ? "node-afford" : "node-available");
if (maxed || lvl > 0 || !avail) node.AddToClassList(maxed ? "node-maxed" : lvl > 0 ? "node-owned" : "node-locked");
else UIK.Costs(node, d.PriceFor(lvl), "node-afford", "node-available");
if (d.id == _selected) node.AddToClassList("node-selected");
var icon = UIK.Img(AssetBank.I.Tex(d.icon), "node-icon", node);
icon.pickingMode = PickingMode.Ignore;
@ -261,7 +272,6 @@ namespace GrassCutter
bool maxed = lvl >= d.maxLevel;
bool avail = ts.PerkAvailable(d);
long price = d.PriceFor(lvl);
bool afford = ts.Money.Value >= price;
var top = UIK.El("detail-top", _detail);
top.style.backgroundColor = Color.Lerp(TreeColors[(int)_tree], Color.white, 0.55f);
@ -292,7 +302,8 @@ namespace GrassCutter
}
else
{
var b = UIK.Btn(lvl > 0 ? Loc.F("UPGRADE {0}", UIK.Money(price)) : Loc.F("UNLOCK {0}", UIK.Money(price)), () => Buy(d, afford), afford ? "btn btn-green" : "btn btn-grey", _detail);
var b = UIK.Btn(lvl > 0 ? Loc.F("UPGRADE {0}", UIK.Money(price)) : Loc.F("UNLOCK {0}", UIK.Money(price)), () => Buy(d, UIK.CanPay(price)), "btn", _detail);
UIK.Costs(b, price);
b.style.alignSelf = Align.Stretch;
}
if (animate) UIK.SlideIn(_detail, new Vector2(40, 0), 0.05f, 0.3f);