Skip to content

Commit

Permalink
Re-add research_report.start_transmit() (addresses #125)
Browse files Browse the repository at this point in the history
  • Loading branch information
untoldwind committed Feb 26, 2024
1 parent 01dcb00 commit 31b20b9
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changes

## 0.5.3.3 -> 0.5.3.4

Hotfix:
* Re-add accidentally dropped `research_report.start_transmission()` (#125)

## 0.5.3.2 -> 0.5.3.3

* Fix stuck in rebooting error if there is an initial compilation failure
Expand Down
5 changes: 5 additions & 0 deletions KSP2Runtime/KSPScience/KSPScienceModule.ResearchReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@ public ResearchReportAdapter(ScienceStorageComponent scienceStorageComponent, Re
[KSField] public double TimeRequired => researchReport.TimeRequired;

[KSField] public double TransmissionSize => researchReport.TransmissionSize;

[KSMethod]
public bool StartTransmit() {
return scienceStorageComponent.StartReportTransmission(researchReport.ResearchReportKey);
}
}
}
4 changes: 2 additions & 2 deletions SpaceWarpMod/KontrolSystemMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

namespace KontrolSystem.SpaceWarpMod {

[BepInPlugin("com.github.untoldwind.KontrolSystem2", "KontrolSystem2", "0.5.3.3")]
[BepInPlugin("com.github.untoldwind.KontrolSystem2", "KontrolSystem2", "0.5.3.4")]
[BepInDependency(SpaceWarpPlugin.ModGuid, SpaceWarpPlugin.ModVer)]
[BepInDependency(KSPAddonsModule.FlightPlanAdapter.ModGuid, BepInDependency.DependencyFlags.SoftDependency)]
public class KontrolSystemMod : BaseSpaceWarpPlugin {
public const string ModGuid = "com.github.untoldwind.KontrolSystem2";
public const string ModName = "KontrolSystem2";
public const string ModVersion = "0.5.3.3";
public const string ModVersion = "0.5.3.4";

private ModuleManagerWindow? moduleManagerWindow;
private UIWindows? uiWindows;
Expand Down
2 changes: 1 addition & 1 deletion SpaceWarpMod/swinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Kontrol System",
"description": "Autopilot scripting framework",
"source": "https://github.com/untoldwind/KontrolSystem2",
"version": "0.5.3.3",
"version": "0.5.3.4",
"dependencies": [],
"ksp2_version": {
"min": "0",
Expand Down
2 changes: 1 addition & 1 deletion Tools/vscode/to2-syntax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "to2-syntax",
"displayName": "to2-syntax",
"description": "",
"version": "0.0.19",
"version": "0.0.20",
"license": "MIT",
"engines": {
"vscode": "^1.76.0"
Expand Down
12 changes: 11 additions & 1 deletion Tools/vscode/to2-syntax/server/src/reference/reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -19049,7 +19049,17 @@
}
}
},
"methods": {},
"methods": {
"start_transmit": {
"isAsync": false,
"name": "start_transmit",
"parameters": [],
"returnType": {
"kind": "Builtin",
"name": "bool"
}
}
},
"assignableFromAny": false,
"assignableFrom": []
},
Expand Down
10 changes: 10 additions & 0 deletions docs/reference/ksp/science.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ transmission_percentage | float | R/O |
transmission_size | float | R/O |
transmission_status | bool | R/O |

#### Methods

##### start_transmit

```rust
researchreport.start_transmit ( ) -> bool
```



### ScienceExperimentType

Science experiment type
Expand Down
2 changes: 1 addition & 1 deletion prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ zip -r KontrolSystem2-${version}.zip BepInEx

gh release upload v${version} KontrolSystem2-${version}.zip
gh release upload v${version} ../Tools/vscode/to2-syntax/to2-syntax-0.0.1.vsix
gh release upload v${version} ../Tools/vscode/to2-syntax/to2-syntax-0.0.19.vsix
gh release upload v${version} ../Tools/vscode/to2-syntax/to2-syntax-0.0.20.vsix
gh release upload v${version} ../Tools/vscode/to2-syntax/server/out/lsp-server.js

0 comments on commit 31b20b9

Please sign in to comment.