feat: add FS25_FarmHUD mod and FarmHUD desktop companion app

Initial commit: the FS25 Lua mod (live.json data export), the
FS25-WebDashboard project (Node/web dashboard + PySide6 desktop
variant), and FarmHUD (standalone PySide6 companion app with
Discord Rich Presence, settings, and installer).
This commit is contained in:
2026-09-27 15:25:07 +02:00
commit e5754cca18
63 changed files with 7196 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
"""The 'Easter Egg' stat slot: a rotating fun line, mostly playful
commentary on your current money/time, occasionally a pure surprise line.
Deterministic-ish per poll (re-picked only when explicitly rolled) so it
doesn't flicker on every 500ms data refresh.
"""
from __future__ import annotations
import random
from typing import Optional
RARE_LINES = [
"🐄 Irgendwo hat gerade eine Kuh gemuht.",
"🛰️ Dieses Feld wird seit 1998 nicht mehr gedüngt.",
"🦆 Eine Ente hat deinen Trecker für ein Boot gehalten.",
"🌾 Der Weizen träumt von der Ernte.",
"🚜 Achtung: Traktor-Philosoph erkannt.",
"🥔 Die Kartoffel des Tages grüßt dich.",
]
MONEY_LINES = [
(1_000_000, "🤑 Krösus vom Dienst - über 1 Million auf dem Konto!"),
(100_000, "💰 Solide gewirtschaftet - sechsstellig im Plus."),
(0, "🌱 Jeder große Hof fängt mal klein an."),
]
NIGHT_HOURS = set(range(22, 24)) | set(range(0, 5))
def pick_easter_egg(money: Optional[float], hour: Optional[int], rng: Optional[random.Random] = None) -> str:
rng = rng or random
# ~1 in 6 rolls is a pure surprise line, independent of game state.
if rng.random() < (1 / 6):
return rng.choice(RARE_LINES)
if hour is not None and hour in NIGHT_HOURS:
return "🌙 Nachtschicht auf dem Hof - Kaffee nicht vergessen."
if money is not None:
for threshold, line in MONEY_LINES:
if money >= threshold:
return line
return "🚜 FarmHUD hält dich auf dem Laufenden."