Skip to content

Commit

Permalink
fix config and upkg name
Browse files Browse the repository at this point in the history
  • Loading branch information
GenZmeY committed Sep 15, 2022
1 parent a7d8cca commit 6777cef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
8 changes: 2 additions & 6 deletions SML/Classes/Mut.uc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ public function PreBeginPlay()
{
Super.PreBeginPlay();

LogLevel = SML.default.LogLevel;
if (LogLevel == LL_WrongLevel)
{
LogLevel = LL_Info;
}
LogLevel = SML.static.GetLogLevel();

`Log_Trace();

Expand Down Expand Up @@ -85,12 +81,12 @@ private function ModifyLoad()
++Index;
}
}
SML.static.StaticSaveConfig();

JoinArray(Mutators, MutatorsRaw);
LoadURL $= (Subst(OptMut) $ MutatorsRaw);
if (SML.static.WantsToSpawn())
{
SML.static.StaticSaveConfig();
LoadURL $= (Subst(OptAC) $ SML.static.GetName());
}

Expand Down
File renamed without changes.
19 changes: 13 additions & 6 deletions SML/Classes/SafeMutLoader.uc
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ class SafeMutLoader extends KFAccessControl
config(SML);

var private Array<Actor> ServerActors;
var public config E_LogLevel LogLevel;
var private config E_LogLevel LogLevel;
var private config Array<String> Mutators;

public function PreBeginPlay()
{
`Log_Trace();

if (LogLevel == LL_WrongLevel)
{
LogLevel = LL_Info;
StaticSaveConfig();
}
LogLevel = GetLogLevel();

LoadActors();

Expand Down Expand Up @@ -129,6 +125,17 @@ public function OnClientConnectionClose(Player ClientConnection)
Super.OnClientConnectionClose(ClientConnection);
}
public static function E_LogLevel GetLogLevel()
{
if (default.LogLevel == LL_WrongLevel)
{
default.LogLevel = LL_Info;
StaticSaveConfig();
}
return default.LogLevel;
}
private static function class<Actor> GetMutReplacement(class<Mutator> MutClass)
{
if (MutClass == None || MutClass.static.GetLocalString() == "") return None;
Expand Down

0 comments on commit 6777cef

Please sign in to comment.