… | |
… | |
145 | print $msg, "\n"; |
145 | print $msg, "\n"; |
146 | } |
146 | } |
147 | |
147 | |
148 | package DC; |
148 | package DC; |
149 | |
149 | |
150 | our $RC_THEME = "theme-metal"; |
150 | our @RC_THEME = ("theme-plain", "."); |
151 | our $RC_BASE; |
151 | our $RC_BASE; |
152 | |
152 | |
153 | for (grep !ref, @INC) { |
153 | for (grep !ref, @INC) { |
154 | $RC_BASE = "$_/Deliantra/Client/private/resources"; |
154 | $RC_BASE = "$_/Deliantra/Client/private/resources"; |
155 | last if -d $RC_BASE; |
155 | last if -d $RC_BASE; |
156 | } |
156 | } |
157 | |
157 | |
158 | sub find_rcfile($) { |
158 | sub find_rcfile($) { |
159 | my $path; |
159 | my $path; |
160 | |
160 | |
|
|
161 | for (@RC_THEME) { |
161 | $path = "$RC_BASE/$RC_THEME/$_[0]"; |
162 | $path = "$RC_BASE/$_/$_[0]"; |
162 | return $path if -r $path; |
163 | return $path if -r $path; |
163 | |
164 | } |
164 | $path = "$RC_BASE/$_[0]"; |
|
|
165 | return $path if -r $path; |
|
|
166 | |
165 | |
167 | die "FATAL: can't find required file \"$_[0]\" in \"$RC_BASE\"\n"; |
166 | die "FATAL: can't find required file \"$_[0]\" in \"$RC_BASE\"\n"; |
168 | } |
167 | } |
169 | |
168 | |
170 | sub read_cfg { |
169 | sub read_cfg { |