Browse Source

fix(rust): improve seed messaging

pull/4161/head
Daniel Gibbs 2 years ago
parent
commit
c6549da271
  1. 2
      lgsm/functions/command_wipe.sh
  2. 3
      lgsm/functions/fix_rust.sh
  3. 2
      lgsm/functions/info_game.sh

2
lgsm/functions/command_wipe.sh

@ -111,7 +111,7 @@ fn_wipe_random_seed() {
seed=$(cat "${datadir}/${selfname}-seed.txt")
randomseed=1
echo -en "generating new random seed (${cyan}${seed}${default})..."
fn_script_log_pass "generating new random seed (${cyan}${seed}${default})"
fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})"
fn_sleep_time
fn_print_ok_eol_nl
fi

3
lgsm/functions/fix_rust.sh

@ -15,6 +15,9 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedic
if [ -z "${seed}" ] || [ "${seed}" == "0" ]; then
if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then
shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt"
seed="$(cat "${datadir}/${selfname}-seed.txt")"
fn_print_info_nl "Generating new random seed (${cyan}${seed}${default})"
fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})"
fi
seed="$(cat "${datadir}/${selfname}-seed.txt")"
randomseed=1

2
lgsm/functions/info_game.sh

@ -1494,6 +1494,8 @@ fn_info_game_rust() {
seed=${seed:-"0"}
elif [ -f "${datadir}/${selfname}-seed.txt" ]; then
seed=$(cat "${datadir}/${selfname}-seed.txt")
else
seed="0"
fi
salt=${salt:-"0"}
}

Loading…
Cancel
Save