Difference between revisions of "Logger Code Object"

From City of Hope MUSH
Jump to navigation Jump to search
m (Arumi moved page Arumi/Logger to User:Arumi/Logger)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This is a work in progress. When I feel more comfortable with it, I'll polish it up for others to use.
+
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.
  
<code><pre>
+
== Arumi's Original Version ==
@create Flux Capacitor=10
+
 
&INDEX Flux Capacitor=0
+
@create Flux Capacitor=10
@Ahear Flux Capacitor=think [if(not(strmatch(%n,SGP - Main Globals)),[set(me,[log_][get(me/index)]:%0)][set(me,index:[add(1,get(me/index))])])]
+
&INDEX Flux Capacitor=0
@Listen Flux Capacitor=*
+
@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))])])]
&CMD_CLEAR Flux Capacitor=$+logger/clear:@emit Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
+
@Listen Flux Capacitor=*
&CMD_SHOW Flux Capacitor=$+logger/show:think [list([lattr(me/log_*)],get(me/##))]
+
&CMD_CLEAR Flux Capacitor=$+logger/clear:@emit Clearing Logger.[set(me,index:0)][iter(lattr(me/log_*),[set(me,##:)])]
@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)
+
&CMD_SHOW Flux Capacitor=$+logger/show:think [list([lattr(me/log_*)],get(me/##)[%r])]
@rxlevel Flux Capacitor= Real
+
@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)
@txlevel Flux Capacitor= Real
+
@rxlevel Flux Capacitor= Real
</pre></code>
+
@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
  
 
[[Category:Unofficial]]
 
[[Category:Unofficial]]

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