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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user