Echo 8 ÉRÀ
Members-
Posts
60 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Echo 8 ÉRÀ
-
I just hope it runs well on Wine. I use FreeBSD for my desktop, so while I'd love to see a native port, realistically it'll never happen.
-
Well, there's your problem. Portable class libraries are there if you want to create a class library that supports desktop, metro-style desktop apps, Windows Phone apps, Silverlight. etc., and as a consequence, require a minimum level of .Net 4.0 (I think that's minimum metro apps support). Just recreate the project, except pick the non-portable Class Library project type.
-
I think only SDKs show up in the Programs and Features control panel applet (the "uninstall programs" tool I think you are referring to): S/he's also mentioned enabling it in the control panel, which presumably means the little dialog that appears if you click "Turn Windows features on or off". Hmm. Maybe they should check if .NET 3.5 is actually installed by checking if the folder actually exists: C:\Windows\Microsoft.NET\Framework\v3.5
-
Just for kicks, I tried to write your nested foreach loops (with KSPAddon instead of your attribute) with LINQ instead: private void FindAllCrewDataGenerators() { var generators = from type in ( (from asm in AssemblyLoader.loadedAssemblies select asm.assembly.GetTypes().AsEnumerable()) .Aggregate((first, second) => first.Concat(second))) where Attribute.IsDefined(type, typeof(KSPAddon)) select type; this.Generators = generators.ToList(); } The nested loops is more efficient and easier to understand, IMO.
-
I'm going to have to investigate this at some point. LINQ in KSP plugins, that is. While I haven't used LINQ itself, I have used the same classes and methods that LINQ is built on with no problems. EDIT: Ippo, would you mind posting a zip containing your project which crashes KSP? My quick and dirty test plugin loads fine, so I don't know if it's because the code is too trivial to trigger any problems or if I set project settings out of habit which allow me to use LINQ without any problems.
-
Why can't you use LINQ AND target .Net 3.5 at the same time? I don't have a handy C# project to test with, but I compiled and ran the following C++/CLI code just fine: using namespace System::Linq; bool attfilter(System::Type ^t); bool attfilter(System::Type ^t) { return System::Attribute::IsDefined(t, KSPAddon::typeid); } void Events::Start(void) { PDebug::Log("Events::Start()"); auto generators = Enumerable::Where(AssemblyLoader::loadedTypes, gcnew System::Func<System::Type ^, bool>(&attfilter)); auto Generators = Enumerable::ToList(generators); for each (auto g in Generators) { PDebug::Log(g->FullName); } }
-
Would anyone happen to know how to port // C# GameEvents.onVesselWasModified.Add(this.OnVesselWasModified); to C++/CLI? I've tried the obvious // C++/CLI GameEvents::onVesselWasModified->Add(gcnew EventData<Vessel^>::OnEvent(this, &Events::OnVesselWasModified)); but that results in error C2664: 'void EventData<Vessel ^>::Add(EventData<Vessel ^>::OnEvent ^)' : cannot convert argument 1 from 'EventData<Vessel ^>::OnEvent ^' to 'EventData<Vessel ^>::OnEvent ^' I currently work around it by using reflection and calling Delegate::CreateDelegate, but it'd be nice to know if there is a cleaner way of doing it. Using VS2013 Professional Update 2.
-
MonoDevelop requires that they install dependencies (Mono on non-Windows machines, .Net on Windows), which they don't want to do. Unity gets away with it because it hosts its own custom Mono runtime. EDIT: On Windows, you can get away with it since the .Net Framework gets preinstalled in Windows Vista onwards (except for the case where a user chooses to remove it). Also, somebody did manage to have a portable Mono runtime, but that was on Windows again.
-
That doesn't clear things up. The reasoning for my question is that there is a huge difference if all you want to do is work on any Windows machine (which is practically guaranteed to have at least .Net 2.0 installed nowadays) and being able to work with any OS. AFAIK, there isn't a portable cross-platform .Net runtime, so if you want to work on a Linux machine one day and then a Mac machine the next, without any guarantee of the necessary dependencies being installed, a VM is the only solution. If all you care about is unzipping your projects on Windows machines, it's a simple matter of learning how to call the c# compiler via the commandline and then automating it via makefiles. I did something similar with the latter back in Uni, as some of the Uni computers only had VS 6.0 and DevC++ installed and I had some little personal projects I wanted to be able to work on between lectures.
-
Portable as in you can use any Windows machine to code (since you mentioned Dev C++ and AFAIK it's Windows only) or portable as in you can use any OS? If it's the former, just use Microsoft's .Net compilers. They get installed as part of the client version of the .Net Framework in "C:\Windows\Microsoft.Net\v<Version Number>\" to support stuff like CodeDom.
-
Show off your awesome KSP pictures!
Echo 8 ÉRÀ replied to NuclearWarfare's topic in KSP Fan Works
Nope. Framerate drops to <5 fps as soon the crane comes into play. I originally wanted to test the feasibility of loading new payloads into it, then got carried away. -
Show off your awesome KSP pictures!
Echo 8 ÉRÀ replied to NuclearWarfare's topic in KSP Fan Works
Prepping a spaceplane for its next flight outside the hanger after Jeb lost the keys. -
Honestly, my suggestion is to stop trying to make mods for now and get started on C# tutorials. I suspected earlier, with your constant references to "scripts" (which is technically a more advanced concept in the context of C#), but it's quite clear now you don't know C#. While it is certainly possible to learn C# and KSP modding at the same time, you're just making it harder for yourself, and we can't exactly hold your hand through every step. If we did, we might as well make the mod ourselves and publish it under our own names.
-
gimbals and transforms
Echo 8 ÉRÀ replied to numerobis's topic in KSP1 C# Plugin Development Help and Support
Why not just do the simple thing and record the initial transform as the rest pose? After all, it makes the code a bit more robust in the case where the modeler didn't make their rest position a simple 〈100〉 direction.