convert to ProtoCrewMemeber.ExtraExperience
zer0Kerbal opened this issue ยท 1 comments
Allow kerbals to have/save/load arbitrary experience points.
ProtoCrewMember.ExtraExperience can be used to record Additional arbitrary experience points for a kerbal (automatically added to the kerbals experience and Level).
else switch (KLevel) { case 1: newKerb.flightLog.AddEntry("Training1," + FlightGlobals.GetHomeBodyName()); newKerb.ArchiveFlightLog(); newKerb.experience = 2; newKerb.experienceLevel = 1; // Hire.Log.Info("KSI :: Level set to 1."); break; case 2: newKerb.flightLog.AddEntry("Training2," + FlightGlobals.GetHomeBodyName()); newKerb.ArchiveFlightLog(); newKerb.experience = 8; newKerb.experienceLevel = 2; // Hire.Log.Info("KSI :: Level set to 2."); break; case 3: newKerb.flightLog.AddEntry("Training3," + FlightGlobals.GetHomeBodyName()); newKerb.ArchiveFlightLog(); newKerb.experience = 16; newKerb.experienceLevel = 3; // Hire.Log.Info("KSI :: Level set to 3."); break; case 4: newKerb.flightLog.AddEntry("Training4," + FlightGlobals.GetHomeBodyName()); newKerb.ArchiveFlightLog(); newKerb.experience = 32; newKerb.experienceLevel = 4; // Hire.Log.Info("KSI :: Level set to 4."); break; case 5: newKerb.flightLog.AddEntry("Training5," + FlightGlobals.GetHomeBodyName()); newKerb.ArchiveFlightLog(); newKerb.experience = 64; newKerb.experienceLevel = 5; break; } GameEvents.onKerbalAdded.Fire(newKerb); // old gameevent most likely to be used by other mods GameEvents.onKerbalAddComplete.Fire(newKerb); // new gameevent that seems relevant