Exemplo n.º 1
0
        /// <summary>
        ///     Called when the world has been generated.
        /// </summary>
        private void OnWorldGenerated()
        {
            Log.Message("[PrepareLanding] OnWorldGenerated");

            // note: if we don't use ExecuteWhenFinished() then the world has been generated but the world field (from Find.World) is not yet set and is null.
            // so better use ExecuteWhenFinished as we are inside a LongEventHandler; see RimWorld.Page_CreateWorldParams.CanDoNext()
            LongEventHandler.ExecuteWhenFinished(delegate
            {
                WorldGenerated?.Invoke();
                WorldGeneratedOrLoaded?.Invoke();
            });
        }
Exemplo n.º 2
0
 public static void GenerateWorldPostFix()
 {
     WorldGenerated?.Invoke();
 }