| 249 | } |
| 250 | |
| 251 | void ScriptExtender::LoadExtensionState(ExtensionStateContext ctx) |
| 252 | { |
| 253 | if (extensionLoaded_ && (!extensionState_ || ctx == extensionState_->Context())) { |
| 254 | return; |
| 255 | } |
| 256 | |
| 257 | PostStartup(); |
| 258 | |
| 259 | if (!extensionState_) { |
| 260 | ResetExtensionState(); |
| 261 | } |
| 262 | |
| 263 | extensionState_->LoadConfigs(); |
| 264 | |
| 265 | if (!gExtender->GetLibraryManager().CriticalInitializationFailed()) { |
| 266 | OsiMsg("Initializing server with target context " << ContextToString(ctx)); |
| 267 | gExtender->GetLibraryManager().ApplyCodePatches(); |
| 268 | network_.ExtendNetworking(); |
| 269 | osiris_.GetCustomFunctionManager().ClearDynamicEntries(); |
| 270 | extensionState_->RequestLuaReset(ctx, true); |
| 271 | } |
| 272 | |
| 273 | extensionLoaded_ = true; |
| 274 | } |
| 275 | |
| 276 | void ScriptExtender::OnSavegameVisit(OsirisVariableHelper* helpers, SavegameVisitor* visitor) |
| 277 | { |
no test coverage detected