Changeset 24
- Timestamp:
- May 26, 2014, 2:29:53 PM (11 years ago)
- Location:
- scripts/usr/local/lib/7dtd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/VERSION
r23 r24 1 Current version: 61 Current version: 7 2 2 Last edit: 2014-05-26 -
scripts/usr/local/lib/7dtd/commands/instances.sh
r23 r24 53 53 echo 54 54 fi 55 configEditAll 55 configEditAll configQueryValue 56 56 echo 57 57 configSetAutoParameters "$INSTANCE" … … 123 123 ;; 124 124 *) 125 configEdit${sects[$SEC]} 125 configEdit${sects[$SEC]} configQueryValue 126 126 echo 127 127 esac … … 161 161 } 162 162 163 sdtdSubcommandInstancesPrintConfig() { 164 if [ $(isValidInstance "$1") -eq 0 ]; then 165 echo "No instance given or not a valid instance!" 166 return 167 fi 168 169 INSTANCE=$1 170 loadCurrentConfigValues "$1" 171 172 configEditAll printConfigValue 173 } 174 163 175 sdtdCommandInstances() { 164 176 SUBCMD=$1 … … 177 189 sdtdSubcommandInstancesDelete "$@" 178 190 ;; 191 print_config) 192 sdtdSubcommandInstancesPrintConfig "$@" 193 ;; 179 194 *) 180 195 sdtdCommandInstancesHelp … … 203 218 case $1 in 204 219 2) 205 echo "list create edit delete "220 echo "list create edit delete print_config" 206 221 ;; 207 222 3) 208 223 case $2 in 209 edit|delete )224 edit|delete|print_config) 210 225 echo "$(getInstanceList)" 211 226 ;; -
scripts/usr/local/lib/7dtd/serverconfig.sh
r23 r24 698 698 DisableNAT \ 699 699 ; do 700 configQueryValue $CV 701 echo 700 $1 $CV 702 701 done 703 702 echo … … 719 718 echo 720 719 fi 721 configQueryValue $CV 722 echo 720 $1 $CV 723 721 done 724 722 echo … … 733 731 GameName GameWorld GameMode \ 734 732 ; do 735 configQueryValue $CV 736 echo 733 $1 $CV 737 734 done 738 735 echo … … 747 744 DayCount FragLimit MatchLength RebuildMap \ 748 745 ; do 749 configQueryValue $CV 750 echo 746 $1 $CV 751 747 done 752 748 echo … … 762 758 BlockDurabilityModifier \ 763 759 ; do 764 configQueryValue $CV 765 echo 760 $1 $CV 766 761 done 767 762 echo … … 777 772 LootAbundance LootRespawnDays AirDropFrequency \ 778 773 ; do 779 configQueryValue $CV 780 echo 774 $1 $CV 781 775 done 782 776 echo … … 792 786 DayNightLength NightPercentage \ 793 787 ; do 794 configQueryValue $CV 795 echo 788 $1 $CV 796 789 done 797 790 echo … … 807 800 PlayerDamageGiven PlayerDamageRecieved EnemySenseMemory EnemySpawnMode EnemyDifficulty \ 808 801 ; do 809 configQueryValue $CV 810 echo 802 $1 $CV 811 803 done 812 804 echo … … 822 814 LandClaimOnlineDurabilityModifier LandClaimOfflineDurabilityModifier \ 823 815 ; do 824 configQueryValue $CV 825 echo 816 $1 $CV 826 817 done 827 818 echo … … 829 820 830 821 configEditAll() { 831 configEditServer 832 configEditRemoteControl 833 configEditGameType 834 configEditGameTypeSpecific 835 configEditGeneric 836 configEditDropLoot 837 configEditTimes 838 configEditDifficulty 839 configEditLandClaim 822 configEditServer "$1" 823 configEditRemoteControl "$1" 824 configEditGameType "$1" 825 configEditGameTypeSpecific "$1" 826 configEditGeneric "$1" 827 configEditDropLoot "$1" 828 configEditTimes "$1" 829 configEditDifficulty "$1" 830 configEditLandClaim "$1" 840 831 } 841 832 … … 990 981 fi 991 982 prompt=$(printf "%s:" "$prompt") 992 prompt=$(printf "%-*s " 35"$prompt")983 prompt=$(printf "%-*s " 40 "$prompt") 993 984 994 985 while : ; do … … 1006 997 export $currentValName="${config_allowed_values[$currentValName-1]}" 1007 998 fi 999 echo 1008 1000 } 1009 1001 … … 1021 1013 1022 1014 1023 # Print currently defined config values 1024 printCurrentConfig() { 1025 local CV 1026 for CV in $(listConfigValues); do 1027 local currentValName=configCurrent_$CV 1028 printf "%-20s = %s\n" "$CV" "${!currentValName}" 1029 done 1015 # Print defined config value 1016 # Params: 1017 # 1: Config option 1018 printConfigValue() { 1019 local currentValName=configCurrent_$1 1020 printf "%-25s = %s\n" "$(serverconfig_$1_QueryName)" "${!currentValName}" 1030 1021 } 1031 1022
Note:
See TracChangeset
for help on using the changeset viewer.