Skip to content

Commit

Permalink
Merge branch 'master' of github.com:KSP-KOS/KOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunbaratu committed Mar 8, 2016
2 parents 49b7d14 + d5aabdc commit ebeac99
Show file tree
Hide file tree
Showing 585 changed files with 40,313 additions and 7,514 deletions.
9 changes: 9 additions & 0 deletions .ci/travis/after_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -ev

cd Resources
rm *.dll
cd ../doc
rm -r gh-pages
rm -r build
cd ../
20 changes: 20 additions & 0 deletions .ci/travis/before_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -ev

if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
echo "Build from within the home repository, encryption enabled."
wget --quiet https://github.com/KSP-KOS/KSP_LIB/blob/master/kos-${KSP_VERSION}.tar.enc?raw=true -O kos-${KSP_VERSION}.tar.enc
openssl aes-256-cbc -K $encrypted_6287ee711a27_key -iv $encrypted_6287ee711a27_iv -in kos-${KSP_VERSION}.tar.enc -out kos-${KSP_VERSION}.tar -d
else
echo "Build from pull request outside of the home repository, encryption disabled."
wget --quiet https://github.com/KSP-KOS/KSP_LIB/blob/master/kos-${KSP_VERSION}.tar?raw=true -O kos-${KSP_VERSION}.tar
fi

mkdir -p Resources
tar -xvf kos-${KSP_VERSION}.tar -C Resources/

python --version
pip --version
# workaround for not being able to use pip outside of a python project
export PATH=$HOME/.local/bin:$PATH
pip install --user $USER sphinx_rtd_theme
7 changes: 7 additions & 0 deletions .ci/travis/script-sphinxdocs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -ev

cd doc
sphinx-build -b html -q -W -d build/doctrees source gh-pages
#make html
cd ../
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Auto detect text files and perform LF normalization
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
* text=auto

*.cs diff=csharp

*.csproj text=auto merge=union
*.sln text=auto eol=crlf merge=union
26 changes: 24 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
bin/
obj/
# VisualStudio
[Bb]in/
[Oo]bj/
*.suo
packages/
/src/kOS.sln.ide

# Monodevelop
[Ee]xported[Oo]bj/
*.userprefs

