Fallout/Wasteland existing code/snippets.
-
@Ashen-Shugar said in Fallout/Wasteland existing code/snippets.:
The only issue this runs across is if you restrict @pemit from players, then objevalling to the enactor breaks because pemit() inherits the @pemit restrictions.
Brilliant idea, but gotta keep in mind games that may restrict commands down.
IIRC, the restricted pemit option you had limited it to targets in the same room if it was running unprivileged. That shouldn't be a barrier here, as you are running a pemit to-the-target AS-the-target, e.g. reach's ooc command:
&cmd_ooc %va=$ooc *: think setq( b, ooc ); @assert isic( loc( %# ))= @pemit %#=msg( h, %qb, This is not an IC area%; just use say/pose/@emit. ); think setq( a, ucstr( objeval( %#, udefault( %#/oocansi, %xc<%xn%xhOOC%xn%xc>%xn )))); @assert strmatch( stripansi( %qa ), <OOC> )= @pemit %#=msg( h, %qb, Your &OOCANSI does not say <OOC>. ); think iter( 0 1 2, setq( %i0, delete( %0, 0, %i0 ))); think setq( m, strcat( %qa%b%K, switch( %0, :%b*, %q2, :*, %b%q1, ;%b*, %b%q2, ;*, %q1, strcat( %bsays%,%b, chr( 8220 )%0, chr( 8221 ))))); think setq( n, strcat( %[, name( %# )%(%#%)%,ooc%]%b )); think iter( cat( %L, lcon( %L )), if( cand( hasflag( %i0, nospoof ), not( strmatch( %i0, %# ))), objeval( %i0, pemit( %i0, %qn%qm )), objeval( %#, pemit( %i0, %qm )))) -
Message in
%qm
processed for emotes, fake nospoof tag in%qn
. Messages never leave the room, so restriction shouldn't matter, but even if someone was crazy enough to implement a softcode channel system (heh!) this method should work for customizing the nospoof output....There are probably better ways to approach this problem tho...
-
Honestly if your wanting to do a fallout or apocalyptic themed game you may want to look into the DSS system. It would allow for what your wanting and have a nice clean look to it with little actual code-fu knowledge to make work. It might be your best option rather than trying to modify a D20 style code base.