Add host normalization and ResolveServerKey to match equivalent endpoints (localhost/127.0.0.1, bracketed IPv6, etc.) so reconnects reuse existing server profiles. Harden profile storage: sanitize save-folder components, use Documents fallback via _dupenv_s when needed, log write/open failures, and fix Windows build issues from unsafe getenv usage. Make session launch resilient to missing or rotated exit saves by accepting Exitsave... names, refreshing to the newest exit save, and falling back to first-time flow from the main menu (instead of hard-failing). Update session launch to prefer resolved profile keys, touch/bind profiles appropriately, and improve related load error handling. Also add a simple Creation Kit quest script (CO_Vault109StartQuestScript) and update changelog/docs to document these changes.
17 lines
544 B
C++
17 lines
544 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace F4T::ServerProfileStore
|
|
{
|
|
std::string MakeServerKey(const std::string& a_host, std::uint16_t a_port);
|
|
std::optional<std::string> ResolveServerKey(const std::string& a_host, std::uint16_t a_port);
|
|
|
|
bool HasProfile(const std::string& a_serverKey);
|
|
std::optional<std::string> LookupSaveFile(const std::string& a_serverKey);
|
|
void BindSaveFile(const std::string& a_serverKey, const std::string& a_saveFile);
|
|
void TouchProfile(const std::string& a_serverKey);
|
|
}
|