Smaller planets, 93% sectors, dearer late game, automation perks, autopilot, grass train

Not yet tried in the game: Unity could not get a licence (Unity Hub isn't
running), so this was only type-checked with Roslyn.

- Planets by area: the hard one half the old whole planet, normal a third of
  that, easy a sixth. Saves keep the size set they were made on (sizeGen 0).
- A sector closes at 93% mown.
- Mid and late prices go up (perks, machines, vehicles, tunes); the early
  game stays as it was.
- AUTOMATION perk tree: Long Leash (robot reach), Overdrive Motors, Bigger
  Hoppers, Long-Range Drones and Hive Mind.
- Autopilot, a garage tune for mowers: C hands the machine over. It mows the
  fields around in strokes, unloads at the nearest pad or the base yard and
  comes back. Getting in takes it back; it carries on after a load.
- Grass Train: lays its own track to a station next door, mowing under it,
  then runs back and forth cutting wider each run. Models in gc_train.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-11-10 11:39:02 +06:00
parent 5b14fd6635
commit df55b5e417
37 changed files with 1690 additions and 328 deletions

BIN
Assets/Art/Models/SM_TrainLoco.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Assets/Art/Models/SM_TrainStation.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Assets/Art/Models/SM_TrainWagon.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -120,6 +120,7 @@ namespace GrassCutter.EditorTools
["icon_piece_hexfoundation"] = new[] { P("SM_Foundation_Hex", 0, 0, 1, 0, 30, 0, tint: new Color(0.8f, 0.8f, 0.7f)) },
["icon_piece_sorter"] = new[] { P("SM_BeltSorter", 0, 0, 1, 0, -30, 0) },
["icon_piece_dronepad"] = new[] { P("SM_Drone", 0, 0.05f, 1, 18, -30, 0) },
["icon_piece_train"] = new[] { P("SM_TrainLoco", 0, 0, 1, 15, -35, 0) },
["icon_piece_skymower"] = new[] { P("SM_DronePad", 0, -0.2f, 0.85f, 20, -30, 0), P("SM_Drone", 0.05f, 0.22f, 0.8f, 14, -30, 0) },
["icon_piece_launcher"] = new[] { P("SM_Launcher", 0, 0, 1, 0, -30, 0) },
["icon_piece_launchpad"] = new[] { P("SM_LaunchPad", 0, -0.2f, 1, 25, -30, 0), P("SM_Rocket", 0.05f, 0.25f, 0.8f, 0, -30, 0) },

View File

