From 2bdb8ddbfa1412b35417c71297d64c3d2c0a2a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 9 May 2012 12:03:26 +0200 Subject: Room: cleanup sned_sys_p --- lib/evendoors/room.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/evendoors/room.rb b/lib/evendoors/room.rb index e947a70..490bddf 100644 --- a/lib/evendoors/room.rb +++ b/lib/evendoors/room.rb @@ -111,14 +111,12 @@ module EvenDoors puts " * send_sys_p #{(p.next_dst.nil? ? 'no dst' : p.next_dst)} ..." if EvenDoors::Twirl.debug if p.next_dst p.split_dst! - if p.door.empty? - if p.action.nil? - p.error! EvenDoors::ERROR_ROUTE_SNDNA - else - p.dst_routed! space - end - else + if p.door route_p p + elsif p.action + p.dst_routed! space + else + p.error! EvenDoors::ERROR_ROUTE_SNDNA end else p.error! EvenDoors::ERROR_ROUTE_SND -- cgit v1.1-2-g2b99