Add an API method for setting spawn ID

This commit is contained in:
xen-42 2024-10-04 15:08:49 -04:00
parent 4a80fa7076
commit ab2bf1118a
2 changed files with 9 additions and 0 deletions

View File

@ -214,5 +214,12 @@ namespace NewHorizons
/// <param name="mod"></param>
/// <param name="filePath"></param>
void AddSubtitle(IModBehaviour mod, string filePath);
/// <summary>
/// Whatever system the player is warping to next, they will spawn at the spawn point with this ID
/// Gets reset after warping. Is also overriden by entering a system-changing black hole or warp volume by their `spawnPointID`
/// </summary>
/// <param name="id"></param>
void SetNextSpawnID(string id);
}
}

View File

@ -342,5 +342,7 @@ namespace NewHorizons
public string GetTranslationForOtherText(string text) => TranslationHandler.GetTranslation(text, TranslationHandler.TextType.OTHER);
public void AddSubtitle(IModBehaviour mod, string filePath) => SubtitlesHandler.RegisterAdditionalSubtitle(mod, filePath);
public void SetNextSpawnID(string id) => PlayerSpawnHandler.TargetSpawnID = id;
}
}