Allow reloadlua to force the state to running

This commit is contained in:
Evil Factory
2026-04-18 15:37:49 -03:00
parent 12e05cb07e
commit f5f7eb7af9
@@ -260,18 +260,12 @@ namespace Barotrauma
public void OnReloadAllPackages() public void OnReloadAllPackages()
{ {
if (CurrentRunState <= RunState.Unloaded)
{
return;
}
CoroutineManager.Invoke(() => CoroutineManager.Invoke(() =>
{ {
var state = CurrentRunState;
SetRunState(RunState.Unloaded); SetRunState(RunState.Unloaded);
CoroutineManager.Invoke(() => CoroutineManager.Invoke(() =>
{ {
SetRunState(state); SetRunState(RunState.Running);
},0.25f); },0.25f);
}); });
} }