ga (#2034)(an instance of generic thing made by Drummer)Go to location of this object, The Club. VERB SOURCE CODE: @addstate:
this.states = setadd(this.states, dobjstr);
if ((dobjstr + "_msg") in properties(this))
return;
else
player:tell("Enter the message ", this.name, " will issue when it enters the
", dobjstr, " state.");
add_property(this, dobjstr + "_msg", $command_utils:read(), {this.owner, "rc"});
endif
.
@ddump:
player:tell("STATES: ", $string_utils:print(this.states));
player:tell("TRANSITIONS: ", $string_utils:print(this.delta));
player:tell("CURRENT STATE: ", this.currently);
player:tell(this.name, "UNDERSTANDS: ", $string_utils:print(this.alph));
.
@rmst*ate: this.states = setremove(this.states, dobjstr); . @addtrans:
player:tell("Origin state?");
origin_state = $command_utils:read();
player:tell("Destination state?");
dest_state = $command_utils:read();
this.alph = setadd(this.alph, dobjstr);
this.states = setadd(this.states, origin_state);
this.states = setadd(this.states, dest_state);
player:tell("On ", dobjstr, ", ", iobjstr, " will transit from \"", origin_state,
"\" to \"", dest_state, ".\"");
newtrans = setadd({}, dobjstr);
newtrans = setadd(newtrans, dest_state);
player:tell("newtrans ==", $string_utils:print(newtrans));
table = $list_utils:assoc(origin_state, this.delta);
if (table == {})
this.delta = setadd(this.delta, setadd({origin_state}, newtrans));
else
this.delta[$list_utils:iassoc(origin_state, this.delta)] = setadd(table, newtrans);
endif
.
transit: newstate = $list_utils:assoc(args[1], $list_utils:assoc(this.currently, this.delta))[2]; player:tell($string_utils:pronoun_sub(this.(newstate + "_msg"))); this.currently = newstate; . @o*rder:
player:tell("/", dobjstr, "/", prepstr, "/", iobjstr);
if (iobjstr in this.alph)
this:transit(iobjstr);
else
player:tell($string_utils:pronoun_sub(this.ENOSTATE_msg));
endif
.
PROPERTY DATA:       alph       start       final       states       delta       currently       standing_msg       ENOSTATE_msg       groveling_msg       licking_feet_msg       licking_msg       awaiting punishment_msg |