@ -298,6 +298,19 @@ namespace GrassCutter.EditorTools
if (d.id == PieceId.RobotII) bot.localScale *= GameDefs.Robot(d.id).width / GameDefs.Robot(PieceId.RobotI).width;
go.AddComponent<RobotDock>().bot = bot;
break;
case PieceId.Train:
{
// the platform is solid; the locomotive and its wagons ride the track the train lays, so they carry no colliders
Solid(go.transform, model);
var train = go.AddComponent<Train>();
train.loco = Child(go.transform, "SM_TrainLoco", Vector3.zero, Quaternion.identity, PrimitiveType.Cube, new Vector3(2.2f, 2.4f, 4.6f), new Vector3(0f, 1.2f, 0f));
train.wagons = new Transform[3];
for (int i = 0; i < train.wagons.Length; i++)
train.wagons[i] = Child(go.transform, "SM_TrainWagon", Vector3.zero, Quaternion.identity, PrimitiveType.Cube, new Vector3(2.1f, 1.6f, 4.4f), new Vector3(0f, 0.9f, 0f));
foreach (var t in new[] { train.loco }.Concat(train.wagons))
foreach (var c in t.GetComponentsInChildren<Collider>()) UnityEngine.Object.DestroyImmediate(c);
break;
}
case PieceId.SkyMower:
{
// the drone pad, and one drone two and a half times the size of the fetching ones

View File

@ -223,7 +223,6 @@ FIND GAMES SPIELE FINDEN
First day Erster Tag
First Delivery Erste Lieferung
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Fünf Kilo Gras werden in 12 Sekunden zu fünf Kilo Heu. Heu bringt dreimal so viel.
FLEET FUHRPARK
Floodlights Flutlicht
Found so far: {0} stakes, {1} points. Bisher gefunden: {0} Pflöcke, {1} Punkte.
Foundations Fundamente
@ -797,9 +796,9 @@ HOW MUCH LAWN? WIE VIEL RASEN?
EASY LEICHT
NORMAL NORMAL
EXTRA HARD EXTREM SCHWER
A planet a third the size, with sectors to match. Earth can wait a little. Ein Planet, ein Drittel so groß, mit passenden Sektoren. Die Erde kann ein bisschen warten.
Half the planet, half-size sectors. Still a lot of lawn. Der halbe Planet, halb so große Sektoren. Immer noch jede Menge Rasen.
The whole of Herbaria-7, full-size sectors, every blade of it. Ganz Herbaria-7, Sektoren in voller Größe, jeder einzelne Halm.
A sixth of the big planet, sectors to match. Earth can wait a little. Ein Sechstel des großen Planeten, die Sektoren passend dazu. Die Erde kann ein bisschen warten.
A third of the big planet, smaller sectors. Still a lot of lawn. Ein Drittel des großen Planeten, kleinere Sektoren. Immer noch jede Menge Rasen.
The big planet: the whole of Herbaria-7, every blade of it. Der große Planet: ganz Herbaria-7, jeder einzelne Halm.
DECOR DEKO
Wall Wand
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Eine 3 m lange Holzwand. Sie kommt an den Rand eines Fundaments oder Bodens; R dreht sie.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME ICH
GLOBE GLOBUS
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG bewegen · WHEEL zoomen · SPACE zurück zu dir · M schließen
AUTOMATION AUTOMATIK
Long Leash Lange Leine
Robots start further out and mow further from home. Roboter fangen weiter draußen an und mähen weiter weg von zu Hause.
+{0}% robot reach +{0} % Roboter-Reichweite
Overdrive Motors Overdrive-Motoren
Robots and Sky Mowers drive and mow faster. Roboter und Himmelsmäher fahren und mähen schneller.
+{0}% robot speed +{0} % Roboter-Tempo
Bigger Hoppers Größere Tanks
Robots carry more grass before they head home. Roboter tragen mehr Gras, bevor sie heimfahren.
+{0}% robot hopper +{0} % Roboter-Tank
Long-Range Drones Langstreckendrohnen
Drone pads fetch bundles from further away. Drohnenplätze holen Bündel von weiter weg.
+{0} m drone reach +{0} m Drohnen-Reichweite
Hive Mind Schwarmgeist
Every robot, Sky Mower and drone works 20% faster. Jeder Roboter, Himmelsmäher und jede Drohne arbeitet 20 % schneller.
Autopilot Autopilot
C hands it over: it mows and unloads on its own C übergibt: Er mäht und lädt selbst ab
autopilot: off to unload Autopilot: fährt zum Abladen
autopilot: nothing left to mow round here Autopilot: hier ist nichts mehr zu mähen
autopilot: mowing Autopilot: mäht
Take over the {0} ({1}, {2} / {3}) {0} übernehmen ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Autopilot an: Der {0} mäht hier und lädt selbst ab. Steig wieder ein, um zu übernehmen.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD fahren · SHIFT Boost · R Verfolgerkamera · E aussteigen · C Autopilot
Grass Train Grasbahn
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Legt sich selbst Gleise zu einer Nachbarstation und mäht dabei den ganzen Weg. Dann pendelt sie hin und her, ihre Seitenmähwerke greifen mit jeder Fahrt weiter aus, und was sie schneidet, wird an beiden Enden bezahlt. Bau sie auf freiem Boden, in die Richtung, in die sie fahren soll.
{0}: laying track to {1}, {2} of {3} m {0}: legt Gleis nach {1}, {2} von {3} m
E: another station E: andere Station
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: Die Strecke nach {1} ist so weit gemäht, wie sie reicht. Ein Upgrade reicht weiter.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: pendelt nach {1}, mäht {2} m zu beiden Seiten, {3} an Bord

View File

@ -222,7 +222,6 @@ FIND GAMES BUSCAR PARTIDAS
First day Primer día
First Delivery Primera entrega
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Cinco kilos de hierba se convierten en cinco de heno en 12 segundos. El heno se paga tres veces más.
FLEET FLOTA
Floodlights Focos
Found so far: {0} stakes, {1} points. Hasta ahora: {0} estacas y {1} puntos.
Foundations Losas
@ -797,9 +796,9 @@ HOW MUCH LAWN? ¿CUÁNTO CÉSPED?
EASY FÁCIL
NORMAL NORMAL
EXTRA HARD MUY DIFÍCIL
A planet a third the size, with sectors to match. Earth can wait a little. Un planeta de un tercio del tamaño, con sectores a juego. La Tierra puede esperar un poco.
Half the planet, half-size sectors. Still a lot of lawn. Medio planeta, sectores de la mitad de tamaño. Sigue siendo mucho césped.
The whole of Herbaria-7, full-size sectors, every blade of it. Herbaria-7 entera, sectores de tamaño completo, hasta la última brizna.
A sixth of the big planet, sectors to match. Earth can wait a little. Un sexto del planeta grande, con sectores a juego. La Tierra puede esperar un poco.
A third of the big planet, smaller sectors. Still a lot of lawn. Un tercio del planeta grande, sectores más pequeños. Sigue siendo mucho césped.
The big planet: the whole of Herbaria-7, every blade of it. El planeta grande: Herbaria-7 entera, hasta la última brizna.
DECOR DECORACIÓN
Wall Pared
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Una pared de madera de 3 m. Va en el borde de una losa o de un piso; R la gira.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME YO
GLOBE GLOBO
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG mover · WHEEL zoom · SPACE volver a ti · M cerrar
AUTOMATION AUTOMATIZACIÓN
Long Leash Correa larga
Robots start further out and mow further from home. Los robots empiezan más lejos y siegan más lejos de casa.
+{0}% robot reach +{0} % de alcance de robots
Overdrive Motors Motores Overdrive
Robots and Sky Mowers drive and mow faster. Los robots y las segadoras aéreas van y siegan más rápido.
+{0}% robot speed +{0} % de velocidad de robots
Bigger Hoppers Tolvas más grandes
Robots carry more grass before they head home. Los robots cargan más hierba antes de volver a casa.
+{0}% robot hopper +{0} % de tolva de robots
Long-Range Drones Drones de largo alcance
Drone pads fetch bundles from further away. Las plataformas de drones recogen fardos desde más lejos.
+{0} m drone reach +{0} m de alcance de drones
Hive Mind Mente colmena
Every robot, Sky Mower and drone works 20% faster. Cada robot, segadora aérea y dron trabaja un 20 % más rápido.
Autopilot Piloto automático
C hands it over: it mows and unloads on its own C lo cede: siega y descarga por su cuenta
autopilot: off to unload piloto automático: va a descargar
autopilot: nothing left to mow round here piloto automático: aquí ya no queda nada que segar
autopilot: mowing piloto automático: segando
Take over the {0} ({1}, {2} / {3}) Tomar el control: {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Piloto automático activado: {0} siega por aquí y descarga solo. Súbete de nuevo para tomar el control.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD conducir · SHIFT turbo · R vista exterior · E bajarse · C piloto automático
Grass Train Tren de hierba
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Se tiende sus propias vías hasta una estación vecina y siega todo el camino. Luego va y viene, sus segadoras laterales llegan más lejos en cada viaje y lo que corta se paga en ambos extremos. Constrúyelo en terreno despejado, mirando hacia donde debe ir.
{0}: laying track to {1}, {2} of {3} m {0}: tendiendo vía hasta {1}, {2} de {3} m
E: another station E: otra estación
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: la línea hasta {1} está segada hasta donde alcanza. Una mejora llega más lejos.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: va a {1} y vuelve, siega {2} m a cada lado, {3} a bordo

View File

@ -223,7 +223,6 @@ FIND GAMES TROUVER DES PARTIES
First day Premier jour
First Delivery Première livraison
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Cinq kilos d'herbe donnent cinq kilos de foin en 12 secondes. Le foin rapporte trois fois plus.
FLEET FLOTTE
Floodlights Projecteurs
Found so far: {0} stakes, {1} points. Trouvés jusqu'ici : {0} piquets, {1} points.
Foundations Fondations
@ -797,9 +796,9 @@ HOW MUCH LAWN? COMBIEN DE PELOUSE ?
EASY FACILE
NORMAL NORMAL
EXTRA HARD TRÈS DIFFICILE
A planet a third the size, with sectors to match. Earth can wait a little. Une planète trois fois plus petite, avec des secteurs à l'avenant. La Terre peut attendre un peu.
Half the planet, half-size sectors. Still a lot of lawn. La moitié de la planète, des secteurs deux fois plus petits. Ça fait encore beaucoup de pelouse.
The whole of Herbaria-7, full-size sectors, every blade of it. Herbaria-7 tout entière, des secteurs grandeur nature, jusqu'au dernier brin.
A sixth of the big planet, sectors to match. Earth can wait a little. Un sixième de la grande planète, des secteurs à l'avenant. La Terre peut attendre un peu.
A third of the big planet, smaller sectors. Still a lot of lawn. Un tiers de la grande planète, des secteurs plus petits. Ça fait encore beaucoup de pelouse.
The big planet: the whole of Herbaria-7, every blade of it. La grande planète : Herbaria-7 tout entière, jusqu'au dernier brin.
DECOR DÉCO
Wall Mur
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Un mur en bois de 3 m. Il se pose au bord d'une fondation ou d'un plancher ; R le fait pivoter.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME MOI
GLOBE GLOBE
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG déplacer · WHEEL zoom · SPACE revenir à vous · M fermer
AUTOMATION AUTOMATISATION
Long Leash Longue laisse
Robots start further out and mow further from home. Les robots commencent plus loin et tondent plus loin de chez eux.
+{0}% robot reach +{0} % de portée des robots
Overdrive Motors Moteurs Overdrive
Robots and Sky Mowers drive and mow faster. Les robots et les tondeuses volantes roulent et tondent plus vite.
+{0}% robot speed +{0} % de vitesse des robots
Bigger Hoppers Trémies géantes
Robots carry more grass before they head home. Les robots emportent plus d'herbe avant de rentrer.
+{0}% robot hopper +{0} % de trémie des robots
Long-Range Drones Drones longue portée
Drone pads fetch bundles from further away. Les pistes à drones vont chercher les bottes plus loin.
+{0} m drone reach +{0} m de portée des drones
Hive Mind Esprit de ruche
Every robot, Sky Mower and drone works 20% faster. Chaque robot, tondeuse volante et drone travaille 20 % plus vite.
Autopilot Pilote auto
C hands it over: it mows and unloads on its own C lui laisse la main : il tond et décharge tout seul
autopilot: off to unload pilote auto : part décharger
autopilot: nothing left to mow round here pilote auto : plus rien à tondre par ici
autopilot: mowing pilote auto : tond
Take over the {0} ({1}, {2} / {3}) Reprendre {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Pilote auto activé : {0} tond le coin et décharge tout seul. Remonte dedans pour reprendre la main.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD conduire · SHIFT boost · R vue poursuite · E descendre · C pilote auto
Grass Train Train à herbe
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Pose ses propres rails jusqu'à une station voisine en tondant tout le trajet. Ensuite il fait la navette, ses faucheuses latérales allant plus loin à chaque trajet, et ce qu'il coupe est payé aux deux bouts. Construis-le sur un terrain dégagé, tourné vers où il doit aller.
{0}: laying track to {1}, {2} of {3} m {0} : pose la voie vers {1}, {2} sur {3} m
E: another station E : une autre station
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0} : la ligne vers {1} est tondue aussi loin qu'il porte. Une amélioration porte plus loin.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0} : fait la navette vers {1}, tond {2} m de chaque côté, {3} à bord

View File

@ -223,7 +223,6 @@ FIND GAMES TROVA PARTITE
First day Primo giorno
First Delivery Prima consegna
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Cinque chili d'erba diventano cinque di fieno in 12 secondi. Il fieno rende il triplo.
FLEET FLOTTA
Floodlights Fari da lavoro
Found so far: {0} stakes, {1} points. Trovati finora: {0} picchetti, {1} punti.
Foundations Fondazioni
@ -797,9 +796,9 @@ HOW MUCH LAWN? QUANTO PRATO?
EASY FACILE
NORMAL NORMALE
EXTRA HARD DIFFICILISSIMO
A planet a third the size, with sectors to match. Earth can wait a little. Un pianeta grande un terzo, con settori in proporzione. La Terra può aspettare un po'.
Half the planet, half-size sectors. Still a lot of lawn. Metà pianeta, settori grandi la metà. Comunque un sacco di prato.
The whole of Herbaria-7, full-size sectors, every blade of it. Tutta Herbaria-7, settori a grandezza piena, fino all'ultimo filo d'erba.
A sixth of the big planet, sectors to match. Earth can wait a little. Un sesto del pianeta grande, settori in proporzione. La Terra può aspettare un po'.
A third of the big planet, smaller sectors. Still a lot of lawn. Un terzo del pianeta grande, settori più piccoli. Comunque un sacco di prato.
The big planet: the whole of Herbaria-7, every blade of it. Il pianeta grande: tutta Herbaria-7, fino all'ultimo filo d'erba.
DECOR DECORO
Wall Muro
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Un muro di legno da 3 m. Va sul bordo di una fondazione o di un solaio; R lo ruota.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME IO
GLOBE GLOBO
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG sposta · WHEEL zoom · SPACE torna a te · M chiudi
AUTOMATION AUTOMAZIONE
Long Leash Guinzaglio lungo
Robots start further out and mow further from home. I robot partono più lontano e falciano più lontano da casa.
+{0}% robot reach +{0}% raggio dei robot
Overdrive Motors Motori Overdrive
Robots and Sky Mowers drive and mow faster. Robot e falciatrici volanti viaggiano e falciano più veloci.
+{0}% robot speed +{0}% velocità dei robot
Bigger Hoppers Tramogge più grandi
Robots carry more grass before they head home. I robot portano più erba prima di tornare a casa.
+{0}% robot hopper +{0}% tramoggia dei robot
Long-Range Drones Droni a lungo raggio
Drone pads fetch bundles from further away. Le piste droni recuperano le balle da più lontano.
+{0} m drone reach +{0} m raggio dei droni
Hive Mind Mente alveare
Every robot, Sky Mower and drone works 20% faster. Ogni robot, falciatrice volante e drone lavora il 20% più veloce.
Autopilot Pilota automatico
C hands it over: it mows and unloads on its own C gli passa il comando: falcia e scarica da solo
autopilot: off to unload pilota automatico: va a scaricare
autopilot: nothing left to mow round here pilota automatico: qui non c'è più niente da falciare
autopilot: mowing pilota automatico: falcia
Take over the {0} ({1}, {2} / {3}) Riprendi {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Pilota automatico attivo: {0} falcia qui intorno e scarica da solo. Risali per riprendere il comando.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD guida · SHIFT boost · R visuale esterna · E scendi · C pilota automatico
Grass Train Treno dell'erba
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Si posa da solo i binari fino a una stazione vicina, falciando tutto il percorso. Poi fa la spola, le falciatrici laterali arrivano più lontano a ogni corsa e ciò che taglia viene pagato a entrambi i capolinea. Costruiscilo su terreno libero, rivolto dove deve andare.
{0}: laying track to {1}, {2} of {3} m {0}: posa binari verso {1}, {2} di {3} m
E: another station E: un'altra stazione
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: la linea verso {1} è falciata fin dove arriva. Un potenziamento arriva più lontano.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: fa la spola con {1}, falcia {2} m per lato, {3} a bordo

View File

@ -223,7 +223,6 @@ FIND GAMES ゲームを探す
First day 初日
First Delivery 初出荷
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. 草5 kgが12秒で干し草5 kgになる。干し草の買取価格は草の3倍。
FLEET 車両
Floodlights 投光器
Found so far: {0} stakes, {1} points. これまでに発見:杭{0}本、測量点{1}か所。
Foundations 土台
@ -797,9 +796,9 @@ HOW MUCH LAWN? どれだけ芝を刈る?
EASY かんたん
NORMAL ふつう
EXTRA HARD 超むずかしい
A planet a third the size, with sectors to match. Earth can wait a little. 3分の1サイズの惑星で、セクターもそれに合わせた大きさ。地球は少し待ってくれる。
Half the planet, half-size sectors. Still a lot of lawn. 惑星の半分、セクターも半分のサイズ。それでも芝はたっぷり。
The whole of Herbaria-7, full-size sectors, every blade of it. Herbaria-7まるごと、フルサイズのセクター、芝の一本一本まで。
A sixth of the big planet, sectors to match. Earth can wait a little. 大きな惑星の6分の1、セクターもそれに合わせた大きさ。地球は少し待ってくれる。
A third of the big planet, smaller sectors. Still a lot of lawn. 大きな惑星の3分の1、セクターも小さめ。それでも芝はたっぷり。
The big planet: the whole of Herbaria-7, every blade of it. 大きな惑星:Herbaria-7まるごと、芝の一本一本まで。
DECOR 装飾
Wall 壁
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. 3 mの木の壁。土台か床の縁に置く。Rで回転。
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME 自分
GLOBE 地球儀
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG 移動 · WHEEL ズーム · SPACE 自分へ戻る · M 閉じる
AUTOMATION 自動化
Long Leash ロングリード
Robots start further out and mow further from home. ロボットがより遠くから刈り始め、家からもっと遠くまで刈る。
+{0}% robot reach ロボットの範囲+{0}%
Overdrive Motors オーバードライブモーター
Robots and Sky Mowers drive and mow faster. ロボットとスカイモアの移動と刈り取りが速くなる。
+{0}% robot speed ロボットの速度+{0}%
Bigger Hoppers 大型ホッパー
Robots carry more grass before they head home. ロボットが帰る前により多くの草を運べる。
+{0}% robot hopper ロボットのホッパー+{0}%
Long-Range Drones 長距離ドローン
Drone pads fetch bundles from further away. ドローンパッドがもっと遠くの束を回収する。
+{0} m drone reach ドローンの範囲+{0} m
Hive Mind ハイブマインド
Every robot, Sky Mower and drone works 20% faster. すべてのロボット、スカイモア、ドローンが20%速く働く。
Autopilot オートパイロット
C hands it over: it mows and unloads on its own Cで任せる:自分で刈って荷下ろしする
autopilot: off to unload オートパイロット:荷下ろしへ移動中
autopilot: nothing left to mow round here オートパイロット:この辺りに刈る草はもうない
autopilot: mowing オートパイロット:刈り取り中
Take over the {0} ({1}, {2} / {3}) {0}を操縦する ({1}、{2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. オートパイロット起動:{0}がこの辺りを刈って自分で荷下ろしする。乗り込めば操縦に戻れる。
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD 運転 · SHIFT ブースト · R 追従視点 · E 降りる・C オートパイロット
Grass Train グラストレイン
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. 隣のステーションまで自分で線路を敷き、道中ずっと草を刈る。線路がつながると往復運転を始め、走るたびに側面のカッターがより遠くまで届き、刈った草は両端で支払われる。開けた地面に、進ませたい方向へ向けて建てよう。
{0}: laying track to {1}, {2} of {3} m {0}:{1}へ線路を敷設中、{2} / {3} m
E: another station E:別のステーション
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}:{1}への路線は届く範囲まで刈り尽くした。アップグレードで更に遠くまで届く。
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}:{1}との間を往復中、両側{2} mまで刈り取り、積載{3}

View File

@ -223,7 +223,6 @@ FIND GAMES 게임 찾기
First day 첫날
First Delivery 첫 납품
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. 풀 5 kg이 12초 만에 건초 5 kg이 돼요. 건초는 세 배 값을 받아요.
FLEET 차량
Floodlights 투광등
Found so far: {0} stakes, {1} points. 지금까지 찾은 것: 말뚝 {0}개, 측량점 {1}개.
Foundations 토대
@ -797,9 +796,9 @@ HOW MUCH LAWN? 잔디가 얼마나?
EASY 쉬움
NORMAL 보통
EXTRA HARD 매우 어려움
A planet a third the size, with sectors to match. Earth can wait a little. 3분의 1 크기의 행성, 섹터도 그에 맞게. 지구는 조금 기다려 줄 수 있어요.
Half the planet, half-size sectors. Still a lot of lawn. 행성의 절반, 절반 크기의 섹터. 그래도 잔디가 한가득.
The whole of Herbaria-7, full-size sectors, every blade of it. Herbaria-7 전체, 실물 크기 섹터, 풀잎 하나하나까지.
A sixth of the big planet, sectors to match. Earth can wait a little. 큰 행성의 6분의 1, 섹터도 그에 맞게. 지구는 조금 기다려 줄 수 있어요.
A third of the big planet, smaller sectors. Still a lot of lawn. 큰 행성의 3분의 1, 더 작은 섹터. 그래도 잔디가 한가득.
The big planet: the whole of Herbaria-7, every blade of it. 큰 행성: Herbaria-7 전체, 풀잎 하나하나까지.
DECOR 장식
Wall 벽
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. 3m 나무 벽. 토대나 바닥의 가장자리에 놓습니다. R로 회전.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME 나
GLOBE 지구본
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG 이동 · WHEEL 확대 · SPACE 내 위치로 · M 닫기
AUTOMATION 자동화
Long Leash 긴 목줄
Robots start further out and mow further from home. 로봇이 더 먼 곳에서 시작해 집에서 더 멀리까지 깎아요.
+{0}% robot reach 로봇 범위 +{0}%
Overdrive Motors 오버드라이브 모터
Robots and Sky Mowers drive and mow faster. 로봇과 스카이 모어가 더 빨리 달리고 깎아요.
+{0}% robot speed 로봇 속도 +{0}%
Bigger Hoppers 대형 호퍼
Robots carry more grass before they head home. 로봇이 집에 돌아가기 전에 풀을 더 많이 실어요.
+{0}% robot hopper 로봇 호퍼 +{0}%
Long-Range Drones 장거리 드론
Drone pads fetch bundles from further away. 드론 패드가 더 먼 곳의 묶음도 가져와요.
+{0} m drone reach 드론 범위 +{0} m
Hive Mind 하이브 마인드
Every robot, Sky Mower and drone works 20% faster. 모든 로봇, 스카이 모어, 드론이 20% 더 빨리 일해요.
Autopilot 자동 조종
C hands it over: it mows and unloads on its own C로 맡기기: 알아서 깎고 내려놔요
autopilot: off to unload 자동 조종: 하역하러 가는 중
autopilot: nothing left to mow round here 자동 조종: 이 근처엔 깎을 게 없어요
autopilot: mowing 자동 조종: 깎는 중
Take over the {0} ({1}, {2} / {3}) {0} 직접 몰기 ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. 자동 조종 켜짐: {0}이(가) 이 근처를 깎고 알아서 하역해요. 다시 타면 직접 몰 수 있어요.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD 운전 · SHIFT 부스트 · R 추적 시점 · E 내리기 · C 자동 조종
Grass Train 잔디 기차
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. 이웃 정거장까지 스스로 선로를 깔면서 가는 길을 전부 깎아요. 선로가 이어지면 왕복 운행을 하는데, 운행할 때마다 옆 커터가 더 멀리 닿고, 깎은 풀은 양 끝에서 정산돼요. 탁 트인 땅에, 가야 할 방향을 보게 지으세요.
{0}: laying track to {1}, {2} of {3} m {0}: {1}까지 선로 까는 중, {2} / {3} m
E: another station E: 다른 정거장
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: {1}까지의 노선은 닿는 데까지 다 깎았어요. 업그레이드하면 더 멀리 닿아요.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: {1} 왕복 중, 양옆 {2} m까지 깎는 중, {3} 적재

View File

@ -223,7 +223,6 @@ FIND GAMES ZNAJDŹ GRY
First day Pierwszy dzień
First Delivery Pierwsza dostawa
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Pięć kilo trawy w 12 sekund zamienia się w pięć kilo siana. Siano jest warte trzy razy więcej.
FLEET FLOTA
Floodlights Reflektory
Found so far: {0} stakes, {1} points. Znalezione do tej pory – paliki: {0}, punkty: {1}.
Foundations Fundamenty
@ -797,9 +796,9 @@ HOW MUCH LAWN? ILE TRAWNIKA?
EASY ŁATWY
NORMAL NORMALNY
EXTRA HARD BARDZO TRUDNY
A planet a third the size, with sectors to match. Earth can wait a little. Planeta trzy razy mniejsza, a sektory do kompletu. Ziemia może chwilę poczekać.
Half the planet, half-size sectors. Still a lot of lawn. Pół planety, sektory o połowę mniejsze. Wciąż mnóstwo trawnika.
The whole of Herbaria-7, full-size sectors, every blade of it. Cała Herbaria-7, sektory w pełnym rozmiarze, każde źdźbło.
A sixth of the big planet, sectors to match. Earth can wait a little. Jedna szósta dużej planety, sektory do kompletu. Ziemia może chwilę poczekać.
A third of the big planet, smaller sectors. Still a lot of lawn. Jedna trzecia dużej planety, mniejsze sektory. Wciąż mnóstwo trawnika.
The big planet: the whole of Herbaria-7, every blade of it. Duża planeta: cała Herbaria-7, co do źdźbła.
DECOR DEKORACJE
Wall Ściana
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Drewniana ściana 3 m. Stawia się ją na krawędzi fundamentu lub stropu; R ją obraca.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME JA
GLOBE GLOBUS
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG przesuń · WHEEL przybliżenie · SPACE wróć do siebie · M zamknij
AUTOMATION AUTOMATYKA
Long Leash Długa smycz
Robots start further out and mow further from home. Roboty zaczynają dalej i koszą dalej od domu.
+{0}% robot reach +{0}% zasięgu robotów
Overdrive Motors Silniki Overdrive
Robots and Sky Mowers drive and mow faster. Roboty i kosiarki powietrzne jeżdżą i koszą szybciej.
+{0}% robot speed +{0}% prędkości robotów
Bigger Hoppers Większe zbiorniki
Robots carry more grass before they head home. Roboty zabierają więcej trawy, zanim wrócą do domu.
+{0}% robot hopper +{0}% zbiornika robotów
Long-Range Drones Drony dalekiego zasięgu
Drone pads fetch bundles from further away. Lądowiska dronów zbierają snopki z dalszej odległości.
+{0} m drone reach +{0} m zasięgu dronów
Hive Mind Umysł roju
Every robot, Sky Mower and drone works 20% faster. Każdy robot, kosiarka powietrzna i dron pracuje o 20% szybciej.
Autopilot Autopilot
C hands it over: it mows and unloads on its own C oddaje stery: sam kosi i sam rozładowuje
autopilot: off to unload autopilot: jedzie rozładować
autopilot: nothing left to mow round here autopilot: tu nie ma już nic do koszenia
autopilot: mowing autopilot: kosi
Take over the {0} ({1}, {2} / {3}) Przejmij: {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Autopilot włączony: {0} kosi w okolicy i sam się rozładowuje. Wsiądź, żeby przejąć stery.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD jazda · SHIFT dopalacz · R widok z tyłu · E wysiadka · C autopilot
Grass Train Trawiasta kolejka
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Sama układa sobie tory do sąsiedniej stacji, kosząc całą drogę. Potem kursuje tam i z powrotem, a jej boczne kosiarki sięgają dalej z każdym kursem; to, co skosi, jest opłacane na obu końcach. Postaw ją na wolnym terenie, przodem tam, dokąd ma jechać.
{0}: laying track to {1}, {2} of {3} m {0}: układa tor do {1}, {2} z {3} m
E: another station E: inna stacja
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: linia do {1} jest skoszona, jak daleko sięga. Ulepszenie sięga dalej.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: kursuje do {1} i z powrotem, kosi {2} m po bokach, {3} na pokładzie

View File

@ -223,7 +223,6 @@ FIND GAMES BUSCAR JOGOS
First day Primeiro dia
First Delivery Primeira Entrega
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Cinco quilos de grama viram cinco de feno em 12 segundos. Feno paga três vezes mais.
FLEET FROTA
Floodlights Holofotes
Found so far: {0} stakes, {1} points. Encontrados até agora: {0} estacas, {1} pontos.
Foundations Fundações
@ -797,9 +796,9 @@ HOW MUCH LAWN? QUANTO GRAMADO?
EASY FÁCIL
NORMAL NORMAL
EXTRA HARD MUITO DIFÍCIL
A planet a third the size, with sectors to match. Earth can wait a little. Um planeta com um terço do tamanho, com setores proporcionais. A Terra pode esperar um pouco.
Half the planet, half-size sectors. Still a lot of lawn. Metade do planeta, setores com metade do tamanho. Ainda é muito gramado.
The whole of Herbaria-7, full-size sectors, every blade of it. Herbaria-7 inteira, setores em tamanho real, cada folha de grama.
A sixth of the big planet, sectors to match. Earth can wait a little. Um sexto do planeta grande, com setores proporcionais. A Terra pode esperar um pouco.
A third of the big planet, smaller sectors. Still a lot of lawn. Um terço do planeta grande, setores menores. Ainda é muito gramado.
The big planet: the whole of Herbaria-7, every blade of it. O planeta grande: Herbaria-7 inteira, cada folha de grama.
DECOR DECORAÇÃO
Wall Parede
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Uma parede de madeira de 3 m. Vai na borda de uma fundação ou de um piso; R gira.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME EU
GLOBE GLOBO
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG mover · WHEEL zoom · SPACE voltar a você · M fechar
AUTOMATION AUTOMAÇÃO
Long Leash Coleira longa
Robots start further out and mow further from home. Os robôs começam mais longe e cortam mais longe de casa.
+{0}% robot reach +{0}% de alcance dos robôs
Overdrive Motors Motores Overdrive
Robots and Sky Mowers drive and mow faster. Robôs e Cortadores Aéreos andam e cortam mais rápido.
+{0}% robot speed +{0}% de velocidade dos robôs
Bigger Hoppers Caçambas maiores
Robots carry more grass before they head home. Os robôs levam mais grama antes de voltar para casa.
+{0}% robot hopper +{0}% de caçamba dos robôs
Long-Range Drones Drones de longo alcance
Drone pads fetch bundles from further away. As Plataformas de Drones buscam fardos mais longe.
+{0} m drone reach +{0} m de alcance dos drones
Hive Mind Mente de colmeia
Every robot, Sky Mower and drone works 20% faster. Todo robô, Cortador Aéreo e drone trabalha 20% mais rápido.
Autopilot Piloto automático
C hands it over: it mows and unloads on its own C entrega o controle: corta e descarrega sozinho
autopilot: off to unload piloto automático: indo descarregar
autopilot: nothing left to mow round here piloto automático: não sobrou nada para cortar por aqui
autopilot: mowing piloto automático: cortando
Take over the {0} ({1}, {2} / {3}) Assumir: {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Piloto automático ligado: {0} corta por aqui e descarrega sozinho. Suba de novo para assumir.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD dirigir · SHIFT turbo · R câmera de perseguição · E descer · C piloto automático
Grass Train Trem da Grama
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Assenta os próprios trilhos até uma estação vizinha, cortando grama o caminho todo. Depois vai e volta, os cortadores laterais alcançam mais longe a cada viagem e o que ele corta é pago nas duas pontas. Construa em terreno aberto, virado para onde ele deve ir.
{0}: laying track to {1}, {2} of {3} m {0}: assentando trilhos até {1}, {2} de {3} m
E: another station E: outra estação
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: a linha até {1} está cortada até onde alcança. Uma melhoria alcança mais longe.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: indo a {1} e voltando, cortando {2} m de cada lado, {3} a bordo

View File

@ -223,7 +223,6 @@ FIND GAMES НАЙТИ ИГРУ
First day Первый день
First Delivery Первая поставка
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Пять кило травы за 12 секунд становятся пятью кило сена. Сено стоит втрое дороже травы.
FLEET ТЕХНИКА
Floodlights Прожекторы
Found so far: {0} stakes, {1} points. Пока найдено колышков: {0}, геоточек: {1}.
Foundations Настилы
@ -797,9 +796,9 @@ HOW MUCH LAWN? СКОЛЬКО ГАЗОНА?
EASY ЛЕГКО
NORMAL НОРМАЛЬНО
EXTRA HARD ОЧЕНЬ СЛОЖНО
A planet a third the size, with sectors to match. Earth can wait a little. Планета втрое меньше, и секторы под стать. Земля немного подождёт.
Half the planet, half-size sectors. Still a lot of lawn. Полпланеты, секторы вдвое меньше. Газона всё равно много.
The whole of Herbaria-7, full-size sectors, every blade of it. Вся Гербария-7, секторы в полный размер, до последней травинки.
A sixth of the big planet, sectors to match. Earth can wait a little. Шестая часть большой планеты, и секторы под стать. Земля немного подождёт.
A third of the big planet, smaller sectors. Still a lot of lawn. Треть большой планеты, секторы поменьше. Газона всё равно много.
The big planet: the whole of Herbaria-7, every blade of it. Большая планета: вся Гербария-7, до последней травинки.
DECOR ДЕКОР
Wall Стена
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. Деревянная стена 3 м. Ставится на край настила или перекрытия; R поворачивает её.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME Я
GLOBE ГЛОБУС
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG — двигать · WHEEL — масштаб · SPACE — к себе · M — закрыть
AUTOMATION АВТОМАТИКА
Long Leash Длинный поводок
Robots start further out and mow further from home. Роботы начинают дальше и косят дальше от дома.
+{0}% robot reach +{0}% к дальности роботов
Overdrive Motors Форсаж-моторы
Robots and Sky Mowers drive and mow faster. Роботы и небесные косилки ездят и косят быстрее.
+{0}% robot speed +{0}% к скорости роботов
Bigger Hoppers Большие бункеры
Robots carry more grass before they head home. Роботы набирают больше травы, прежде чем ехать домой.
+{0}% robot hopper +{0}% к бункеру роботов
Long-Range Drones Дальнобойные дроны
Drone pads fetch bundles from further away. Дронопорты забирают снопы издалека.
+{0} m drone reach +{0} м к дальности дронов
Hive Mind Разум улья
Every robot, Sky Mower and drone works 20% faster. Все роботы, небесные косилки и дроны работают на 20% быстрее.
Autopilot Автопилот
C hands it over: it mows and unloads on its own C передаёт управление: косит и разгружается сам
autopilot: off to unload автопилот: едет разгружаться
autopilot: nothing left to mow round here автопилот: тут косить больше нечего
autopilot: mowing автопилот: косит
Take over the {0} ({1}, {2} / {3}) Сесть за руль: {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Автопилот включён: {0} косит здесь и сам разгружается. Садись обратно, чтобы взять управление.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD — ехать · SHIFT — ускорение · R — вид сзади · E — выйти · C автопилот
Grass Train Травяной поезд
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Сам прокладывает себе рельсы до соседней станции и выкашивает всё по пути. Потом курсирует туда и обратно, боковые косилки с каждым рейсом берут всё дальше, а скошенное оплачивается на обоих концах. Ставь на открытой земле, лицом туда, куда ему ехать.
{0}: laying track to {1}, {2} of {3} m {0}: прокладывает путь до станции {1}, {2} из {3} м
E: another station E: другая станция
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: линия до станции {1} выкошена, докуда достаёт. Улучшение достаёт дальше.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: курсирует до станции {1}, косит на {2} м по сторонам, на борту {3}

View File

@ -223,7 +223,6 @@ FIND GAMES OYUN BUL
First day İlk gün
First Delivery İlk Teslimat
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. Beş kilo çim 12 saniyede beş kilo saman olur. Saman üç kat fazla kazandırır.
FLEET FİLO
Floodlights Projektörler
Found so far: {0} stakes, {1} points. Şimdiye kadar bulunan: {0} kazık, {1} nokta.
Foundations Temeller
@ -797,9 +796,9 @@ HOW MUCH LAWN? NE KADAR ÇİM?
EASY KOLAY
NORMAL NORMAL
EXTRA HARD ÇOK ZOR
A planet a third the size, with sectors to match. Earth can wait a little. Üçte bir boyutunda bir gezegen, sektörler de ona göre. Dünya biraz bekleyebilir.
Half the planet, half-size sectors. Still a lot of lawn. Gezegenin yarısı, yarı boyutta sektörler. Yine de bir sürü çim.
The whole of Herbaria-7, full-size sectors, every blade of it. Herbaria-7'nin tamamı, tam boyutlu sektörler, son çim yaprağına kadar.
A sixth of the big planet, sectors to match. Earth can wait a little. Büyük gezegenin altıda biri, sektörler de ona göre. Dünya biraz bekleyebilir.
A third of the big planet, smaller sectors. Still a lot of lawn. Büyük gezegenin üçte biri, daha küçük sektörler. Yine de bolca çim.
The big planet: the whole of Herbaria-7, every blade of it. Büyük gezegen: Herbaria-7'nin tamamı, son çim yaprağına kadar.
DECOR DEKOR
Wall Duvar
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. 3 m ahşap duvar. Bir temelin ya da döşemenin kenarına konur; R ile döner.
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME BEN
GLOBE KÜRE
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG taşı · WHEEL yakınlaş · SPACE sana dön · M kapat
AUTOMATION OTOMASYON
Long Leash Uzun Tasma
Robots start further out and mow further from home. Robotlar daha uzaktan başlar ve evden daha uzağı biçer.
+{0}% robot reach Robot menzili +%{0}
Overdrive Motors Overdrive Motorlar
Robots and Sky Mowers drive and mow faster. Robotlar ve Gök Biçiciler daha hızlı gider ve biçer.
+{0}% robot speed Robot hızı +%{0}
Bigger Hoppers Büyük Hazneler
Robots carry more grass before they head home. Robotlar eve dönmeden önce daha çok çim taşır.
+{0}% robot hopper Robot haznesi +%{0}
Long-Range Drones Uzun Menzilli Dronlar
Drone pads fetch bundles from further away. Dron Pistleri demetleri daha uzaktan toplar.
+{0} m drone reach Dron menzili +{0} m
Hive Mind Kovan Zihni
Every robot, Sky Mower and drone works 20% faster. Her robot, Gök Biçici ve dron %20 daha hızlı çalışır.
Autopilot Otopilot
C hands it over: it mows and unloads on its own C devreder: kendi biçer, kendi boşaltır
autopilot: off to unload otopilot: boşaltmaya gidiyor
autopilot: nothing left to mow round here otopilot: buralarda biçecek bir şey kalmadı
autopilot: mowing otopilot: biçiyor
Take over the {0} ({1}, {2} / {3}) Direksiyona geç: {0} ({1}, {2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. Otopilot açık: {0} buraları biçip kendi boşaltır. Kontrolü almak için yeniden bin.
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD sür · SHIFT turbo · R takip kamerası · E in · C otopilot
Grass Train Çim Treni
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. Komşu bir istasyona kendi rayını döşer ve yol boyunca her şeyi biçer. Sonra gidip gelir, yan biçicileri her seferinde daha uzağa uzanır ve biçtiği çim iki uçta da ödenir. Açık bir zemine, gitmesi gereken yöne bakacak şekilde kur.
{0}: laying track to {1}, {2} of {3} m {0}: {1} istasyonuna ray döşüyor, {2} / {3} m
E: another station E: başka istasyon
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}: {1} hattı uzanabildiği yere kadar biçildi. Yükseltme daha uzağa uzanır.
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}: {1} ile arasında gidip geliyor, iki yanda {2} m biçiyor, içinde {3}

View File

@ -222,7 +222,6 @@ FIND GAMES 寻找游戏
First day 第一天
First Delivery 首次交货
Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much. 五公斤草 12 秒变成五公斤干草。干草的价格是草的三倍。
FLEET 车队
Floodlights 泛光灯
Found so far: {0} stakes, {1} points. 目前已找到:{0} 根测桩,{1} 个勘测点。
Foundations 地基
@ -797,9 +796,9 @@ HOW MUCH LAWN? 要割多少草坪?
EASY 简单
NORMAL 普通
EXTRA HARD 超难
A planet a third the size, with sectors to match. Earth can wait a little. 星球只有三分之一大,扇区也相应缩小。地球可以稍等一下。
Half the planet, half-size sectors. Still a lot of lawn. 半个星球,扇区缩小一半。草坪还是很多。
The whole of Herbaria-7, full-size sectors, every blade of it. 整个 Herbaria-7,扇区全尺寸,一根草都不少。
A sixth of the big planet, sectors to match. Earth can wait a little. 大星球的六分之一,扇区也相应缩小。地球可以稍等一下。
A third of the big planet, smaller sectors. Still a lot of lawn. 大星球的三分之一,扇区更小。草坪还是很多。
The big planet: the whole of Herbaria-7, every blade of it. 大星球:整个 Herbaria-7,一根草都不少。
DECOR 装饰
Wall 墙
A 3 m timber wall. It goes on the edge of a foundation or a floor; R turns it round. 3 米长的木墙。放在地基或楼板的边缘;按 R 旋转。
@ -962,3 +961,32 @@ A big mowing drone. It flies over rocks and hills, works 91 sectors around its p
ME 我
GLOBE 地球仪
DRAG move · WHEEL zoom · SPACE back to you · M close DRAG 移动 · WHEEL 缩放 · SPACE 回到自己 · M 关闭
AUTOMATION 自动化
Long Leash 长牵引绳
Robots start further out and mow further from home. 机器人从更远处开工,离家更远也照割不误。
+{0}% robot reach 机器人范围 +{0}%
Overdrive Motors 超速电机
Robots and Sky Mowers drive and mow faster. 机器人和空中割草机跑得更快、割得更快。
+{0}% robot speed 机器人速度 +{0}%
Bigger Hoppers 大号料斗
Robots carry more grass before they head home. 机器人回家前能装更多草。
+{0}% robot hopper 机器人料斗 +{0}%
Long-Range Drones 远程无人机
Drone pads fetch bundles from further away. 无人机坪能从更远处取回草捆。
+{0} m drone reach 无人机范围 +{0} m
Hive Mind 蜂巢思维
Every robot, Sky Mower and drone works 20% faster. 所有机器人、空中割草机和无人机工作速度提高 20%。
Autopilot 自动驾驶
C hands it over: it mows and unloads on its own 按 C 交给它:自己割草、自己卸货
autopilot: off to unload 自动驾驶:去卸货
autopilot: nothing left to mow round here 自动驾驶:附近没有可割的草了
autopilot: mowing 自动驾驶:割草中
Take over the {0} ({1}, {2} / {3}) 接管{0} ({1},{2} / {3})
Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over. 自动驾驶已开启:{0}会在这附近割草并自己卸货。重新上车即可接管。
WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot WASD 驾驶 · SHIFT 加速 · R 追随视角 · E 下车 · C 自动驾驶
Grass Train 割草火车
Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go. 自己铺轨通往相邻的站点,一路割草。铺通后便来回往返,每跑一趟两侧割刀伸得更远,割下的草在两端结算。请建在空地上,朝向它要去的方向。
{0}: laying track to {1}, {2} of {3} m {0}:正在铺轨前往{1},{2} / {3} m
E: another station E:换一个站点
{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further. {0}:通往{1}的线路已割到够得着的地方。升级后能伸得更远。
{0}: running to {1} and back, cutting {2} m out either side, {3} on board {0}:往返于{1},两侧割到 {2} m,车上 {3}

View File

@ -42,8 +42,8 @@ namespace GrassCutter
NetworkVariable<Vector4> Trip(int i) => i == 0 ? _trip0 : i == 1 ? _trip1 : i == 2 ? _trip2 : _trip3;
/// <summary>Two drones at Mk I, one more per upgrade, four at most.</summary>
int Count => Mathf.Min(Most, 2 + (Piece ? Piece.Tier.Value : 0));
float Fly => Speed * Mathf.Sqrt(Piece ? Piece.TierMul : 1f);
float Reach => Range + RangePerTier * (Piece ? Piece.Tier.Value : 0);
float Fly => Speed * Mathf.Sqrt(Piece ? Piece.TierMul : 1f) * (TeamState.Instance ? TeamState.Instance.DroneSpeedMul : 1f);
float Reach => Range + RangePerTier * (Piece ? Piece.Tier.Value : 0) + (TeamState.Instance ? TeamState.Instance.DroneReachAdd : 0f);
readonly float[] _idleUntil = new float[Most];
float _shipAt;
double Now => NetworkManager ? NetworkManager.ServerTime.Time : Time.timeAsDouble;

View File

@ -14,9 +14,9 @@ namespace GrassCutter
public enum VehicleKind : byte { Push, Rider, Pickup, Tractor, Combine, Hauler, Mulcher, Baler, Count }
public enum TuneId : byte { Motors, Hopper, Turbo, Cruise, Cutter, Release, Lights, Count }
public enum TuneId : byte { Motors, Hopper, Turbo, Cruise, Cutter, Release, Lights, Autopilot, Count }
public enum PerkTree : byte { Containers = 0, Cutting = 1, Suit = 2, Logistics = 3, Economy = 4 }
public enum PerkTree : byte { Containers = 0, Cutting = 1, Suit = 2, Logistics = 3, Economy = 4, Automation = 5 }
public enum PerkId : byte
{
@ -30,13 +30,15 @@ namespace GrassCutter
QuickTwine, BundleLine, ThrowArm, ExpressDepot,
// ECONOMY
EarthPrices, RegionBonus, SupplyDeals, GreenExchange,
// AUTOMATION (after the rest: a save keeps its perks by number)
BotReach, BotSpeed, BotHopper, DroneRange, HiveMind,
Count
}
public enum PieceCat : byte { Services, Logistics, Production, Power, Structures, Decor, Count }
public enum PieceId : byte { Depot, Belt, Splitter, Merger, Square, Hex, Dryer, Press, SolarS, SolarM, SolarL, Garage, Binder, RobotI, RobotII, Reaper, Catcher, Pole, BatteryS, BatteryL, UnloadBay, DronePad, Intake,
Wall, WindowWall, DoorWall, Railing, Fence, Floor, FlatRoof, Roof, Stairs, Steps, Pillar, Planter, Lamppost, Bench, Crates, Flagpole, SkyMower, Count }
Wall, WindowWall, DoorWall, Railing, Fence, Floor, FlatRoof, Roof, Stairs, Steps, Pillar, Planter, Lamppost, Bench, Crates, Flagpole, SkyMower, Train, Count }
/// <summary>How a structure finds its place: anywhere, on the edge of a deck, or on top of the walls (a storey up).</summary>
public enum Fit : byte { Free, Edge, Top }
@ -236,50 +238,65 @@ namespace GrassCutter
Bin(PerkId.BinScythe, Loc.N("Scythe Basket"), Loc.N("A bigger basket for the Scythe."), 3, 30, 80, 190),
Bin(PerkId.BinLongScythe, Loc.N("Long Scythe Basket"), Loc.N("A bigger basket for the Long Scythe."), 4, 45, 110, 260),
Bin(PerkId.BinWideScythe, Loc.N("Two-Handed Scythe Basket"), Loc.N("A bigger basket for the Two-Handed Scythe."), 5, 55, 140, 320),
new PerkDef { id = PerkId.Compactor, tree = PerkTree.Containers, name = Loc.N("Grass Compactor"), icon = "icon_perk_pressure", col = 2, row = 1, prices = new long[] { 150, 450, 1200 },
new PerkDef { id = PerkId.Compactor, tree = PerkTree.Containers, name = Loc.N("Grass Compactor"), icon = "icon_perk_pressure", col = 2, row = 1, prices = new long[] { 150, 600, 2400 },
desc = Loc.N("Tread it down harder. Every tool holds more."), effect = l => Loc.F("All tools +{0}%", l * 15) },
new PerkDef { id = PerkId.AutoBaler, tree = PerkTree.Containers, name = Loc.N("Auto-Binder"), icon = "icon_piece_filler", col = 3, row = 2, prices = new long[] { 2000 }, big = true, requires = new[] { PerkId.Compactor }, requireLevel = 2,
new PerkDef { id = PerkId.AutoBaler, tree = PerkTree.Containers, name = Loc.N("Auto-Binder"), icon = "icon_piece_filler", col = 3, row = 2, prices = new long[] { 5000 }, big = true, requires = new[] { PerkId.Compactor }, requireLevel = 2,
desc = Loc.N("A full basket ties itself into a bundle and drops it at your feet.") },
// ── CUTTING ──
new PerkDef { id = PerkId.WiderBlades, tree = PerkTree.Cutting, name = Loc.N("Wider Blades"), icon = "icon_perk_suction", col = 0, row = 0, prices = new long[] { 40, 140, 400 },
new PerkDef { id = PerkId.WiderBlades, tree = PerkTree.Cutting, name = Loc.N("Wider Blades"), icon = "icon_perk_suction", col = 0, row = 0, prices = new long[] { 40, 180, 700 },
desc = Loc.N("A wider strip with every tool."), effect = l => Loc.F("Strip width +{0:0}%", WidthBonus(l) * 100f) },
new PerkDef { id = PerkId.LongHandles, tree = PerkTree.Cutting, name = Loc.N("Long Handles"), icon = "icon_perk_nozzle", col = 1, row = 0, prices = new long[] { 70, 220 },
new PerkDef { id = PerkId.LongHandles, tree = PerkTree.Cutting, name = Loc.N("Long Handles"), icon = "icon_perk_nozzle", col = 1, row = 0, prices = new long[] { 70, 350 },
desc = Loc.N("Reach further without taking a step."), effect = l => Loc.F("Reach +{0:0.##} m", l * 0.75f) },
new PerkDef { id = PerkId.DeepSwath, tree = PerkTree.Cutting, name = Loc.N("Deep Swath"), icon = "icon_perk_flow", col = 2, row = 0, prices = new long[] { 90, 280 },
new PerkDef { id = PerkId.DeepSwath, tree = PerkTree.Cutting, name = Loc.N("Deep Swath"), icon = "icon_perk_flow", col = 2, row = 0, prices = new long[] { 90, 450 },
desc = Loc.N("The blade bites deeper into the grass."), effect = l => Loc.F("Strip width +{0:0}%", l * 6) },
new PerkDef { id = PerkId.WhetSteel, tree = PerkTree.Cutting, name = Loc.N("Whetstone Steel"), icon = "icon_perk_blast", col = 1, row = 1, prices = new long[] { 1500 }, big = true, requires = new[] { PerkId.WiderBlades, PerkId.LongHandles, PerkId.DeepSwath }, requireLevel = 2,
new PerkDef { id = PerkId.WhetSteel, tree = PerkTree.Cutting, name = Loc.N("Whetstone Steel"), icon = "icon_perk_blast", col = 1, row = 1, prices = new long[] { 4500 }, big = true, requires = new[] { PerkId.WiderBlades, PerkId.LongHandles, PerkId.DeepSwath }, requireLevel = 2,
desc = Loc.N("A razor edge: +10% width and depth, +0.5 m reach.") },
// ── SUIT ──
new PerkDef { id = PerkId.ServoBoots, tree = PerkTree.Suit, name = Loc.N("Servo Boots"), icon = "icon_perk_sneakers", col = 0, row = 0, prices = new long[] { 50, 160, 450 },
new PerkDef { id = PerkId.ServoBoots, tree = PerkTree.Suit, name = Loc.N("Servo Boots"), icon = "icon_perk_sneakers", col = 0, row = 0, prices = new long[] { 50, 200, 800 },
desc = Loc.N("Move faster."), effect = l => Loc.F("Speed +{0}%", l * 7) },
new PerkDef { id = PerkId.SpringStep, tree = PerkTree.Suit, name = Loc.N("Spring Step"), icon = "icon_perk_boots", col = 2, row = 0, prices = new long[] { 80, 250 },
new PerkDef { id = PerkId.SpringStep, tree = PerkTree.Suit, name = Loc.N("Spring Step"), icon = "icon_perk_boots", col = 2, row = 0, prices = new long[] { 80, 400 },
desc = Loc.N("Jump higher."), effect = l => Loc.F("Jump +{0}%", l * 20) },
new PerkDef { id = PerkId.FieldFrame, tree = PerkTree.Suit, name = Loc.N("Field Frame"), icon = "icon_perk_fins", col = 1, row = 1, prices = new long[] { 1200 }, big = true, requires = new[] { PerkId.ServoBoots, PerkId.SpringStep }, requireLevel = 2,
new PerkDef { id = PerkId.FieldFrame, tree = PerkTree.Suit, name = Loc.N("Field Frame"), icon = "icon_perk_fins", col = 1, row = 1, prices = new long[] { 3500 }, big = true, requires = new[] { PerkId.ServoBoots, PerkId.SpringStep }, requireLevel = 2,
desc = Loc.N("A light exoskeleton: +8% speed, +15% jump.") },
// ── LOGISTICS ──
new PerkDef { id = PerkId.QuickTwine, tree = PerkTree.Logistics, name = Loc.N("Quick Twine"), icon = "icon_perk_release", col = 0, row = 0, prices = new long[] { 30, 100, 300 },
new PerkDef { id = PerkId.QuickTwine, tree = PerkTree.Logistics, name = Loc.N("Quick Twine"), icon = "icon_perk_release", col = 0, row = 0, prices = new long[] { 30, 120, 450 },
desc = Loc.N("Tie bundles faster."), effect = l => Loc.F("Bundle time -{0}%", l switch { 1 => 25, 2 => 44, _ => 58 }) },
new PerkDef { id = PerkId.BundleLine, tree = PerkTree.Logistics, name = Loc.N("Bundle Line"), icon = "icon_perk_remote", col = 1, row = 0, prices = new long[] { 60, 200 },
new PerkDef { id = PerkId.BundleLine, tree = PerkTree.Logistics, name = Loc.N("Bundle Line"), icon = "icon_perk_remote", col = 1, row = 0, prices = new long[] { 60, 300 },
desc = Loc.N("Grab bundles from further away."), effect = l => Loc.F("Pick-up reach +{0:0.#} m", l * 1.5f) },
new PerkDef { id = PerkId.ThrowArm, tree = PerkTree.Logistics, name = Loc.N("Throwing Arm"), icon = "icon_perk_beltspeed", col = 2, row = 0, prices = new long[] { 80, 240 },
new PerkDef { id = PerkId.ThrowArm, tree = PerkTree.Logistics, name = Loc.N("Throwing Arm"), icon = "icon_perk_beltspeed", col = 2, row = 0, prices = new long[] { 80, 360 },
desc = Loc.N("Throw bundles further."), effect = l => Loc.F("Throw +{0}%", l * 25) },
new PerkDef { id = PerkId.ExpressDepot, tree = PerkTree.Logistics, name = Loc.N("Express Depot"), icon = "icon_perk_dockpump", col = 1, row = 1, prices = new long[] { 900 }, big = true, requires = new[] { PerkId.QuickTwine }, requireLevel = 2,
new PerkDef { id = PerkId.ExpressDepot, tree = PerkTree.Logistics, name = Loc.N("Express Depot"), icon = "icon_perk_dockpump", col = 1, row = 1, prices = new long[] { 2500 }, big = true, requires = new[] { PerkId.QuickTwine }, requireLevel = 2,
desc = Loc.N("Bundles tie twice as fast and machines unload at the depot twice as fast.") },
// ── ECONOMY ──
new PerkDef { id = PerkId.EarthPrices, tree = PerkTree.Economy, name = Loc.N("Earth Prices"), icon = "icon_perk_contracts", col = 0, row = 0, prices = new long[] { 120, 400, 1100 },
new PerkDef { id = PerkId.EarthPrices, tree = PerkTree.Economy, name = Loc.N("Earth Prices"), icon = "icon_perk_contracts", col = 0, row = 0, prices = new long[] { 150, 900, 3500 },
desc = Loc.N("Earth is desperate for grass. Make it pay."), effect = l => Loc.F("Payout +{0}%", l * 6) },
new PerkDef { id = PerkId.RegionBonus, tree = PerkTree.Economy, name = Loc.N("Sector Bounty"), icon = "icon_perk_purity", col = 2, row = 0, prices = new long[] { 200, 600 },
new PerkDef { id = PerkId.RegionBonus, tree = PerkTree.Economy, name = Loc.N("Sector Bounty"), icon = "icon_perk_purity", col = 2, row = 0, prices = new long[] { 250, 1200 },
desc = Loc.N("More cash for every sector mown clean."), effect = l => Loc.F("+{0} per sector", UIK.Money(l * 15d)) },
new PerkDef { id = PerkId.SupplyDeals, tree = PerkTree.Economy, name = Loc.N("Supply Deals"), icon = "icon_perk_overclock", col = 0, row = 1, prices = new long[] { 250, 700 },
new PerkDef { id = PerkId.SupplyDeals, tree = PerkTree.Economy, name = Loc.N("Supply Deals"), icon = "icon_perk_overclock", col = 0, row = 1, prices = new long[] { 250, 900 },
desc = Loc.N("Tools at the supply wall get cheaper."), effect = l => Loc.F("Tools -{0}%", l * 5) },
new PerkDef { id = PerkId.GreenExchange, tree = PerkTree.Economy, name = Loc.N("Green Exchange"), icon = "icon_star", col = 1, row = 2, prices = new long[] { 2500 }, big = true, requires = new[] { PerkId.EarthPrices }, requireLevel = 2,
new PerkDef { id = PerkId.GreenExchange, tree = PerkTree.Economy, name = Loc.N("Green Exchange"), icon = "icon_star", col = 1, row = 2, prices = new long[] { 12000 }, big = true, requires = new[] { PerkId.EarthPrices }, requireLevel = 2,
desc = Loc.N("A seat on the Earth grass exchange: +10% on every payout.") },
// ── AUTOMATION ──
new PerkDef { id = PerkId.BotReach, tree = PerkTree.Automation, name = Loc.N("Long Leash"), icon = "icon_perk_turnaround", col = 0, row = 0, prices = new long[] { 600, 1800, 5000 },
desc = Loc.N("Robots start further out and mow further from home."), effect = l => Loc.F("+{0}% robot reach", l * 25) },
new PerkDef { id = PerkId.BotSpeed, tree = PerkTree.Automation, name = Loc.N("Overdrive Motors"), icon = "icon_perk_turbo", col = 1, row = 0, prices = new long[] { 800, 2400, 6500 },
desc = Loc.N("Robots and Sky Mowers drive and mow faster."), effect = l => Loc.F("+{0}% robot speed", l * 12) },
new PerkDef { id = PerkId.BotHopper, tree = PerkTree.Automation, name = Loc.N("Bigger Hoppers"), icon = "icon_perk_tankcap", col = 2, row = 0, prices = new long[] { 700, 2600 },
desc = Loc.N("Robots carry more grass before they head home."), effect = l => Loc.F("+{0}% robot hopper", l * 25) },
new PerkDef { id = PerkId.DroneRange, tree = PerkTree.Automation, name = Loc.N("Long-Range Drones"), icon = "icon_perk_dronefleet", col = 3, row = 0, prices = new long[] { 900, 2800, 7000 },
desc = Loc.N("Drone pads fetch bundles from further away."), effect = l => Loc.F("+{0} m drone reach", l * DroneReachStep) },
new PerkDef { id = PerkId.HiveMind, tree = PerkTree.Automation, name = Loc.N("Hive Mind"), icon = "icon_perk_swarm", col = 2, row = 1, prices = new long[] { 15000 }, big = true, requires = new[] { PerkId.BotSpeed, PerkId.DroneRange }, requireLevel = 2,
desc = Loc.N("Every robot, Sky Mower and drone works 20% faster.") },
};
/// <summary>Metres a drone pad reaches further per level of Long-Range Drones.</summary>
public const int DroneReachStep = 20;
public static PerkDef Perk(PerkId id) => Perks[(int)id];
// ───────────────────────── build pieces ─────────────────────────
@ -298,9 +315,9 @@ namespace GrassCutter
desc = Loc.N("A level timber deck on mown ground. What stands on it goes along when you move it.") },
new PieceDef { id = PieceId.Hex, cat = PieceCat.Structures, name = Loc.N("Hex Foundation"), icon = "icon_piece_hexfoundation", model = "SM_Foundation_Hex", prefab = "Piece_Hex", price = 10, sizeX = 3, sizeZ = 3,
desc = Loc.N("A level timber deck on mown ground, turns in steps of 30 degrees.") },
new PieceDef { id = PieceId.Dryer, cat = PieceCat.Production, name = Loc.N("Windmill"), icon = "icon_piece_vaporizer", model = "SM_Windmill", prefab = "Piece_Dryer", price = 500, sizeX = 2, sizeZ = 2, kw = 10f,
new PieceDef { id = PieceId.Dryer, cat = PieceCat.Production, name = Loc.N("Windmill"), icon = "icon_piece_vaporizer", model = "SM_Windmill", prefab = "Piece_Dryer", price = 800, sizeX = 2, sizeZ = 2, kw = 10f,
desc = Loc.N("Five kilos of grass become five of hay in 12 seconds. Hay pays three times as much.") },
new PieceDef { id = PieceId.Press, cat = PieceCat.Production, name = Loc.N("Brick Press"), icon = "icon_piece_cryo", model = "SM_CryoPress", prefab = "Piece_Press", price = 1000, sizeX = 2, sizeZ = 2, kw = 18f,
new PieceDef { id = PieceId.Press, cat = PieceCat.Production, name = Loc.N("Brick Press"), icon = "icon_piece_cryo", model = "SM_CryoPress", prefab = "Piece_Press", price = 2500, sizeX = 2, sizeZ = 2, kw = 18f,
desc = Loc.N("A kilo of grass and a kilo of hay become two kilos of brick in 6 seconds. Brick pays seven times as much.") },
new PieceDef { id = PieceId.SolarS, cat = PieceCat.Power, name = Loc.N("Solar Post"), icon = "icon_piece_solars", prefab = "Piece_SolarS", price = 75,
desc = Loc.N("3 kW within 16 m, less when the sun is low, nothing at night.") },
@ -314,21 +331,21 @@ namespace GrassCutter
desc = Loc.N("E hands it what's in your tool. It ties the grass into bundles and puts them on the belt at its front.") },
new PieceDef { id = PieceId.RobotI, cat = PieceCat.Services, name = Loc.N("Robot Mk I"), icon = "icon_piece_robot", model = "SM_RobotDock", prefab = "Piece_RobotI", price = 250, sizeX = 3, sizeZ = 3,
desc = Loc.N("Mows the sectors around its dock, then further out once they are done. With a belt the dock sends bundles down it, without one it ships the grass to Earth itself.") },
new PieceDef { id = PieceId.RobotII, cat = PieceCat.Services, name = Loc.N("Robot Mk II"), icon = "icon_piece_robot2", model = "SM_RobotDock", prefab = "Piece_RobotII", price = 500, sizeX = 3, sizeZ = 3,
new PieceDef { id = PieceId.RobotII, cat = PieceCat.Services, name = Loc.N("Robot Mk II"), icon = "icon_piece_robot2", model = "SM_RobotDock", prefab = "Piece_RobotII", price = 900, sizeX = 3, sizeZ = 3,
desc = Loc.N("Starts with 37 sectors, a wider cut and a bigger hopper.") },
new PieceDef { id = PieceId.Reaper, cat = PieceCat.Services, name = Loc.N("Reaper"), icon = "icon_piece_reaper", model = "SM_Reaper", prefab = "Piece_Reaper", price = 20000, sizeX = 3, sizeZ = 4,
new PieceDef { id = PieceId.Reaper, cat = PieceCat.Services, name = Loc.N("Reaper"), icon = "icon_piece_reaper", model = "SM_Reaper", prefab = "Piece_Reaper", price = 60000, sizeX = 3, sizeZ = 4,
desc = Loc.N("Goes from sector to sector on its own and shoots every bundle into a Bundle Catcher, from anywhere on the planet.") },
new PieceDef { id = PieceId.Catcher, cat = PieceCat.Services, name = Loc.N("Bundle Catcher"), icon = "icon_piece_catcher", model = "SM_BundleCatcher", prefab = "Piece_Catcher", price = 1500, sizeX = 3, sizeZ = 3,
new PieceDef { id = PieceId.Catcher, cat = PieceCat.Services, name = Loc.N("Bundle Catcher"), icon = "icon_piece_catcher", model = "SM_BundleCatcher", prefab = "Piece_Catcher", price = 3000, sizeX = 3, sizeZ = 3,
desc = Loc.N("Holds 100 kg of what Reapers shoot and puts it on the belt.") },
new PieceDef { id = PieceId.Pole, cat = PieceCat.Power, name = Loc.N("Power Pole"), icon = "icon_piece_pole", model = "SM_Prop_Power_Pole_01", prefab = "Piece_Pole", price = 25, scale = 0.62f,
desc = Loc.N("Carries the network 30 m further. Poles reach each other and everything around them.") },
new PieceDef { id = PieceId.BatteryS, cat = PieceCat.Power, name = Loc.N("Battery Rack"), icon = "icon_piece_battery", model = "SM_BatteryRack", prefab = "Piece_BatteryS", price = 250, sizeX = 2, sizeZ = 2,
desc = Loc.N("Stores 5 kWh of spare sun and gives it back at up to 10 kW when the panels fall short, within 12 m.") },
new PieceDef { id = PieceId.BatteryL, cat = PieceCat.Power, name = Loc.N("Battery Bank"), icon = "icon_piece_batteryl", model = "SM_BatteryBank", prefab = "Piece_BatteryL", price = 1000, sizeX = 3, sizeZ = 2,
new PieceDef { id = PieceId.BatteryL, cat = PieceCat.Power, name = Loc.N("Battery Bank"), icon = "icon_piece_batteryl", model = "SM_BatteryBank", prefab = "Piece_BatteryL", price = 1800, sizeX = 3, sizeZ = 2,
desc = Loc.N("Stores 25 kWh and gives back up to 40 kW, within 16 m. A windmill and a press run all night on one.") },
new PieceDef { id = PieceId.UnloadBay, cat = PieceCat.Logistics, name = Loc.N("Unload Bay"), icon = "icon_piece_unloadbay", model = "SM_UnloadBay", prefab = "Piece_UnloadBay", price = 150, sizeX = 4, sizeZ = 7,
desc = Loc.N("Drive a mower onto the grate and it empties into the bin. Two hatches at the back put it on belts as bundles.") },
new PieceDef { id = PieceId.DronePad, cat = PieceCat.Logistics, name = Loc.N("Drone Pad"), icon = "icon_piece_dronepad", model = "SM_DronePad", prefab = "Piece_DronePad", price = 600, sizeX = 3, sizeZ = 3, scale = 3.2f,
new PieceDef { id = PieceId.DronePad, cat = PieceCat.Logistics, name = Loc.N("Drone Pad"), icon = "icon_piece_dronepad", model = "SM_DronePad", prefab = "Piece_DronePad", price = 900, sizeX = 3, sizeZ = 3, scale = 3.2f,
desc = Loc.N("Its drones fly out to bundles of grass lying loose within 70 m (25 m more per upgrade) and bring them in. With a belt on the front hatch they go down it, without one straight to Earth. Two drones, one more per upgrade.") },
new PieceDef { id = PieceId.Intake, cat = PieceCat.Services, company = true, name = Loc.N("Base Intake"), icon = "icon_piece_hopper", model = "SM_BaseIntake", prefab = "Piece_Intake", sizeX = 3, sizeZ = 2,
desc = Loc.N("A low hopper against the side of the base: drop grass in or run a belt to it, and it's paid and on its way to Earth.") },
@ -367,8 +384,10 @@ namespace GrassCutter
new PieceDef { id = PieceId.Flagpole, cat = PieceCat.Decor, name = Loc.N("Flagpole"), icon = "icon_piece_flagpole", model = "SM_Flagpole", prefab = "Piece_Flagpole", price = 5, sizeX = 1, sizeZ = 1,
desc = Loc.N("The crew's own flag, four metres up.") },
// (appended: the list follows PieceId, and saves keep the ids)
new PieceDef { id = PieceId.SkyMower, cat = PieceCat.Services, name = Loc.N("Sky Mower"), icon = "icon_piece_skymower", model = "SM_DronePad", prefab = "Piece_SkyMower", price = 4000, sizeX = 3, sizeZ = 3, scale = 3.2f,
new PieceDef { id = PieceId.SkyMower, cat = PieceCat.Services, name = Loc.N("Sky Mower"), icon = "icon_piece_skymower", model = "SM_DronePad", prefab = "Piece_SkyMower", price = 9000, sizeX = 3, sizeZ = 3, scale = 3.2f,
desc = Loc.N("A big mowing drone. It flies over rocks and hills, works 91 sectors around its pad and goes further out once they are mown. No belt needed: the pad sends the grass to Earth.") },
new PieceDef { id = PieceId.Train, cat = PieceCat.Services, name = Loc.N("Grass Train"), icon = "icon_piece_train", model = "SM_TrainStation", prefab = "Piece_Train", price = 12000, sizeX = 4, sizeZ = 8,
desc = Loc.N("Lays its own track to a station next door, mowing all the way there. Then it runs back and forth, its side cutters reaching further out on every run, and what it cuts is paid for at either end. Build it on open ground facing the way it should go.") },
};
public static PieceDef Piece(PieceId id) => Pieces[(int)id];
@ -384,7 +403,7 @@ namespace GrassCutter
{
case PieceId.Belt: case PieceId.Splitter: case PieceId.Merger: return UpgradeKind.Belt;
case PieceId.Dryer: case PieceId.Press: case PieceId.Binder: return UpgradeKind.Machine;
case PieceId.RobotI: case PieceId.RobotII: case PieceId.Reaper: case PieceId.SkyMower: return UpgradeKind.Robot;
case PieceId.RobotI: case PieceId.RobotII: case PieceId.Reaper: case PieceId.SkyMower: case PieceId.Train: return UpgradeKind.Robot;
case PieceId.Garage: case PieceId.UnloadBay: case PieceId.Catcher: case PieceId.DronePad: return UpgradeKind.Silo;
default: return UpgradeKind.None;
}
@ -519,19 +538,19 @@ namespace GrassCutter
{
new VehicleDef { kind = VehicleKind.Push, name = Loc.N("Push Mower"), icon = "icon_vehicle_push", price = 300, width = 1.35f, hopper = 100f, speed = 5f, accel = 7f, turn = 3f,
desc = Loc.N("The first step up from a scythe: a wide strip at walking pace.") },
new VehicleDef { kind = VehicleKind.Rider, name = Loc.N("Garden Rider"), icon = "icon_vehicle_ski", price = 1000, width = 2f, hopper = 500f, speed = 9.7f, accel = 11f, turn = 2.2f,
new VehicleDef { kind = VehicleKind.Rider, name = Loc.N("Garden Rider"), icon = "icon_vehicle_ski", price = 1200, width = 2f, hopper = 500f, speed = 9.7f, accel = 11f, turn = 2.2f,
desc = Loc.N("Sit down, drive, mow. Unloads at a garage pad.") },
new VehicleDef { kind = VehicleKind.Pickup, name = Loc.N("Pickup"), icon = "icon_vehicle_hover", price = 2000, speed = 14f, accel = 10f, turn = 1.8f, bed = 4, seatDrop = 0.56f, seatAhead = 0.12f,
new VehicleDef { kind = VehicleKind.Pickup, name = Loc.N("Pickup"), icon = "icon_vehicle_hover", price = 2500, speed = 14f, accel = 10f, turn = 1.8f, bed = 4, seatDrop = 0.56f, seatAhead = 0.12f,
desc = Loc.N("Doesn't mow. Fast, and carries four bundles: E loads the one in your arms, T tips them out.") },
new VehicleDef { kind = VehicleKind.Tractor, name = Loc.N("Mowing Tractor"), icon = "icon_vehicle_tug", price = 2500, width = 2.8f, hopper = 1200f, speed = 9f, accel = 8f, turn = 1.5f, seatDrop = 0.42f,
new VehicleDef { kind = VehicleKind.Tractor, name = Loc.N("Mowing Tractor"), icon = "icon_vehicle_tug", price = 4000, width = 2.8f, hopper = 1200f, speed = 9f, accel = 8f, turn = 1.5f, seatDrop = 0.42f,
desc = Loc.N("A proper machine for proper fields.") },
new VehicleDef { kind = VehicleKind.Combine, name = Loc.N("Combine"), icon = "icon_vehicle_combine", price = 6000, width = 3.7f, hopper = 3000f, speed = 8f, accel = 5f, turn = 1.3f, seatDrop = 0.45f,
new VehicleDef { kind = VehicleKind.Combine, name = Loc.N("Combine"), icon = "icon_vehicle_combine", price = 15000, width = 3.7f, hopper = 3000f, speed = 8f, accel = 5f, turn = 1.3f, seatDrop = 0.45f,
desc = Loc.N("Slow to turn, and nothing else cuts as wide or carries as much.") },
new VehicleDef { kind = VehicleKind.Hauler, name = Loc.N("Haul Tractor"), icon = "icon_vehicle_hauler", price = 4000, width = 1.6f, hopper = 4000f, speed = 12f, accel = 8f, turn = 1.4f, seatDrop = 0.18f,
new VehicleDef { kind = VehicleKind.Hauler, name = Loc.N("Haul Tractor"), icon = "icon_vehicle_hauler", price = 7000, width = 1.6f, hopper = 4000f, speed = 12f, accel = 8f, turn = 1.4f, seatDrop = 0.18f,
desc = Loc.N("A narrow cutter and a huge tank on a trailer: mow far out, come back once.") },
new VehicleDef { kind = VehicleKind.Mulcher, name = Loc.N("Wide Mulcher"), icon = "icon_vehicle_mulcher", price = 8000, width = 5.5f, hopper = 900f, speed = 7f, accel = 5f, turn = 1.1f, seatDrop = 0.18f,
new VehicleDef { kind = VehicleKind.Mulcher, name = Loc.N("Wide Mulcher"), icon = "icon_vehicle_mulcher", price = 20000, width = 5.5f, hopper = 900f, speed = 7f, accel = 5f, turn = 1.1f, seatDrop = 0.18f,
desc = Loc.N("Wings out to five and a half metres. Fills fast: put an Unload Bay near the field.") },
new VehicleDef { kind = VehicleKind.Baler, name = Loc.N("Baler Tractor"), icon = "icon_vehicle_baler", price = 3500, width = 2.2f, hopper = 600f, speed = 9f, accel = 8f, turn = 1.5f, bales = true,
new VehicleDef { kind = VehicleKind.Baler, name = Loc.N("Baler Tractor"), icon = "icon_vehicle_baler", price = 6000, width = 2.2f, hopper = 600f, speed = 9f, accel = 8f, turn = 1.5f, bales = true,
desc = Loc.N("Bales as it goes: pull up beside the start of any belt and its chute feeds the belt, five bundles a second.") },
};
@ -539,19 +558,21 @@ namespace GrassCutter
public static readonly TuneDef[] Tunes =
{
new TuneDef { id = TuneId.Motors, name = Loc.N("Tuned Motors"), prices = new long[] { 250, 600, 1500 }, effect = l => Loc.F("+{0}% speed and pull", l * 10) },
new TuneDef { id = TuneId.Hopper, name = Loc.N("Big Hopper"), prices = new long[] { 200, 500, 1200 }, effect = l => Loc.F("+{0}% hopper", l * 30) },
new TuneDef { id = TuneId.Turbo, name = Loc.N("Turbo Kit"), prices = new long[] { 400, 1200 }, effect = l => Loc.F("SHIFT boost {0:0}%", BoostMul(l) * 100f) },
new TuneDef { id = TuneId.Motors, name = Loc.N("Tuned Motors"), prices = new long[] { 250, 900, 3000 }, effect = l => Loc.F("+{0}% speed and pull", l * 10) },
new TuneDef { id = TuneId.Hopper, name = Loc.N("Big Hopper"), prices = new long[] { 200, 700, 2400 }, effect = l => Loc.F("+{0}% hopper", l * 30) },
new TuneDef { id = TuneId.Turbo, name = Loc.N("Turbo Kit"), prices = new long[] { 400, 2000 }, effect = l => Loc.F("SHIFT boost {0:0}%", BoostMul(l) * 100f) },
new TuneDef { id = TuneId.Cruise, name = Loc.N("Cruise Control"), prices = new long[] { 500 }, effect = l => Loc.T("C holds your speed") },
new TuneDef { id = TuneId.Cutter, name = Loc.N("Cutter Control"), prices = new long[] { 400, 900, 2000 }, effect = l => Loc.F("Strip +{0}% at {1:0}% speed", l * 25, CutterSpeed(l) * 100f) },
new TuneDef { id = TuneId.Cutter, name = Loc.N("Cutter Control"), prices = new long[] { 400, 1400, 4000 }, effect = l => Loc.F("Strip +{0}% at {1:0}% speed", l * 25, CutterSpeed(l) * 100f) },
new TuneDef { id = TuneId.Release, name = Loc.N("Quick Release"), prices = new long[] { 150, 400 }, effect = l => Loc.F("+{0}% unloading", l * 50) },
new TuneDef { id = TuneId.Lights, name = Loc.N("Floodlights"), prices = new long[] { 100, 300 }, effect = l => Loc.F("+{0}% light at night", l * 60) },
new TuneDef { id = TuneId.Autopilot, name = Loc.N("Autopilot"), prices = new long[] { 1500 }, effect = l => Loc.T("C hands it over: it mows and unloads on its own") },
};
public static TuneDef Tune(TuneId t) => Tunes[(int)t];
/// <summary>Upgrades cost more on dearer machines, from half to three times the listed price.</summary>
public static double TunePrice(VehicleKind k, TuneId t, int level) => System.Math.Round(Tune(t).prices[level] * System.Math.Min(3d, System.Math.Max(0.5d, Vehicle(k).price / 1000d)), 2);
public static bool TuneFits(VehicleKind k, TuneId t) => Vehicle(k).bed == 0 || (t != TuneId.Hopper && t != TuneId.Cutter && t != TuneId.Release);
public static bool TuneFits(VehicleKind k, TuneId t) => t == TuneId.Autopilot ? Vehicle(k).bed == 0 && Vehicle(k).width > 0f
: Vehicle(k).bed == 0 || (t != TuneId.Hopper && t != TuneId.Cutter && t != TuneId.Release);
public static float BoostMul(int level) => level >= 2 ? 1.65f : level == 1 ? 1.5f : 1.25f;
public static float CutterSpeed(int level) => level >= 3 ? 0.6f : level == 2 ? 0.72f : level == 1 ? 0.85f : 1f;
public static float VehicleTankMul(int level) => 1f + level * 0.3f;

View File

@ -53,7 +53,9 @@ namespace GrassCutter
BuildPiece _bp;
/// <summary>The dock's upgrade level makes the robot faster and its hopper bigger.</summary>
protected float Boost => (_bp ? _bp : (_bp = GetComponent<BuildPiece>())) ? _bp.TierMul : 1f;
public float HopperCap => Def.hopper * Boost;
public float HopperCap => Def.hopper * Boost * (TeamState.Instance ? TeamState.Instance.BotHopperMul : 1f);
/// <summary>The crew's automation perks.</summary>
protected float PerkSpeed => TeamState.Instance ? TeamState.Instance.BotSpeedMul : 1f;
public RobotMood Doing => (RobotMood)Mood.Value;
protected abstract Transform Body { get; }
@ -312,7 +314,7 @@ namespace GrassCutter
// not RotateTowards: it calls anything under a tenth of a degree "there already", and that is 4 m on this ball
var gap = goal - Dir;
// on the way somewhere (to a sector, home to unload) it goes faster than it mows
float step = Def.speed * Boost * (Homing || _travel ? TravelMul : 1f) * dt / Planet.Radius;
float step = Def.speed * Boost * PerkSpeed * (Homing || _travel ? TravelMul : 1f) * dt / Planet.Radius;
if (gap.magnitude > step) Dir = (Dir + gap.normalized * step).normalized;
else
{

View File

@ -23,8 +23,10 @@ namespace GrassCutter
protected override Transform Body => bot;
protected override bool NoseOnBack => true;
protected override Vector3 Origin => transform.position;
protected override int Reach => _reach > 0 ? _reach : Def.reach;
int MaxReach => Def.reach * 4;
protected override int Reach => Mathf.Min(MaxReach, Mathf.Max(_reach, StartReach));
/// <summary>Where it starts: its own reach, and Long Leash puts it further out.</summary>
int StartReach => Def.reach + (TeamState.Instance ? TeamState.Instance.BotReachRings : 0);
int MaxReach => Mathf.Max(StartReach, Mathf.RoundToInt(Def.reach * 4 * (TeamState.Instance ? TeamState.Instance.BotRoamMul : 1f)));
protected override Vector3 HomeDir => Planet.Up(transform.position);
public override string Prompt
@ -98,7 +100,7 @@ namespace GrassCutter
public override void Moved(Vector3 at)
{
base.Moved(at);
_reach = Def.reach;
_reach = 0;
_area = 0;
}
}

View File

@ -18,6 +18,9 @@ namespace GrassCutter
public float tank;
public int[] tune;
public Vector2[] bed;
/// <summary>On autopilot (<see cref="Vehicle.AutoJob"/>, 0 off), and the spot and way it was started from.</summary>
public int auto;
public Vector3 home, fwd;
}
/// <summary>Where a garage puts a machine: its pad, or if it's gone, at the base along the ramp in the first free spot.</summary>
@ -141,6 +144,7 @@ namespace GrassCutter
{
if (!v || !v.IsSpawned) continue;
var s = new VehicleSave { kind = (int)v.kind, key = v.Crew.Value.ToString(), at = v.transform.position, turn = v.transform.rotation, tank = v.Tank.Value };
if (!v.HasDriver) v.AutoState(out s.auto, out s.home, out s.fwd);
s.tune = new int[v.Tuned.Count];
for (int i = 0; i < s.tune.Length; i++) s.tune[i] = v.Tuned[i];
s.bed = new Vector2[v.Bed.Count];
@ -161,6 +165,7 @@ namespace GrassCutter
v.Tank.Value = s.tank;
if (s.tune != null) for (int i = 0; i < s.tune.Length && i < v.Tuned.Count; i++) v.Tuned[i] = (byte)s.tune[i];
if (s.bed != null) foreach (var b in s.bed) v.Bed.Add(b);
if (s.auto != 0) v.ServerResumeAuto(s.home, s.fwd);
}
}
}

View File

@ -46,6 +46,8 @@ namespace GrassCutter
public int ver;
/// <summary>How big the ball is: 0 the whole planet (every save from before there was a choice), 1 half, 2 a third.</summary>
public int level;
/// <summary>Which set of planet sizes (<see cref="Difficulties.NewGen"/>): 0 for every save from before.</summary>
public int sizeGen;
public double money, shipped, mown;
/// <summary>Time of day: the first morning begins here.</summary>
public float day = 0.75f;
@ -86,7 +88,7 @@ namespace GrassCutter
Tiles.OnListChanged += _ => { TilesChanged?.Invoke(); Changed?.Invoke(); };
if (!IsServer)
{
Difficulties.Apply((Difficulty)Size.Value);
Difficulties.ApplyWire(Size.Value);
MowMap.Reset(); // the host sends what has been cut
}
WatchSectors();
@ -140,6 +142,15 @@ namespace GrassCutter
public float BundleSeconds => GameDefs.BundleSeconds(Level(PerkId.QuickTwine), Level(PerkId.ExpressDepot));
/// <summary>Rings a robot starts further out, from Long Leash.</summary>
public int BotReachRings => Level(PerkId.BotReach);
/// <summary>How far out a robot may roam, against its own limit.</summary>
public float BotRoamMul => 1f + Level(PerkId.BotReach) * 0.25f;
public float BotSpeedMul => (1f + Level(PerkId.BotSpeed) * 0.12f) * (Has(PerkId.HiveMind) ? 1.2f : 1f);
public float BotHopperMul => 1f + Level(PerkId.BotHopper) * 0.25f;
public float DroneReachAdd => Level(PerkId.DroneRange) * GameDefs.DroneReachStep;
public float DroneSpeedMul => Has(PerkId.HiveMind) ? 1.2f : 1f;
public float PayoutMul => GameDefs.PayoutMul(Level(PerkId.EarthPrices), Level(PerkId.GreenExchange));
public double ToolPrice(ToolDef d) => d.id == ToolId.Hammer ? d.price : Math.Round(d.price * (double)GameDefs.ToolPriceMul(Level(PerkId.SupplyDeals)), 2);
@ -325,7 +336,7 @@ namespace GrassCutter
public void Save()
{
if (!IsServer) return;
var d = new SaveData { ver = 6, level = Size.Value, money = Money.Value, shipped = Shipped.Value, mown = Mown.Value, crew = _crew, day = Sun.Phase, vehicles = PackVehicles(), banned = _banned };
var d = new SaveData { ver = 6, level = (int)Difficulties.Current, sizeGen = Difficulties.Gen, money = Money.Value, shipped = Shipped.Value, mown = Mown.Value, crew = _crew, day = Sun.Phase, vehicles = PackVehicles(), banned = _banned };
d.perks = new int[Perks.Count];
for (int i = 0; i < Perks.Count; i++) d.perks[i] = Perks[i];
d.tiles = new int[Tiles.Count];
@ -356,8 +367,8 @@ namespace GrassCutter
// the ball first: the mow map, the stakes and every piece go down on it
var level = fresh ? Difficulties.Chosen : (Difficulty)d.level;
if (fresh && CommandLine.Get("-difficulty") is string forced && byte.TryParse(forced, out byte f)) level = (Difficulty)f;
Difficulties.Apply(level);
Size.Value = (byte)Difficulties.Current;
Difficulties.Apply(level, fresh ? Difficulties.NewGen : d.sizeGen);
Size.Value = Difficulties.Wire;
MowMap.Reset();
if (!fresh) LoadMow();
Money.Value = d.money;

View File

@ -0,0 +1,434 @@
using System.Collections.Generic;
using System.Linq;
using Unity.Netcode;
using UnityEngine;
namespace GrassCutter
{
/// <summary>
/// The grass train. Built at a base, it lays its own track to a station next door (the one most in front of it, E picks
/// another while the track is short), mowing a strip under the rails all the way. Once the track gets there it runs
/// back and forth, its side cutters reaching one strip further out on every run until they reach as far as they can,
/// and what it cuts is paid for at either end. The host moves it; every peer draws the track and the train from the
/// same few numbers (where to, how much is laid, where the head is).
/// </summary>
public class Train : NetworkBehaviour, IInteractable, IPieceState
{
public Transform loco;
public Transform[] wagons;
/// <summary>Track points every two metres; the first stretch runs straight off the platform.</summary>
const float Step = 2f, Lead = 24f, StopShort = 16f;
/// <summary>Metres a second laying track and running on it, at Mk I.</summary>
const float LaySpeed = 2.4f, RunSpeed = 8f;
/// <summary>Strip cut under the rails, and the width each side cutter adds on a run.</summary>
const float Strip = 3.4f, Arm = 3f;
/// <summary>How far out the side cutters reach at Mk I, either side of the track.</summary>
const float Reach = 18f;
const float WaitAtEnd = 6f, Hold = 6000f, Gap = 5.2f, Gauge = 1.5f;
/// <summary>The station it is laying track to (255: not chosen yet).</summary>
public readonly NetworkVariable<byte> Target = new NetworkVariable<byte>(255);
/// <summary>Metres of track down.</summary>
public readonly NetworkVariable<float> Laid = new NetworkVariable<float>();
/// <summary>Where the locomotive is along the track, in metres from the platform.</summary>
public readonly NetworkVariable<float> At = new NetworkVariable<float>();
/// <summary>Runs since the track was finished: run n cuts the n-th strip out either side.</summary>
public readonly NetworkVariable<int> Runs = new NetworkVariable<int>();
public readonly NetworkVariable<float> Hopper = new NetworkVariable<float>();
readonly List<Vector3> _pts = new List<Vector3>();
readonly List<float> _cum = new List<float>();
float _length, _wait, _shown = -1f;
BuildPiece _bp;
BuildPiece Piece => _bp ? _bp : (_bp = GetComponent<BuildPiece>());
TeamState Ts => TeamState.Instance;
float Mul => (Piece ? Piece.TierMul : 1f) * (Ts ? Ts.BotSpeedMul : 1f);
float MaxOut => Reach * (Piece ? Piece.TierMul : 1f);
/// <summary>Where the train stands at home: far enough along for every wagon to be on the rails.</summary>
float HomeAt => Mathf.Min(_length, (wagons != null ? wagons.Length : 0) * Gap + 1f);
float Inner => Strip * 0.5f + (Runs.Value - 1) * Arm;
bool Laying => Laid.Value < _length - 0.01f;
bool RouteDone => !Laying && Runs.Value > 0 && Inner >= MaxOut;
// ───────────────────────── life ─────────────────────────
readonly List<(Transform t, Quaternion rest, float r)> _wheels = new List<(Transform, Quaternion, float)>();
Transform _reel;
Quaternion _reelRest;
float _rolled, _reelAngle, _lastShown = -1f;
void Awake()
{
// the wheels turn as it goes, the cutter reel on the nose spins while it cuts
foreach (var root in new[] { loco }.Concat(wagons ?? new Transform[0]))
{
if (!root) continue;
foreach (var t in root.GetComponentsInChildren<Transform>(true))
{
if (t.name.StartsWith("Wheel"))
{
var mf = t.GetComponent<MeshFilter>();
float rad = mf && mf.sharedMesh ? Mathf.Max(0.1f, mf.sharedMesh.bounds.extents.y) : 0.4f;
_wheels.Add((t, t.localRotation, rad));
}
else if (t.name == "Reel") { _reel = t; _reelRest = t.localRotation; }
}
}
}
public override void OnNetworkSpawn()
{
Target.OnValueChanged += (_, __) => Route();
if (IsServer && Target.Value == 255) Target.Value = Pick(-1);
Route();
}
public override void OnNetworkDespawn()
{
if (_track) Destroy(_track);
}
public override void OnDestroy()
{
if (_track) Destroy(_track);
base.OnDestroy();
}
/// <summary>A station next to the one this stands by, the most in front of it after <paramref name="after"/>.</summary>
byte Pick(int after)
{
var p = transform.position;
var up = Planet.Up(p);
var fwd = Vector3.ProjectOnPlane(transform.forward, up).normalized;
int home = Stations.Nearest(p);
var near = new List<(int i, float score)>();
for (int i = 0; i < Stations.Count; i++)
{
if (i == home) continue;
var d = Stations.Dir(i);
// the twelve stations stand on an icosahedron: the five next door are a dot of 0.447 away
if (Vector3.Dot(d, Stations.Dir(home)) < 0.3f) continue;
near.Add((i, Vector3.Dot(Vector3.ProjectOnPlane(d - up, up).normalized, fwd)));
}
if (near.Count == 0) return (byte)(home == 0 ? 1 : 0);
near.Sort((a, b) => b.score.CompareTo(a.score));
if (after < 0) return (byte)near[0].i;
int k = near.FindIndex(n => n.i == after);
return (byte)near[(k + 1) % near.Count].i;
}
void Route()
{
_pts.Clear();
_cum.Clear();
_length = 0f;
ClearTrack();
if (Target.Value >= Stations.Count) return;
var up = Planet.Up(transform.position);
var fwd = Vector3.ProjectOnPlane(transform.forward, up).normalized;
// from the buffer stop at the back of the platform
var a = transform.position - fwd * 3.6f;
var lead = Planet.Surface(a + fwd * Lead);
// off the platform in a straight ramp down to the ground
int n = Mathf.CeilToInt(Lead / Step);
for (int i = 0; i < n; i++)
{
var g = Planet.Surface(Vector3.Lerp(a, lead, i / (float)n));
float t = i / (float)n;
_pts.Add(Vector3.Lerp(a, g, Mathf.SmoothStep(0f, 1f, t)));
}
// then the great circle to the station, stopping short of its yard
var from = Planet.Up(lead);
var to = Stations.Dir(Target.Value);
float ang = Mathf.Acos(Mathf.Clamp(Vector3.Dot(from, to), -1f, 1f));
float full = ang * Planet.Radius, arc = Mathf.Max(Step, full - StopShort);
int m = Mathf.Max(1, Mathf.CeilToInt(arc / Step));
for (int j = 0; j <= m; j++) _pts.Add(Planet.OnSurface(Vector3.Slerp(from, to, j * arc / m / full)));
_cum.Add(0f);
for (int i = 1; i < _pts.Count; i++) _cum.Add(_cum[i - 1] + Vector3.Distance(_pts[i - 1], _pts[i]));
_length = _cum[_cum.Count - 1];
}
/// <summary>The point this far along the track.</summary>
Vector3 Pos(float d)
{
if (_pts.Count == 0) return transform.position;
d = Mathf.Clamp(d, 0f, _length);
int lo = 0, hi = _cum.Count - 1;
while (hi - lo > 1)
{
int mid = (lo + hi) >> 1;
if (_cum[mid] <= d) lo = mid; else hi = mid;
}
float seg = _cum[hi] - _cum[lo];
return Vector3.Lerp(_pts[lo], _pts[hi], seg > 1e-4f ? (d - _cum[lo]) / seg : 0f);
}
Vector3 Ahead(float d) => (Pos(d + 1f) - Pos(d - 1f)).normalized;
// ───────────────────────── the host runs it ─────────────────────────
void Update()
{
if (!IsSpawned) return;
if (IsServer && _length > 0f) Run(Time.deltaTime);
Draw();
}
void Run(float dt)
{
if (_wait > 0f) { _wait -= dt; return; }
if (Laying)
{
float was = Laid.Value, now = Mathf.Min(_length, was + LaySpeed * Mul * dt);
Laid.Value = now;
At.Value = now;
Cut(was, now, 0f, Strip);
if (!Laying) Arrive(1);
return;
}
if (Runs.Value <= 0) { Runs.Value = 1; return; }
bool done = RouteDone;
// odd runs come home, even ones go out; with nothing left in reach it goes home and waits there
float goal = done || Runs.Value % 2 == 1 ? HomeAt : _length;
float a = At.Value, b = Mathf.MoveTowards(a, goal, RunSpeed * Mul * dt);
if (b != a) At.Value = b;
if (!done) Cut(a, b, Inner, Mathf.Min(Arm, MaxOut - Inner));
if (Mathf.Abs(b - goal) < 0.01f)
{
if (done) Ship();
else Arrive(Runs.Value + 1);
}
}
void Arrive(int nextRun)
{
Ship();
_wait = WaitAtEnd;
Runs.Value = nextRun;
}
void Ship()
{
if (Hopper.Value <= 0.01f || !Ts) return;
Ts.DepositRpc(Hopper.Value, (byte)CargoKind.Grass, Pos(At.Value));
Hopper.Value = 0f;
}
/// <summary>Mows along the track from a to b: under it (offset 0), or a strip either side starting this far out.</summary>
void Cut(float a, float b, float offset, float width)
{
if (width <= 0.05f || Mathf.Abs(b - a) < 1e-4f) return;
float kg = 0f;
int n = Mathf.Max(1, Mathf.CeilToInt(Mathf.Abs(b - a) / Step));
for (int k = 0; k < n; k++)
{
float d0 = Mathf.Lerp(a, b, k / (float)n), d1 = Mathf.Lerp(a, b, (k + 1) / (float)n);
var p0 = Pos(d0);
var p1 = Pos(d1);
if (offset <= 0f) { kg += MowMap.Cut(Planet.Surface(p0), Planet.Surface(p1), width, 0f, MowMap.PaintFeather); continue; }
var up = Planet.Up(p0);
var side = Vector3.Cross(up, Ahead(d0)).normalized;
float o = offset + width * 0.5f;
kg += MowMap.Cut(Planet.Surface(p0 + side * o), Planet.Surface(p1 + side * o), width, 0f, MowMap.PaintFeather);
kg += MowMap.Cut(Planet.Surface(p0 - side * o), Planet.Surface(p1 - side * o), width, 0f, MowMap.PaintFeather);
}
Hopper.Value = Mathf.Min(Hold, Hopper.Value + kg * GameDefs.GrassDensity);
}
// ───────────────────────── what everyone sees ─────────────────────────
void Draw()
{
if (_length <= 0f) return;
float at = At.Value;
if (IsServer || _shown < 0f || Mathf.Abs(_shown - at) > 30f) _shown = at;
else _shown = Mathf.MoveTowards(_shown, at, (RunSpeed * 2.5f + Mathf.Abs(at - _shown) * 4f) * Time.deltaTime);
Place(loco, _shown, true);
if (wagons != null)
for (int i = 0; i < wagons.Length; i++)
{
float d = _shown - (i + 1) * Gap;
if (wagons[i]) wagons[i].gameObject.SetActive(d >= 0f);
if (d >= 0f) Place(wagons[i], d, true);
}
Lay(Laid.Value);
Spin();
}
void Spin()
{
float moved = _lastShown < 0f ? 0f : _shown - _lastShown;
_lastShown = _shown;
if (Mathf.Abs(moved) > 20f) moved = 0f;
_rolled += moved;
foreach (var (t, rest, r) in _wheels)
if (t) t.localRotation = rest * Quaternion.AngleAxis(_rolled / r * Mathf.Rad2Deg, Vector3.right);
if (_reel && Mathf.Abs(moved) > 1e-4f && !RouteDone)
{
_reelAngle += Time.deltaTime * 720f;
_reel.localRotation = _reelRest * Quaternion.AngleAxis(_reelAngle, Vector3.right);
}
}
void Place(Transform t, float d, bool onRails)
{
if (!t) return;
var p = Pos(d);
var up = Planet.Up(p);
var f = Vector3.ProjectOnPlane(Ahead(d), up);
if (f.sqrMagnitude < 1e-6f) f = Vector3.ProjectOnPlane(transform.forward, up);
t.SetPositionAndRotation(p + up * (onRails ? 0.22f : 0f), Quaternion.LookRotation(f.normalized, up));
}
// ───────────────────────── the track ─────────────────────────
const int ChunkPts = 32;
GameObject _track;
readonly List<Mesh> _chunks = new List<Mesh>();
int _drawnSeg = -1;
void ClearTrack()
{
if (_track) Destroy(_track);
_track = null;
_chunks.Clear();
_drawnSeg = -1;
}
/// <summary>Rails and sleepers up to this many metres, a chunk of track at a time.</summary>
void Lay(float upto)
{
int seg = 0;
while (seg + 1 < _cum.Count && _cum[seg + 1] <= upto + 0.01f) seg++;
if (seg == _drawnSeg) return;
if (!_track)
{
_track = new GameObject("Track_" + NetworkObjectId);
_drawnSeg = -1;
}
int from = Mathf.Max(0, _drawnSeg) / ChunkPts, to = seg / ChunkPts;
for (int c = from; c <= to; c++) Chunk(c, seg);
_drawnSeg = seg;
}
void Chunk(int c, int lastSeg)
{
while (_chunks.Count <= c)
{
var go = new GameObject("Rails");
go.transform.SetParent(_track.transform, false);
var mesh = new Mesh { name = "Track" };
go.AddComponent<MeshFilter>().sharedMesh = mesh;
var mr = go.AddComponent<MeshRenderer>();
var bank = AssetBank.I;
mr.sharedMaterials = new[] { bank ? bank.Mat("M_Steel") : null, bank ? bank.Mat("M_Wood") : null };
mr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
_chunks.Add(mesh);
}
var v = new List<Vector3>();
var nrm = new List<Vector3>();
var uv = new List<Vector2>();
var rails = new List<int>();
var ties = new List<int>();
int s0 = c * ChunkPts, s1 = Mathf.Min(lastSeg, s0 + ChunkPts);
for (int s = s0; s < s1; s++)
{
var a = _pts[s];
var b = _pts[s + 1];
var up = Planet.Up(a);
var f = (b - a).normalized;
var side = Vector3.Cross(up, f).normalized;
// two steel rails a little proud of the sleepers, one sleeper per two metres
for (int r = -1; r <= 1; r += 2)
{
var o = side * (r * Gauge * 0.5f) + up * 0.16f;
Box(v, nrm, uv, rails, a + o, b + o, side, up, 0.09f, 0.11f);
}
var mid = (a + b) * 0.5f + up * 0.06f;
Box(v, nrm, uv, ties, mid - f * 0.14f, mid + f * 0.14f, side, up, 2.2f, 0.12f);
}
var mesh2 = _chunks[c];
mesh2.Clear();
mesh2.SetVertices(v);
mesh2.SetNormals(nrm);
mesh2.SetUVs(0, uv);
mesh2.subMeshCount = 2;
mesh2.SetTriangles(rails, 0);
mesh2.SetTriangles(ties, 1);
mesh2.RecalculateBounds();
}
/// <summary>A box from a to b, this wide and this tall, standing on the line (no bottom face).</summary>
static void Box(List<Vector3> v, List<Vector3> n, List<Vector2> uv, List<int> tris, Vector3 a, Vector3 b, Vector3 side, Vector3 up, float w, float h)
{
var s = side * (w * 0.5f);
var t = up * h;
var f = (b - a).normalized;
Quad(v, n, uv, tris, a - s + t, a + s + t, b + s + t, b - s + t, up);
Quad(v, n, uv, tris, a + s, b + s, b + s + t, a + s + t, side);
Quad(v, n, uv, tris, b - s, a - s, a - s + t, b - s + t, -side);
Quad(v, n, uv, tris, a - s, a + s, a + s + t, a - s + t, -f);
Quad(v, n, uv, tris, b + s, b - s, b - s + t, b + s + t, f);
}
static void Quad(List<Vector3> v, List<Vector3> n, List<Vector2> uv, List<int> tris, Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 normal)
{
int i = v.Count;
v.Add(p0); v.Add(p1); v.Add(p2); v.Add(p3);
for (int k = 0; k < 4; k++) n.Add(normal);
uv.Add(new Vector2(0, 0)); uv.Add(new Vector2(1, 0)); uv.Add(new Vector2(1, 1)); uv.Add(new Vector2(0, 1));
// Unity's front face: Cross(b - a, c - a) points at the viewer
var cross = Vector3.Cross(p1 - p0, p2 - p0);
if (Vector3.Dot(cross, normal) > 0f) { tris.Add(i); tris.Add(i + 1); tris.Add(i + 2); tris.Add(i); tris.Add(i + 2); tris.Add(i + 3); }
else { tris.Add(i); tris.Add(i + 2); tris.Add(i + 1); tris.Add(i); tris.Add(i + 3); tris.Add(i + 2); }
}
// ───────────────────────── talking to it ─────────────────────────
public string Prompt
{
get
{
string where = Target.Value < Stations.Count ? Stations.Name(Target.Value) : "?";
var def = GameDefs.Piece(PieceId.Train);
if (Laying)
{
string s = Loc.F("{0}: laying track to {1}, {2} of {3} m", def.name, where, Mathf.RoundToInt(Laid.Value), Mathf.RoundToInt(_length));
return Laid.Value < Lead ? s + " · " + Loc.T("E: another station") : s;
}
if (RouteDone) return Loc.F("{0}: the line to {1} is mown clean as far as it reaches. An upgrade reaches further.", def.name, where);
return Loc.F("{0}: running to {1} and back, cutting {2} m out either side, {3} on board", def.name, where, Mathf.RoundToInt(Inner + Arm), GameDefs.Kilos(Hopper.Value));
}
}
public bool CanInteract => Laying && Laid.Value < Lead;
public void Interact() => OtherWayRpc();
[Rpc(SendTo.Server)]
void OtherWayRpc()
{
if (!Laying || Laid.Value >= Lead) return;
Laid.Value = 0f;
At.Value = 0f;
Target.Value = Pick(Target.Value);
}
public float[] State
{
get => new[] { Target.Value, Laid.Value, At.Value, Runs.Value, Hopper.Value };
set
{
if (value == null || value.Length < 5 || !IsServer) return;
if (value[0] < Stations.Count) Target.Value = (byte)value[0];
Laid.Value = value[1];
At.Value = value[2];
Runs.Value = (int)value[3];
Hopper.Value = value[4];
}
}
}
}

View File

@ -0,0 +1,291 @@
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
namespace GrassCutter
{
/// <summary>
/// The autopilot, bought for a machine at the garage. C hands the machine over and the driver steps off: it mows a field
/// round where it was let go in long strokes (every other row first, so it has room to turn), then the fields round
/// that one, ring by ring. With the hopper full it drives to the nearest place to unload (a garage pad, an unload bay or
/// the base yard), empties it and comes back to the stroke it left. Getting in takes it back. The host drives it.
/// </summary>
public partial class Vehicle
{
public enum AutoJob : byte { Off, Mowing, Unloading, Done }
/// <summary>What the autopilot is doing (the host writes it).</summary>
public readonly NetworkVariable<byte> Auto = new NetworkVariable<byte>();
public AutoJob Job => (AutoJob)Auto.Value;
public bool OnAuto => Auto.Value != (byte)AutoJob.Off;
/// <summary>Has an autopilot, and a cutter for it to mow with.</summary>
public bool CanAuto => GameDefs.TuneFits(kind, TuneId.Autopilot) && Level(TuneId.Autopilot) > 0;
/// <summary>A field is this many metres a side; it works this many rings of fields round the first.</summary>
const float FieldSize = 34f;
const int FieldRings = 4;
Vector3 _home, _homeFwd;
/// <summary>Strokes as pairs of points on the ground: start, end, start, end...</summary>
readonly List<Vector3> _strokes = new List<Vector3>();
int _next, _field;
float _stuck, _back, _backSteer, _lastSteer;
int _stuckTimes;
Vector3 _unloadAt;
static readonly List<Vector2Int> s_fields = new List<Vector2Int>();
static readonly Collider[] s_block = new Collider[4];
/// <summary>The driver hands over: they step off, it carries on.</summary>
[Rpc(SendTo.Server)]
void AutoRpc(RpcParams rpc = default)
{
if (Driver.Value != rpc.Receive.SenderClientId || !CanAuto) return;
ServerEject();
ServerStartAuto(transform.position, transform.forward);
}
/// <summary>Host: start working round this spot, the strokes running this way.</summary>
public void ServerStartAuto(Vector3 home, Vector3 forward)
{
if (!IsServer || !CanAuto) return;
var up = Planet.Up(home);
_home = home;
_homeFwd = Vector3.ProjectOnPlane(forward, up).normalized;
if (_homeFwd.sqrMagnitude < 0.5f) _homeFwd = Vector3.ProjectOnPlane(Vector3.forward, up).normalized;
_field = -1;
_strokes.Clear();
_next = 0;
_stuckTimes = 0;
Auto.Value = (byte)AutoJob.Mowing;
if (!NextField()) Auto.Value = (byte)AutoJob.Done;
}
float _resumeAt;
/// <summary>Host, loading a save: back to work once the world round it has been built.</summary>
public void ServerResumeAuto(Vector3 home, Vector3 forward)
{
_home = home;
_homeFwd = forward;
_resumeAt = Time.time + 4f;
}
void AutoResume()
{
if (_resumeAt <= 0f || Time.time < _resumeAt) return;
_resumeAt = 0f;
if (!HasDriver) ServerStartAuto(_home, _homeFwd);
}
/// <summary>Where the autopilot was started, for the save (Off: it wasn't).</summary>
public void AutoState(out int job, out Vector3 home, out Vector3 fwd)
{
job = Auto.Value;
home = _home;
fwd = _homeFwd;
}
string AutoPrompt => Job == AutoJob.Unloading ? Loc.T("autopilot: off to unload")
: Job == AutoJob.Done ? Loc.T("autopilot: nothing left to mow round here")
: Loc.T("autopilot: mowing");
// ───────────────────────── planning ─────────────────────────
static void Fields()
{
if (s_fields.Count > 0) return;
s_fields.Add(Vector2Int.zero);
for (int r = 1; r <= FieldRings; r++)
{
// round the ring: along the top, down the right, back along the bottom, up the left
for (int x = -r; x < r; x++) s_fields.Add(new Vector2Int(x, r));
for (int z = r; z > -r; z--) s_fields.Add(new Vector2Int(r, z));
for (int x = r; x > -r; x--) s_fields.Add(new Vector2Int(x, -r));
for (int z = -r; z < r; z++) s_fields.Add(new Vector2Int(-r, z));
}
}
/// <summary>Plans the next field that has grass on it. False when there is none left.</summary>
bool NextField()
{
Fields();
_strokes.Clear();
_next = 0;
while (++_field < s_fields.Count)
{
Plan(s_fields[_field]);
if (_strokes.Count > 0) return true;
}
return false;
}
void Plan(Vector2Int f)
{
var up = Planet.Up(_home);
var fwd = _homeFwd;
var right = Vector3.Cross(up, fwd);
var centre = _home + right * (f.x * FieldSize) + fwd * (f.y * FieldSize);
float w = Mathf.Max(0.8f, CutWidth * 0.85f);
int rows = Mathf.Max(1, Mathf.CeilToInt(FieldSize / w));
// every other row out, the rest on the way back: a turn is two strips wide, not one
var order = new List<int>();
for (int i = 0; i < rows; i += 2) order.Add(i);
for (int i = rows - 1 - (rows % 2 == 0 ? 0 : 1); i >= 1; i -= 2) order.Add(i);
bool flip = false;
foreach (int i in order)
{
float u = -FieldSize * 0.5f + (i + 0.5f) * w;
var a = centre + right * u - fwd * (FieldSize * 0.5f);
var b = centre + right * u + fwd * (FieldSize * 0.5f);
if (flip) (a, b) = (b, a);
if (Stroke(a, b)) flip = !flip;
}
}
/// <summary>Adds the stretches of a row that are free to drive and have grass on them. True if any were.</summary>
bool Stroke(Vector3 a, Vector3 b)
{
const float Step = 1.5f;
int n = Mathf.Max(2, Mathf.CeilToInt(Vector3.Distance(a, b) / Step));
bool any = false;
int start = -1, grass = 0;
Vector3 first = default, last = default;
for (int k = 0; k <= n; k++)
{
var p = Planet.Surface(Vector3.Lerp(a, b, k / (float)n));
bool free = Free(p);
if (free)
{
if (start < 0) { start = k; first = p; grass = 0; }
last = p;
if (MowMap.Yield(p) > 0.3f) grass++;
}
if (!free || k == n)
{
if (start >= 0 && grass >= 2 && Vector3.Distance(first, last) > 3f)
{
_strokes.Add(first);
_strokes.Add(last);
any = true;
}
start = -1;
}
}
return any;
}
/// <summary>Open ground: no deck, rock, building or scenery in the way.</summary>
bool Free(Vector3 p)
{
if (Ts && Ts.OnDeck(p)) return false;
if (Ground.Instance && Ground.Instance.RockAt(p)) return false;
var up = Planet.Up(p);
int n = Physics.OverlapSphereNonAlloc(p + up * 1.3f, width * 0.5f + 1f, s_block, (1 << Layers.Default) | (1 << Layers.Build), QueryTriggerInteraction.Ignore);
for (int i = 0; i < n; i++)
if (s_block[i] && !s_block[i].transform.IsChildOf(transform)) return false;
return true;
}
/// <summary>The nearest place to empty the hopper: a pad (garage, unload bay) or the base yard.</summary>
bool FindUnload(out Vector3 at)
{
at = default;
float best = float.MaxValue;
var p = transform.position;
foreach (var s in SiloPiece.Pads)
{
if (!s || !s.IsSpawned) continue;
float d = (s.PadSpot - p).sqrMagnitude;
if (d < best) { best = d; at = s.PadSpot; }
}
if (!s_dock) { var dz = GameObject.Find("DockZone"); s_dock = dz ? dz.transform : null; }
if (s_dock && (s_dock.position - p).sqrMagnitude < best) { best = (s_dock.position - p).sqrMagnitude; at = s_dock.position; }
return best < float.MaxValue;
}
// ───────────────────────── driving (host) ─────────────────────────
/// <summary>The stick the autopilot holds this physics step.</summary>
Vector2 AutoInput(float dt)
{
var p = transform.position;
var up = Planet.Up(p);
var job = Job;
if (job == AutoJob.Off || job == AutoJob.Done) return Vector2.zero;
if (job == AutoJob.Mowing && Tank.Value >= Capacity - 0.5f)
{
if (FindUnload(out _unloadAt)) { Auto.Value = (byte)(job = AutoJob.Unloading); _stuckTimes = 0; }
else { Auto.Value = (byte)AutoJob.Done; return Vector2.zero; }
}
if (job == AutoJob.Unloading)
{
// on the pad: stand still until it's empty, then back to work
if (Unloading) return Vector2.zero;
if (Tank.Value <= 0.1f) { Auto.Value = (byte)AutoJob.Mowing; _stuckTimes = 0; return Vector2.zero; }
}
Vector3 goal;
if (job == AutoJob.Unloading) goal = _unloadAt;
else
{
if (_next >= _strokes.Count && !NextField())
{
// all done round here: what's in the hopper goes home first
if (Tank.Value > 0.1f && FindUnload(out _unloadAt)) Auto.Value = (byte)AutoJob.Unloading;
else Auto.Value = (byte)AutoJob.Done;
return Vector2.zero;
}
goal = _strokes[_next];
}
var to = Vector3.ProjectOnPlane(goal - p, up);
float dist = to.magnitude;
if (job == AutoJob.Mowing && dist < 1.6f)
{
_next++;
_stuckTimes = 0;
return new Vector2(_lastSteer, 0.4f);
}
var fwd = Vector3.ProjectOnPlane(transform.forward, up).normalized;
float ang = Vector3.SignedAngle(fwd, to, up);
float speed = Vector3.ProjectOnPlane(Body.linearVelocity, up).magnitude;
// backing out of something it ran into
if (_back > 0f)
{
_back -= dt;
return new Vector2(_backSteer, -1f);
}
float steer = Mathf.Clamp(ang / 30f, -1f, 1f);
// mowing it keeps to a pace it can turn at; on the way somewhere far it goes faster
float cap = job == AutoJob.Mowing ? 0.7f : dist > 20f ? 1f : 0.6f;
float thr = cap * Mathf.Lerp(1f, 0.4f, Mathf.Clamp01(Mathf.Abs(ang) / 90f));
if (dist < 6f) thr = Mathf.Min(thr, 0.3f + dist * 0.08f);
_lastSteer = steer;
if (speed < 0.5f && thr > 0.2f)
{
_stuck += dt;
if (_stuck > 2.2f)
{
_stuck = 0f;
_back = 1.5f;
_backSteer = ang > 0f ? -1f : 1f;
if (++_stuckTimes >= 4)
{
// can't get there: the next stroke, or another way home
_stuckTimes = 0;
if (job == AutoJob.Mowing) _next += (_next % 2 == 0) ? 2 : 1;
else Auto.Value = (byte)AutoJob.Done;
}
}
}
else _stuck = 0f;
return new Vector2(steer, thr);
}
}
}

View File

@ -11,7 +11,7 @@ namespace GrassCutter
/// while driving and unloads at a garage pad. The pickup carries bundles on its bed instead.
/// </summary>
[RequireComponent(typeof(Rigidbody))]
public class Vehicle : NetworkBehaviour, IInteractable
public partial class Vehicle : NetworkBehaviour, IInteractable
{
public static readonly List<Vehicle> All = new List<Vehicle>();
public const ulong Nobody = ulong.MaxValue;
@ -109,7 +109,7 @@ namespace GrassCutter
// ───────────────────────── seat ─────────────────────────
public string Prompt => HasDriver ? null : Def.bed > 0 ? Loc.F("Ride the {0} ({1} of {2} bundles, E with a bundle loads it)", Def.name, Bed.Count, Def.bed) : Loc.F("Ride the {0} ({1} / {2})", Def.name, GameDefs.Kilos(Tank.Value), GameDefs.Kilos(Capacity));
public string Prompt => HasDriver ? null : OnAuto ? Loc.F("Take over the {0} ({1}, {2} / {3})", Def.name, AutoPrompt, GameDefs.Kilos(Tank.Value), GameDefs.Kilos(Capacity)) : Def.bed > 0 ? Loc.F("Ride the {0} ({1} of {2} bundles, E with a bundle loads it)", Def.name, Bed.Count, Def.bed) : Loc.F("Ride the {0} ({1} / {2})", Def.name, GameDefs.Kilos(Tank.Value), GameDefs.Kilos(Capacity));
public bool CanInteract => !HasDriver;
public void Interact()
@ -124,6 +124,9 @@ namespace GrassCutter
if (HasDriver || RollingOut) return;
foreach (var v in All) if (v != this && v.Driver.Value == who) return;
Driver.Value = who;
// getting in takes it back from the autopilot
Auto.Value = (byte)AutoJob.Off;
_resumeAt = 0f;
if (OwnerClientId != who) NetworkObject.ChangeOwnership(who);
}
@ -253,7 +256,13 @@ namespace GrassCutter
Sfx.Play("ui_open");
UIRoot.I?.OpenGarage(near.GetComponent<Garage>(), kind);
}
if (Ctl.CruisePressed && Level(TuneId.Cruise) > 0) _cruise = !_cruise;
if (Ctl.CruisePressed && CanAuto)
{
AutoRpc();
Sfx.Play("ui_click", 0.8f, 1.2f);
Hud.Toast(Loc.F("Autopilot on: the {0} mows round here and unloads itself. Hop back in to take over.", Def.name), Hud.ToastKind.Info);
}
else if (Ctl.CruisePressed && Level(TuneId.Cruise) > 0) _cruise = !_cruise;
if (Ctl.MovePressed && Def.bed > 0) TipRpc();
}
else _cruise = false;
@ -272,6 +281,13 @@ namespace GrassCutter
if (!IsSpawned || !IsOwner || Body.isKinematic) return;
bool driving = LocalDriving;
var input = driving ? Ctl.Move : Vector2.zero;
// the host drives a machine on autopilot
bool auto = false;
if (IsServer && !HasDriver)
{
AutoResume();
if (OnAuto) { input = AutoInput(Time.fixedDeltaTime); auto = true; }
}
float boost = driving && Ctl.Sprint ? GameDefs.BoostMul(Level(TuneId.Turbo)) : 1f;
if (input.y < -0.1f) _cruise = false;
float throttle = _cruise && input.y < 0.1f ? 1f : input.y;
@ -329,7 +345,7 @@ namespace GrassCutter
var tq = Vector3.Cross(transform.up, lean.normalized) * 18f - Body.angularVelocity * 2.5f;
Body.AddTorque(Vector3.ProjectOnPlane(tq, up) * Body.mass, ForceMode.Force);
}
if (driving && Throttle.Value != throttle) Throttle.Value = throttle;
if ((driving || auto) && Throttle.Value != throttle) Throttle.Value = throttle;
// mow under the cutter: what the header sweeps goes in the hopper
bool mowing = false;
@ -338,12 +354,12 @@ namespace GrassCutter
var ip = intake ? intake.position : transform.position + fwd * length * 0.5f;
bool overMeadow = Planet.Altitude(ip) < 1.2f && !(Ground.Instance && Ground.Instance.RockAt(ip));
bool onDeck = Ts && Ts.OnDeck(ip);
if (overMeadow && !onDeck && Tank.Value < Capacity && driving)
if (overMeadow && !onDeck && Tank.Value < Capacity && (driving || auto))
{
mowing = true;
float kg = MowMap.Cut(_hasCut ? _lastCut : ip, ip, CutWidth, blade: true) * GameDefs.GrassDensity;
Tank.Value = Mathf.Min(Capacity, Tank.Value + kg);
if (Tank.Value >= Capacity - 0.01f) { Sfx.Play("tank_full", 0.8f); Assistant.Say("asst_hopper"); Hud.Toast(Loc.F("{0} hopper full: unload at the base yard, a garage pad or an Unload Bay (follow the UNLOAD markers)", Def.name), Hud.ToastKind.Warn); }
if (Tank.Value >= Capacity - 0.01f && driving) { Sfx.Play("tank_full", 0.8f); Assistant.Say("asst_hopper"); Hud.Toast(Loc.F("{0} hopper full: unload at the base yard, a garage pad or an Unload Bay (follow the UNLOAD markers)", Def.name), Hud.ToastKind.Warn); }
_lastCut = ip;
}
_hasCut = mowing;
@ -352,7 +368,7 @@ namespace GrassCutter
// unload: in the yard at the base it's paid as it comes off, on a garage's pad or an unload bay it fills the bin
var pad = Tank.Value > 0.1f ? SiloPiece.PadUnder(transform.position) : null;
if (Def.bales && driving) Bale(dt);
if (Def.bales && (driving || auto)) Bale(dt);
Unloading = Tank.Value > 0.1f && (pad || NearDock());
if (Tank.Value > 0.1f && (pad || NearDock()) && Ts)
{

View File

@ -702,7 +702,7 @@ namespace GrassCutter
_frame = _heading;
Sfx.Play("build_place", 0.5f, 1.3f);
Assistant.Say("asst_drive");
Hud.Toast(Loc.T("WASD to drive · SHIFT boost · R chase view · E to hop off"), Hud.ToastKind.Info);
Hud.Toast(v.CanAuto ? Loc.T("WASD to drive · SHIFT boost · R chase view · E to hop off · C autopilot") : Loc.T("WASD to drive · SHIFT boost · R chase view · E to hop off"), Hud.ToastKind.Info);
}
void ExitVehicle()

View File

@ -6,7 +6,7 @@ using UnityEngine.UIElements;
namespace GrassCutter
{
/// <summary>
/// The upgrade matrix as node graphs: the GreenHaul console shows CONTAINERS · CUTTING · SUIT · LOGISTICS · ECONOMY,
/// The upgrade matrix as node graphs: the GreenHaul console shows CONTAINERS · CUTTING · SUIT · LOGISTICS · ECONOMY · AUTOMATION,
/// each branch growing out of the free Earth Uplink, the garage shows the FLEET. Click a node to inspect it, buy it from
/// the shared crew wallet.
/// </summary>
@ -15,7 +15,7 @@ namespace GrassCutter
public VisualElement Card { get; }
readonly Label _money, _installs;
readonly Action _close;
public static readonly PerkTree[] TerminalTrees = { PerkTree.Containers, PerkTree.Cutting, PerkTree.Suit, PerkTree.Logistics, PerkTree.Economy };
public static readonly PerkTree[] TerminalTrees = { PerkTree.Containers, PerkTree.Cutting, PerkTree.Suit, PerkTree.Logistics, PerkTree.Economy, PerkTree.Automation };
readonly PerkTree[] _trees;
bool Hub => _trees == TerminalTrees;
int TreeCount => _trees.Length;
@ -33,11 +33,11 @@ namespace GrassCutter
static int MaxRow { get { int m = 0; foreach (var d in GameDefs.Perks) m = Mathf.Max(m, d.row); return m; } }
static readonly float CanvasW = PadX * 2f + ColW * (MaxCol + 1), CanvasH = PadY + RowH * (MaxRow + 1) + Node + 64f;
static readonly string[] TreeNames = { Loc.N("CONTAINERS"), Loc.N("CUTTING"), Loc.N("SUIT"), Loc.N("LOGISTICS"), Loc.N("ECONOMY"), Loc.N("FLEET") };
static readonly string[] TreeNames = { Loc.N("CONTAINERS"), Loc.N("CUTTING"), Loc.N("SUIT"), Loc.N("LOGISTICS"), Loc.N("ECONOMY"), Loc.N("AUTOMATION") };
static readonly Color[] TreeColors =
{
new Color(0.9f, 0.72f, 0.24f), new Color(0.45f, 0.8f, 0.2f), new Color(0.85f, 0.75f, 0.4f), new Color(1f, 0.8f, 0.25f),
new Color(0.25f, 0.7f, 0.45f), new Color(0.75f, 0.45f, 0.25f),
new Color(0.25f, 0.7f, 0.45f), new Color(0.3f, 0.66f, 0.86f),
};
TeamState Ts => TeamState.Instance;

View File

@ -18,12 +18,29 @@ namespace GrassCutter
public static string Tag(Difficulty d) => Loc.T(d == Difficulty.Mommy ? Loc.N("EASY") : d == Difficulty.HoldMyBeer ? Loc.N("NORMAL") : Loc.N("EXTRA HARD"));
public static string Blurb(Difficulty d) => Loc.T(
d == Difficulty.Mommy ? Loc.N("A planet a third the size, with sectors to match. Earth can wait a little.")
: d == Difficulty.HoldMyBeer ? Loc.N("Half the planet, half-size sectors. Still a lot of lawn.")
: Loc.N("The whole of Herbaria-7, full-size sectors, every blade of it."));
d == Difficulty.Mommy ? Loc.N("A sixth of the big planet, sectors to match. Earth can wait a little.")
: d == Difficulty.HoldMyBeer ? Loc.N("A third of the big planet, smaller sectors. Still a lot of lawn.")
: Loc.N("The big planet: the whole of Herbaria-7, every blade of it."));
/// <summary>
/// Which set of sizes a save is on. 0: the first one (radius 1, 1/2, 1/3 of the whole planet), every save from
/// before the planets shrank; they keep their ball, the pieces on it stand where they stood. 1: by area, the hard
/// one half the whole planet, normal a third of that, easy a sixth.
/// </summary>
public const int NewGen = 1;
/// <summary>The planet's radius against the whole one.</summary>
public static float Scale(Difficulty d) => d == Difficulty.Mommy ? 1f / 3f : d == Difficulty.HoldMyBeer ? 0.5f : 1f;
public static float Scale(Difficulty d, int gen) => gen >= 1
? (d == Difficulty.Mommy ? 0.288675f : d == Difficulty.HoldMyBeer ? 0.408248f : 0.707107f)
: (d == Difficulty.Mommy ? 1f / 3f : d == Difficulty.HoldMyBeer ? 0.5f : 1f);
/// <summary>The size set the world is built on right now.</summary>
public static int Gen { get; private set; }
/// <summary>Difficulty and size set in one byte, for the wire.</summary>
public static byte Wire => (byte)((int)Current | (Gen << 4));
public static void ApplyWire(byte b) => Apply((Difficulty)(b & 15), b >> 4);
/// <summary>What the next new save starts on: set by the menu (and `-difficulty 0..2` for the dev bots).</summary>
public static Difficulty Chosen = Difficulty.Hazard;
@ -32,12 +49,14 @@ namespace GrassCutter
public static Difficulty Current { get; private set; } = Difficulty.Hazard;
/// <summary>Builds the world on the ball for this difficulty, if it isn't on it already.</summary>
public static void Apply(Difficulty d)
public static void Apply(Difficulty d, int gen)
{
if (d != Difficulty.Mommy && d != Difficulty.HoldMyBeer) d = Difficulty.Hazard;
if (d == Current) return;
gen = gen >= 1 ? 1 : 0;
if (d == Current && gen == Gen) return;
Current = d;
Planet.Rescale(GameDefs.PlanetRadius * Scale(d));
Gen = gen;
Planet.Rescale(GameDefs.PlanetRadius * Scale(d, gen));
}
}
}

View File

@ -18,7 +18,7 @@ namespace GrassCutter
public const int Res = 128;
/// <summary>The last scraps of a sector this nearly done go with the stroke that got it there.</summary>
// the last few scraps (behind rocks, along the seams) go by themselves: no hunting for the final percent
const float DoneAt = 0.97f;
const float DoneAt = 0.93f;
const int MaxStampsPerCut = 28, MaxOpen = 300;
/// <summary>Less than this left in a cell is not worth a row of its own.</summary>
const ushort Scrap = 120;