Cheetah's Room Parent

A room parent with colors that can be customized.

Author: Cheetah@M*U*S*H
Category: Building
Commands: @create, @lock, @set.
Compatibility: PennMUSH, TinyBit, TinyMUX.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Cheetah's Room Parent

@create Cheetah's room parent
@lock Cheetah's room parent==me
@set Cheetah's room parent = LINK_OK
@set Cheetah's room parent = OPAQUE
@set Cheetah's room parent = MONITOR
&CONFORMAT Cheetah's room parent=[ansi(v(lincol),-)] [ansi(v(itemcol),People)] [ansi(v(lincol),-)] [squish(iter(lcon(me),switch(type(##),PLAYER,if(not(hasflag(##,DARK)),%r%b[switch(idle(##),-1,ansi(r,<ASLEEP>),>14400,ansi(r,<DOZING>),>3600,ansi(r,<SLEEPY>))] [name(##)]),THING,setq(0,%q0 ##))))]%r[ansi(v(lincol),-)] [ansi(v(itemcol),Objects)] [ansi(v(lincol),-)][squish(iter(%q0,if(not(hasflag(##,DARK)),%r%b[name(##)])))]%r[setq(0,lattr(me/VIEW_*))][if(%q0,iter(%q0,[ansi(v(lincol),-)] [ansi(v(itemcol),Viewable)] [ansi(v(lincol),-)] [u(FUN_CAPSTRING,after(##,VIEW_))] [ansi(v(lincol),-)]))]
@set Cheetah's room parent/CONFORMAT=no_command
&CREDITS Cheetah's room parent=Originally by Taluie@STR aka Tal'Ifa@TrekMUSH: ATS, total prune and rewrite by Cheetah@M*U*S*H. Several vars hold ansi()able colours, others hold separators and descs. Putting a desc on it and naming it desc_get_something will make that available in all rooms by setting DESC_STORE to that name. Else set DESC_STORE to the preferred desc of the room. Filch away if you want to use it, but retain some sort of credit please :)
&DESCCOL Cheetah's room parent=hx
&DESCRIBE Cheetah's room parent=%r[repeat(ansi(v(lincol),v(linchar)),79)]%r[ansi(v(desccol),ifelse(match(v(desc_store),desc_get_*) , u(me/[v(me/desc_store)]) , u(me/desc_store)))]%r[ansi(v(lincol),repeat(v(linchar),79))]%r
@set Cheetah's room parent/DESCRIBE=no_command visual public nearby
&DESC_STORE Cheetah's room parent=Set a DESC_STORE.
&EXITFORMAT Cheetah's room parent=[ansi(c,Obvious Exits:)]%r[iter(%0,[ljust([ansi(hg,<)][ansi(y,[ucstr(extract(fullname(##),2,1,;))])][ansi(hg,>)],8)][ansi(y,ljust(name(##),30))][if(hasflag(me,TRANSPARENT),[ansi(hg,name(loc(##)))])],,%r)]
@set Cheetah's room parent/EXITFORMAT=no_command
&FUN_CAPSTRING Cheetah's room parent=iter(%0,capstr(lcstr(##)),_)
&ITEMCOL Cheetah's room parent=ch
&LINCHAR Cheetah's room parent=-
&LINCOL Cheetah's room parent=hb
&NAMEFORMAT Cheetah's room parent=ljust(ansi(hw,name(%0)),20)[center(if(isdbref(zone(%0)),<[name(zone(%0))]>),40)]
@set Cheetah's room parent/NAMEFORMAT=no_command

ex Cheetah's room parent/CREDITS
think Parent your room(s) to [num(Cheetah's room parent)].