-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathCORE 03 - Ancestor Objects - Room Parents.txt
58 lines (36 loc) · 5.84 KB
/
CORE 03 - Ancestor Objects - Room Parents.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@@ DEPENDENCIES: CORE
@@ ANCESTOR ROOM
@select/inline isdbref(u(oldcobj,ancestor_room))=1,{&COBJ`ANCESTOR_ROOM [u(cobj,ccp)]=[objid([u(oldcobj,ancestor_room)])]},0,{@select/inline isdbref(u(cobj,ancestor_room))=0,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_ROOM,objid(dig(Ancestor Room)))}}
&HEADER [u(cobj,ancestor_room)]=vol_header(%0,,%1,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))
&SEPARATOR [u(cobj,ancestor_room)]=vol_separator(%0,,%1,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))
&SUBHEADER [u(cobj,ancestor_room)]=vol_subheader(%0,,%1,,,v(DISTCOLOR`BORDER),v(DISTCOLOR`HEADER_STAR),v(DISTCOLOR`HEADER_TEXT))
@NAMEFORMAT [u(cobj,ancestor_room)]=[vol_choosegame(endtag(a),)][u(HEADER,vol_getmoniker(%!)[if(cor(controls(%#,%!),vol_isadmin(%#)),%(%!%))],1)]
@CONFORMAT [u(cobj,ancestor_room)]=[u(CONFORMAT`EXTRA)][if(words(lvplayers(%!)),udefault(PLAYERS`[u(SETTINGS`ROOM_PLAYERS)],u(PLAYERS`DEFAULT)))][if(words(lvthings(%!)),%R[udefault(THINGS`[switch(num(vol_masterroom()),num(%!),MASTER_ROOM,u(SETTINGS`ROOM_THINGS))],u(THINGS`DEFAULT))])][switch(type(%!),THING,%R[u(SUBHEADER)])]
@@ @DESCFORMAT [u(cobj,ancestor_room)]=if(vol_opother(%#,system,SCREEN_READER),trim(squish(%0,%R),%R),%0)
&PLAYERS`DEFAULT [u(cobj,ancestor_room)]=u(SEPARATOR,Players)%R[ansi(vol_color(%#,COLUMN_NAMES),align(19,Name))]%R[iter(vol_sortname(lvplayers(%!)),align(19,vol_mxpmenu(vol_getmoniker(%i0),look [name(%i0)])),%b,%R)]
&THINGS`DEFAULT [u(cobj,ancestor_room)]=[u(SEPARATOR,Things)]%R[ansi(vol_color(%#,COLUMN_NAMES),align(40 28 8,Name,Owner,if(isadmin(%#),DBref,Enter)))]%R[iter(vol_sortname(lvthings(%!)),align(40 28 8,vol_pueblize(vol_getmoniker(%i0),look [name(%i0)]),vol_pueblize(name(owner(%i0)),+finger [name(owner(%i0))]),switch(vol_isadmin(%#)[hasflag(%i0,ENTER_OK)],11,vol_pueblize(ansi(hg,%i0),enter %i0),1*,ansi(hr,%i0),01,vol_pueblize(ansi(hg,enter_ok),enter %i0),ansi(hr,can't))),%b,%R)]
&THINGS`MASTER_ROOM [u(cobj,ancestor_room)]=[u(SEPARATOR,Things)]%R[ansi(vol_color(%#,ROOM_COLUMNS),align(40 28 8,Name,Owner,if(vol_isadmin(%#),DBref,Enter)))]%R[iter(vol_sortname(lvthings(%!)),align(40 28 8,name(%i0),name(owner(%i0)),switch(vol_isadmin(%#)[hasflag(%i0,ENTER_OK)],11,ansi(hg,%i0),1*,ansi(hr,%i0),01,ansi(hg,enter_ok),ansi(hr,can't))),%b,%R)]
&CONFORMAT`EXTRA [u(cobj,ancestor_room)]=[if(cor(nattr(%!/VIEW`*),nattr(%!/MUSIC`*),nattr(%!/PLACE`*)),u(separator,Extra)%R[iter(filterbool(#lambda/nattr(%!/\%0`*),PLACE VIEW MUSIC),%T[u(FUN`EXTRA`%i0)],%b,%R)]%R)]
&FUN`EXTRA`VIEW [u(cobj,ancestor_room)]=This room has views! Type [vol_pueblize(ansi(h,+view),+view)] to list!
&FUN`EXTRA`MUSIC [u(cobj,ancestor_room)]=[ansi(hc,This room has a soundtrack! Type)] [vol_pueblize(ansi(h,soundtrack),soundtrack)] [ansi(hc,to list!)]
&FUN`EXTRA`PLACE [u(cobj,ancestor_room)]=This room has places! Type [vol_pueblize(ansi(h,places),places)] to list!
&EXITFORMAT [u(cobj,ancestor_room)]=[if(words(lvexits(%!)),udefault(EXITFORMAT`[u(SETTINGS`ROOM_EXITS)],u(EXITFORMAT`DEFAULT)),u(SUBHEADER,u(FOOTER_TEXT)))]
&EXITFORMAT`DEFAULT [u(cobj,ancestor_room)]=[u(SEPARATOR,Exits)]%R[null(if(t(u(setr,lvexits,lvexits(%!))),iter(exitalias exitname exitwrap exitdest,u(setq,col%i0,u(strfirstof,v(DISTCOLOR`%i0),vol_color(%#,ROOM,%i0))))))][table(iter(vol_sortorder(vol_sortname(%q<lvexits>)),u(RENDER_EXIT,%i0,37),%b,|),37,width(%#),|)]%R[u(SUBHEADER)]
&RENDER_EXIT [u(cobj,ancestor_room)]=ljust(if(strlen(alias(%0)),[ansi(%q<colexitwrap>,<)][ansi(%q<colexitalias>,vol_pueblize(ucstr(alias(%0)),name(%0)))][ansi(%q<colexitwrap>,>)]),6)[ansi(%q<colexitname>,vol_pueblize(vol_getmoniker(%0),name(%0)))] to [ansi(%q<colexitdest>,left(name(loc(%0)),sub(%1,6,4,strlen(name(%0)))))]
&FIL`VISIBLE [u(cobj,ancestor_room)]=not(u(FIL`DARK,%0))
&FIL`DARK [u(cobj,ancestor_room)]=hasflag(%0,DARK)
@@ ANCESTOR EXIT
@select/inline isdbref(u(oldcobj,ancestor_exit))=1,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_EXIT,objid(u(oldcobj,ancestor_exit)))},0,{@select/inline isdbref(u(cobj,ancestor_exit))=0,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_EXIT,objid(create(Ancestor Exit)))};@tel [u(cobj,ancestor_exit)]=[u(cobj,ancestor_room)]}
&ODROP [u(cobj,ancestor_exit)]=heads over from [fullname(home(me))]
&OSUCCESS [u(cobj,ancestor_exit)]=heads over to [fullname(loc(me))]
&SUCCESS [u(cobj,ancestor_exit)]=You head over to [fullname(loc(me))]
@@ ANCESTOR PLAYER
@select/inline isdbref(u(setr,ap,u(oldcobj,ancestor_player)))=1,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_PLAYER,objid(%q<ap>));@newpass %q<ar>=scramble(digest(md5,secs()))},0,{@select/inline isdbref(u(cobj,ancestor_player))=0,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_PLAYER,objid(create(Ancestor Player)))}}
@tel [u(cobj,ancestor_player)]=[u(cobj,ancestor_room)]
@adescribe [u(cobj,ancestor_player)]=@check [vol_my_config(ALERTS,ADESC)];think GAME> %n just looked at you.
@idle [u(cobj,ancestor_player)]=if(cand(gte(idle(%!),v(IDLE_SECS)),v(IDLE_SECS)),Currently idle\, please try again later!)
@CHATFORMAT [u(cobj,ancestor_player)]=if(cor(vol_chanpriority(%1),strmatch(%#,%!)),if(strlen(setr(color,vol_chancolor(%1))),<[ansi(%q<color>,stripansi(%1))]>[if(strlen(%4),%B%4%B,%B)][vol_speech(%#,switch(%0,@,|,%0)%2,%!,if(vol_my_options(CHANNELS,NAMELINK),vol_namelink(%#)),CHANNELS,setunion(lwho(),))],<%1>[if(strlen(%4),%B%4%B,%B)][vol_speech(%#,switch(%0,@,|,%0)[vol_colormarkup(%!,vol_chanhash(%1,%2),%#,,vol_my_options(CHANNELS,OTHERLINK))],%!,vol_codename(cmogrifier(%1)),CHANNELS,,,vol_my_options(CHANNELS,NAMELINK))]))
&ACONNECT [u(cobj,ancestor_player)]=@dolist/inline/nobreak u(lattrp,%!/ACONNECT`SUITE`*)={@attach %!/##}
@@ ANCESTOR THING
@select/inline isdbref(u(oldcobj,ancestor_thing))=1,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_THING,objid(u(oldcobj,ancestor_thing)))},0,{@select/inline isdbref(u(cobj,ancestor_thing))=0,{th u(attrib_set,u(cobj,ccp),COBJ`ANCESTOR_THING,objid(create(Ancestor Thing <AT>)))}}
@tel [u(cobj,ancestor_thing)]=[u(cobj,ancestor_room)]