Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KSP-RO/RealFuels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: rf-v12.8.3.1
Choose a base ref
...
head repository: KSP-RO/RealFuels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 7,139 additions and 5,202 deletions.
  1. +101 −0 .github/workflows/attachReleaseArtifacts.yml
  2. +79 −0 .github/workflows/build.yml
  3. +61 −0 .github/workflows/pr-comment.yml
  4. +0 −1 .gitignore
  5. +37 −32 NetKAN/RealFuels.netkan
  6. +155 −0 RealFuels/CryoTanks_modularFuelTanks.cfg
  7. +181 −0 RealFuels/Localization/en-us.cfg
  8. +181 −0 RealFuels/Localization/ru.cfg
  9. +181 −0 RealFuels/Localization/zh-cn.cfg
  10. +3 −0 RealFuels/MFSSettings.cfg
  11. +1 −138 RealFuels/NearFuture_Propulsion_modularFuelTanks.cfg
  12. +0 −11 RealFuels/ProceduralPartsFixes.cfg
  13. +167 −3 RealFuels/Readme_RF.txt
  14. +15 −8 RealFuels/RealFuels.version
  15. +9 −0 RealFuels/RealSettings.cfg
  16. +0 −5 RealFuels/Resources/CRPFix.cfg
  17. +2 −7 RealFuels/Resources/MLITechUpgrades.cfg
  18. +182 −39 RealFuels/Resources/ResourceHsps.cfg
  19. +171 −0 RealFuels/SquadExpansion_modularFuelTanks.cfg
  20. +0 −377 RealFuels/Stretchy.cfg
  21. +213 −0 RealFuels/changelog.cfg
  22. +40 −0 Source/B9PSPatchProject/B9PSMFTHandler.cs
  23. +32 −0 Source/B9PSPatchProject/Harmony/B9PS.cs
  24. +14 −0 Source/B9PSPatchProject/HarmonyPatcher.cs
  25. +65 −0 Source/B9PSPatchProject/RealFuelsB9PSPatch.csproj
  26. +14 −9 ...ce/{TestFlightRF/Properties/AssemblyInfo.cs → B9PSPatchProject/assembly/AssemblyInfoB9PSPatch.cs}
  27. +47 −47 Source/EditorToolbar.cs
  28. +94 −0 Source/Engines/ConfigFilters.cs
  29. +334 −0 Source/Engines/ModuleBimodalEngineConfigs.cs
  30. +1,025 −893 Source/Engines/ModuleEngineConfigs.cs
  31. +683 −341 Source/Engines/ModuleEnginesRF.cs
  32. +48 −0 Source/Engines/ModuleHybridEngine.cs
  33. +58 −135 Source/Engines/RFSettings.cs
  34. +140 −30 Source/Engines/SolverRF.cs
  35. +2 −0 Source/EntryCosts/EngineConfigUpgrade.cs
  36. +95 −39 Source/EntryCosts/EntryCostDatabase.cs
  37. +19 −1 Source/EntryCosts/Initializer.cs
  38. +1 −1 Source/EntryCosts/PartEntryCostHolder.cs
  39. +1 −1 Source/EntryCosts/TLUpgrade.cs
  40. +100 −90 Source/EntryCosts/UpgradeManager.cs
  41. +4 −3 Source/Makefile
  42. +74 −93 Source/Pumps/RefuelingPump.cs
  43. +55 −30 Source/RealFuels.csproj
  44. +10 −7 Source/RealFuels.sln
  45. +3 −2 Source/RealFuels.userprefs
  46. +0 −23 Source/Tanks/EditorCrossfeedSetMaintainer.cs
  47. +138 −0 Source/Tanks/EditorPartSetMaintainer.cs
  48. +43 −40 Source/Tanks/FuelInfo.cs
  49. +224 −406 Source/Tanks/FuelTank.cs
  50. +47 −38 Source/Tanks/FuelTankList.cs
  51. +48 −94 Source/Tanks/MFSSettings.cs
  52. +878 −997 Source/Tanks/ModuleFuelTanks.cs
  53. +331 −497 Source/Tanks/ModuleFuelTanksRF.cs
  54. +49 −47 Source/Tanks/TankDefinition.cs
  55. +0 −32 Source/Tanks/TankDefinitionList.cs
  56. +126 −0 Source/Tanks/TankDefinitionSelectionGUI.cs
  57. +277 −314 Source/Tanks/TankWindow.cs
  58. +0 −88 Source/TestFlightRF/TestFlightRF.csproj
  59. +0 −2 Source/TestFlightRF/TestFlightRF.csproj.DotSettings
  60. +0 −80 Source/TestFlightRF/TestFlightRealFuels.cs
  61. +0 −12 Source/TestFlightRF/custom.targets
  62. +12 −44 Source/Ullage/UllageModule.cs
  63. +23 −73 Source/Ullage/UllageSet.cs
  64. +49 −45 Source/Ullage/UllageSimulator.cs
  65. +29 −10 Source/Utilities/Styles.cs
  66. +4 −3 Source/Utilities/TestFlightWrapper.cs
  67. +142 −4 Source/Utilities/Utilities.cs
  68. +12 −6 Source/assembly/{AssemblyInfoRF.in → AssemblyInfoRF.cs}
  69. +5 −4 Source/assembly/Checkers.cs
  70. +3 −0 Source/tools/git-version-gen
  71. +2 −0 Source/tools/post-build-rf.sh
101 changes: 101 additions & 0 deletions .github/workflows/attachReleaseArtifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: "Attach Release Artifacts"

# Controls when the action will run.
on:
release:
types: [published]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
attach-release-artifacts:
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get Branch
shell: bash
run: |
releaseBranch=${{ github.event.release.target_commitish }}
echo "Found branch ${releaseBranch}"
echo "tagged_branch=${releaseBranch}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ env.tagged_branch }}

- name: Download required assemblies
id: download-assemblies
uses: KSP-RO/BuildTools/download-assemblies@master
with:
KSP_ZIP_PASSWORD: ${{ secrets.KSP_ZIP_PASSWORD }}

- name: Update AssemblyInfo
uses: KSP-RO/BuildTools/update-assembly-info@master
with:
path: ${GITHUB_WORKSPACE}/Source/assembly/AssemblyInfoRF.cs
tag: ${{ github.event.release.tag_name }}

- name: Build mod solution
run: msbuild ${GITHUB_WORKSPACE}/Source/RealFuels.sln /t:build /restore /p:RestorePackagesConfig=true /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}"

- name: Remove excess DLLs
uses: KSP-RO/BuildTools/remove-excess-dlls@master
with:
path: ${GITHUB_WORKSPACE}/RealFuels/

- name: Update version file
uses: KSP-RO/BuildTools/update-version-file@master
with:
tag: ${{ github.event.release.tag_name }}
path: ${GITHUB_WORKSPACE}/RealFuels/RealFuels.version

- name: Update changelog file
uses: KSP-RO/BuildTools/process-changelog@master
with:
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
path: ${GITHUB_WORKSPACE}/RealFuels/changelog.cfg

- name: Assemble release
id: assemble-release
run: |
RELEASE_DIR="${RUNNER_TEMP}/release"
echo "Release dir: ${RELEASE_DIR}"
echo "Release zip: ${RELEASE_DIR}/RealFuels_${{ github.event.release.tag_name }}.zip"
mkdir -v "${RELEASE_DIR}"
mkdir -v "${RELEASE_DIR}"/GameData
echo "::set-output name=release-dir::${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/RealFuels" "${RELEASE_DIR}"/GameData/RealFuels
cd ${RELEASE_DIR}
zip -r RealFuels_${{ github.event.release.tag_name }}.zip GameData
- name: Upload package to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.assemble-release.outputs.release-dir }}/RealFuels_${{ github.event.release.tag_name }}.zip
asset_name: RealFuels_${{ github.event.release.tag_name }}.zip
asset_content_type: application/zip

- name: Setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Commit changes
shell: bash
env:
TAG_STRING: ${{ github.event.release.tag_name }}
run: |
RELEASEBRANCH=${{ env.tagged_branch }}
git add "${GITHUB_WORKSPACE}/RealFuels/RealFuels.version"
git add "${GITHUB_WORKSPACE}/RealFuels/changelog.cfg"
git commit -m "Update version to $TAG_STRING"
git push origin $RELEASEBRANCH
git tag $TAG_STRING $RELEASEBRANCH --force
git push origin $TAG_STRING --force
79 changes: 79 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is a basic workflow to help you get started with Actions

name: build

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-secret:
uses: KSP-RO/BuildTools/.github/workflows/check-secret.yml@master
secrets:
KSP_ZIP_PASSWORD: ${{ secrets.KSP_ZIP_PASSWORD }}

validate-cfg-files:
uses: KSP-RO/BuildTools/.github/workflows/validate-cfg-files.yml@master

build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
needs: [check-secret]
if: needs.check-secret.outputs.has-password == 'true'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 100

- name: Download required assemblies
id: download-assemblies
uses: KSP-RO/BuildTools/download-assemblies@master
with:
KSP_ZIP_PASSWORD: ${{ secrets.KSP_ZIP_PASSWORD }}

- name: Update AssemblyInfo
uses: KSP-RO/BuildTools/update-assembly-info@master
with:
path: ${GITHUB_WORKSPACE}/Source/assembly/AssemblyInfoRF.cs
tag: "15.9.0.0"

- name: Build mod solution
run: msbuild ${GITHUB_WORKSPACE}/Source/RealFuels.sln /t:build /restore /p:RestorePackagesConfig=true /p:Configuration=Release /p:ReferencePath="${{ steps.download-assemblies.outputs.ksp-dll-path }}"

- name: Remove excess DLLs
uses: KSP-RO/BuildTools/remove-excess-dlls@master
with:
path: ${GITHUB_WORKSPACE}/RealFuels/

- name: Build metadata
uses: KSP-RO/BuildTools/update-version-file@master
with:
path: ${GITHUB_WORKSPACE}/RealFuels/RealFuels.version
tag: "v2.0.0.0"

- name: Assemble release
id: assemble-release
run: |
RELEASE_DIR="${RUNNER_TEMP}/release"
echo "Release dir: ${RELEASE_DIR}"
mkdir -v "${RELEASE_DIR}"
mkdir -v "${RELEASE_DIR}"/GameData
echo "::set-output name=release-dir::${RELEASE_DIR}"
cp -v -R "${GITHUB_WORKSPACE}/RealFuels" "${RELEASE_DIR}"/GameData/RealFuels
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: RealFuels
path: ${{ steps.assemble-release.outputs.release-dir }}
61 changes: 61 additions & 0 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Comment on pull request
on:
workflow_run:
workflows: ['build']
types: [completed]
jobs:
pr_comment:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-22.04
steps:
- uses: actions/github-script@v5
with:
# This snippet is public-domain, taken from
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
script: |
async function upsertComment(owner, repo, issue_number, purpose, body) {
const {data: comments} = await github.rest.issues.listComments(
{owner, repo, issue_number});
const marker = `<!-- bot: ${purpose} -->`;
body = marker + "\n" + body;
const existing = comments.filter((c) => c.body.includes(marker));
if (existing.length > 0) {
const last = existing[existing.length - 1];
core.info(`Updating comment ${last.id}`);
await github.rest.issues.updateComment({
owner, repo,
body,
comment_id: last.id,
});
} else {
core.info(`Creating a comment in issue / PR #${issue_number}`);
await github.rest.issues.createComment({issue_number, body, owner, repo});
}
}
const {owner, repo} = context.repo;
const run_id = ${{github.event.workflow_run.id}};
const pull_requests = ${{ toJSON(github.event.workflow_run.pull_requests) }};
if (!pull_requests.length) {
return core.error("This workflow doesn't match any pull requests!");
}
const artifacts = await github.paginate(
github.rest.actions.listWorkflowRunArtifacts, {owner, repo, run_id});
if (!artifacts.length) {
return core.error(`No artifacts found`);
}
let body = `Download the artifacts for this pull request:\n`;
for (const art of artifacts) {
body += `\n* [${art.name}.zip](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
}
core.info("Review thread message body:", body);
for (const pr of pull_requests) {
await upsertComment(owner, repo, pr.number,
"nightly-link", body);
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -155,7 +155,6 @@ $RECYCLE.BIN/
.DS_Store

Source/assembly/AssemblyInfoMFT.cs
Source/assembly/AssemblyInfoRF.cs
Source/RealFuels.sln
Source/RealFuels.csproj
.vs
69 changes: 37 additions & 32 deletions NetKAN/RealFuels.netkan
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
{
"spec_version" : "v1.4",
"name" : "Real Fuels",
"abstract" : "Real fuels and tanks for KSP",
"identifier" : "RealFuels",
"$kref" : "#/ckan/github/NathanKell/ModularFuelSystem",
"$vref" : "#/ckan/ksp-avc",
"license" : "CC-BY-SA",
"author" : [ "ialdabaoth", "NathanKell", "taniwha", "Starwaster", "blowfish" ],
"release_status" : "stable",
"resources" : { "homepage" : "https://forum.kerbalspaceprogram.com/index.php?showtopic=58236" },
"install" : [
{
"find" : "RealFuels",
"install_to" : "GameData",
"filter" : ".DS_Store"
}
],
"depends" : [
{ "name" : "ModuleManager" },
{ "name" : "RealFuels-Engine-Configs" },
{ "name" : "CommunityResourcePack" },
{ "name" : "SolverEngines" }
],
"conflicts" : [
{ "name" : "ModularFuelSystem" },
{ "name" : "ModularFuelTanks" },
{ "name" : "Fuelswitchtoeverytank" },
{ "name" : "StockFuelSwitch" },
{ "name" : "EngineIgnitor" }
]
}
spec_version: v1.26
name: Real Fuels
abstract: Real fuels and tanks for KSP
identifier: RealFuels
$kref: '#/ckan/github/KSP-RO/RealFuels'
$vref: '#/ckan/ksp-avc'
license: CC-BY-SA
author:
- ialdabaoth
- NathanKell
- taniwha
- Starwaster
- blowfish
release_status: stable
resources:
homepage: https://forum.kerbalspaceprogram.com/index.php?showtopic=58236
install:
- find: RealFuels
install_to: GameData
filter: .DS_Store
depends:
- name: ModuleManager
- name: RealFuels-Engine-Configs
suppress_recommendations: true
- name: CommunityResourcePack
suppress_recommendations: true
- name: SolverEngines
min_version: v3.11.0
suppress_recommendations: true
- name: ROUtils
suppress_recommendations: true
conflicts:
- name: ModularFuelSystem
- name: ModularFuelTanks
- name: Fuelswitchtoeverytank
- name: StockFuelSwitch
- name: EngineIgnitor
Loading