Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,4 @@ UpgradeLog*.htm

# Microsoft Fakes
FakesAssemblies/
/.vs
Binary file modified GameData/KerbalSports/KerbalSports.dll
Binary file not shown.
19 changes: 9 additions & 10 deletions GameData/KerbalSports/KerbalSports.version
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
{
"NAME":"KerbalSports",
"URL":"https://raw.githubusercontent.com/jrossignol/KerbalSports/master/GameData/KerbalSports/KerbalSports.version",
"DOWNLOAD":"https://github.com/jrossignol/KerbalSports/releases",
"CHANGE_LOG_URL":"https://raw.githubusercontent.com/jrossignol/KerbalSports/1.1.0/CHANGES.txt",
"URL":"https://raw.githubusercontent.com/JonnyOThan/KerbalSports/master/GameData/KerbalSports/KerbalSports.version",
"DOWNLOAD":"https://github.com/JonnyOThan/KerbalSports/releases",
"GITHUB":{
"USERNAME":"jrossignol",
"USERNAME":"JonnyOThan",
"REPOSITORY":"KerbalSports",
"ALLOW_PRE_RELEASE":true
},
"VERSION":{
"MAJOR":1,
"MINOR":1,
"MINOR":2,
"PATCH":0,
"BUILD":0
},
"KSP_VERSION":{
"MAJOR":1,
"MINOR":4,
"PATCH":1
"MINOR":12,
"PATCH":3
},
"KSP_VERSION_MIN":{
"MAJOR":1,
"MINOR":4,
"PATCH":1
"MINOR":12,
"PATCH":3
},
"KSP_VERSION_MAX":{
"MAJOR":1,
"MINOR":4,
"MINOR":12,
"PATCH":99
}
}
26 changes: 26 additions & 0 deletions GameData/KerbalSports/locale/fr-fr.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Localization
{
fr-fr
{
#loc.kerbalsports.fishing.ctrl-ui = CTRL
#loc.kerbalsports.fishing.skill-ui = Habileté
#loc.kerbalsports.fishing.cast-msg = Lancez votre ligne en appuyant sue [ESPACE] !
#loc.kerbalsports.fishing.got-away = Le poisson s'est échappé, semble-t-il.
#loc.kerbalsports.fishing.caught-fish = Bravo! Vous avez attrapé un poisson de <<1>> kg(s)!
#loc.kerbalsports.fishing.reward = Récompense:

#loc.kerbalsports.fishing.fish-type = Type de Poisson
#loc.kerbalsports.fishing.biggest-fish = Plus Grand Poisson Attrappé
#loc.kerbalsports.fishing.number-of-fish = Poissons Attrappés
#loc.kerbalsports.fishing.start-fishing = Commencer la pêche

#loc.kerbalsports.fishing.fish-type-pond = Étang
#loc.kerbalsports.fishing.fish-type-freshwater = Eau Douce
#loc.kerbalsports.fishing.fish-type-coastal = Côte
#loc.kerbalsports.fishing.fish-type-ocean = Océan
#loc.kerbalsports.fishing.fish-type-deep-ocean = Océan Profond
#loc.kerbalsports.fishing.fish-type-kraken = Kraken

#loc.kerbalsports.fishing.tutorial = Bienvenue à la compétition de pêche de Jebediah Kerman! Je suis Gus, et je vais vous montrer comment pêcher. Ne vous inquiétez pas si ça a l'air un peu difficile (bien sûr que c'est difficile, ce n'est pas comme si on faisait une fusée)! En plus, je suis sûr qu'un Kerbal motivé comme vous comprendra rapidement.\n\nD'abord, l'interface. À gauche, la distance de jet - qui montre à quelle distance est votre bouchon. Quand vous avez attrappé un poisson, la marge de manoeuvre dont vous disposez sera également indiquée. À droite, le compteur d'habileté. C'est très simple - il suddit de pêcher plus pour s'améliorer. Une nouvelle barre apparaîtra en bas quand vous aurez attrappé un poisson (on en parlera bientôt).\n\nPour lancer votre ligne, appuyez sur la barre d'<color=#86E900>ESPACE</color>. Une fois la ligne lancée, gardez une des touches <color=#86E900>SHIFT</color> appuyées pour rembobiner. Si vous arrivez à attraper un poisson, vous verrez de nouveaux éléments apparaître.\n\nUne fois qu'un poisson a mordu, gardez-le au centre de la barre verte qui se trouvera en bas, en utilisant les touches <color=#86E900>CTRL</color> (ou <color=#86E900>Command</color>) droite et gauche. En faisant cela, vous tirez sur la canne. Une fois que vous avez ramené le bâton, utilisez la touche <color=#86E900>SHIFT</color> pour ramener le poisson vers vous. Répétez ces étapes jusqu'à ce que vous ayez pêché le poisson!\n\nBonne chance, et n'oubliez pas - si vous voulez vous entraîner, allez vour du côté de l'Administration, et essayez dans le bassin (présent uniquement lorsque l'Administration est au niveau 3).
}
}
23 changes: 0 additions & 23 deletions KerbalSports.netkan

