Difference between revisions of "Logger Code Object"

From City of Hope MUSH
Jump to navigation Jump to search
(updated to use +colortheme colors)
 
(One intermediate revision by the same user not shown)
Line 18: Line 18:
  
 
  @create Logger Object=10
 
  @create Logger Object=10
  @lock Logger Object=*me
+
  @lock Logger Object==me
 
  &INDEX Logger Object=0
 
  &INDEX Logger Object=0
 
  @Ahear Logger Object=think [if(not(strmatch([stripansi([%0])],[*<OOC>*])),[set(me,[log_][get(me/index)]:[iter(%0,[trim(edit(itext(),%t,),b)],%r,%r)])][set(me,index:[add(1,get(me/index))])])]
 
  @Ahear Logger Object=think [if(not(strmatch([stripansi([%0])],[*<OOC>*])),[set(me,[log_][get(me/index)]:[iter(%0,[trim(edit(itext(),%t,),b)],%r,%r)])][set(me,index:[add(1,get(me/index))])])]
 
  @Listen Logger Object=*
 
  @Listen Logger Object=*
  &CMD_CLEAR Logger Object=$+logger/clear:@break strmatch(%#,not(owner(me)));@pemit/list %# [owner(me)]=Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
+
  &CMD_CLEAR Logger Object=$logger/clear:@break strmatch(%#,not(owner(me)));@pemit/list %# [owner(me)]=Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
  &CMD_SHOW Logger Object=$+logger/show:@pemit %#=%xh%xg%xuLOG EMIT%xn%r;think [list([lattr(me/log_*)],get(me/##)[%r%r----%r])]
+
  &CMD_SHOW Logger Object=$logger/show:@pemit %#=%xh%xg%xuLOG EMIT%xn%r;think [list([lattr(me/log_*)],get(me/##)[%r%r----%r])]
 
  @Descformat Logger Object=%0[u(logger-desc)]
 
  @Descformat Logger Object=%0[u(logger-desc)]
 
  &logger-desc widget=[pcol(OOC)][tcol(:)] This is a version of Arumi's logger. [argcol(+logger/show)] displays the log %r[space(5)](potential spam warning as the scene may be long)
 
  &logger-desc widget=[pcol(OOC)][tcol(:)] This is a version of Arumi's logger. [argcol(+logger/show)] displays the log %r[space(5)](potential spam warning as the scene may be long)

Latest revision as of 13:08, 30 October 2020

This code project is a work in progress that was started by User:Arumi. As of 20Sept2020 I (User:Nerdvana) have taken over the project and as it is developed updates will be made here.

Arumi's Original Version

@create Flux Capacitor=10
&INDEX Flux Capacitor=0
@Ahear Flux Capacitor=think [if(not(strmatch([stripansi([%0])],[*<OOC>*])),[set(me,[log_][get(me/index)]:[iter(%0,[trim(edit(itext(),%t,),b)],%r,%r)])][set(me,index:[add(1,get(me/index))])])]
@Listen Flux Capacitor=*
&CMD_CLEAR Flux Capacitor=$+logger/clear:@emit Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
&CMD_SHOW Flux Capacitor=$+logger/show:think [list([lattr(me/log_*)],get(me/##)[%r])]
@Desc Flux Capacitor=OOC: This is Arumi's scene logger. Type +logger/show to see the scene log (could be spammy if the scene's long)
@rxlevel Flux Capacitor= Real
@txlevel Flux Capacitor= Real

Nerdvana's Slightly Tweaked Version

Using this version it will work, the description can be set to what ever you want and it will not override the OOC note about code object.

@create Logger Object=10
@lock Logger Object==me
&INDEX Logger Object=0
@Ahear Logger Object=think [if(not(strmatch([stripansi([%0])],[*<OOC>*])),[set(me,[log_][get(me/index)]:[iter(%0,[trim(edit(itext(),%t,),b)],%r,%r)])][set(me,index:[add(1,get(me/index))])])]
@Listen Logger Object=*
&CMD_CLEAR Logger Object=$logger/clear:@break strmatch(%#,not(owner(me)));@pemit/list %# [owner(me)]=Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
&CMD_SHOW Logger Object=$logger/show:@pemit %#=%xh%xg%xuLOG EMIT%xn%r;think [list([lattr(me/log_*)],get(me/##)[%r%r----%r])]
@Descformat Logger Object=%0[u(logger-desc)]
&logger-desc widget=[pcol(OOC)][tcol(:)] This is a version of Arumi's logger. [argcol(+logger/show)] displays the log %r[space(5)](potential spam warning as the scene may be long)
@set Logger Object=SAFE
@rxlevel Logger Object= Real
@txlevel Logger Object= Real