patch help for *apz and *naz instructions
This commit is contained in:
763
ic10emu/data/Enums.json
Normal file
763
ic10emu/data/Enums.json
Normal file
@@ -0,0 +1,763 @@
|
||||
{
|
||||
"LogicType": {
|
||||
"None": 0,
|
||||
"Power": 1,
|
||||
"Open": 2,
|
||||
"Mode": 3,
|
||||
"Error": 4,
|
||||
"Pressure": 5,
|
||||
"Temperature": 6,
|
||||
"PressureExternal": 7,
|
||||
"PressureInternal": 8,
|
||||
"Activate": 9,
|
||||
"Lock": 10,
|
||||
"Charge": 11,
|
||||
"Setting": 12,
|
||||
"Reagents": 13,
|
||||
"RatioOxygen": 14,
|
||||
"RatioCarbonDioxide": 15,
|
||||
"RatioNitrogen": 16,
|
||||
"RatioPollutant": 17,
|
||||
"RatioVolatiles": 18,
|
||||
"RatioWater": 19,
|
||||
"Horizontal": 20,
|
||||
"Vertical": 21,
|
||||
"SolarAngle": 22,
|
||||
"Maximum": 23,
|
||||
"Ratio": 24,
|
||||
"PowerPotential": 25,
|
||||
"PowerActual": 26,
|
||||
"Quantity": 27,
|
||||
"On": 28,
|
||||
"ImportQuantity": 29,
|
||||
"ImportSlotOccupant": 30,
|
||||
"ExportQuantity": 31,
|
||||
"ExportSlotOccupant": 32,
|
||||
"RequiredPower": 33,
|
||||
"HorizontalRatio": 34,
|
||||
"VerticalRatio": 35,
|
||||
"PowerRequired": 36,
|
||||
"Idle": 37,
|
||||
"Color": 38,
|
||||
"ElevatorSpeed": 39,
|
||||
"ElevatorLevel": 40,
|
||||
"RecipeHash": 41,
|
||||
"ExportSlotHash": 42,
|
||||
"ImportSlotHash": 43,
|
||||
"PlantHealth1": 44,
|
||||
"PlantHealth2": 45,
|
||||
"PlantHealth3": 46,
|
||||
"PlantHealth4": 47,
|
||||
"PlantGrowth1": 48,
|
||||
"PlantGrowth2": 49,
|
||||
"PlantGrowth3": 50,
|
||||
"PlantGrowth4": 51,
|
||||
"PlantEfficiency1": 52,
|
||||
"PlantEfficiency2": 53,
|
||||
"PlantEfficiency3": 54,
|
||||
"PlantEfficiency4": 55,
|
||||
"PlantHash1": 56,
|
||||
"PlantHash2": 57,
|
||||
"PlantHash3": 58,
|
||||
"PlantHash4": 59,
|
||||
"RequestHash": 60,
|
||||
"CompletionRatio": 61,
|
||||
"ClearMemory": 62,
|
||||
"ExportCount": 63,
|
||||
"ImportCount": 64,
|
||||
"PowerGeneration": 65,
|
||||
"TotalMoles": 66,
|
||||
"Volume": 67,
|
||||
"Plant": 68,
|
||||
"Harvest": 69,
|
||||
"Output": 70,
|
||||
"PressureSetting": 71,
|
||||
"TemperatureSetting": 72,
|
||||
"TemperatureExternal": 73,
|
||||
"Filtration": 74,
|
||||
"AirRelease": 75,
|
||||
"PositionX": 76,
|
||||
"PositionY": 77,
|
||||
"PositionZ": 78,
|
||||
"VelocityMagnitude": 79,
|
||||
"VelocityRelativeX": 80,
|
||||
"VelocityRelativeY": 81,
|
||||
"VelocityRelativeZ": 82,
|
||||
"RatioNitrousOxide": 83,
|
||||
"PrefabHash": 84,
|
||||
"ForceWrite": 85,
|
||||
"SignalStrength": 86,
|
||||
"SignalID": 87,
|
||||
"TargetX": 88,
|
||||
"TargetY": 89,
|
||||
"TargetZ": 90,
|
||||
"SettingInput": 91,
|
||||
"SettingOutput": 92,
|
||||
"CurrentResearchPodType": 93,
|
||||
"ManualResearchRequiredPod": 94,
|
||||
"MineablesInVicinity": 95,
|
||||
"MineablesInQueue": 96,
|
||||
"NextWeatherEventTime": 97,
|
||||
"Combustion": 98,
|
||||
"Fuel": 99,
|
||||
"ReturnFuelCost": 100,
|
||||
"CollectableGoods": 101,
|
||||
"Time": 102,
|
||||
"Bpm": 103,
|
||||
"EnvironmentEfficiency": 104,
|
||||
"WorkingGasEfficiency": 105,
|
||||
"PressureInput": 106,
|
||||
"TemperatureInput": 107,
|
||||
"RatioOxygenInput": 108,
|
||||
"RatioCarbonDioxideInput": 109,
|
||||
"RatioNitrogenInput": 110,
|
||||
"RatioPollutantInput": 111,
|
||||
"RatioVolatilesInput": 112,
|
||||
"RatioWaterInput": 113,
|
||||
"RatioNitrousOxideInput": 114,
|
||||
"TotalMolesInput": 115,
|
||||
"PressureInput2": 116,
|
||||
"TemperatureInput2": 117,
|
||||
"RatioOxygenInput2": 118,
|
||||
"RatioCarbonDioxideInput2": 119,
|
||||
"RatioNitrogenInput2": 120,
|
||||
"RatioPollutantInput2": 121,
|
||||
"RatioVolatilesInput2": 122,
|
||||
"RatioWaterInput2": 123,
|
||||
"RatioNitrousOxideInput2": 124,
|
||||
"TotalMolesInput2": 125,
|
||||
"PressureOutput": 126,
|
||||
"TemperatureOutput": 127,
|
||||
"RatioOxygenOutput": 128,
|
||||
"RatioCarbonDioxideOutput": 129,
|
||||
"RatioNitrogenOutput": 130,
|
||||
"RatioPollutantOutput": 131,
|
||||
"RatioVolatilesOutput": 132,
|
||||
"RatioWaterOutput": 133,
|
||||
"RatioNitrousOxideOutput": 134,
|
||||
"TotalMolesOutput": 135,
|
||||
"PressureOutput2": 136,
|
||||
"TemperatureOutput2": 137,
|
||||
"RatioOxygenOutput2": 138,
|
||||
"RatioCarbonDioxideOutput2": 139,
|
||||
"RatioNitrogenOutput2": 140,
|
||||
"RatioPollutantOutput2": 141,
|
||||
"RatioVolatilesOutput2": 142,
|
||||
"RatioWaterOutput2": 143,
|
||||
"RatioNitrousOxideOutput2": 144,
|
||||
"TotalMolesOutput2": 145,
|
||||
"CombustionInput": 146,
|
||||
"CombustionInput2": 147,
|
||||
"CombustionOutput": 148,
|
||||
"CombustionOutput2": 149,
|
||||
"OperationalTemperatureEfficiency": 150,
|
||||
"TemperatureDifferentialEfficiency": 151,
|
||||
"PressureEfficiency": 152,
|
||||
"CombustionLimiter": 153,
|
||||
"Throttle": 154,
|
||||
"Rpm": 155,
|
||||
"Stress": 156,
|
||||
"InterrogationProgress": 157,
|
||||
"TargetPadIndex": 158,
|
||||
"SizeX": 160,
|
||||
"SizeY": 161,
|
||||
"SizeZ": 162,
|
||||
"MinimumWattsToContact": 163,
|
||||
"WattsReachingContact": 164,
|
||||
"Channel0": 165,
|
||||
"Channel1": 166,
|
||||
"Channel2": 167,
|
||||
"Channel3": 168,
|
||||
"Channel4": 169,
|
||||
"Channel5": 170,
|
||||
"Channel6": 171,
|
||||
"Channel7": 172,
|
||||
"LineNumber": 173,
|
||||
"Flush": 174,
|
||||
"SoundAlert": 175,
|
||||
"SolarIrradiance": 176,
|
||||
"RatioLiquidNitrogen": 177,
|
||||
"RatioLiquidNitrogenInput": 178,
|
||||
"RatioLiquidNitrogenInput2": 179,
|
||||
"RatioLiquidNitrogenOutput": 180,
|
||||
"RatioLiquidNitrogenOutput2": 181,
|
||||
"VolumeOfLiquid": 182,
|
||||
"RatioLiquidOxygen": 183,
|
||||
"RatioLiquidOxygenInput": 184,
|
||||
"RatioLiquidOxygenInput2": 185,
|
||||
"RatioLiquidOxygenOutput": 186,
|
||||
"RatioLiquidOxygenOutput2": 187,
|
||||
"RatioLiquidVolatiles": 188,
|
||||
"RatioLiquidVolatilesInput": 189,
|
||||
"RatioLiquidVolatilesInput2": 190,
|
||||
"RatioLiquidVolatilesOutput": 191,
|
||||
"RatioLiquidVolatilesOutput2": 192,
|
||||
"RatioSteam": 193,
|
||||
"RatioSteamInput": 194,
|
||||
"RatioSteamInput2": 195,
|
||||
"RatioSteamOutput": 196,
|
||||
"RatioSteamOutput2": 197,
|
||||
"ContactTypeId": 198,
|
||||
"RatioLiquidCarbonDioxide": 199,
|
||||
"RatioLiquidCarbonDioxideInput": 200,
|
||||
"RatioLiquidCarbonDioxideInput2": 201,
|
||||
"RatioLiquidCarbonDioxideOutput": 202,
|
||||
"RatioLiquidCarbonDioxideOutput2": 203,
|
||||
"RatioLiquidPollutant": 204,
|
||||
"RatioLiquidPollutantInput": 205,
|
||||
"RatioLiquidPollutantInput2": 206,
|
||||
"RatioLiquidPollutantOutput": 207,
|
||||
"RatioLiquidPollutantOutput2": 208,
|
||||
"RatioLiquidNitrousOxide": 209,
|
||||
"RatioLiquidNitrousOxideInput": 210,
|
||||
"RatioLiquidNitrousOxideInput2": 211,
|
||||
"RatioLiquidNitrousOxideOutput": 212,
|
||||
"RatioLiquidNitrousOxideOutput2": 213,
|
||||
"Progress": 214,
|
||||
"DestinationCode": 215,
|
||||
"Acceleration": 216,
|
||||
"ReferenceId": 217,
|
||||
"AutoShutOff": 218,
|
||||
"Mass": 219,
|
||||
"DryMass": 220,
|
||||
"Thrust": 221,
|
||||
"Weight": 222,
|
||||
"ThrustToWeight": 223,
|
||||
"TimeToDestination": 224,
|
||||
"BurnTimeRemaining": 225,
|
||||
"AutoLand": 226,
|
||||
"ForwardX": 227,
|
||||
"ForwardY": 228,
|
||||
"ForwardZ": 229,
|
||||
"Orientation": 230,
|
||||
"VelocityX": 231,
|
||||
"VelocityY": 232,
|
||||
"VelocityZ": 233,
|
||||
"PassedMoles": 234,
|
||||
"ExhaustVelocity": 235,
|
||||
"FlightControlRule": 236,
|
||||
"ReEntryAltitude": 237,
|
||||
"Apex": 238,
|
||||
"EntityState": 239,
|
||||
"DrillCondition": 240,
|
||||
"Index": 241,
|
||||
"CelestialHash": 242,
|
||||
"AlignmentError": 243,
|
||||
"DistanceAu": 244,
|
||||
"OrbitPeriod": 245,
|
||||
"Inclination": 246,
|
||||
"Eccentricity": 247,
|
||||
"SemiMajorAxis": 248,
|
||||
"DistanceKm": 249,
|
||||
"CelestialParentHash": 250,
|
||||
"TrueAnomaly": 251,
|
||||
"RatioHydrogen": 252,
|
||||
"RatioLiquidHydrogen": 253,
|
||||
"RatioPollutedWater": 254,
|
||||
"Discover": 255,
|
||||
"Chart": 256,
|
||||
"Survey": 257,
|
||||
"NavPoints": 258,
|
||||
"ChartedNavPoints": 259,
|
||||
"Sites": 260,
|
||||
"CurrentCode": 261,
|
||||
"Density": 262,
|
||||
"Richness": 263,
|
||||
"Size": 264,
|
||||
"TotalQuantity": 265,
|
||||
"MinedQuantity": 266
|
||||
},
|
||||
"LogicSlotType": {
|
||||
"None": 0,
|
||||
"Occupied": 1,
|
||||
"OccupantHash": 2,
|
||||
"Quantity": 3,
|
||||
"Damage": 4,
|
||||
"Efficiency": 5,
|
||||
"Health": 6,
|
||||
"Growth": 7,
|
||||
"Pressure": 8,
|
||||
"Temperature": 9,
|
||||
"Charge": 10,
|
||||
"ChargeRatio": 11,
|
||||
"Class": 12,
|
||||
"PressureWaste": 13,
|
||||
"PressureAir": 14,
|
||||
"MaxQuantity": 15,
|
||||
"Mature": 16,
|
||||
"PrefabHash": 17,
|
||||
"Seeding": 18,
|
||||
"LineNumber": 19,
|
||||
"Volume": 20,
|
||||
"Open": 21,
|
||||
"On": 22,
|
||||
"Lock": 23,
|
||||
"SortingClass": 24,
|
||||
"FilterType": 25,
|
||||
"ReferenceId": 26
|
||||
},
|
||||
"LogicBatchMethod": { "Average": 0, "Sum": 1, "Minimum": 2, "Maximum": 3 },
|
||||
"LogicReagentMode": {
|
||||
"Contents": 0,
|
||||
"Required": 1,
|
||||
"Recipe": 2,
|
||||
"TotalContents": 3
|
||||
},
|
||||
"Enums": {
|
||||
"LogicType.None": 0,
|
||||
"LogicType.Power": 1,
|
||||
"LogicType.Open": 2,
|
||||
"LogicType.Mode": 3,
|
||||
"LogicType.Error": 4,
|
||||
"LogicType.Pressure": 5,
|
||||
"LogicType.Temperature": 6,
|
||||
"LogicType.PressureExternal": 7,
|
||||
"LogicType.PressureInternal": 8,
|
||||
"LogicType.Activate": 9,
|
||||
"LogicType.Lock": 10,
|
||||
"LogicType.Charge": 11,
|
||||
"LogicType.Setting": 12,
|
||||
"LogicType.Reagents": 13,
|
||||
"LogicType.RatioOxygen": 14,
|
||||
"LogicType.RatioCarbonDioxide": 15,
|
||||
"LogicType.RatioNitrogen": 16,
|
||||
"LogicType.RatioPollutant": 17,
|
||||
"LogicType.RatioVolatiles": 18,
|
||||
"LogicType.RatioWater": 19,
|
||||
"LogicType.Horizontal": 20,
|
||||
"LogicType.Vertical": 21,
|
||||
"LogicType.SolarAngle": 22,
|
||||
"LogicType.Maximum": 23,
|
||||
"LogicType.Ratio": 24,
|
||||
"LogicType.PowerPotential": 25,
|
||||
"LogicType.PowerActual": 26,
|
||||
"LogicType.Quantity": 27,
|
||||
"LogicType.On": 28,
|
||||
"LogicType.ImportQuantity": 29,
|
||||
"LogicType.ImportSlotOccupant": 30,
|
||||
"LogicType.ExportQuantity": 31,
|
||||
"LogicType.ExportSlotOccupant": 32,
|
||||
"LogicType.RequiredPower": 33,
|
||||
"LogicType.HorizontalRatio": 34,
|
||||
"LogicType.VerticalRatio": 35,
|
||||
"LogicType.PowerRequired": 36,
|
||||
"LogicType.Idle": 37,
|
||||
"LogicType.Color": 38,
|
||||
"LogicType.ElevatorSpeed": 39,
|
||||
"LogicType.ElevatorLevel": 40,
|
||||
"LogicType.RecipeHash": 41,
|
||||
"LogicType.ExportSlotHash": 42,
|
||||
"LogicType.ImportSlotHash": 43,
|
||||
"LogicType.PlantHealth1": 44,
|
||||
"LogicType.PlantHealth2": 45,
|
||||
"LogicType.PlantHealth3": 46,
|
||||
"LogicType.PlantHealth4": 47,
|
||||
"LogicType.PlantGrowth1": 48,
|
||||
"LogicType.PlantGrowth2": 49,
|
||||
"LogicType.PlantGrowth3": 50,
|
||||
"LogicType.PlantGrowth4": 51,
|
||||
"LogicType.PlantEfficiency1": 52,
|
||||
"LogicType.PlantEfficiency2": 53,
|
||||
"LogicType.PlantEfficiency3": 54,
|
||||
"LogicType.PlantEfficiency4": 55,
|
||||
"LogicType.PlantHash1": 56,
|
||||
"LogicType.PlantHash2": 57,
|
||||
"LogicType.PlantHash3": 58,
|
||||
"LogicType.PlantHash4": 59,
|
||||
"LogicType.RequestHash": 60,
|
||||
"LogicType.CompletionRatio": 61,
|
||||
"LogicType.ClearMemory": 62,
|
||||
"LogicType.ExportCount": 63,
|
||||
"LogicType.ImportCount": 64,
|
||||
"LogicType.PowerGeneration": 65,
|
||||
"LogicType.TotalMoles": 66,
|
||||
"LogicType.Volume": 67,
|
||||
"LogicType.Plant": 68,
|
||||
"LogicType.Harvest": 69,
|
||||
"LogicType.Output": 70,
|
||||
"LogicType.PressureSetting": 71,
|
||||
"LogicType.TemperatureSetting": 72,
|
||||
"LogicType.TemperatureExternal": 73,
|
||||
"LogicType.Filtration": 74,
|
||||
"LogicType.AirRelease": 75,
|
||||
"LogicType.PositionX": 76,
|
||||
"LogicType.PositionY": 77,
|
||||
"LogicType.PositionZ": 78,
|
||||
"LogicType.VelocityMagnitude": 79,
|
||||
"LogicType.VelocityRelativeX": 80,
|
||||
"LogicType.VelocityRelativeY": 81,
|
||||
"LogicType.VelocityRelativeZ": 82,
|
||||
"LogicType.RatioNitrousOxide": 83,
|
||||
"LogicType.PrefabHash": 84,
|
||||
"LogicType.ForceWrite": 85,
|
||||
"LogicType.SignalStrength": 86,
|
||||
"LogicType.SignalID": 87,
|
||||
"LogicType.TargetX": 88,
|
||||
"LogicType.TargetY": 89,
|
||||
"LogicType.TargetZ": 90,
|
||||
"LogicType.SettingInput": 91,
|
||||
"LogicType.SettingOutput": 92,
|
||||
"LogicType.CurrentResearchPodType": 93,
|
||||
"LogicType.ManualResearchRequiredPod": 94,
|
||||
"LogicType.MineablesInVicinity": 95,
|
||||
"LogicType.MineablesInQueue": 96,
|
||||
"LogicType.NextWeatherEventTime": 97,
|
||||
"LogicType.Combustion": 98,
|
||||
"LogicType.Fuel": 99,
|
||||
"LogicType.ReturnFuelCost": 100,
|
||||
"LogicType.CollectableGoods": 101,
|
||||
"LogicType.Time": 102,
|
||||
"LogicType.Bpm": 103,
|
||||
"LogicType.EnvironmentEfficiency": 104,
|
||||
"LogicType.WorkingGasEfficiency": 105,
|
||||
"LogicType.PressureInput": 106,
|
||||
"LogicType.TemperatureInput": 107,
|
||||
"LogicType.RatioOxygenInput": 108,
|
||||
"LogicType.RatioCarbonDioxideInput": 109,
|
||||
"LogicType.RatioNitrogenInput": 110,
|
||||
"LogicType.RatioPollutantInput": 111,
|
||||
"LogicType.RatioVolatilesInput": 112,
|
||||
"LogicType.RatioWaterInput": 113,
|
||||
"LogicType.RatioNitrousOxideInput": 114,
|
||||
"LogicType.TotalMolesInput": 115,
|
||||
"LogicType.PressureInput2": 116,
|
||||
"LogicType.TemperatureInput2": 117,
|
||||
"LogicType.RatioOxygenInput2": 118,
|
||||
"LogicType.RatioCarbonDioxideInput2": 119,
|
||||
"LogicType.RatioNitrogenInput2": 120,
|
||||
"LogicType.RatioPollutantInput2": 121,
|
||||
"LogicType.RatioVolatilesInput2": 122,
|
||||
"LogicType.RatioWaterInput2": 123,
|
||||
"LogicType.RatioNitrousOxideInput2": 124,
|
||||
"LogicType.TotalMolesInput2": 125,
|
||||
"LogicType.PressureOutput": 126,
|
||||
"LogicType.TemperatureOutput": 127,
|
||||
"LogicType.RatioOxygenOutput": 128,
|
||||
"LogicType.RatioCarbonDioxideOutput": 129,
|
||||
"LogicType.RatioNitrogenOutput": 130,
|
||||
"LogicType.RatioPollutantOutput": 131,
|
||||
"LogicType.RatioVolatilesOutput": 132,
|
||||
"LogicType.RatioWaterOutput": 133,
|
||||
"LogicType.RatioNitrousOxideOutput": 134,
|
||||
"LogicType.TotalMolesOutput": 135,
|
||||
"LogicType.PressureOutput2": 136,
|
||||
"LogicType.TemperatureOutput2": 137,
|
||||
"LogicType.RatioOxygenOutput2": 138,
|
||||
"LogicType.RatioCarbonDioxideOutput2": 139,
|
||||
"LogicType.RatioNitrogenOutput2": 140,
|
||||
"LogicType.RatioPollutantOutput2": 141,
|
||||
"LogicType.RatioVolatilesOutput2": 142,
|
||||
"LogicType.RatioWaterOutput2": 143,
|
||||
"LogicType.RatioNitrousOxideOutput2": 144,
|
||||
"LogicType.TotalMolesOutput2": 145,
|
||||
"LogicType.CombustionInput": 146,
|
||||
"LogicType.CombustionInput2": 147,
|
||||
"LogicType.CombustionOutput": 148,
|
||||
"LogicType.CombustionOutput2": 149,
|
||||
"LogicType.OperationalTemperatureEfficiency": 150,
|
||||
"LogicType.TemperatureDifferentialEfficiency": 151,
|
||||
"LogicType.PressureEfficiency": 152,
|
||||
"LogicType.CombustionLimiter": 153,
|
||||
"LogicType.Throttle": 154,
|
||||
"LogicType.Rpm": 155,
|
||||
"LogicType.Stress": 156,
|
||||
"LogicType.InterrogationProgress": 157,
|
||||
"LogicType.TargetPadIndex": 158,
|
||||
"LogicType.SizeX": 160,
|
||||
"LogicType.SizeY": 161,
|
||||
"LogicType.SizeZ": 162,
|
||||
"LogicType.MinimumWattsToContact": 163,
|
||||
"LogicType.WattsReachingContact": 164,
|
||||
"LogicType.Channel0": 165,
|
||||
"LogicType.Channel1": 166,
|
||||
"LogicType.Channel2": 167,
|
||||
"LogicType.Channel3": 168,
|
||||
"LogicType.Channel4": 169,
|
||||
"LogicType.Channel5": 170,
|
||||
"LogicType.Channel6": 171,
|
||||
"LogicType.Channel7": 172,
|
||||
"LogicType.LineNumber": 173,
|
||||
"LogicType.Flush": 174,
|
||||
"LogicType.SoundAlert": 175,
|
||||
"LogicType.SolarIrradiance": 176,
|
||||
"LogicType.RatioLiquidNitrogen": 177,
|
||||
"LogicType.RatioLiquidNitrogenInput": 178,
|
||||
"LogicType.RatioLiquidNitrogenInput2": 179,
|
||||
"LogicType.RatioLiquidNitrogenOutput": 180,
|
||||
"LogicType.RatioLiquidNitrogenOutput2": 181,
|
||||
"LogicType.VolumeOfLiquid": 182,
|
||||
"LogicType.RatioLiquidOxygen": 183,
|
||||
"LogicType.RatioLiquidOxygenInput": 184,
|
||||
"LogicType.RatioLiquidOxygenInput2": 185,
|
||||
"LogicType.RatioLiquidOxygenOutput": 186,
|
||||
"LogicType.RatioLiquidOxygenOutput2": 187,
|
||||
"LogicType.RatioLiquidVolatiles": 188,
|
||||
"LogicType.RatioLiquidVolatilesInput": 189,
|
||||
"LogicType.RatioLiquidVolatilesInput2": 190,
|
||||
"LogicType.RatioLiquidVolatilesOutput": 191,
|
||||
"LogicType.RatioLiquidVolatilesOutput2": 192,
|
||||
"LogicType.RatioSteam": 193,
|
||||
"LogicType.RatioSteamInput": 194,
|
||||
"LogicType.RatioSteamInput2": 195,
|
||||
"LogicType.RatioSteamOutput": 196,
|
||||
"LogicType.RatioSteamOutput2": 197,
|
||||
"LogicType.ContactTypeId": 198,
|
||||
"LogicType.RatioLiquidCarbonDioxide": 199,
|
||||
"LogicType.RatioLiquidCarbonDioxideInput": 200,
|
||||
"LogicType.RatioLiquidCarbonDioxideInput2": 201,
|
||||
"LogicType.RatioLiquidCarbonDioxideOutput": 202,
|
||||
"LogicType.RatioLiquidCarbonDioxideOutput2": 203,
|
||||
"LogicType.RatioLiquidPollutant": 204,
|
||||
"LogicType.RatioLiquidPollutantInput": 205,
|
||||
"LogicType.RatioLiquidPollutantInput2": 206,
|
||||
"LogicType.RatioLiquidPollutantOutput": 207,
|
||||
"LogicType.RatioLiquidPollutantOutput2": 208,
|
||||
"LogicType.RatioLiquidNitrousOxide": 209,
|
||||
"LogicType.RatioLiquidNitrousOxideInput": 210,
|
||||
"LogicType.RatioLiquidNitrousOxideInput2": 211,
|
||||
"LogicType.RatioLiquidNitrousOxideOutput": 212,
|
||||
"LogicType.RatioLiquidNitrousOxideOutput2": 213,
|
||||
"LogicType.Progress": 214,
|
||||
"LogicType.DestinationCode": 215,
|
||||
"LogicType.Acceleration": 216,
|
||||
"LogicType.ReferenceId": 217,
|
||||
"LogicType.AutoShutOff": 218,
|
||||
"LogicType.Mass": 219,
|
||||
"LogicType.DryMass": 220,
|
||||
"LogicType.Thrust": 221,
|
||||
"LogicType.Weight": 222,
|
||||
"LogicType.ThrustToWeight": 223,
|
||||
"LogicType.TimeToDestination": 224,
|
||||
"LogicType.BurnTimeRemaining": 225,
|
||||
"LogicType.AutoLand": 226,
|
||||
"LogicType.ForwardX": 227,
|
||||
"LogicType.ForwardY": 228,
|
||||
"LogicType.ForwardZ": 229,
|
||||
"LogicType.Orientation": 230,
|
||||
"LogicType.VelocityX": 231,
|
||||
"LogicType.VelocityY": 232,
|
||||
"LogicType.VelocityZ": 233,
|
||||
"LogicType.PassedMoles": 234,
|
||||
"LogicType.ExhaustVelocity": 235,
|
||||
"LogicType.FlightControlRule": 236,
|
||||
"LogicType.ReEntryAltitude": 237,
|
||||
"LogicType.Apex": 238,
|
||||
"LogicType.EntityState": 239,
|
||||
"LogicType.DrillCondition": 240,
|
||||
"LogicType.Index": 241,
|
||||
"LogicType.CelestialHash": 242,
|
||||
"LogicType.AlignmentError": 243,
|
||||
"LogicType.DistanceAu": 244,
|
||||
"LogicType.OrbitPeriod": 245,
|
||||
"LogicType.Inclination": 246,
|
||||
"LogicType.Eccentricity": 247,
|
||||
"LogicType.SemiMajorAxis": 248,
|
||||
"LogicType.DistanceKm": 249,
|
||||
"LogicType.CelestialParentHash": 250,
|
||||
"LogicType.TrueAnomaly": 251,
|
||||
"LogicType.RatioHydrogen": 252,
|
||||
"LogicType.RatioLiquidHydrogen": 253,
|
||||
"LogicType.RatioPollutedWater": 254,
|
||||
"LogicType.Discover": 255,
|
||||
"LogicType.Chart": 256,
|
||||
"LogicType.Survey": 257,
|
||||
"LogicType.NavPoints": 258,
|
||||
"LogicType.ChartedNavPoints": 259,
|
||||
"LogicType.Sites": 260,
|
||||
"LogicType.CurrentCode": 261,
|
||||
"LogicType.Density": 262,
|
||||
"LogicType.Richness": 263,
|
||||
"LogicType.Size": 264,
|
||||
"LogicType.TotalQuantity": 265,
|
||||
"LogicType.MinedQuantity": 266,
|
||||
"LogicSlotType.None": 0,
|
||||
"LogicSlotType.Occupied": 1,
|
||||
"LogicSlotType.OccupantHash": 2,
|
||||
"LogicSlotType.Quantity": 3,
|
||||
"LogicSlotType.Damage": 4,
|
||||
"LogicSlotType.Efficiency": 5,
|
||||
"LogicSlotType.Health": 6,
|
||||
"LogicSlotType.Growth": 7,
|
||||
"LogicSlotType.Pressure": 8,
|
||||
"LogicSlotType.Temperature": 9,
|
||||
"LogicSlotType.Charge": 10,
|
||||
"LogicSlotType.ChargeRatio": 11,
|
||||
"LogicSlotType.Class": 12,
|
||||
"LogicSlotType.PressureWaste": 13,
|
||||
"LogicSlotType.PressureAir": 14,
|
||||
"LogicSlotType.MaxQuantity": 15,
|
||||
"LogicSlotType.Mature": 16,
|
||||
"LogicSlotType.PrefabHash": 17,
|
||||
"LogicSlotType.Seeding": 18,
|
||||
"LogicSlotType.LineNumber": 19,
|
||||
"LogicSlotType.Volume": 20,
|
||||
"LogicSlotType.Open": 21,
|
||||
"LogicSlotType.On": 22,
|
||||
"LogicSlotType.Lock": 23,
|
||||
"LogicSlotType.SortingClass": 24,
|
||||
"LogicSlotType.FilterType": 25,
|
||||
"LogicSlotType.ReferenceId": 26,
|
||||
"Sound.None": 0,
|
||||
"Sound.Alarm2": 1,
|
||||
"Sound.Alarm3": 2,
|
||||
"Sound.Alarm4": 3,
|
||||
"Sound.Alarm5": 4,
|
||||
"Sound.Alarm6": 5,
|
||||
"Sound.Alarm7": 6,
|
||||
"Sound.Music1": 7,
|
||||
"Sound.Music2": 8,
|
||||
"Sound.Music3": 9,
|
||||
"Sound.Alarm8": 10,
|
||||
"Sound.Alarm9": 11,
|
||||
"Sound.Alarm10": 12,
|
||||
"Sound.Alarm11": 13,
|
||||
"Sound.Alarm12": 14,
|
||||
"Sound.Danger": 15,
|
||||
"Sound.Warning": 16,
|
||||
"Sound.Alert": 17,
|
||||
"Sound.StormIncoming": 18,
|
||||
"Sound.IntruderAlert": 19,
|
||||
"Sound.Depressurising": 20,
|
||||
"Sound.Pressurising": 21,
|
||||
"Sound.AirlockCycling": 22,
|
||||
"Sound.PowerLow": 23,
|
||||
"Sound.SystemFailure": 24,
|
||||
"Sound.Welcome": 25,
|
||||
"Sound.MalfunctionDetected": 26,
|
||||
"Sound.HaltWhoGoesThere": 27,
|
||||
"Sound.FireFireFire": 28,
|
||||
"Sound.One": 29,
|
||||
"Sound.Two": 30,
|
||||
"Sound.Three": 31,
|
||||
"Sound.Four": 32,
|
||||
"Sound.Five": 33,
|
||||
"Sound.Floor": 34,
|
||||
"Sound.RocketLaunching": 35,
|
||||
"Sound.LiftOff": 36,
|
||||
"Sound.TraderIncoming": 37,
|
||||
"Sound.TraderLanded": 38,
|
||||
"Sound.PressureHigh": 39,
|
||||
"Sound.PressureLow": 40,
|
||||
"Sound.TemperatureHigh": 41,
|
||||
"Sound.TemperatureLow": 42,
|
||||
"Sound.PollutantsDetected": 43,
|
||||
"Sound.HighCarbonDioxide": 44,
|
||||
"Sound.Alarm1": 45,
|
||||
"TransmitterMode.Passive": 0,
|
||||
"TransmitterMode.Active": 1,
|
||||
"ElevatorMode.Stationary": 0,
|
||||
"ElevatorMode.Upward": 1,
|
||||
"ElevatorMode.Downward": 2,
|
||||
"Color.Blue": 0,
|
||||
"Color.Gray": 1,
|
||||
"Color.Green": 2,
|
||||
"Color.Orange": 3,
|
||||
"Color.Red": 4,
|
||||
"Color.Yellow": 5,
|
||||
"Color.White": 6,
|
||||
"Color.Black": 7,
|
||||
"Color.Brown": 8,
|
||||
"Color.Khaki": 9,
|
||||
"Color.Pink": 10,
|
||||
"Color.Purple": 11,
|
||||
"EntityState.Alive": 0,
|
||||
"EntityState.Dead": 1,
|
||||
"EntityState.Unconscious": 2,
|
||||
"EntityState.Decay": 3,
|
||||
"AirControl.None": 0,
|
||||
"AirControl.Offline": 1,
|
||||
"AirControl.Pressure": 2,
|
||||
"AirControl.Draught": 4,
|
||||
"DaylightSensorMode.Default": 0,
|
||||
"DaylightSensorMode.Horizontal": 1,
|
||||
"DaylightSensorMode.Vertical": 2,
|
||||
"Equals": 0,
|
||||
"Greater": 1,
|
||||
"Less": 2,
|
||||
"NotEquals": 3,
|
||||
"AirCon.Cold": 0,
|
||||
"AirCon.Hot": 1,
|
||||
"Vent.Outward": 0,
|
||||
"Vent.Inward": 1,
|
||||
"PowerMode.Idle": 0,
|
||||
"PowerMode.Discharged": 1,
|
||||
"PowerMode.Discharging": 2,
|
||||
"PowerMode.Charging": 3,
|
||||
"PowerMode.Charged": 4,
|
||||
"RobotMode.None": 0,
|
||||
"RobotMode.Follow": 1,
|
||||
"RobotMode.MoveToTarget": 2,
|
||||
"RobotMode.Roam": 3,
|
||||
"RobotMode.Unload": 4,
|
||||
"RobotMode.PathToTarget": 5,
|
||||
"RobotMode.StorageFull": 6,
|
||||
"SortingClass.Default": 0,
|
||||
"SortingClass.Kits": 1,
|
||||
"SortingClass.Tools": 2,
|
||||
"SortingClass.Resources": 3,
|
||||
"SortingClass.Food": 4,
|
||||
"SortingClass.Clothing": 5,
|
||||
"SortingClass.Appliances": 6,
|
||||
"SortingClass.Atmospherics": 7,
|
||||
"SortingClass.Storage": 8,
|
||||
"SortingClass.Ores": 9,
|
||||
"SortingClass.Ices": 10,
|
||||
"SlotClass.None": 0,
|
||||
"SlotClass.Helmet": 1,
|
||||
"SlotClass.Suit": 2,
|
||||
"SlotClass.Back": 3,
|
||||
"SlotClass.GasFilter": 4,
|
||||
"SlotClass.GasCanister": 5,
|
||||
"SlotClass.Motherboard": 6,
|
||||
"SlotClass.Circuitboard": 7,
|
||||
"SlotClass.DataDisk": 8,
|
||||
"SlotClass.Organ": 9,
|
||||
"SlotClass.Ore": 10,
|
||||
"SlotClass.Plant": 11,
|
||||
"SlotClass.Uniform": 12,
|
||||
"SlotClass.Entity": 13,
|
||||
"SlotClass.Battery": 14,
|
||||
"SlotClass.Egg": 15,
|
||||
"SlotClass.Belt": 16,
|
||||
"SlotClass.Tool": 17,
|
||||
"SlotClass.Appliance": 18,
|
||||
"SlotClass.Ingot": 19,
|
||||
"SlotClass.Torpedo": 20,
|
||||
"SlotClass.Cartridge": 21,
|
||||
"SlotClass.AccessCard": 22,
|
||||
"SlotClass.Magazine": 23,
|
||||
"SlotClass.Circuit": 24,
|
||||
"SlotClass.Bottle": 25,
|
||||
"SlotClass.ProgrammableChip": 26,
|
||||
"SlotClass.Glasses": 27,
|
||||
"SlotClass.CreditCard": 28,
|
||||
"SlotClass.DirtCanister": 29,
|
||||
"SlotClass.SensorProcessingUnit": 30,
|
||||
"SlotClass.LiquidCanister": 31,
|
||||
"SlotClass.LiquidBottle": 32,
|
||||
"SlotClass.Wreckage": 33,
|
||||
"SlotClass.SoundCartridge": 34,
|
||||
"SlotClass.DrillHead": 35,
|
||||
"SlotClass.ScanningHead": 36,
|
||||
"SlotClass.Flare": 37,
|
||||
"SlotClass.Blocked": 38,
|
||||
"GasType.Undefined": 0,
|
||||
"GasType.Oxygen": 1,
|
||||
"GasType.Nitrogen": 2,
|
||||
"GasType.CarbonDioxide": 4,
|
||||
"GasType.Volatiles": 8,
|
||||
"GasType.Pollutant": 16,
|
||||
"GasType.Water": 32,
|
||||
"GasType.NitrousOxide": 64,
|
||||
"GasType.LiquidNitrogen": 128,
|
||||
"GasType.LiquidOxygen": 256,
|
||||
"GasType.LiquidVolatiles": 512,
|
||||
"GasType.Steam": 1024,
|
||||
"GasType.LiquidCarbonDioxide": 2048,
|
||||
"GasType.LiquidPollutant": 4096,
|
||||
"GasType.LiquidNitrousOxide": 8192,
|
||||
"GasType.Hydrogen": 16384,
|
||||
"GasType.LiquidHydrogen": 32768,
|
||||
"GasType.PollutedWater": 65536
|
||||
}
|
||||
}
|
||||
52119
ic10emu/data/Stationpedia.json
Normal file
52119
ic10emu/data/Stationpedia.json
Normal file
File diff suppressed because it is too large
Load Diff
12
ic10emu/data/instruction_help_patches.json
Normal file
12
ic10emu/data/instruction_help_patches.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"english": {
|
||||
"bapz": "Branch to line c if abs(a) <= max(b * abs(a), float.epsilon * 8)",
|
||||
"bapzal": "Branch to line c if abs(a) <= max(b * abs(a), float.epsilon * 8) and store next line number in ra",
|
||||
"bnaz": "Branch to line c if abs(a) > max b * abs(a), float.epsilon * 8)",
|
||||
"bnazal": "Branch to line c if abs(a) > max b * abs(a), float.epsilon * 8) and store next line number in ra",
|
||||
"brapz": "Relative branch to line c if abs(a) <= max(b * abs(a), float.epsilon * 8)",
|
||||
"brnaz": "Relative branch to line c if abs(a) > max(b * abs(a), float.epsilon * 8)",
|
||||
"sapz": "Register = 1 if |a| <= max(b * abs(a), float.epsilon * 8), otherwise 0",
|
||||
"snaz": "Register = 1 if |a| > max(b * abs(a), float.epsilon), otherwise 0"
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ atan Returns the angle (radians) whos tan is the specified value
|
||||
atan2 Returns the angle (radians) whose tangent is the quotient of two specified values: a (y) and b (x)
|
||||
bap Branch to line d if abs(a - b) <= max(c * max(abs(a), abs(b)), float.epsilon * 8)
|
||||
bapal Branch to line d if abs(a - b) <= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra
|
||||
bapz Branch to line c if abs(a) <= float.epsilon * 8
|
||||
bapzal Branch to line c if abs(a) <= float.epsilon * 8
|
||||
bapz Branch to line c if abs(a) <= max(b * abs(a), float.epsilon * 8)
|
||||
bapzal Branch to line c if abs(a) <= max(b * abs(a), float.epsilon * 8) and store next line number in ra
|
||||
bdns Branch to line a if device d isn't set
|
||||
bdnsal Jump execution to line a and store next line number if device is not set
|
||||
bdse Branch to line a if device d is set
|
||||
@@ -37,14 +37,14 @@ bltzal Branch to line b if a < 0 and store next line number in ra
|
||||
bna Branch to line d if abs(a - b) > max(c * max(abs(a), abs(b)), float.epsilon * 8)
|
||||
bnaal Branch to line d if abs(a - b) <= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra
|
||||
bnan Branch to line b if a is not a number (NaN)
|
||||
bnaz Branch to line c if abs(a) > float.epsilon * 8
|
||||
bnazal Branch to line c if abs(a) > float.epsilon * 8
|
||||
bnaz Branch to line c if abs(a) > max b * abs(a), float.epsilon * 8)
|
||||
bnazal Branch to line c if abs(a) > max b * abs(a), float.epsilon * 8) and store next line number in ra
|
||||
bne Branch to line c if a != b
|
||||
bneal Branch to line c if a != b and store next line number in ra
|
||||
bnez branch to line b if a != 0
|
||||
bnezal Branch to line b if a != 0 and store next line number in ra
|
||||
brap Relative branch to line d if abs(a - b) <= max(c * max(abs(a), abs(b)), float.epsilon * 8)
|
||||
brapz Relative branch to line c if abs(a) <= float.epsilon * 8
|
||||
brapz Relative branch to line c if abs(a) <= max(b * abs(a), float.epsilon * 8)
|
||||
brdns Relative jump to line a if device is not set
|
||||
brdse Relative jump to line a if device is set
|
||||
breq Relative branch to line c if a == b
|
||||
@@ -59,7 +59,7 @@ brlt Relative jump to line c if a < b
|
||||
brltz Relative branch to line b if a < 0
|
||||
brna Relative branch to line d if abs(a - b) > max(c * max(abs(a), abs(b)), float.epsilon * 8)
|
||||
brnan Relative branch to line b if a is not a number (NaN)
|
||||
brnaz Relative branch to line c if abs(a) > float.epsilon * 8
|
||||
brnaz Relative branch to line c if abs(a) > max(b * abs(a), float.epsilon * 8)
|
||||
brne Relative branch to line c if a != b
|
||||
brnez Relative branch to line b if a != 0
|
||||
ceil Register = smallest integer greater than a
|
||||
@@ -97,7 +97,7 @@ rand Register = a random value x with 0 <= x < 1
|
||||
round Register = a rounded to nearest integer
|
||||
s Stores register value to LogicType on device by housing index value.
|
||||
sap Register = 1 if abs(a - b) <= max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0
|
||||
sapz Register = 1 if |a| <= float.epsilon * 8, otherwise 0
|
||||
sapz Register = 1 if |a| <= max(b * abs(a), float.epsilon * 8), otherwise 0
|
||||
sb Stores register value to LogicType on all output network devices with provided type hash.
|
||||
sbn Stores register value to LogicType on all output network devices with provided type hash and name.
|
||||
sbs Stores register value to LogicSlotType on all output network devices with provided type hash in the provided slot.
|
||||
@@ -122,7 +122,7 @@ sltz Register = 1 if a < 0, otherwise 0
|
||||
sna Register = 1 if abs(a - b) > max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0
|
||||
snan Register = 1 if a is NaN, otherwise 0
|
||||
snanz Register = 0 if a is NaN, otherwise 1
|
||||
snaz Register = 1 if |a| > float.epsilon, otherwise 0
|
||||
snaz Register = 1 if |a| > max(b * abs(a), float.epsilon), otherwise 0
|
||||
sne Register = 1 if a != b, otherwise 0
|
||||
snez Register = 1 if a != 0, otherwise 0
|
||||
sqrt Register = square root of a
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
from collections import defaultdict
|
||||
import json
|
||||
import xml.etree.ElementTree as ET
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import re
|
||||
from itertools import chain
|
||||
import struct
|
||||
import binascii
|
||||
import json
|
||||
import re
|
||||
import struct
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
from collections import defaultdict
|
||||
from itertools import chain
|
||||
from pathlib import Path
|
||||
|
||||
def intOrNone(val):
|
||||
|
||||
def intOrNone(val: str):
|
||||
try:
|
||||
return int(val)
|
||||
except ValueError:
|
||||
@@ -20,32 +21,32 @@ def main():
|
||||
description="Generate instructions, enums, and docs for lsp.\n\nWorks best when using https://github.com/Ryex/StationeersStationpediaExtractor",
|
||||
epilog="Point at the Stationeers install and go!",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
arg_parser.add_argument("path", help="Path to Stationeers installation")
|
||||
arg_parser.add_argument("--lang", help="language to extract from (ie. english)", default="english")
|
||||
_ = arg_parser.add_argument("path", help="Path to Stationeers installation")
|
||||
_ = arg_parser.add_argument("--lang", help="language to extract from (ie. english)", default="english")
|
||||
args = arg_parser.parse_args()
|
||||
install_path = Path(args.path)
|
||||
install_path = Path(args.path) # type:ignore[reportAny]
|
||||
if install_path.match("Stationeers/*.exe") or install_path.match("Stationeers/rocketstation_Data"):
|
||||
install_path = install_path.parent
|
||||
elif install_path.name == "Stationeers":
|
||||
pass
|
||||
elif (install_path / "Stationeers").is_dir():
|
||||
install_path = install_path / "Stationeers"
|
||||
|
||||
data_path = install_path / "rocketstation_Data" / "StreamingAssets" / "Language"
|
||||
|
||||
data_path = install_path / "rocketstation_Data" / "StreamingAssets" / "Language"
|
||||
if not data_path.is_dir():
|
||||
|
||||
print(f"Invalid install path. {install_path} does not point to a valid Stationeers installation")
|
||||
arg_parser.print_help()
|
||||
sys.exit(1)
|
||||
|
||||
lang = args.lang
|
||||
lang: str = args.lang # type:ignore[reportAny]
|
||||
if not (data_path / f"{lang}.xml").is_file():
|
||||
print("Language file '{lang}.xml' does not exist. can not pull help strings.")
|
||||
sys.exit(2)
|
||||
|
||||
extract_data(install_path, data_path, lang)
|
||||
|
||||
def extract_data(install_path, data_path: Path, language: str):
|
||||
def extract_data(install_path: Path, data_path: Path, language: str):
|
||||
tree = ET.parse(data_path / f"{language}.xml")
|
||||
root = tree.getroot()
|
||||
interface = root.find("Interface")
|
||||
@@ -53,7 +54,7 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
colors = root.find("Colors")
|
||||
elms = [elm for elm in (interface, strings, colors) if elm is not None ]
|
||||
|
||||
|
||||
|
||||
logic_type = re.compile(r"LogicType(\w+)")
|
||||
logic_slot_type = re.compile(r"LogicSlotType(\w+)")
|
||||
script_command = re.compile(r"ScriptCommand(\w+)")
|
||||
@@ -89,11 +90,11 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
op_help_patch_path = Path("data") / "instruction_help_patches.json"
|
||||
if op_help_patch_path.exists():
|
||||
with op_help_patch_path.open(mode="r") as f:
|
||||
patches = defaultdict(dict)
|
||||
patches.update(json.load(f))
|
||||
patches: dict[str, dict[str,str]] = defaultdict(dict)
|
||||
patches.update(json.load(f)) # type:ignore[reportAny]
|
||||
operation_help_strings.update(patches[language])
|
||||
|
||||
enums = {}
|
||||
enums: dict[str, tuple[int | None, str]] = {}
|
||||
with (Path("data") / "enums.txt").open("r") as f:
|
||||
for line in f.readlines():
|
||||
match line.strip().split(' ', maxsplit=2):
|
||||
@@ -121,7 +122,7 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
logictypes[name] = (intOrNone(val), help)
|
||||
case _:
|
||||
pass
|
||||
|
||||
|
||||
with(Path("data") / "slotlogictypes.txt").open("r") as f:
|
||||
for line in f.readlines():
|
||||
match line.strip().split(' ', maxsplit=2):
|
||||
@@ -136,8 +137,8 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
slotlogictypes[name] = (intOrNone(val), help)
|
||||
case _:
|
||||
pass
|
||||
|
||||
batchmodes = {}
|
||||
|
||||
batchmodes: dict[str, tuple[int | None, str]] = {}
|
||||
with(Path("data") / "batchmodes.txt").open("r") as f:
|
||||
for line in f.readlines():
|
||||
match line.strip().split(' ', maxsplit=2):
|
||||
@@ -148,7 +149,7 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
case _:
|
||||
pass
|
||||
|
||||
reagentmodes = {}
|
||||
reagentmodes: dict[str, tuple[int | None, str]] = {}
|
||||
with(Path("data") / "reagentmodes.txt").open("r") as f:
|
||||
for line in f.readlines():
|
||||
match line.strip().split(' ', maxsplit=2):
|
||||
@@ -162,8 +163,8 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
enum_values_path = install_path / "Stationpedia" / "Enums.json"
|
||||
if enum_values_path.exists():
|
||||
with enum_values_path.open(mode="r") as f:
|
||||
enum_values = json.load(f)
|
||||
def update_enum(enum, values):
|
||||
enum_values: dict[str, dict[str, int]] = json.load(f)
|
||||
def update_enum(enum: dict[str, tuple[int | None, str]], values: dict[str, int]):
|
||||
for name, val, in values.items():
|
||||
if name in enum:
|
||||
_, help = enum[name]
|
||||
@@ -178,13 +179,13 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
update_enum(batchmodes, enum_values["LogicBatchMethod"])
|
||||
update_enum(reagentmodes, enum_values["LogicReagentMode"])
|
||||
update_enum(enums, enum_values["Enums"])
|
||||
|
||||
|
||||
op_help_path = Path("data") / "instructions_help.txt"
|
||||
with op_help_path.open(mode="w") as f:
|
||||
for key, val in sorted(operation_help_strings.items()):
|
||||
f.write("{} {}\n".format(key, val.replace("\r", "").replace("\n", "\\n")))
|
||||
_ = f.write("{} {}\n".format(key, val.replace("\r", "").replace("\n", "\\n")))
|
||||
|
||||
stationpedia: dict[str, tuple[str, str | None]] = {}
|
||||
stationpedia: dict[int, tuple[str, str | None]] = {}
|
||||
things = root.find("Things")
|
||||
reagents = root.find("Reagents")
|
||||
hashables = [elm for elm in (things, reagents) if elm is not None]
|
||||
@@ -197,44 +198,44 @@ def extract_data(install_path, data_path: Path, language: str):
|
||||
value = value.text
|
||||
if key is None:
|
||||
continue
|
||||
crc = binascii.crc32(key.encode('utf-8'))
|
||||
crc_s = struct.unpack("i", struct.pack("I", crc))[0]
|
||||
stationpedia[crc_s] = (key, value)
|
||||
|
||||
crc_u = binascii.crc32(key.encode('utf-8'))
|
||||
crc_i: int = struct.unpack("i", struct.pack("I", crc_u))[0]
|
||||
stationpedia[crc_i] = (key, value)
|
||||
|
||||
exported_stationpedia_path = install_path / "Stationpedia" / "Stationpedia.json"
|
||||
if exported_stationpedia_path.exists():
|
||||
with exported_stationpedia_path.open(mode="r") as f:
|
||||
exported = json.load(f)
|
||||
for page in exported["pages"]:
|
||||
exported: dict[str, list[dict[str, Any]]] = json.load(f) # type:ignore[reportAny]
|
||||
for page in exported["pages"]: # type:ignore[reportUnknownVariableType]
|
||||
stationpedia[page["PrefabHash"]] = (page["PrefabName"], page["Title"])
|
||||
|
||||
|
||||
hashables_path = Path("data") / "stationpedia.txt"
|
||||
with hashables_path.open(mode="w") as f:
|
||||
for key, val in sorted(stationpedia.items(), key=lambda i: i[1][0]):
|
||||
name = val[0]
|
||||
desc = val[1] if val[1] is not None else ""
|
||||
f.write("{} {} {}\n".format(key, name, desc.replace("\r", "").replace("\n", "\\n")))
|
||||
_ = f.write("{} {} {}\n".format(key, name, desc.replace("\r", "").replace("\n", "\\n")))
|
||||
|
||||
logic_types_path = Path("data") / "logictypes.txt"
|
||||
with logic_types_path.open(mode="w") as f:
|
||||
for t, (v, help) in sorted(logictypes.items()):
|
||||
f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
_ = f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
slot_logic_types_path = Path("data") / "slotlogictypes.txt"
|
||||
with slot_logic_types_path.open(mode="w") as f:
|
||||
for t, (v, help) in sorted(slotlogictypes.items()):
|
||||
f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
_ = f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
batch_modes_path = Path("data") / "batchmodes.txt"
|
||||
with batch_modes_path.open(mode="w") as f:
|
||||
for t, (v, help) in sorted(batchmodes.items()):
|
||||
f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
_ = f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
reagent_modes_path = Path("data") / "reagentmodes.txt"
|
||||
with reagent_modes_path.open(mode="w") as f:
|
||||
for t, (v, help) in sorted(reagentmodes.items()):
|
||||
f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
_ = f.write(f"{t} {v} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
enums_path = Path("data") / "enums.txt"
|
||||
with enums_path.open(mode="w") as f:
|
||||
for name, (val, help) in sorted(enums.items()):
|
||||
f.write(f"{name} {val} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
_ = f.write(f"{name} {val} {help.replace("\r", "").replace("\n", "\\n")}\n")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user