minor cleanup from playtest

This commit is contained in:
Tenari
2026-03-20 07:29:27 -05:00
parent 711a812145
commit b84a120d70
3 changed files with 72 additions and 159 deletions
+31 -98
View File
@@ -8,7 +8,7 @@
#define STARTING_DOWN_PAYMENT (10000)
#define SHIP_DETAIL_COUNT (8)
#define STAR_SYSTEM_COUNT (16)
#define MAP_WIDTH (36)
#define MAP_WIDTH (32)
#define MAP_HEIGHT (12)
#define MAX_PLANETS (3)
#define MAX_PASSENGER_JOB_OFFERS (16)
@@ -87,36 +87,19 @@ global FieldDescriptor SHIP_FIELDS[SHIP_DETAIL_COUNT] = {
{ "O2 Tank", FieldTypeU32, offsetof(ShipTemplate, cu_m_o2), 8 },
};
typedef enum EquipmentType {
EquipmentTypeAquaponicsSystem,
EquipmentType3DPrinter,
EquipmentTypeAutoTailor,
EquipmentType_Count,
} EquipmentType;
typedef enum CommodityType {
CommodityHydrogenFuel,
CommodityOxygen,
CommodityWater,
CommodityFertilizer,
CommodityFood,
CommodityRawTextiles,
CommodityLowGradeOre,
CommodityHighGradeOre,
CommodityOre,
CommodityPlastics,
CommodityGrain,
CommodityMeat,
CommoditySpices,
CommodityElectronics,
CommoditySemiConductors,
CommodityMetals,
CommodityGlass,
CommodityHandTools,
CommoditySemiConductors,
CommodityCommonMetals,
CommodityRareMetals,
// CommodityPreciousMetals,
CommodityAlcohol,
CommodityClothes,
CommodityPersonalSundries,
CommodityIndustrialChemicals,
CommodityElectronics,
Commodity_Count,
} CommodityType;
@@ -124,25 +107,15 @@ global str COMMODITY_STRINGS[Commodity_Count] = {
"Hydrogen Fuel",
"Oxygen",
"Water",
"Fertilizer",
"Food",
"Raw Textiles",
"Low Grade Ore",
"High Grade Ore",
"Ore",
"Plastics",
"Grain",
"Meat",
"Spices",
"Electronics",
"Semi-conductors",
"Metals",
"Glass",
"Hand Tools",
"Semi-conductors",//"Semi-conductors (Silicon, Arsenic, Boron)",
"Common Metals",//"Common Metals (Iron, Nickel, Zinc)",
"Rare Metals",//"Rare Metals (Titanium, Chromium)",
// "Precious Metals (Silver, Gold, Platinum)",
"Alcohol",
"Clothes",
"Personal Sundries",//"Personal Sundries (Cutlery, Toys, Misc)",
"Industrial Chemicals",
"Electronics",
};
typedef enum StorageUnit {
@@ -178,83 +151,43 @@ global Commodity COMMODITIES[Commodity_Count] = {
},
{ .type = CommodityWater, .unit = StorageUnitContainer,
.name = "Water",
.price = 700, .qty = 100, .consumption = 10,
.price = 100, .qty = 100, .consumption = 10,
},
{ .type = CommodityFertilizer, .unit = StorageUnitContainer,
.name = "Fertilizer",
.price = 1200, .qty = 70, .consumption = 10,
{ .type = CommodityFood, .unit = StorageUnitContainer,
.name = "Food",
.price = 200, .qty = 70, .consumption = 10,
},
{ .type = CommodityRawTextiles, .unit = StorageUnitContainer,
.name = "Raw Textiles",
.price = 1800, .qty = 40, .consumption = 3,
.price = 500, .qty = 40, .consumption = 3,
},
{ .type = CommodityLowGradeOre, .unit = StorageUnitContainer,
.name = "Low Grade Ore",
.price = 800, .qty = 100, .consumption = 8,
},
{ .type = CommodityHighGradeOre, .unit = StorageUnitContainer,
.name = "High Grade Ore",
.price = 1200, .qty = 10, .consumption = 2,
{ .type = CommodityOre, .unit = StorageUnitContainer,
.name = "Ore",
.price = 1000, .qty = 100, .consumption = 8,
},
{ .type = CommodityPlastics, .unit = StorageUnitContainer,
.name = "Plastics",
.price = 2000, .qty = 30, .consumption = 5,
},
{ .type = CommodityGrain, .unit = StorageUnitContainer,
.name = "Grain",
.price = 1900, .qty = 200, .consumption = 30,
{ .type = CommoditySemiConductors, .unit = StorageUnitContainer,
.name = "Semi-conductors",
.price = 4000, .qty = 40, .consumption = 3,
},
{ .type = CommodityMeat, .unit = StorageUnitContainer,
.name = "Meat",
.price = 2100, .qty = 90, .consumption = 15,
},
{ .type = CommoditySpices, .unit = StorageUnitContainer,
.name = "Spices",
.price = 3900, .qty = 6, .consumption = 1,
},
{ .type = CommodityElectronics, .unit = StorageUnitContainer,
.name = "Electronics",
.price = 9500, .qty = 40, .consumption = 6,
{ .type = CommodityMetals, .unit = StorageUnitContainer,
.name = "Metals",
.price = 5000, .qty = 40, .consumption = 3,
},
{ .type = CommodityGlass, .unit = StorageUnitContainer,
.name = "Glass",
.price = 1400, .qty = 50, .consumption = 5,
.price = 9200, .qty = 50, .consumption = 5,
},
{ .type = CommodityHandTools, .unit = StorageUnitContainer,
.name = "Hand Tools",
.price = 5000, .qty = 5, .consumption = 1,
.price = 20000, .qty = 5, .consumption = 1,
},
{ .type = CommoditySemiConductors, .unit = StorageUnitContainer,
.name = "Semi-conductors",//"Semi-conductors (Silicon, Arsenic, Boron)",
.price = 1800, .qty = 40, .consumption = 3,
},
{ .type = CommodityCommonMetals, .unit = StorageUnitContainer,
.name = "Common Metals",//"Common Metals (Iron, Nickel, Zinc)",
.price = 1800, .qty = 40, .consumption = 3,
},
{ .type = CommodityRareMetals, .unit = StorageUnitContainer,
.name = "Rare Metals",//"Rare Metals (Titanium, Chromium)",
.price = 1800, .qty = 40, .consumption = 3,
},
/* { .type = CommodityPreciousMetals, .unit = StorageUnitKg,
.name = "Precious Metals (Silver, Gold, Platinum)",
.price = 1800, .qty = 40, .consumption = 3,
},*/
{ .type = CommodityAlcohol, .unit = StorageUnitContainer,
.name = "Alcohol",
.price = 1800, .qty = 40, .consumption = 3,
},
{ .type = CommodityClothes, .unit = StorageUnitContainer,
.name = "Clothes",
.price = 1800, .qty = 40, .consumption = 3,
},
{ .type = CommodityPersonalSundries, .unit = StorageUnitContainer,
.name = "Personal Sundries",//"Personal Sundries (Cutlery, Toys, Misc)",
.price = 1800, .qty = 40, .consumption = 3,
},
{ .type = CommodityIndustrialChemicals, .unit = StorageUnitContainer,
.name = "Industrial Chemicals",
.price = 3800, .qty = 20, .consumption = 5,
{ .type = CommodityElectronics, .unit = StorageUnitContainer,
.name = "Electronics",
.price = 40000, .qty = 40, .consumption = 6,
},
};
@@ -471,7 +404,7 @@ static const char* MESSAGE_STRINGS[] = {
fn u32 fuelCostForTravel(u32 drive_efficiency, Pos2 current, Pos2 dest) {
u32 x_distance = Max(current.x, dest.x) - Min(current.x, dest.x);
u32 y_distance = Max(current.y, dest.y) - Min(current.y, dest.y);
u32 fuel_per_dist = 100 - drive_efficiency;
u32 fuel_per_dist = 100 - drive_efficiency*10;
return (x_distance + y_distance) * fuel_per_dist;
}