diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index ceb3be5b5..3c8e1a419 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -198,7 +198,7 @@ fn_wipe_warning(){ fn_print_warn "wipe is about to start" } -# Will change the seed everytime the wipe command is run if the seed in config is not set +# Will change the seed everytime the wipe command is run if the seed in config is not set. fn_wipe_random_seed(){ if [ -z "${seed}" ]; then shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 782f774d4..4a81d73ce 100755 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -140,6 +140,13 @@ fn_info_parms_rust(){ maxplayers=${maxplayers:-"0"} saveinterval=${saveinterval:-"0"} tickrate=${tickrate:-"0"} + # Part of random seed feature. + if [ -z "${seed}" ]; then + if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then + shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" + fi + seed=$(cat "${datadir}/${selfname}-seed.txt") + fi } fn_info_parms_samp(){