Browse Source

add seed to info_parms

pull/3190/head
Daniel Gibbs 5 years ago
parent
commit
87576bde91
  1. 2
      lgsm/functions/command_wipe.sh
  2. 7
      lgsm/functions/info_parms.sh

2
lgsm/functions/command_wipe.sh

@ -198,7 +198,7 @@ fn_wipe_warning(){
fn_print_warn "wipe is about to start" 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(){ fn_wipe_random_seed(){
if [ -z "${seed}" ]; then if [ -z "${seed}" ]; then
shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt"

7
lgsm/functions/info_parms.sh

@ -140,6 +140,13 @@ fn_info_parms_rust(){
maxplayers=${maxplayers:-"0"} maxplayers=${maxplayers:-"0"}
saveinterval=${saveinterval:-"0"} saveinterval=${saveinterval:-"0"}
tickrate=${tickrate:-"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(){ fn_info_parms_samp(){

Loading…
Cancel
Save