|
|
@ -98,13 +98,17 @@ fn_full_wipe_warning(){ |
|
|
|
fn_print_warn_nl "Full wipe will reset the map and remove player data" |
|
|
|
} |
|
|
|
|
|
|
|
# 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 is run, if the seed is not defined by the user. |
|
|
|
fn_wipe_random_seed(){ |
|
|
|
echo -en "generating random seed..." |
|
|
|
shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" |
|
|
|
seed=$(cat "${datadir}/${selfname}-seed.txt") |
|
|
|
exitcode=0 |
|
|
|
fn_wipe_exit_code |
|
|
|
if [ -f "${datadir}/${selfname}-seed.txt" ]; then |
|
|
|
echo -en "generating random seed..." |
|
|
|
shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" |
|
|
|
seed=$(cat "${datadir}/${selfname}-seed.txt") |
|
|
|
echo -e "${cyan}${seed}${default}" |
|
|
|
fn_sleep_time |
|
|
|
exitcode=0 |
|
|
|
fn_wipe_exit_code |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
fn_print_dots "" |
|
|
|