For example:
My Shop;;My cool shop;;My sex-shop
Jellopy 3
Andre Card 200,000 5
Code: Select all
Index: src/FileParsers.pm
===================================================================
--- src/FileParsers.pm (revision 6342)
+++ src/FileParsers.pm (working copy)
@@ -425,8 +425,8 @@
$line =~ s/[\r\n\x{FEFF}]//g;
next if $line =~ /^$/ || $line =~ /^#/;
- if (!$shop->{title}) {
- $shop->{title} = $line;
+ if (!$shop->{title_line}) {
+ $shop->{title_line} = $line;
next;
}
Index: src/Misc.pm
===================================================================
--- src/Misc.pm (revision 6342)
+++ src/Misc.pm (working copy)
@@ -4152,7 +4152,7 @@
return;
}
- if (!$shop{title}) {
+ if (!$shop{title_line}) {
error T("Your shop does not have a title.\n");
return;
}
@@ -4194,7 +4194,10 @@
sub openShop {
my @items = makeShop();
+ my @shopnames;
return unless @items;
+ @shopnames = split(/;;/, $shop{title_line});
+ $shop{title} = $shopnames[int rand($#shopnames)];
$shop{title} = ($config{shopTitleOversize}) ? $shop{title} : substr($shop{title},0,36);
$messageSender->sendOpenShop($shop{title}, \@items);
message TF("Shop opened (%s) with %d selling items.\n", $shop{title}, @items.""), "success";