public static void SetEntry(MyGameEntryEnum entry) { try { m_entry = entry; } catch (Exception ex) { MyLog.Default.WriteLine(ex); } }
protected virtual Dictionary <string, object> GetGameplayStartData(MyGameEntryEnum entry, MyObjectBuilder_SessionSettings settings) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); try { dictionary["entry"] = entry.ToString(); dictionary["game_mode"] = settings.GameMode.ToString(); dictionary["online_mode"] = settings.OnlineMode.ToString(); dictionary["world_type"] = MySession.Static.Scenario.Id.SubtypeName; dictionary["worldName"] = MySession.Static.Name; dictionary["server_is_dedicated"] = (MyMultiplayer.Static == null) ? ((object)0) : ((object)MyMultiplayer.Static.HostName.Equals("Dedicated server")); dictionary["server_name"] = (MyMultiplayer.Static != null) ? MyMultiplayer.Static.HostName : MySession.Static.LocalHumanPlayer.DisplayName; dictionary["server_max_number_of_players"] = (MyMultiplayer.Static != null) ? MyMultiplayer.Static.MemberLimit : 1; dictionary["server_current_number_of_players"] = (MyMultiplayer.Static != null) ? MyMultiplayer.Static.MemberCount : 1; dictionary["is_hosting_player"] = (MyMultiplayer.Static != null) ? ((object)MyMultiplayer.Static.IsServer) : ((object)1); if (MyMultiplayer.Static == null) { dictionary["multiplayer_type"] = "Off-line"; } else if (((MySession.Static == null) || (MySession.Static.LocalCharacter == null)) || !MyMultiplayer.Static.HostName.Equals(MySession.Static.LocalCharacter.DisplayNameText)) { dictionary["multiplayer_type"] = !MyMultiplayer.Static.HostName.Equals("Dedicated server") ? "Client" : "Dedicated server"; } else { dictionary["multiplayer_type"] = "Host"; } dictionary["active_mods"] = GetModList(); dictionary["active_mods_count"] = MySession.Static.Mods.Count; long num = (long)Math.Ceiling((DateTime.UtcNow - this.m_loadingStartedAt).TotalSeconds); dictionary["loading_duration"] = num; } catch (Exception exception) { dictionary["failed_to_get_data"] = exception.Message + "\n" + exception.StackTrace; } return(dictionary); }
public static void SetEntry(MyGameEntryEnum entry) { try { IMyAnalytics analytics = MyPerGameSettings.AnalyticsTracker; if (analytics == null) { return; } // The entry point can get overwritten in some cases, we need to track scenario. if (entry == MyGameEntryEnum.Scenario) { m_scenarioFlag = true; } m_entry = entry; } catch (Exception ex) { MyLog.Default.WriteLine(ex); } }
public static void SetEntry(MyGameEntryEnum entry) { try { IMyAnalytics analytics = MyPerGameSettings.AnalyticsTracker; if (analytics == null) return; // The entry point can get overwritten in some cases, we need to track scenario. if (entry == MyGameEntryEnum.Scenario) m_scenarioFlag = true; m_entry = entry; } catch (Exception ex) { MyLog.Default.WriteLine(ex); } }
protected override Dictionary <string, object> GetGameplayStartData(MyGameEntryEnum entry, MyObjectBuilder_SessionSettings settings) { int isVanilla; int num2; int count; MyVisualScriptManagerSessionComponent component = MySession.Static.GetComponent <MyVisualScriptManagerSessionComponent>(); bool flag = (MyCampaignManager.Static != null) ? (MyCampaignManager.Static.ActiveCampaign != null) : false; Dictionary <string, object> gameplayStartData = base.GetGameplayStartData(entry, settings); gameplayStartData["is_campaign_mission"] = flag; Dictionary <string, object> dictionary1 = gameplayStartData; if (!flag || (MyCampaignManager.Static.ActiveCampaign == null)) { isVanilla = 0; } else { isVanilla = (int)MyCampaignManager.Static.ActiveCampaign.IsVanilla; } dictionary1[(string)dictionary1] = (bool)isVanilla; if ((component == null) || (component.RunningLevelScriptNames == null)) { num2 = 0; } else { num2 = component.RunningLevelScriptNames.Count <string>(); } "is_official_campaign"["level_script_count"] = num2; if (((component == null) || (component.SMManager == null)) || (component.SMManager.MachineDefinitions == null)) { count = 0; } else { count = component.SMManager.MachineDefinitions.Count; } "is_official_campaign"["state_machine_count"] = count; this.m_lastCampaignProgressionTime = 0; string local2 = "is_official_campaign"; local2["voxel_support"] = settings.StationVoxelSupport; local2["destructible_blocks"] = settings.DestructibleBlocks; local2["destructible_voxels"] = settings.EnableVoxelDestruction; local2["jetpack"] = settings.EnableJetpack; local2["hostility"] = settings.EnvironmentHostility.ToString(); local2["drones"] = settings.EnableDrones; local2["wolfs"] = settings.EnableWolfs; local2["spiders"] = settings.EnableSpiders; local2["encounters"] = settings.EnableEncounters; local2["oxygen"] = settings.EnableOxygen; local2["pressurization"] = settings.EnableOxygenPressurization; local2["realistic_sounds"] = settings.RealisticSound; local2["tool_shake"] = settings.EnableToolShake; local2["multiplier_inventory"] = settings.InventorySizeMultiplier; local2["multiplier_welding_speed"] = settings.WelderSpeedMultiplier; local2["multiplier_grinding_speed"] = settings.GrinderSpeedMultiplier; local2["multiplier_refinery_speed"] = settings.RefinerySpeedMultiplier; local2["multiplier_assembler_speed"] = settings.AssemblerSpeedMultiplier; local2["multiplier_assembler_efficiency"] = settings.AssemblerEfficiencyMultiplier; local2["max_floating_objects"] = settings.MaxFloatingObjects; return((Dictionary <string, object>)local2); }
public void SetEntry(MyGameEntryEnum entry) { base.m_entry = entry; }
public static void SetEntry(MyGameEntryEnum entry) { try { m_entry = entry; } catch (Exception ex) { MyLog.Default.WriteLine(ex); } }