Conn/exits

From City of Hope MUSH
Revision as of 10:16, 5 May 2021 by CuAnnan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
@ExitFormat here=Trods:%r%t[trim(iter(lexits(me),if(get(##/trod),[setq(0, name(##))[index(%q0,:,2,2) <%xh[index(%q0,:,1,1)]%xn>]])))]%rDuelling Rings:%r%t[iter(lexits(me),if(not(get(##/trod)), [setq(0, name(##))[index(%q0,:,2,2) <%xh[index(%q0,:,1,1)]%xn>]]))]


Okay, gonna try to explain this bit by bit.

@exitformat allows you to, for any room you own, list the ones that are trods on a different line than the ones that aren't.

It does this by looping through the exits in a room and, if the exit has had the property TROD, listing it in the first iter, and if it doesn't, listing it on the second.

You can change trod to any property you like, as long as it matches what's set in the get(##/trod).