# Unity
[Ll]ibrary/
[Tt]emp/
/*.pidb
/*.user

# Build products and files generated during gameplay
Resources/GameData/kOS/Plugins/
!Resources/GameData/kOS/ICSharpCode.SharpZipLib.dll

# Symlink to KSP directory
KSPdirlink

# OS Specific
.DS_STORE*
[Tt]humbs.db
43 changes: 43 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
language: csharp
solution: src/kOS.sln
sudo: false

addons:
apt:
packages:
- python-sphinx
- nunit-console

env:
global:
- KSP_VERSION="1.0.5"

# Pre-shared token for pushing notifications to slack chat
notifications:
slack: ksp-kos:51DTQ4ZBP9SlGNnLWJ5D84vp

# Before the install the library dlls need to be downloaded
before_script:
- chmod +x .ci/travis/before_script.sh && ./.ci/travis/before_script.sh

script:
- xbuild /p:Configuration=Release $TRAVIS_SOLUTION
# I know framework 4.0 is wrong, just trying it to see if it fixes the test
- nunit-console -framework=4.0 src/kOS.Safe.Test/bin/Release/kOS.Safe.Test.dll
# - chmod +x .ci/travis/script-sphinxdocs.sh && ./.ci/travis/script-sphinxdocs.sh

# Cleanup the downloaded resources
after_script:
- chmod +x .ci/travis/after_script.sh && ./.ci/travis/after_script.sh

before_deploy:
- mkdir src/kOS/bin/dist
- tar -zcvf src/kOS/bin/dist/build_$TRAVIS_BUILD_NUMBER.tgz src/kOS/bin/Release/kOS*.dll

deploy:
provider: s3
access_key_id: "AKIAINHSGTBU5O3DKV2Q"
secret_access_key: "$S3_DEPLOY_SECRET"
bucket: "kos-artifacts"
skip_cleanup: true
local_dir: "src/kOS/bin/dist/"
330 changes: 294 additions & 36 deletions CHANGELOG.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
Pull Requests
=============

* All PRs must be related to an open issue
* If a PR changes the scripting API, it must include all related changes to the documentation.

Setting Up Your Environment
===========================

1. Copy `Resources/GameData/kOS` to `$KSP/GameData/`, `where $KSP` is your
Kerbal Space Program installation directory.

2. Download the latest KSPAPIExtensions.dll from
https://github.com/Swamp-Ig/KSPAPIExtensions/releases, and copy
it to `$KSP/GameData/kOS/Plugins`.

3. Create a file at src/kOS/kOS.csproj.user conaining the following XML,
replacing /path/to/KSP with your own KSP install directory.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ReferencePath>
/path/to/KSP/KSP_Data/Managed;
/path/to/KSP/GameData/kOS/Plugins
</ReferencePath>
</PropertyGroup>
</Project>

4. If you want building the solution to update the dlls in your KSP
directory, create a symbolic link called `KSPdirlink` from the root
of this repository to your KSP installation directory.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Addon release thread: http://forum.kerbalspaceprogram.com/threads/68089-0-23-kOS

Addon development thread: http://forum.kerbalspaceprogram.com/threads/68096-kOS-Autopilot

Contribution : If you have contributed to the development of the mod, and wish to be named a certain way in the next release notes, then add your edit to the ``### Contributors`` section of the CHANGELOG.md file in your pull request.
3 changes: 1 addition & 2 deletions RELEASECHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This is a precursor to an automated build system

### Pre-Build
* Update the kOS.Core.cs VersionInfo
* Update AssemblyInfo for kOS project
* Update AssemblyInfo for kOS.Safe project
* Update Resources\GameData\kOS\kOS.version
Expand All @@ -10,7 +9,7 @@

### Build
* Build kOS solution in release mode
* Copy kOS.dll and kOS.Safe.dll to \Resources\GameData\kOS\Plugins\
* Ensure that all required resources are in place (ie KSP API Extensions DLL, ModuleManager DLL)
* Create zip file with a root starting in the \Resources\ directory
* Name the zip file with the following pattern kOS.v<major>.<minor>.<patch>.zip (eg kOS.v0.14.2.zip )
* Build the documentation in \docs\
Expand Down
Binary file added Resources/GameData/kOS/GFX/brightness-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/GameData/kOS/GFX/error.wav
Binary file not shown.
Binary file added Resources/GameData/kOS/GFX/font-height-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/GameData/kOS/GFX/font-width-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/GameData/kOS/GFX/terminal-beep.wav
Binary file not shown.
Binary file added Resources/GameData/kOS/GFX/terminal-click.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
44 changes: 44 additions & 0 deletions Resources/GameData/kOS/Parts/KOSCherryLight/part.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
PART
{

name = Cherry Light
module = Part
author = Peter Goddard (pgodd) and Brad White (hvacengi)
mesh = model/cherrylight.mu
scale = 1
rescaleFactor = 1
node_stack_bottom = 0, -0.01, 0, 0, -90, 0, 0
node_attach = 0.0, -0.01, 0.0, 0, -90, 0, 0
TechRequired = advElectrics
cost = 500
entryCost = 1200
category = Utility
subcategory = 0
title = Cherry Light
manufacturer = kOS Peripherals
description = Watch out! It's the coppers! Fool your friends, be the life of the party with our simulated police style light. Not for use by real police.
attachRules = 1,1,0,0,0
mass = 0.001
dragModelType = default
maximum_drag = .002
minimum_drag = .002
angularDrag = 2
crashTolerance = 9
maxTemp = 2400
MODULE
{
name = ModuleLight
lightName = PowerLight
isOn = true
lightR = 0.5
lightG = 0
lightB = 0
}
MODULE
{
name = kOSLightModule
resourceAmount = 0.02
animationName = Rotation
}
}
Binary file not shown.
Binary file modified Resources/GameData/kOS/Parts/kOSMachine0m/KR-2042_uv_layout_1_d_NRM.mbm
100644 → 100755
Binary file not shown.
Binary file modified Resources/GameData/kOS/Parts/kOSMachine0m/KR-2042_uv_layout_d.mbm
100644 → 100755
Binary file not shown.
Binary file modified Resources/GameData/kOS/Parts/kOSMachine0m/model.mu
Binary file not shown.
32 changes: 18 additions & 14 deletions Resources/GameData/kOS/Parts/kOSMachine0m/part.cfg
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PART
{
// --- general parameters ---
name = kOSMachine0m
name = KR-2042
module = Part
author = SMA
author = SMA and Peter Goddard

// --- asset parameters ---
mesh = model/model.mu
Expand All @@ -12,8 +12,8 @@ rescaleFactor = 1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, connector node size
node_stack_bottom = 0.0, -0.0566, 0.0, 0.0, 1.0, 0.0, 0
node_stack_top = 0.0, 0.0466, 0.0, 0.0, 1.0, 0.0, 0
node_stack_bottom = 0.0, -0.081, 0.0, 0.0, -1.0, 0.0, 0
node_stack_top = 0.0, -0.003, 0.0, 0.0, 1.0, 0.0, 0


// --- Tech tree ---
Expand All @@ -29,7 +29,7 @@ manufacturer = Compotronix
description = Would you trust life and limb to a mindless autopilot, powered by untested software you hastily wrote yourself? Spacefaring kerbals would!

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,1
attachRules = 1,0,1,0,0

// --- standard part parameters ---
mass = 0.08
Expand All @@ -44,6 +44,8 @@ MODULE
{
name = kOSProcessor
diskSpace = 5000
ECPerBytePerSecond = 0
ECPerInstruction = 0.000004
}

RESOURCE
Expand All @@ -57,15 +59,17 @@ MODULE
{
name = ModuleLight
lightName = PowerLight
useAnimationDim = true
lightBrightenSpeed = 4
lightDimSpeed = 4
resourceAmount = 0.01
animationName = PowerLight
useResources = true
startEventGUIName = "Power Off"
endEventGUIName = "Power On"
lightR = 0
lightG = 0.1
lightB = 0
}

MODULE
{
name = kOSLightModule
resourceAmount = 0.02
animationName = flickerStart
}

}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
71 changes: 71 additions & 0 deletions Resources/GameData/kOS/Parts/kOSMachine0mLegacy/part.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
PART
{
// --- general parameters ---
name = kOSMachine0m
module = Part
author = SMA and Peter Goddard

// --- asset parameters ---
mesh = model/model.mu
scale = 1
rescaleFactor = 1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, connector node size
node_stack_bottom = 0.0, -0.04, 0.0, 0.0, -1.0, 0.0, 0
node_stack_top = 0.0, 0.03, 0.0, 0.0, 1.0, 0.0, 0


// --- Tech tree ---
TechRequired = precisionEngineering

// --- editor parameters ---
cost = 1200
entryCost = 6800
category = -1
subcategory = 0
title = KR-2042 b Scriptable Control System
manufacturer = Compotronix
description = Would you trust life and limb to a mindless autopilot, powered by untested software you hastily wrote yourself? Spacefaring kerbals would!

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 0.08
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 9
maxTemp = 3400

MODULE
{
name = kOSProcessor
diskSpace = 5000
}

RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}

MODULE
{
name = ModuleLight
lightName = PowerLight
useAnimationDim = true
lightBrightenSpeed = 8
lightDimSpeed = 4
resourceAmount = 0.01
animationName = PowerLight
useResources = true
startEventGUIName = "Power Off"
endEventGUIName = "Power On"
}


}
Binary file modified Resources/GameData/kOS/Parts/kOSMachine1m/model.mu
100644 → 100755
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 4 additions & 2 deletions Resources/GameData/kOS/Parts/kOSMachine1m/part.cfg
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PART
{
// --- general parameters ---
// --- general parameters --- V2~ fixed collision mesh
name = kOSMachine1m
module = Part
author = KevinLaity
author = KevinLaity / Peter Goddard

// --- asset parameters ---
mesh = model/model.mu
Expand Down Expand Up @@ -44,6 +44,8 @@ MODULE
{
name = kOSProcessor
diskSpace = 10000
ECPerBytePerSecond = 0
ECPerInstruction = 0.000004
}

RESOURCE
Expand Down
Binary file modified Resources/GameData/kOS/Parts/kOSMachineRad/Model.mu
100644 → 100755
Binary file not shown.
Empty file modified Resources/GameData/kOS/Parts/kOSMachineRad/colorTexture.mbm
100644 → 100755
Empty file.
Loading

0 comments on commit ebeac99

Please sign in to comment.