… | |
… | |
93 | cf::register_command wizlook => sub { |
93 | cf::register_command wizlook => sub { |
94 | my ($ob, $arg) = @_; |
94 | my ($ob, $arg) = @_; |
95 | |
95 | |
96 | return unless $ob->may ("command_wizlook"); |
96 | return unless $ob->may ("command_wizlook"); |
97 | |
97 | |
98 | $ob->contr->clear_los (0); |
98 | my $new_val = length $arg ? $arg * 1 : !$ob->flag (cf::FLAG_WIZLOOK); |
99 | |
99 | |
100 | $ob->reply (undef, "You can temporarily see through walls."); |
100 | $ob->flag (cf::FLAG_WIZLOOK, $new_val); |
|
|
101 | |
|
|
102 | $ob->contr->do_los (1); |
|
|
103 | |
|
|
104 | $ob->reply (undef, |
|
|
105 | $new_val |
|
|
106 | ? "You can now look through walls." |
|
|
107 | : "You will now see the same thing as you would normally.", |
|
|
108 | ); |
101 | |
109 | |
102 | 1 |
110 | 1 |
103 | }; |
111 | }; |
104 | |
112 | |
105 | cf::register_command reset => sub { |
113 | cf::register_command reset => sub { |