Jump to content

Echo 8 ÉRÀ

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Echo 8 ÉRÀ

  1. 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.
  2. The Unity scripting documentation talks about Javascript, which does have a .Net implementation.
  3. Not to my knowledge. You could always try to track down a version of J# and see if that works, though the way it seems to require J# specific runtime DLLs, I seriously doubt it would work.
  4. Or you could just use MSBuild Tasks and accomplish the same thing without the hassle of dealing with batch files:
  5. A collection is only considered to have been modified after an element is added/removed from it. I'm not sure what replacing an element without changing the collection size is considered though. EDIT: For List<T>, replacing an element qualifies as modifying it.
  6. 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.
  7. 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
  8. The quick and dirty way of forcing VS to target a specific version of the .NET Framework is to open your *.csproj file in Notepad and change the line that reads <TargetFrameworkVersion>vx.y</TargetFrameworkVersion> where x.y is the .NET Framework version.
  9. Despite not being able to read your log file, since that's not a proper link, I'm going to take a guess and say that your project is targeting the .Net 4.x framework and contains references to DLLs that don't come with KSP.
  10. If you can display a string, you can display a number. String.Format() is your friend.
  11. 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.
  12. As for your case of using .Net 3.5 but finding no types, it might be a case of AssemblyLoader.loadedTypes not being populated with what you think it is. At least in the flight scene for me, AssemblyLoader.loadedTypes just contains Part, Partmodule, InternalModule and ScenarioModule.
  13. 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.
  14. 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); } }
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. Prepping a spaceplane for its next flight outside the hanger after Jeb lost the keys.
  21. 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.
  22. 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.
×
×
  • Create New...