summaryrefslogtreecommitdiffstats
path: root/lib/evendoors/particle.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/evendoors/particle.rb')
-rw-r--r--lib/evendoors/particle.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/evendoors/particle.rb b/lib/evendoors/particle.rb
index c81b16a..ee4a8a8 100644
--- a/lib/evendoors/particle.rb
+++ b/lib/evendoors/particle.rb
@@ -57,8 +57,10 @@ module EvenDoors
end
#
def split_dst!
- @dst = nil
- p, @action = next_dst.split EvenDoors::ACT_SEP
+ @dst = @room = @door = @action = nil
+ n = next_dst
+ return if n.nil? or n.empty?
+ p, @action = n.split EvenDoors::ACT_SEP
i = p.rindex EvenDoors::PATH_SEP
if i.nil?
@room = nil