@describe %vs=This object contains information on all the commands needed to be run at startup to initialize Talvo's MUSHcode Suite. Attributes are in this format:%r&`MISC` %!= to run the commands in . NOTE: Do NOT use @break%r&`CMD` %!=| for @COMMAND/ADD ; @HOOK/OVERRIDE =%r&`FUN` %!= for @FUNCTION =%r&`FUNP` %!= for @FUNCTION/PRESERVE =%r&`ATTR` %!= for @ATTRIBUTE/ACCESS =%r&`HOOK`/ %!= for @HOOK/ = (for non-/override hooks)%r&`TRG` %!=/ for @TRIGGER / &core`startup-trg-1 %vs=[iter(lattr(me/*`misc`*),u(%i0),,;)] &core`startup-trg-2 %vs=[iter(lattr(me/*`cmd`*),@COMMAND/ADD[first(setr(0,u(%i0)),|)] [last(%i0,`)]; @HOOK/OVERRIDE [last(%i0,`)]=[rest(%q0,|)],,;)] ; [iter(lattr(me/*`fun`*),@FUNCTION [last(%i0,`)]=[u(%i0)],,;)] ; [iter(lattr(me/*`funp`*),@FUNCTION/PRESERVE [last(%i0,`)]=[u(%i0)],,;)] &core`startup-trg-3 %vs=[iter(lattr(me/*`attr`*),@ATTRIBUTE/ACCESS [last(%i0,`)]=[u(%i0)],,;)] ; [iter(lattr(me/*`hook`*),@HOOK/[last(%i0,/)] [before(last(%i0,`),/)]=[u(%i0)],,;)] ; [iter(lattr(me/*`trg`*),@TRIGGER [u(%i0)],,;)] &tag %ve=udefault(%vc/info`%0`tag,) &haspackage %ve=cand(hasattrval(%vc,info`%0),not(strmatch(%0,*`*))) &core`cmd.delete-package %va=$+tmcs/delete *: @nspemit/silent %#=setr(9,ufun(%ve/tag,core))[setq(0,0)][switch(0,strmatch(%#,#1),You must be God to do that.,hasflag(%#,wizard),You must be a Wizard to do that.,not(strmatch(%0,*`*)),There is no package with that name.,ufun(%ve/haspackage,%0),There is no package with that name.,if(strmatch(%0,core),lt(words(ufun(%ve/packages)),2),1),You cannot delete the Core while other packages are installed.,Removing package [setr(n,get(%vc/info`%0))] ([ucstr(%0)])...[setq(0,1,t,get(%vc/info`%0`objects))])] ; @assert %q0 ; @dolist [remove(get(%vc/info`core`objects),%vc)]={@nspemit/silent %#=Wiping package attributes from [name(##)](##)... ; @wipe ##/%0`**} ; @nspemit/silent %#=%q9Removing package info from Core object... ; @wipe %vc/info`%0 ; @dolist %qt={@set ##=no_command ; @nuke ## ; @nspemit/silent %#=%q9Destroying Object [name(##)](##)...} ; @force me=@nspemit/silent %#=\%q9Package deleted. &core`cmd.add-package %va=$+tmcs/addpackage *=*: @nspemit/silent %#=ufun(%ve/tag,core)[switch(0,hasflag(%#,Wizard),Permission denied.,regmatch(%0,^\[a-zA-Z0-9_.-\]\{1\,25\}),That is not a valid package name.,strmatch(%1,*/*/*/*,f v d t),You must give a fullname\, version\, description and tag.,if(ufun(%ve/haspackage,%0),Updating package %0...,Adding package %0 (%1)\, version %qv...)[attrib_set(%vc/info`%0,%qf)][attrib_set(%vc/info`%0`version,%qv)][attrib_set(%vc/info`%0`desc,%qd)][if(strlen(%qt),attrib_set(%vc/info`%0`tag,decompose(%qt)),attrib_set(%vc/info`%0`tag))][attrib_set(%vc/info`%0`installed,secs())][attrib_set(%vc/info`%0`installed`[secs()],%: / +TMCS/ADDPACKAGE %0=%1)] Done.)] &core`cmd.register-object %va=$+tmcs/register *=*: @nspemit/silent %#=ufun(%ve/tag,core)[switch(0,hasflag(%#,Wizard),Permission denied.,ufun(%ve/haspackage,%0),No such package.,cand(isdbref(%1),num(%1)),Invalid dbref/objid.,not(member(get(%vc/info`%0`objects),objid(%1))),That object is already registered for that package.,Object registered.[attrib_set(%vc/info`%0`objects,squish(get(%vc/info`%0`objects) [objid(%1)]))])] &core`cmd.unregister-object %va=$+tmcs/unregister *=*: @nspemit/silent %#=ufun(%ve/tag,core)[switch(0,hasflag(%#,Wizard),Permission denied.,ufun(%ve/haspackage,%0),No such package.,cor(member(get(%vc/info`%0`objects),setr(1,%1)),member(get(%vc/info`%0`objects),setr(1,objid(%1)))),That object is not registered for that package.,Object unregistered.[attrib_set(%vc/info`%0`objects,squish(remove(get(%vc/info`%0`objects),objid(%1))))])] &core`cmd.package-info %vd=$+tmcs *: @nspemit/silent %#=ufun(%ve/tag,core)[switch(0,ufun(%ve/haspackage,%0),No such package.,Installation Information for Package: [ucstr(%0)]%r%b%bPackage Name: [get(%vc/info`%0)]%r%b%bPackage Version: [get(%vc/info`%0`version)]%r%b%bPackage Description: [get(%vc/info`%0`desc)]%r%b%bInstalled On: [timefmt($b $d $Y,get(%vc/info`%0`installed))][if(orflags(%#,Wr),%r%b%bObjects Used: [if(strlen(squish(get(%vc/info`%0`objects))),iter(sort(get(%vc/info`%0`objects)),name(##)\([first(##,:)][flags(##)]\),,%r[space(16)]),None)]%r)])] +tmcs/addpackage core=MUSHcode Core/1.2/Basic object creation and initial code set up for the MUSHcode Suite. Required for all other code packages./\[+TMCS\]%b think ansi(h,Update Complete. Please edit #1's @STARTUP to the following:%r@force me=\{\[ufun(%vs/CORE`STARTUP-TRG-1)]\} ; @force me=\{\[ufun(%vs/CORE`STARTUP-TRG-2)]\} ; @force me=\{\[ufun(%vs/CORE`STARTUP-TRG-3)]\}