diff --git a/.mod_data.yml b/.mod_data.yml new file mode 100644 index 0000000..2f73d5a --- /dev/null +++ b/.mod_data.yml @@ -0,0 +1,31 @@ +mod-name: CryoTanks +package: + include-dependencies: true # Include dependencies in the package + included-gamedata: + - CryoTanks + included-support: # Include these root-level files in packages + - readme.txt + - changelog.txt +dependencies: # Configure dependencies + ModuleManager: + version: 4.0.2 + location: s3 + B9PartSwitch: + version: 2.7.0 + location: s3 + CommunityResourcePack: + version: 1.0.0 + location: s3 + DynamicBatteryStorage: + tag: 1.4.1 + location: github + repository: ChrisAdderley/DynamicBatteryStorage +deploy: + SpaceDock: + enabled: false # activate/deactivate this deployment script + mod-id: 558 # The Spacedock mod ID for deployment + CurseForge: + enabled: false # activate/deactivate this deployment script + mod-id: 220671 # The CurseForge mod ID for deployment + GitHub: + enabled: true # activate/deactivate this deployment script diff --git a/.travis.yml b/.travis.yml index 20e8055..85661ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,44 +7,28 @@ branches: only: - master script: - - python build_scripts/build.py + - git clone https://github.com/post-kerbin-mining-corporation/build-deploy.git # clone this repo, it contains the stuff that does the heavy lifting + - cd build-deploy + - git checkout master + - cd .. + - pytest -s --testpath "GameData/" build-deploy/src/tests/ # run the deploy tests + - python build-deploy/src/package.py --f ".mod_data.yml" # Build package before_deploy: - - VERSION=$(cat build_scripts/version.txt) - - CHANGELOG=$(cat build_scripts/changelog.md) - - IFS='/'; BASENAME=($TRAVIS_REPO_SLUG); unset IFS; - - RELEASE_NAME="${BASENAME[1]} $VERSION" - - echo $VERSION - - git config --local user.name "ChrisAdderley" - - git config --local user.email "cadderley@gmail.com" - - git remote set-url origin https://ChrisAdderley:${GITHUB_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git - # Only tag if this is the first before_deploy (runs for all providers) - - > - if ! [ "$BEFORE_DEPLOY_RUN" ]; then - export BEFORE_DEPLOY_RUN=1; - git tag $VERSION; - git push origin $VERSION; - fi + - python build-deploy/src/stage.py --f ".mod_data.yml" # Run the staging script deploy: - - provider: s3 + - provider: script + script: python build-deploy/src/deploy.py --f ".mod_data.yml" # Deploy package to spacedock, curse, github + skip_cleanup: true + on: + branch: master + - provider: s3 # releases to S3 access_key_id: $AWS_ACCESS_KEY_ID secret_access_key: $AWS_SECRET_ACCESS_KEY bucket: "nertea-ksp-modding-releases" - local_dir: deploy + local_dir: deploy/CryoTanks skip_cleanup: true acl: public_read region: us-east-2 upload-dir: cryo-tanks on: - condition: $TRAVIS_BRANCH = master - - deploy: - provider: releases - api_key: $GITHUB_OAUTH_TOKEN - file_glob: true - file: deploy/* - # Newline handling is currently broken so changelog must be added manually... - # body: "$CHANGELOG" - name: $RELEASE_NAME - skip_cleanup: true - on: - tags: false - condition: $TRAVIS_BRANCH = master + branch: master diff --git a/CKAN/CryoTanks-Core.netkan b/CKAN/CryoTanks-Core.netkan new file mode 100644 index 0000000..147c722 --- /dev/null +++ b/CKAN/CryoTanks-Core.netkan @@ -0,0 +1,20 @@ +{ + "spec_version": "v1.4", + "identifier": "CryoTanks-Core", + "abstract": "This is the CryoTanks plugin stand-alone, for adding functionality to other mods. It contains no parts and does nothing by itself.", + "name": "Cryo Tanks Core", + "$kref": "#/ckan/github/ChrisAdderley/CryoTanks", + "$vref": "#/ckan/ksp-avc/CryoTanks.version", + "license": "MIT", + "resources": { + "homepage": "https://github.com/ChrisAdderley/CryoTanks/wiki", + "repository": "https://github.com/ChrisAdderley/CryoTanks" + }, + "supports": [ + { "name": "CryoTanks" } + ], + "install" : [ + { "file" : "GameData/CryoTanks/Plugins/SimpleBoiloff.dll", + "install_to" : "GameData/CryoTanks/Plugins" } + ] +} diff --git a/CKAN/CryoTanks.netkan b/CKAN/CryoTanks.netkan new file mode 100644 index 0000000..cdde5ff --- /dev/null +++ b/CKAN/CryoTanks.netkan @@ -0,0 +1,30 @@ +{ + "spec_version": "v1.4", + "identifier": "CryoTanks", + "abstract": "A set of fuel tanks for containing Liquid Hydrogen. Also adds Liquid Hydrogen storage to most stock tanks", + "name": "Cryo Tanks", + "$kref": "#/ckan/github/ChrisAdderley/CryoTanks", + "$vref": "#/ckan/ksp-avc/CryoTanks.version", + "license": "restricted", + "resources": { + "homepage": "https://github.com/ChrisAdderley/CryoTanks/wiki", + "repository": "https://github.com/ChrisAdderley/CryoTanks" + }, + "depends": [ + { "name": "CryoTanks-Core" }, + { "name": "ModuleManager" }, + { "name": "CommunityResourcePack" }, + { "name": "DynamicBatteryStorage" } + ], + "supports": [ + { "name": "KerbalAtomics" }, + { "name": "CryoEngines" } + ], + "install": [ + { + "find" : "CryoTanks", + "install_to" : "GameData", + "filter" : "SimpleBoiloff.dll" + } + ] +} diff --git a/GameData/CryoTanks/Localization/fr-fr.cfg b/GameData/CryoTanks/Localization/fr-fr.cfg new file mode 100644 index 0000000..50be72b --- /dev/null +++ b/GameData/CryoTanks/Localization/fr-fr.cfg @@ -0,0 +1,119 @@ +Localization +{ + fr-fr + { + // CONFIG + // MANUFACTURERS + #LOC_CryoTanks_manufacturer_argylehydro_title = S.A.R.L Argyle Hydroponie + + // SWITCHERS + #LOC_CryoTanks_switcher_tankappearance_title = Apparence + #LOC_CryoTanks_switcher_tankappearance_variant1 = Isolation multi-couches + #LOC_CryoTanks_switcher_tankappearance_variant2 = Couverture isohédrale + #LOC_CryoTanks_switcher_tankappearance_variant3 = Isolation multi-couches [Nu] + #LOC_CryoTanks_switcher_tankappearance_variant4 = Couverture isohédrale [Nu] + #LOC_CryoTanks_switcher_tankappearance_variant5 = Isolation multi-couches [Compact] + #LOC_CryoTanks_switcher_tankappearance_variant6 = Couverture Isohédrale [Compact] + #LOC_CryoTanks_switcher_fuel_title = Type de réservoir + #LOC_CryoTanks_switcher_fuel_lh2 = H2Liq + #LOC_CryoTanks_switcher_fuel_lh2ox = H2Liq/Ox + #LOC_CryoTanks_switcher_fuel_ox = Ox + #LOC_CryoTanks_switcher_fuel_lf = EglLiq + #LOC_CryoTanks_switcher_fuel_lfox = EglLiq/Ox + + // PARTS + #LOC_CryoTanks_hydrogen-10-1_title = Réservoir d'hydrogène H1000-1152 + #LOC_CryoTanks_hydrogen-10-1_description = Le plus gros réservoir d'hydrogène d'Argyle Hydroponie a un volume vraiment pharamineux, mais il est en fait plutôt léger par rapport à sa taille. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-10-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + + #LOC_CryoTanks_hydrogen-5-1_title = Réservoir d'hydrogène H500-576 + #LOC_CryoTanks_hydrogen-5-1_description = Un réservoir d'hydrogène prodigieusement grand qui peut conserver des combustibles cryogéniques. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-5-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-5-2_title = Réservoir d'hydrogène H500-288 + #LOC_CryoTanks_hydrogen-5-2_description = Un réservoir d'hydrogène extrêmement grand qui peut conserver des combustibles cryogéniques. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-5-2_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-5-3_title = Réservoir d'hydrogène H500-144 + #LOC_CryoTanks_hydrogen-5-3_description = Un réservoir d'hydrogène relativement grand qui peut conserver des combustibles cryogéniques. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-5-3_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + + #LOC_CryoTanks_hydrogen-375-1_title = Réservoir d'hydrogène H375-144 + #LOC_CryoTanks_hydrogen-375-1_description = La gamme de réservoirs à hydrogène Mondo d'Argyle est, comme son nom l'indique, monstrueuse. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-375-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-375-2_title = Réservoir d'hydrogène H375-72 + #LOC_CryoTanks_hydrogen-375-2_description = La demande pour un réservoir Mondo moitié moins grand étant forte, le Mondo-30 fut créé. It is slightly less high. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-375-2_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-375-3_title = Réservoir d'hydrogène H375-36 + #LOC_CryoTanks_hydrogen-375-3_description = Le plus petit modèle de la gamme Mondo a l'air un peu écrasé, mais reste parfaitement utilisable. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-375-3_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + + #LOC_CryoTanks_hydrogen-25-1_title = Réservoir d'hydrogène H250-64 + #LOC_CryoTanks_hydrogen-25-1_description = Le réservoir Argyle de milieu de gamme n'a rien de spécial. En fait, on ne lui a même pas donné un nom accrocheur ! Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-25-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-25-2_title = Réservoir d'hydrogène H250-32 + #LOC_CryoTanks_hydrogen-25-2_description = à mi-chemin en matière de taille, à mi-chemin en matière de contenance, à mi-chemin de l'éventail de prix, zut, on le trouve même au milieu des chemins ! Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-25-2_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-25-3_title = Réservoir d'hydrogène H250-16 + #LOC_CryoTanks_hydrogen-25-3_description = Un diamètre modéré et une hauteur réduite confèrent au H250-16 une contenance presque décevante. Mais ! Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir, donc c'est déjà quelque chose. + #LOC_CryoTanks_hydrogen-25-3_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + + #LOC_CryoTanks_hydrogen-125-1_title = Réservoir d'hydrogène H125-8 + #LOC_CryoTanks_hydrogen-125-1_description = L'aspect presque neuf de ce réservoir est légèrement suspect, étant donné qu'il a été envoyé au CSK dans son emballage d'origine. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-125-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-125-2_title =Réservoir d'hydrogène H125-4 + #LOC_CryoTanks_hydrogen-125-2_description = Le plus petit des réservoirs d'hydrogène liquide empilables n'est pas le plus populaire. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-125-2_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + + #LOC_CryoTanks_hydrogen-radial-125-1_title = Réservoir d'hydrogène HR-1 + #LOC_CryoTanks_hydrogen-radial-125-1_description = Affectueusement surnommé le "réservoir du joyeux anniversaire" parmi le personnel du CSK. Ce réservoir fut responsable de 57 blessures lorsqu'un ingénieur tenta d'en utiliser comme gâteau alors qu'il était rempli, et alluma des bougies. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-radial-125-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-radial-25-1_title = Réservoir d'hydrogène HR-18 + #LOC_CryoTanks_hydrogen-radial-25-1_description = Un grand réservoir d'hydrogène. Pas particulièrement solide, mais les critiques emploient des mots comme "stupéfiant", "énorme" et "fuyard". Attendez, est-ce que je devais bien dire ça ? Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-radial-25-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + #LOC_CryoTanks_hydrogen-radial-375-1_title = Réservoir d'hydrogène HR-64 + #LOC_CryoTanks_hydrogen-radial-375-1_description = Ce réservoir fut conçu lorsque l’ingénieur en chef d’Argyle doubla accidentellement le rayon du réservoir HR-18 sur les plans. Après que plusieurs douzaines furent construits et encensés par la critique, sa production en série fut décidée. Il utilise des matériaux isolants avancés pour diminuer l'énergie nécessaire au refroidissement du réservoir. + #LOC_CryoTanks_hydrogen-radial-375-1_tags = réservoir de combustible oxydant ergol liquide fusée hydrogène cryo + + // Converters + #LOC_CryoTanks_isru_LH2_name = H2Liq + #LOC_CryoTanks_isru_LH2_StartAction = Démarrer l'ISRU [H2Liq] + #LOC_CryoTanks_isru_LH2_StopAction = Arrêter l'ISRU [H2Liq] + #LOC_CryoTanks_isru_LH2_ToggleAction = Activer l'ISRU [H2Liq] + + #LOC_CryoTanks_isru_LH2Ox_name = H2Liq + Ox + #LOC_CryoTanks_isru_LH2Ox_StartAction = Démarrer l'ISRU [H2Liq + Ox] + #LOC_CryoTanks_isru_LH2Ox_StopAction = Arrêter l'ISRU [H2Liq + Ox] + #LOC_CryoTanks_isru_LH2Ox_ToggleAction = Activer l'ISRU [H2Liq + Ox] + + // Plugin + // ModuleCryoTank + #LOC_CryoTanks_ModuleCryoTank_ModuleName = Réservoir cryogénique + #LOC_CryoTanks_ModuleCryoTank_PartInfoUncooled = Les combustibles cryogéniques s'évaporent avec le temps\n + #LOC_CryoTanks_ModuleCryoTank_PartInfoCooled = Les combustibles cryogéniques s'évaporent avec le temps s'ils ne sont pas refroidis<<1>>\n\n Coût de refroidissement : <<2>> Ce/s pour 1000 unités\n + #LOC_CryoTanks_ModuleCryoTank_PartInfoBoiloff = \n- <<1>>: -<<2>>%/h + #LOC_CryoTanks_ModuleCryoTank_PartInfoBoiloffOutput = \n- <<1>>: +<<2>>%/h + + + #LOC_CryoTanks_ModuleCryoTank_Field_BoiloffStatus = Évaporation + #LOC_CryoTanks_ModuleCryoTank_Field_BoiloffStatus_NoFuel = Pas de combustible + #LOC_CryoTanks_ModuleCryoTank_Field_BoiloffStatus_Insulated = Isolé + #LOC_CryoTanks_ModuleCryoTank_Field_BoiloffStatus_Boiloff = Perd <<1>> u/<<2>> + + #LOC_CryoTanks_ModuleCryoTank_TimeInterval_Second_Abbrev = s + #LOC_CryoTanks_ModuleCryoTank_TimeInterval_Hour_Abbrev = h + #LOC_CryoTanks_ModuleCryoTank_TimeInterval_Minute_Abbrev = min + + #LOC_CryoTanks_ModuleCryoTank_Field_CoolingStatus = Isolation + #LOC_CryoTanks_ModuleCryoTank_Field_CoolingStatus_Editor = Coût <<1>> Ce/s + #LOC_CryoTanks_ModuleCryoTank_Field_CoolingStatus_NoFuel = Pas de combustible + #LOC_CryoTanks_ModuleCryoTank_Field_CoolingStatus_Disabled = Désactivé + #LOC_CryoTanks_ModuleCryoTank_Field_CoolingStatus_Uncooled = Non refroidi + #LOC_CryoTanks_ModuleCryoTank_Field_CoolingStatus_Cooling = Consomme <<1>> Ce/s + + #LOC_CryoTanks_ModuleCryoTank_Event_Enable = Démarrer le refroidissement + #LOC_CryoTanks_ModuleCryoTank_Event_Disable = Arrêter le refroidissement + + #LOC_CryoTanks_ModuleCryoTank_Action_EnableAction = Démarrer le refroidissement + #LOC_CryoTanks_ModuleCryoTank_Action_DisableAction = Arrêter le refroidissement + #LOC_CryoTanks_ModuleCryoTank_Action_ToggleAction = Activer le refroidissement + } +} diff --git a/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-5-3.cfg b/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-5-3.cfg index 0389d62..2ae518e 100644 --- a/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-5-3.cfg +++ b/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-5-3.cfg @@ -82,7 +82,7 @@ PART } SUBTYPE { - name = WhiteCompact + name = FoilCompact transform = COLLIDERCOMPACT transform = COLLIDERTANK1 transform = COLLIDERTANK2 @@ -91,14 +91,14 @@ PART transform = 5mCompactStructExtra transform = 5mStructureCompact transform = 5mCoreStructure - transform = Short5mTankIso + transform = Short5mTankFoil node = top01 node = bottom01 title = #LOC_CryoTanks_switcher_tankappearance_variant5 } SUBTYPE { - name = FoilCompact + name = WhiteCompact transform = COLLIDERCOMPACT transform = COLLIDERTANK1 transform = COLLIDERTANK2 @@ -107,14 +107,14 @@ PART transform = 5mCompactStructExtra transform = 5mStructureCompact transform = 5mCoreStructure - transform = Short5mTankFoil + transform = Short5mTankIso node = top01 node = bottom01 title = #LOC_CryoTanks_switcher_tankappearance_variant6 } SUBTYPE { - name = WhiteBare + name = FoilBare transform = COLLIDERBARE transform = COLLIDERTANK1 transform = COLLIDERTANK2 @@ -122,14 +122,14 @@ PART transform = COLLIDERTANK4 transform = 5mBare transform = 5mCoreStructure - transform = Short5mTankIso + transform = Short5mTankFoil node = top02 node = bottom02 title = #LOC_CryoTanks_switcher_tankappearance_variant3 } SUBTYPE { - name = FoilBare + name = WhiteBare transform = COLLIDERBARE transform = COLLIDERTANK1 transform = COLLIDERTANK2 @@ -137,7 +137,7 @@ PART transform = COLLIDERTANK4 transform = 5mBare transform = 5mCoreStructure - transform = Short5mTankFoil + transform = Short5mTankIso node = top02 node = bottom02 title = #LOC_CryoTanks_switcher_tankappearance_variant4 diff --git a/GameData/CryoTanks/Versioning/CryoTanks.version b/GameData/CryoTanks/Versioning/CryoTanks.version index 5ee43f2..e72dfa5 100644 --- a/GameData/CryoTanks/Versioning/CryoTanks.version +++ b/GameData/CryoTanks/Versioning/CryoTanks.version @@ -6,23 +6,23 @@ { "MAJOR":1, "MINOR":1, - "PATCH":1, + "PATCH":2, "BUILD":0 }, "KSP_VERSION": { "MAJOR":1, - "MINOR":6, - "PATCH":1 + "MINOR":7, + "PATCH":0 }, "KSP_VERSION_MIN":{ "MAJOR":1, - "MINOR":6, - "PATCH":1 + "MINOR":7, + "PATCH":0 }, "KSP_VERSION_MAX":{ "MAJOR":1, - "MINOR":6, + "MINOR":7, "PATCH":99 } } diff --git a/README.md b/README.md index 22fa9fb..64836e2 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ For translation instructions please see [Localization Instructions](https://gith * **Spanish:** KSP forum user fitiales * **Russian:** KSP forum user vladmir_v * **German:** KSP forum user Three_Pounds +* **French:** KSP forum user Aodh4n ## Config Documentation @@ -122,67 +123,3 @@ Setting `ShortwaveFluxAffectsBoiloff` will cause emission from the sun to affect The `DebugMode` flag can also be set in order to observe solar input and planetary input as UI fields ingame. Finally, the `MaximumBoiloffScale` and `MinimumBoiloffScale` fields can be configured to cap the modifier to boiloff from these modifications. - -## Changelog - -### 1.1.0 -* Standalone release, license change for non-art assets (MIT) -* 1.6.x compatible -* Fixed a small bracket -* Adjusted MFT patch so that the boiloff module is still used (when RO is not installed) -* Fixed procedural tanks patch to be correct now (thanks madman2003) - -### 1.0.3 -* Removed MiniAVC from distribution - -### 1.0.2 -* KSP 1.5.1 -* Updated MiniAVC to 1.2.0.6 - -### 1.0.1 -* KSP 1.4.5 -* Adjusted switcher patch that was erronously running - -### 1.0.0 -* KSP 1.4.2 -* Updated MiniAVC to 1.2.0.1 -* Final content update -* Fixed boiloff being disabled if a tank's fuel was disabled -* Fixed boiloff rates being calculated incorrectly at timewarp -* Redid all tank textures, particularly foils -* Added 3 new tank models - * Short 2.5m (standard, compact variants) - * Short 3.75m (standard, compact, bare variants) - * Short 5m (standard, compact, bare variants) -* Fixed attach nodes of 3.75m compact tank variants -* Rebalanced capacities, masses and costs of all tanks -* Decreased cooling cost of ZBO tanks to 0.05 Ec/1000u -* Added an *optional* ability to specify a set of OUTPUT_RESOURCE blocks in a BOILOFFCONFIG. This causes boiloff to produce that resource with the specified ratio and flow mode. See Config Documentation section -* Added the *optional* ability to specify boiloff as dependent on solar/planetary radiation input. See Config Documentation section - -### 0.4.9 -* Deconflicted a WBI fuel switcher - -### 0.4.8 -* Cryo Tanks no longer suck up all EC - -### 0.4.7 -* Fixed an issue where parts with '_' in their name would not be patched properly - -### 0.4.6 -* All tanks can now be cooled. Lifting tanks cast ~10% more to cool and have cooling disabled by default -* Repaired normals on tanks -* Fixed science costs of many tanks -* Refactored plugin to support multiple cryogenic fuels per tank -* Updates to MFT Compatibility - -### 0.4.5 -* Added Russian translation from vladmir_v -* Fixed a typo in the version file -* Adjusted the position of the nodes for the compact variants of 3.75m tanks -* Fixed medium 3.75m tank's Compact variant collider being correctly specified -* Fixed low cost of 5m hydrogen tanks -* Fixed slightly off cost of 10m hydrogen tank - -### Previous -* Not tracked in this readme diff --git a/build_scripts/build.py b/build_scripts/build.py deleted file mode 100644 index 58d7643..0000000 --- a/build_scripts/build.py +++ /dev/null @@ -1,159 +0,0 @@ -# Build script entrypoint -import os -import shutil -import zipfile -import zlib -import sys -from argparse import ArgumentParser - -from build_support.build_helpers import * -from build_support.dependencies import download_dependency - - -# Build paths -TEMP_PATH = "tmp" -BUILD_PATH = "build" -DEPLOY_PATH = "deploy" - -# Root directoy files to keep in the archives -VALID_FILES = ["changelog.txt", "readme.txt"] - -def build_nodep_release(version_data, mod_name): - """ - Builds the release zip with no included dependencies - - Inputs: - version_data (dict): Contents of the .version file - mod_name (str): name of the mod - """ - build_path = os.path.join(DEPLOY_PATH, - f"{mod_name}_Core_" + "{MAJOR}_{MINOR}_{PATCH}".format(**version_data["VERSION"])) - shutil.make_archive(build_path, 'zip', os.path.join(BUILD_PATH)) - print(f"> Built {build_path}") - -def build_full_release(version_data, mod_name): - """ - Builds the release zip with a full set of required dependencies - - Inputs: - version_data (dict): Contents of the .version file - mod_name (str): name of the mod - """ - build_path = os.path.join(DEPLOY_PATH, - f"{mod_name}_" + "{MAJOR}_{MINOR}_{PATCH}".format(**version_data["VERSION"])) - shutil.make_archive(build_path, 'zip', os.path.join(BUILD_PATH)) - print(f"> Built {build_path}") - -def build_extras(version_data, build_packages=False): - """ - Compiles and optionally builds packages for all Extras in the mod - - Inputs: - version_data (dict): Contents of the .version file - build_packages (bool): whether to create an individual zipfile for each package - """ - for root, dirs, files in os.walk("Extras"): - for name in dirs: - build_extra(name, version_data, build_packages) - -def build_extra(name, version_data, build_package): - """ - Compiles and optionally builds a single Extras package - - Inputs: - name (str): name of the extra - version_data (dict): Contents of the .version file - build_package (bool): whether to create an individual zipfile for the package - """ - extra_path = os.path.join(DEPLOY_PATH, f"{name}" + "{MAJOR}_{MINOR}_{PATCH}".format(**version_data["VERSION"])) - print(f"> Compiling Extra {name}") - ensure_path(os.path.join(BUILD_PATH,"Extras")) - shutil.copytree(os.path.join("Extras", name), os.path.join(BUILD_PATH,"Extras", name)) - - if build_package: - print(f"> Building {name}") - shutil.make_archive(extra_path, "zip", os.path.join(BUILD_PATH, "Extras", name)) - print(f"> Built {extra_path}") - -def collect_dependencies(dep_data): - """ - Finds and downloads all the mod's dependencies - - Inputs: - dep_data (dict): dictionart of dependecies from build_data.json - """ - clean_path(TEMP_PATH) - for name, info in dep_data.items(): - download_dependency(name, info, TEMP_PATH, BUILD_PATH) - cleanup() - -def cleanup(): - """ - Cleans up the trailing files in the main directory for packaging by excluding all expect the - specified items in VALID_FILES - """ - onlyfiles = [f for f in os.listdir(BUILD_PATH) if os.path.isfile(os.path.join(BUILD_PATH, f))] - for f in onlyfiles: - if f not in VALID_FILES: - os.remove(os.path.join(BUILD_PATH,f)) - -def bundle(core_release, extras_release, complete_release): - """ - Compiles and builds the set of release packages according to information from - the .version file and the build_data.json file - """ - # Collect build information - build_data = get_build_data() - version_data = get_version_file_info(build_data["mod_name"]) - - print(f"Building {build_data['mod_name']} version {get_version(version_data)}\n=================") - - # Clean/recreate the build, deploy and temp paths - clean_path(os.path.join(BUILD_PATH)) - clean_path(os.path.join(DEPLOY_PATH)) - clean_path(os.path.join(TEMP_PATH)) - - # Copy main mod content - print(f"Compiling core mod content") - shutil.copytree(os.path.join("GameData", build_data["mod_name"]), os.path.join(BUILD_PATH, "GameData", build_data["mod_name"])) - shutil.copy("changelog.txt", os.path.join(BUILD_PATH, "changelog.txt")) - shutil.copy("readme.txt", os.path.join(BUILD_PATH, "readme.txt")) - - if core_release: - print(f"Building BASIC release package") - build_nodep_release(version_data, build_data['mod_name']) - - if os.path.exists("Extras"): - print(f"Compiling and building EXTRAS release packages") - build_extras(version_data, extras_release) - - print(f"Compiling complete release package") - print(f"> Collecting dependencies") - collect_dependencies(build_data["dependencies"]) - - if complete_release: - print(f"Building COMPLETE release package") - build_full_release(version_data, build_data['mod_name']) - - # Write the version/changelog out in text for Travis deploy scripts to take advantage of as env variables set are not persisted - with open(os.path.join("build_scripts", 'version.txt'), "w") as f: - f.write(get_version(version_data)) - - with open(os.path.join("build_scripts", 'changelog.md'), "w") as f: - f.write(get_changelog()) - -if __name__ == "__main__": - parser = ArgumentParser() - parser.add_argument("-c", "--complete", - action="store_true", default=True, - help="write complete package") - parser.add_argument("-e", "--extras", - action="store_true", default=False, - help="write extras package") - parser.add_argument("-b", "--basic", - action="store_true", default=False, - help="write basic no dependency package") - - args = parser.parse_args() - - bundle(args.basic, args.extras, args.complete) diff --git a/build_scripts/build_data.json b/build_scripts/build_data.json deleted file mode 100644 index 720a52d..0000000 --- a/build_scripts/build_data.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "mod_name": "CryoTanks", - "dependencies": - { - "B9PartSwitch": - { - "version": "2.6.0", - "location": "s3" - }, - "ModuleManager": - { - "version": "3.1.3", - "location": "s3" - }, - "CommunityResourcePack": - { - "version": "1.0.0", - "location": "s3" - }, - "DynamicBatteryStorage": - { - "location": "github", - "repository": "ChrisAdderley/DynamicBatteryStorage", - "tag": "1.4.0" - } - } -} diff --git a/build_scripts/build_support/__init__.py b/build_scripts/build_support/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/build_scripts/build_support/build_helpers.py b/build_scripts/build_support/build_helpers.py deleted file mode 100644 index 0cbe5a4..0000000 --- a/build_scripts/build_support/build_helpers.py +++ /dev/null @@ -1,73 +0,0 @@ -# Useful functions for build scripts -import os -import json -import stat - -BUILD_SCRIPT_PATH = "build_scripts" -BUILD_DATA_NAME = "build_data.json" -CHANGELOG_PATH = "changelog.txt" - -class tcolors: - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - ENDC = '\033[0m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - -def get_version(version_data): - """Returns a formatted version string from the version data dictionary""" - return "{MAJOR}.{MINOR}.{PATCH}".format(**version_data["VERSION"]) - -def get_ksp_version(version_data): - """Returns a formatted KSP version string from the version data dictionary""" - return "{MAJOR}.{MINOR}.{PATCH}".format(**version_data["KSP_VERSION"]) - -def get_version_file_info(mod_name): - """Extracts version info from the .version file""" - version_path = os.path.join("GameData", mod_name, "Versioning", f"{mod_name}.version") - with open(version_path, "r") as f: - version_data = json.load(f) - return version_data - -def get_build_data(): - """Loads the information from the build data file""" - build_data_path = os.path.join(BUILD_SCRIPT_PATH, BUILD_DATA_NAME) - with open(build_data_path, "r") as f: - build_data = json.load(f) - return build_data - -def ensure_path(path): - """Ensure a path exists, make it if not""" - if os.path.exists(path): - return - else: - os.makedirs(path) - -def clean_path(path): - """Creates a clean copy of a path if it exists""" - if os.path.exists(path): - for root, dirs, files in os.walk(path, topdown=False): - for name in files: - filename = os.path.join(root, name) - os.chmod(filename, stat.S_IWUSR) - os.remove(filename) - for name in dirs: - os.rmdir(os.path.join(root, name)) - else: - os.makedirs(path) - -def get_changelog(): - """Extracts a markdown formatted version of the latest changelog.txt entry""" - log_lines = [] - with open(CHANGELOG_PATH, "r") as f: - for idx, line in enumerate(f): - if line.startswith("---") or line.startswith("v"): - pass - else: - log_lines.append(line.replace("- ", "* ")) - if idx > 1 and line == "\n": - break - return "".join(log_lines) diff --git a/build_scripts/build_support/curseforge.py b/build_scripts/build_support/curseforge.py deleted file mode 100644 index d8dd619..0000000 --- a/build_scripts/build_support/curseforge.py +++ /dev/null @@ -1,103 +0,0 @@ -import requests -from contextlib import closing - - -class CurseForgeAPI(object): - - base_url = "https://kerbal.curseforge.com" - versions_url = "api/game/versions" - upload_file_url = "api/projects/{mod_id}/upload-file" - - def __init__(self, token, session=None): - """ - Initializes the API session - - Inputs: - token (str): Curse authentication token - """ - self.auth_token = token - if isinstance(session, requests.Session): - self.session = session - else: - self.session = requests.Session() - - def query_version(self): - """ - Queries the API and returns a list of available game versions - """ - url = f'{self.base_url}/{self.versions_url}' - headers = {'X-Api-Token': self.auth_token} - with closing(self.session.get(url, headers=headers)) as resp: - try: - print(resp.url) - print(resp.text) - return resp - except requests.exceptions.HTTPError as err: - print(err) - return resp.text - - def get_curse_game_version_id(self, game_version): - """ - Gets the curse version id by querying the API and comparing to the provided - ID - - Inputs: - game_version (str): the string game version to match - Returns: - curse_version (int): the integer curse version - """ - versions = self.query_version() - curse_version = None - for version in versions: - if version["name"] == game_version: - curse_version = version["id"] - - if curse_version is None: - raise Exception(f"Couldn't determine curse version from game version {game_version}") - - return curse_version - - def update_mod(self, mod_id, changelog, game_version, releaseType, zip): - """ - Updates a mod by hitting the project upload files API - - Inputs: - mod_id (str): the curseforge project ID - changelog (str): a Markdown-formatted changelog - game_version (str): the string game version to use - releaseType (str): One of alpha, beta, release - zip (str): the path of the zip to upload - """ - curse_version = self.get_curse_game_version_id(game_version) - url = f'{self.base_url}/{self.upload_file_url}' - metadata = { - "changelog": changelog, - "changelogType": "markdown", - "gameversions": [curse_version], - "releaseType": releaseType - } - print(f"posting {metadata} to {url}") - #with closing(self.session.post(url, data=payload)) as resp: - # return resp.text - - def login(self): - """Unneeded""" - pass - - def logout(self): - """Unneeded""" - pass - - def close(self): - self.session.close() - - def __call__(self, **kwargs): - return self.query(**kwargs) - - def __enter__(self): - self.login() - return self - - def __exit__(self, *args): - self.logout() - self.close() diff --git a/build_scripts/build_support/dependencies.py b/build_scripts/build_support/dependencies.py deleted file mode 100644 index 6d21233..0000000 --- a/build_scripts/build_support/dependencies.py +++ /dev/null @@ -1,67 +0,0 @@ -import os -import shutil -import zipfile -import zlib -from build_support.build_helpers import * -import build_support.s3 as s3 - -DEPENDENCY_BUCKET = "nertea-ksp-modding-dependencies" - -def download_dependency(name, info, temp_path, build_path): - """ - Downloads a dependency record from either S3 (external dependency) or github (internal dependency) - - Inputs: - name (str): name of the dependency - info (dict): dictionary describing the dependency - temp_path (str): path to store dependency zips to - build_path (str): path to stage to - """ - if info["location"] == "s3": - print(f"> Collecting {name} {info['version']} from S3") - download_dependency_s3(name, info["version"], temp_path, build_path) - - if info["location"] == "github": - print(f"> Collecting {name} {info['tag']} from repository {info['repository']}") - download_dependency_github(name, info['repository'], info["tag"], temp_path, build_path) - -def download_dependency_s3(name, version, temp_path, build_path): - """ - Downloads and unzips a dependency from S3 - - Inputs: - name (str): name of the dependency - version (str): version of the dependency - temp_path (str): path to store dependency zips to - build_path (str): path to stage to - """ - target_name = os.path.join(temp_path, f"{name}_{version}.zip") - print(f"> Pulling s3://{DEPENDENCY_BUCKET}/external/{name}_{version}.zip") - s3.copy(f"s3://{DEPENDENCY_BUCKET}/external/{name}_{version}.zip", - target_name) - - with zipfile.ZipFile(target_name, "r") as z: - z.extractall(build_path) - -def download_dependency_github(name, repo, tag, temp_path, build_path): - """ - Downloads a github repo with a specific tag - - Inputs: - name (str): name of the dependency - repo (str): Account/RepoName - tag (str): version of the dependency (tagged in the repo) - temp_path (str): path to store dependency zips to - build_path (str): path to stage to - """ - wp = os.getcwd() - os.chdir(temp_path) - # Clone into the repo, pull the specified tag - clone_cmd = f"git clone https://github.com/{repo}.git" - tag_cmd = f"git checkout master && git fetch && git fetch --tags && git checkout {tag}" - os.system(clone_cmd) - os.chdir(name) - os.system(tag_cmd) - os.chdir(wp) - # Move the contents of GameData into the build directory - shutil.copytree(os.path.join(temp_path, name, "GameData", name), os.path.join(build_path, "GameData", name)) diff --git a/build_scripts/build_support/s3.py b/build_scripts/build_support/s3.py deleted file mode 100644 index 93a9572..0000000 --- a/build_scripts/build_support/s3.py +++ /dev/null @@ -1,21 +0,0 @@ -# Useful functions for working with Amazon S3 -import boto3 -import botocore -from urllib.parse import urlparse - -def copy(src, dest): - """ - Copies a file to or from s3. If a link starts with s3: it will be treated - as an S3 path. Uses local AWS keys to do this - - Inputs: - src (str): url of source file - dest (str): url of destination file - """ - s3 = boto3.client('s3', verify=False) - if src.startswith("s3"): - url_parsed = urlparse(src) - s3.download_file(url_parsed.netloc, url_parsed.path[1:], dest) - if dest.startswith("s3"): - url_parsed = urlparse(dest) - s3.upload_file(src, url_parsed.netloc, url_parsed.path) diff --git a/build_scripts/build_support/spacedock.py b/build_scripts/build_support/spacedock.py deleted file mode 100644 index 98d53d9..0000000 --- a/build_scripts/build_support/spacedock.py +++ /dev/null @@ -1,101 +0,0 @@ -# Class for accessing the SpaceDock API -import requests -from contextlib import closing - - -class SpaceDockAPI(object): - - base_url = "https://spacedock.info" - login_url = "api/login" - query_mod_url = "api/mod/{mod_id}" - update_mod_url = "api/mod/{mod_id}/update" - - def __init__(self, login, password, session=None): - """ - Initializes the API session - - Inputs: - login (str): SpaceDock user - password (str): Spacedock PW - """ - self.credentials = {"username":login, "password":password} - self.password = password - if isinstance(session, requests.Session): - self.session = session - else: - self.session =requests.Session() - - def query_mod(self, mod_id): - """ - Queries the API for a mod - - Inputs: - mod_id (str): SpaceDock mod ID - - Returns: - response (str): The query result - """ - url = f'{self.base_url}/{self.query_mod_url}' - print(f"> Getting {url}") - with closing(self.session.get(url)) as resp: - try: - m = getattr(resp, "json") - return m() if callable(m) else m - except requests.exceptions.HTTPError as err: - print(err) - return resp.text - - def update_mod(self, mod_id, version, changelog, game_version, notify_followers, zip): - """ - Submits an update to a mod - - Inputs: - mod_id (str): the Spacedock mod ID - version (str): the string mod version to use - changelog (str): a Markdown-formatted changelog - game_version (str): the string game version to use - notify_followers (bool): email followers - zip (str): the path of the zip to upload - - """ - url = f'{self.base_url}/{self.query_mod_url}' - payload = { - "version": version, - "changelog": changelog, - "game-version": game_version, - "notify-followers": "yes" if True else "no", - "zipball": zip - } - print(f"> Posting {payload} to {url}") - - #with closing(self.session.post(url, data=payload)) as resp: - # try: - # resp.raise_for_status() - # return resp.text -# except requests.exceptions.HTTPError as err: -# print(err) -# return resp.text - - - def login(self): - with closing(self.session.post(f'{self.base_url}/{self.login_url}', data=self.credentials)) as resp: - if resp.reason == 'OK': - print('"Successfully logged in"') - return self.session - - def logout(self): - pass - - def close(self): - self.session.close() - - def __call__(self, **kwargs): - return self.query(**kwargs) - - def __enter__(self): - self.login() - return self - - def __exit__(self, *args): - self.logout() - self.close() diff --git a/build_scripts/deploy.py b/build_scripts/deploy.py deleted file mode 100644 index eba1c86..0000000 --- a/build_scripts/deploy.py +++ /dev/null @@ -1,84 +0,0 @@ -# Deploy script entrypoint -import os -import shutil -import zipfile -import zlib -from argparse import ArgumentParser - -from build_support.build_helpers import * -from build_support.spacedock import SpaceDockAPI -from build_support.curseforge import CurseForgeAPI - - -def deploy(spacedock, curse): - """ - Deploys packages to providers - - Inputs: - spacedock (bool): deploy to SpaceDock - curse (bool): deploy to CurseForge - """ - build_data = get_build_data() - version_data = get_version_file_info(build_data["mod_name"]) - changelog = get_changelog() - - print(f"Deploying {build_data['mod_name']} version {get_version(version_data)}\n=================") - print(f"Changes:\n{changelog}") - - print(f"Targets: {'SpaceDock, ' if spacedock else ''}{'Curse' if curse else ''}") - zipfile = os.path.join("deploy", f"{build_data['mod_name']}_{get_version(version_data)}.zip") - print(f"> Deploying file {zipfile}") - if spacedock: - deploy_spacedock( - get_version(version_data), - get_ksp_version(version_data), - build_data['spacedock']['mod-id'], - changelog, - zipfile) - if curse: - deploy_curseforge( - get_ksp_version(version_data), - build_data['spacedock']['mod-id'], - changelog, - zipfile) - -def deploy_curseforge(ksp_version, mod_id, changelog, zipfile): - """ - Performs deployment to CurseForge - - Inputs: - ksp_version (str): version of KSP to target - mod_id (str): CurseForge project ID - changelog (str): Markdown formatted changelog - zipfile (str): path to file to upload - """ - print("> Deploying to CurseForge") - with CurseForgeAPI(os.environ["CURSEFORGE_TOKEN"]) as api: - api.update_mod(mod_id, changelog, ksp_version, "release", zipfile) - -def deploy_spacedock(version, ksp_version, mod_id, changelog, zipfile): - """ - Performs deployment to SpaceDock - - Inputs: - version (str): mod version - ksp_version (str): version of KSP to target - mod_id (str): CurseForge project ID - changelog (str): Markdown formatted changelog - zipfile (str): path to file to upload - """ - print("> Deploying to SpaceDock") - with SpaceDockAPI(os.environ["SPACEDOCK_LOGIN"], os.environ["SPACEDOCK_PASSWORD"]) as api: - api.update_mod(mod_id, version, changelog, ksp_version, True, zipfile) - -if __name__ == "__main__": - parser = ArgumentParser() - parser.add_argument("-c", "--curse", - action="store_true", default=False, - help="deploy to curse") - parser.add_argument("-s", "--spacedock", - action="store_true", default=False, - help="deploy to spacedock") - - args = parser.parse_args() - deploy(args.spacedock, args.curse) diff --git a/changelog.txt b/changelog.txt index d89620f..da6a48a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,12 @@ +v1.1.2 +------ +- 1.7.x compatible +- Added French translation (thanks Aodh4n) +- Updated ModuleManger to 4.0.2 +- Updated DynamicBatteryStorage to 1.4.1 +- Updated B9PartSwitch to 2.7.0 +- Fixed description of variants for compact 5m tank (thanks HSJasperism) + v1.1.1 ------ - Added German translation diff --git a/readme.txt b/readme.txt index a6b76c0..6babc5e 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ ================= -Cryo Tanks v1.1.1 +Cryo Tanks v1.1.2 ================= A mod pack for Kerbal Space Program, specifically supporting my other mods Kerbal Atomics (https://github.com/ChrisAdderley/KerbalAtomics) and Cryogenic Engines (https://github.com/ChrisAdderley/CryoEngines), dealing with cryogenic fuels, their storage and their properties. @@ -20,9 +20,10 @@ DEPENDENCIES ============ Required: -- B9PartSwitch (2.6.0) +- B9PartSwitch (2.7.0) - Community Resource Pack (1.0.0) -- ModuleManager (3.1.3) +- ModuleManager (4.0.2) +- DynamicBatteryStorage (1.4.1) Optional - Community Tech Tree (v2.2+) @@ -48,6 +49,7 @@ This mod includes localization support, and includes translations for - Spanish (KSP forum user fitiales) - Russian (KSP forum user vladmir_v) - German (KSP forum user Three_Pounds) +- French (KSP forum user Aodh4n) ========= LICENSING