This file was deleted.

10 changes: 8 additions & 2 deletions source/KerbalSports/Fishing/FishingDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,14 @@ void HandleIdleStateGUI()
{
}

static FieldInfo x_startTimer_FieldInfo = typeof(KerbalEVA).GetField("startTimer", BindingFlags.Instance | BindingFlags.NonPublic);

void SetState(FishingState newState)
{
Debug.Log("set fishing state to " + newState);

KerbalEVA eva = evaVessel.GetComponent<KerbalEVA>();

// Remove any looping clips
loopingClipName = null;

Expand All @@ -652,10 +656,14 @@ void SetState(FishingState newState)
{
NavBallToggle.Instance.panel.Collapse();
}

x_startTimer_FieldInfo.SetValue(eva, false);
}
// Undo what we did
else if (newState == FishingState.NotFishing)
{
x_startTimer_FieldInfo.SetValue(eva, true);

// Clear the locks
InputLockManager.RemoveControlLock("Fishing");

Expand All @@ -671,7 +679,6 @@ void SetState(FishingState newState)
if (evaVessel != null)
{
// Set the animation back to the idle one
KerbalEVA eva = evaVessel.GetComponent<KerbalEVA>();
animation.Stop();
animation.Play(eva.Animations.idle.animationName);

Expand Down Expand Up @@ -714,7 +721,6 @@ void SetState(FishingState newState)
// Play the idle animation
if (newState == FishingState.Idle)
{
KerbalEVA eva = evaVessel.GetComponent<KerbalEVA>();
animation.Stop();
animation.Play(eva.Animations.idle.animationName);
}
Expand Down
2 changes: 1 addition & 1 deletion source/KerbalSports/Fishing/ModuleFishing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public override void OnUpdate()
// Check 5 meters forward for water
Vector3 checkPosition = vessel.transform.localPosition + vessel.transform.forward * 5.0f;
double latitude = vessel.mainBody.GetLatitude(checkPosition);
double longitude = vessel.mainBody.GetLongitude(checkPosition);
double longitude = (vessel.mainBody.GetLongitude(checkPosition) + 360) % 360;
double height = Util.TerrainHeight(vessel.mainBody, latitude, longitude);

int adminLevel = (int)Math.Round(ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.Administration) *
Expand Down
71 changes: 47 additions & 24 deletions source/KerbalSports/KerbalSports.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,72 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>KerbalSports</RootNamespace>
<AssemblyName>KerbalSports</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<!--Import targets now, which will import KSPCommunityFixes.csproj.user where the path to the KSP install root must be defined in ReferencePath-->
<!--This must be done after the main project poperties are defined because it needs the target framework property to be defined -->
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--Parse KSP platform-specific paths and set the start action-->
<PropertyGroup>
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('Windows'))">KSP_x64.exe</KSPExecutable>
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('OSX'))">KSP.app</KSPExecutable>
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('Linux'))">KSP.x86_64</KSPExecutable>
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('Windows'))">KSP_x64_Data\Managed</ManagedRelativePath>
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('OSX'))">KSP.app\Contents\Resources\Data\Managed</ManagedRelativePath>
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('Linux'))">KSP_Data\Managed</ManagedRelativePath>
<ManagedPath>$(ReferencePath)\$(ManagedRelativePath)</ManagedPath>
<StartAction>Program</StartAction>
<StartProgram>$(ReferencePath)\$(KSPExecutable)</StartProgram>
<StartWorkingDirectory>$(ReferencePath)</StartWorkingDirectory>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Kerbal Space Program\KSP_Data\Managed\UnityEngine.dll</HintPath>
<Reference Include="$(ManagedPath)\Assembly-CSharp.dll">
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Kerbal Space Program\KSP_Data\Managed\UnityEngine.UI.dll</HintPath>
<Reference Include="$(ManagedPath)\UnityEngine.dll">
<Private>false</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine.CoreModule.dll">
<Private>false</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine.AnimationModule.dll">
<Private>false</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine.IMGUIModule.dll">
<Private>false</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine.TextRenderingModule.dll">
<Private>false</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine.AudioModule.dll">
<Private>false</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine.InputLegacyModule.dll">
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand All @@ -67,10 +90,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Util.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy /y "$(TargetPath)" "$(SolutionDir)..\GameData\KerbalSports\"
copy /y "$(TargetPath)" "C:\Program Files (x86)\Kerbal Space Program\GameData\KerbalSports\"</PostBuildEvent>
<PostBuildEvent>
copy /y "$(TargetPath)" "$(SolutionDir)..\GameData\KerbalSports\"
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
8 changes: 4 additions & 4 deletions source/KerbalSports/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyFileVersion("1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: KSPAssembly("KerbalSports", 1, 0)]
[assembly: AssemblyVersion("1.2.0")]
[assembly: AssemblyFileVersion("1.2.0")]
[assembly: AssemblyInformationalVersion("1.2.0")]
[assembly: KSPAssembly("KerbalSports", 1, 2)]