Skip to content

Commit

Permalink
Merge pull request #64 from ChrisAdderley/dev
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
ChrisAdderley authored Jan 17, 2019
2 parents 9d229eb + ae7a303 commit 832704f
Show file tree
Hide file tree
Showing 20 changed files with 823 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build_scripts/* linguist-vendored
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.pyc
.idea/
build/
tmp/
deploy/
build_scripts/version.txt
build_scripts/changelog.md
50 changes: 50 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
language: python
python:
- 3.6
install:
- pip install awscli boto3 requests
branches:
only:
- master
script:
- python build_scripts/build.py
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
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: "nertea-ksp-modding-releases"
local_dir: deploy
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
1 change: 0 additions & 1 deletion GameData/CryoTanks/Patches/CryoTanksCTT.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{
@TechRequired = specializedFuelStorage
}
}
@PART[hydrogen-5-1]:NEEDS[CommunityTechTree]:FOR[CryoTanks]
{
@TechRequired = specializedFuelStorage
Expand Down
4 changes: 2 additions & 2 deletions GameData/CryoTanks/Patches/CryoTanksFuelTankSwitcher.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Lifting tanks
@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch],!MODULE[WBIConvertibleStorage],!MODULE[WBIResourceSwitcher]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch],!MODULE[WBIConvertibleStorage],!MODULE[WBIResourceSwitcher]]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
{
%LF = #$RESOURCE[LiquidFuel]/maxAmount$
%OX = #$RESOURCE[Oxidizer]/maxAmount$
Expand Down Expand Up @@ -86,7 +86,7 @@
}
}
// ZBO tanks
@PART[*]:HAS[@RESOURCE[LqdHydrogen],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch],!MODULE[WBIConvertibleStorage],!MODULE[WBIResourceSwitcher]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
@PART[*]:HAS[@RESOURCE[LqdHydrogen],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch],!MODULE[WBIConvertibleStorage],!MODULE[WBIResourceSwitcher]]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
{
%LH2 = #$RESOURCE[LqdHydrogen]/maxAmount$

Expand Down
30 changes: 25 additions & 5 deletions GameData/CryoTanks/Patches/CryoTanksModularFuelTanks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//------------------------------------------------------//

// Adds LqdHydrogen to Default tank definition
@TANK_DEFINITION[Default]:NEEDS[ModularFuelTanks,!RealFuels]:FOR[CryoTanks]
@TANK_DEFINITION[Default]:NEEDS[ModularFuelTanks&!RealFuels]:FOR[CryoTanks]
{
TANK
{
Expand All @@ -16,7 +16,7 @@
}

// Adds LqdHydrogen to Fuselage tank definition
@TANK_DEFINITION[Fuselage]:NEEDS[ModularFuelTanks,!RealFuels]:FOR[CryoTanks]
@TANK_DEFINITION[Fuselage]:NEEDS[ModularFuelTanks&!RealFuels]:FOR[CryoTanks]
{
TANK
{
Expand All @@ -29,7 +29,7 @@
}

// Adds LqdHydrogen to Structural tank definition
@TANK_DEFINITION[Structural]:NEEDS[ModularFuelTanks,!RealFuels]:FOR[CryoTanks]
@TANK_DEFINITION[Structural]:NEEDS[ModularFuelTanks&!RealFuels]:FOR[CryoTanks]
{
TANK
{
Expand All @@ -42,7 +42,7 @@
}

// Adds LqdHydrogen to ServiceModule tank definition
@TANK_DEFINITION[ServiceModule]:NEEDS[ModularFuelTanks,!RealFuels]:FOR[CryoTanks]
@TANK_DEFINITION[ServiceModule]:NEEDS[ModularFuelTanks&!RealFuels]:FOR[CryoTanks]
{
TANK
{
Expand All @@ -56,7 +56,7 @@

//------------------------------------------------------//
// Adds tank definition for CryoEngines
TANK_DEFINITION:NEEDS[ModularFuelTanks,!RealFuels]
TANK_DEFINITION:NEEDS[ModularFuelTanks&!RealFuels]
{
name = Cryogenic
basemass = 0.000625 * volume // if basemass is already described in part cfg. through other MFT patches, MFT won't update to basemass defined in tank definitions. Applies to most spaceplane parts.
Expand All @@ -74,6 +74,12 @@ TANK_DEFINITION:NEEDS[ModularFuelTanks,!RealFuels]
name = Oxidizer
amount = full
maxAmount = 40%
}
TANK
{
name = Monopropellant
amount = 0
maxAmount = 5%
}
}
Expand All @@ -92,4 +98,18 @@ TANK_DEFINITION:NEEDS[ModularFuelTanks,!RealFuels]
%typeAvailable = Fuselage
typeAvailable = Cryogenic
}
MODULE
{
name = ModuleCryoTank
// in Ec per 1000 units per second
CoolingCost = 0.05
CoolingEnabled = True
BOILOFFCONFIG
{
FuelName = LqdHydrogen
// in % per hr
BoiloffRate = 0.05
}
}
}
38 changes: 28 additions & 10 deletions GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg
Original file line number Diff line number Diff line change
@@ -1,40 +1,58 @@
// Procedural Fuel Tanks Patch
// Svm420
// Most recent author: madman2003

@PART[procedural*Liquid]:NEEDS[ProceduralParts&!ModularFuelTanks&!RealFuels]:FOR[CryoTanks]
@PART[procedural*Liquid]:NEEDS[ProceduralParts&!RealFuels&!ModularFuelTanks]:FOR[CryoTanks]
{
@MODULE[TankContentSwitcher]
{
TANK_TYPE_OPTION
{
name = LqdHydrogen
dryDensity = 0.1
dryDensity = 0.01417 // kg of tank mass per liter (1 unit) of LqdHydrogen, 20% of wet-mass
costMultiplier = 0.035
// Based on observation that LH2 is 1/20 the cost of LF
RESOURCE
{
name = LqdHydrogen
unitsPerT = 16000
// Based on nertea's 10x total of mixed tank
// How many units (1 liter) of LqdHydrogen fit into 1 metric tonne of tank
// 0.01417 kg tank per liter LqdHydrogen
// 70.5716 liter per kg tank
// 70571.6 liter per metric tonne of tank
unitsPerT = 70571.6
}
}
TANK_TYPE_OPTION
{
name = LqdHydrogen+Oxidizer
dryDensity = 0.1
// 12.5% of wet-mass of Oxidizer is dry-mass, so 87,5% is fuel
// 20% of wet-mass of LqdHydrogen is dry-mass, so 80% is fuel
// every 16 units of fuel, 15 (*1 Liter) is LqdHydrogen and 1 (*5 Liters) is Oxidizer
// so for every 4 liters, 3 liter will be LqdHydrogen and 1 liters will be Oxidizer
// 15 liters (15 units) of LqdHyrodogen has a mass of 15*0.00007 = 0.00105 metric tonnes
// 5 liters (1 unit) of Oxidizer has a mass of 1*0.005 = 0.005 metric tonnes
// 15 liters (15 units) of LqdHydrogen tank has a mass of (12.5%/87,5%) * 0.00105 = 0.00015 metric tonnes
// 5 liters (1 unit) of Oxidizer tank has a mass of (20%/80%) * 0.005 = 0.0014 metric tonnes
// the average liter of dry-mass of tank has a dry density of (0.00015 + 0.0014)/20 = 0.0000775 metric tonnes
dryDensity = 0.0775 // in kg/L, not the more "KSP community resource pack typical" metric tonnes/L or 1000 kg/L
costMultiplier = 0.785
// Based on observation that LH2 is 1/20 the cost of LF and adding the cost mult for oxidizer only

// How many units of Oxidizer and LqdHydrogen fit into 1 metric tonne of tank
// Every 16 units, 1 unit will be Oxidizer and 15 units will be LqdHydrogen
// 1 unit (5 L) Oxidizer-tank is 0.0014 metric tonnes
// 15 units (15 L) LqdHydrogen-tank is 0.00015 metric tonnes
// The sum of that is 0.00155 metric tonnes, so:
// 645.2 units of Oxidizer per metric tonne of tank
// 9677.4 units of LqdHydrogen per metric tonne of tank
RESOURCE
{
name = LqdHydrogen
unitsPerT = 9600
// Based on nertea's 6x total of mixed tank
unitsPerT = 9677.4
}
RESOURCE
{
name = Oxidizer
unitsPerT = 640
// Based on nertea's 1:10 ratio for mixed tank
unitsPerT = 645.2
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions GameData/CryoTanks/Versioning/CryoTanks.version
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"NAME":"CryoTanks",
"URL":"https://raw.githubusercontent.com/ChrisAdderley/CryoTanks/master/GameData/CryoTanks/Versioning/CryoTanks.version",
"DOWNLOAD":"http://forum.kerbalspaceprogram.com/index.php?/topic/155465-122-near-future-technologies",
"DOWNLOAD":"https://github.com/ChrisAdderley/CryoTanks/releases",
"VERSION":
{
"MAJOR":1,
"MINOR":0,
"PATCH":3,
"MINOR":1,
"PATCH":0,
"BUILD":0
},
"KSP_VERSION":
{
"MAJOR":1,
"MINOR":5,
"PATCH":0
"MINOR":6,
"PATCH":1
},
"KSP_VERSION_MIN":{
"MAJOR":1,
"MINOR":5,
"PATCH":0
"MINOR":6,
"PATCH":1
},
"KSP_VERSION_MAX":{
"MAJOR":1,
"MINOR":5,
"MINOR":6,
"PATCH":99
}
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ Finally, the `MaximumBoiloffScale` and `MinimumBoiloffScale` fields can be confi

## 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

Expand Down
Loading

0 comments on commit 832704f

Please sign in to comment.