Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
feat: Update GameUserSettings.ActiveMods on server startup (#164)
Browse files Browse the repository at this point in the history
Co-authored-by: Alanoll <[email protected]>
  • Loading branch information
Alanoll and Alanoll authored Nov 28, 2023
1 parent 83dd7a3 commit 04f0d3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/server/Mods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function GeneralServerSettingsCard({ setServ, serv }: {setServ: React.Dispatch<R
<Card variant="soft" className={''}>
<div className={'space-x-4 w-full flex'}>
<div className={'inline-block'}>
<FormLabel>Mods (e.g.: modid1,modid2,modid3) (for now you need to set "ACTIVEMODS" to ini manually)</FormLabel>
<FormLabel>Mods (e.g.: modid1,modid2,modid3)</FormLabel>
<Input className={"w-[60vw]"} value={serv?.mods} onChange={(e) => setServ((p) => ({ ...p, mods: e.target.value, convertValues: p.convertValues }))}></Input>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions server/gus.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ func (s *Server) SaveGameUserSettingsIni(filePathToLoadFrom string, overrideUseI
s.GameUserSettings.MultiHome.MultiHome = true
s.GameUserSettings.ScriptEngineGameSession.MaxPlayers = s.MaxPlayers

s.GameUserSettings.ServerSettings.ActiveMods = s.Mods

err = gusIni.ReflectFrom(&s.GameUserSettings)
if err != nil {
return err
Expand Down

0 comments on commit 04f0d3b

Please sign in to comment.