Anomaly Jobs Activity Patch


  • Coder

    There is a way to change how Anomaly Jobs reacts to inputs. I'm looking for it, so I don't have to re-invent this stone wheel. On the whole it acts like this:

    • On creating a job, status is 'New'.
    • When a player uses +myjob/add to it, status changes to 'Staff'
    • When staff uses +job/mail, status changes to 'Player'
    • I don't think status changes otherwise.

    Where is this patch? Thanks.


  • Tutorialist

    Those are the things you want it to do?


  • Coder

    @Cobaltasaurus said:

    Those are the things you want it to do?

    Hell no. I want it to die.

    @Thenomain said:

    There is a way to change how Anomaly Jobs reacts to inputs. I'm looking for it, so I don't have to re-invent this stone wheel. On the whole it acts like this:

    Added differently on each mush, which is why I recommend storing UNMODIFIED AJ objects and then override objects that inherit from them; your patches would pop right out and be easy to see.


  • Coder

    I could be remembering this incorrectly, but I want to say that this is only the changing of a parameter in the trig.add or whatever of each of those job commands.


  • Coder

    @Chime said:

    Added differently on each mush, which is why I recommend storing UNMODIFIED AJ objects and then override objects that inherit from them; your patches would pop right out and be easy to see.

    Easy enough.

    Now all I need is something to override it with.



  • @Chime
    I must be way too tired.
    For some reason it took me about fifteen minutes to understand exactly what you meant by override objects.


  • Coder

    /*
    Job Database <JD> (%va)
    */
    
    &fn_isstaff %va=isstaff( %0 )
    
    &status_7 %va=STAFF|With Staff
    &status_8 %va=PLAYER|With Player
    
    /*
    Job Parent Object <JPO> (%vc)
    	0: job dbref
    	1: enactor (%#)
    	2: bucket dbref
    	3: contents
    */
    
    &HOOK_MAI %vc=@set %0/[last( sortby( %va/SORTBY_COMMENTS, lattr( %0/COMMENT_* )))]=no_inherit; @if u( %va/fn_isstaff, %1 )={ &STATUS %0=8 }; 
    &HOOK_ADD %vc=@if not( u( %va/fn_isstaff, %1 ))={ &STATUS %0=7 }; 
    

    Apparently.


  • Coder

    Warning: Apparently this is now making +job/mail replies unpublished.

    Does anyone know why? Thanks.


  • Coder

    @Thenomain Are the individual comments being set inherit?


  • Coder

    You see here the exact changes I've made, and no more.

    And no, they are no longer being set Inherit. Now that I know, perhaps I can do it manually. I do deplore having to crawl into the code to find out what is being passed, but if there's a how-to on using hooks, I'd check it out.

    (I'm somewhat sure it's somewhere in the help files, but finding one concept in the entirety of a Mu-based help system is on the far end of not fun.)

    edit: Now that I'm in the code, I still can't find where the inherit (publish) flag gets set.


  • Coder

    Apparently I clobbered the default &HOOK_MAI, causing the publishing it did to stop working. I have some generic complaints about the way this works, but eh.

    Original post updated.