Home
About
Policies
FAQ
Forums
Registration
Password Recovery

One room one exit

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 +
General premise is that by placing the exit on the parent, then using MPI to limit/lock where it can be used from, you can cut down on the quota used for exits.
 +
<pre>***********************************
<pre>***********************************
ON PARENT (ONCE)
ON PARENT (ONCE)

Revision as of 02:23, 19 May 2014

General premise is that by placing the exit on the parent, then using MPI to limit/lock where it can be used from, you can cut down on the quota used for exits.

***********************************
ON PARENT (ONCE)
***********************************
/* Global no-access failure messages*/
@set #69636=/_exit/msg/fail:Huh?  (Type "help" for help.)
@set #69636=/_exit/msg/ofail:

/* Exit-origin combo specific message code */
@set #69636=/_exit/code/fail:{if:{ne:{eval:{prop:_allowed?}},yes},{prop:_exit/msg/fail,#69636},{prop:_origins/{ref:here}/fail/locked}}
@set #69636=/_exit/code/ofail:{if:{ne:{eval:{prop:_allowed?}},yes},{prop:_exit/msg/ofail,#69636},{prop:_origins/{ref:here}/ofail/locked}}
@set #69636=/_exit/code/succ:{prop:_origins/{ref:here}/succ}
@set #69636=/_exit/code/osucc:{prop:_origins/{ref:here}/osucc}
@set #69636=/_exit/code/odrop:{prop:_origins/{ref:here}/odrop}


***********************************
ON EACH EXIT (ONCE)
***********************************
@open <tla>=here,<#dest>

/* @lock info: lockable-room and origin both reasons to deny entry */
@lock <exit> = _allowed?:yes&!_locked:yes
@set <exit> =/_allowed?:{if:{propdir:_origins/{ref:here}},yes,no}
@set <exit>=/_locked:{prop:_locked,{links:this}}

/* set all fail/ofail messages to use code stored in parent */
@fail <exit>={eval:{prop:/_exit/code/fail,#69636}}
@ofail <exit>={eval:{prop:/_exit/code/ofail,#69636}}
@succ <exit>={eval:{prop:/_exit/code/succ,#69636}}
@osucc <exit>={eval:{prop:/_exit/code/osucc,#69636}}
@odrop <exit>={eval:{prop:/_exit/code/odrop,#69636}}

***********************************
ON EACH EXIT (FOR EACH ORIGIN ROOM)
***********************************

@set <exit>=/_origins/<#origin>/fail/locked:[MESSAGE]
@set <exit>=/_origins/<#origin>/ofail/locked:[MESSAGE]
@set <exit>=/_origins/<#origin>/succ:[MESSAGE]
@set <exit>=/_origins/<#origin>/osucc:[MESSAGE]
@set <exit>=/_origins/<#origin>/odrop:[MESSAGE]
Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox