generic note #9

Parent #5Owner #2Flags obsolete1, read, fertileSource RPG Core/rpgcore-patched.db

Aliases: generic note

11 verbs · 23 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
r*eadthis none nonerxd#913
er*asethis none nonerxd#96
wr*iteany on top of/on/onto/upon thisrxd#96
del*ete rem*oveany out of/from inside/from thisrd#916
encryptthis with/using anyrd#914
decryptthis none nonerd#97
textthis none thisrxd#96
is_readable_bythis none thisrxd#92
set_textthis none thisrxd#911
is_writable_bythis none thisrxd#99
mailme @mailmethis none nonerd#915

Properties

PropertyDefinerFlagsOwnerValue
writers#9rc#2{}
encryption_key#9c#20
text#9c#2{}
drop_failed_msg#5rc#2<clear>
drop_succeeded_msg#5rc#2<clear>
odrop_failed_msg#5rc#2<clear>
odrop_succeeded_msg#5rc#2<clear>
otake_succeeded_msg#5rc#2<clear>
otake_failed_msg#5rc#2<clear>
take_succeeded_msg#5rc#2<clear>
take_failed_msg#5rc#2<clear>
value_base#102r#2<clear>
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#2<clear>
key#1c#2<clear>
aliases#1rc#2{"generic note"}
description#1rc#2"There appears to be some writing on the note ..."
object_size#1r#36{6960, -1090650497}
html#1rc#2<clear>

Ancestry

Ancestors (nearest first): #5 generic thing#102 subthing#1 Root Class

Children: #54 generic letter

Call graph

calls n9_0 #9:r*ead n9_7 #9:is_readable_by n9_0->n9_7 n6_18 #6:tell n9_0->n6_18 n1_10 #1:look_self n9_0->n1_10 n9_6 #9:text n9_0->n9_6 n1_35 #1:tell_lines_suspended n9_0->n1_35 n53_6 #53:eval_key n9_7->n53_6 n9_6->n9_7 n42_0 #42:controls n9_6->n42_0 n9_1 #9:er*ase n9_1->n6_18 n9_9 #9:is_writable_by n9_1->n9_9 n9_8 #9:set_text n9_1->n9_8 n9_9->n42_0 n9_8->n9_9 n9_8->n42_0 n9_2 #9:wr*ite n9_2->n6_18 n9_2->n9_9 n9_2->n9_8 n9_3 #9:del*ete n9_3->n6_18 n9_3->n9_9 n9_3->n9_8 n9_4 #9:encrypt n9_4->n6_18 n53_3 #53:parse_keyexp n9_4->n53_3 n53_8 #53:unparse_key n9_4->n53_8 n9_5 #9:decrypt n9_5->n6_18 n9_10 #9:mailme n9_10->n9_7 n9_10->n6_18 n9_10->n9_6 n20_34 #20:pronoun_sub n9_10->n20_34 n102_4 #102:title n9_10->n102_4 n72_4 #72:sendmail n9_10->n72_4 n1_4 #1:titlec n9_10->n1_4

Source

r*ead

Spec this none noneFlags rxdOwner #2Definer #9

Referenced by

Source

1if (!this:is_readable_by(valid(caller_perms()) ? caller_perms() | player))
2player:tell("Sorry, but it seems to be written in some code that you can't read.");
3else
4this:look_self();
5if (text = this:text())
6player:tell();
7player:tell_lines_suspended(text);
8player:tell();
9player:tell("(You finish reading.)");
10else
11player:tell("(There seems to be nothing to read.)");
12endif
13endif

er*ase

Spec this none noneFlags rxdOwner #2Definer #9

Referenced by

Source

1if (this:is_writable_by(valid(caller_perms()) ? caller_perms() | player))
2this:set_text({});
3player:tell("Note erased.");
4else
5player:tell("You can't erase this note.");
6endif

wr*ite

Spec any on top of/on/onto/upon thisFlags rxdOwner #2Definer #9

Referenced by

Source

1if (this:is_writable_by(valid(caller_perms()) ? caller_perms() | player))
2this:set_text({@this.text, dobjstr});
3player:tell("Line added to note.");
4else
5player:tell("You can't write on this note.");
6endif

del*ete rem*ove

Spec any out of/from inside/from thisFlags rdOwner #2Definer #9

Referenced by

none

Source

1if (!this:is_writable_by(player))
2player:tell("You can't modify this note.");
3elseif (!dobjstr)
4player:tell("You must tell me which line to delete.");
5else
6line = toint(dobjstr);
7if (line < 0)
8line = (line + length(this.text)) + 1;
9endif
10if ((line <= 0) || (line > length(this.text)))
11player:tell("Line out of range.");
12else
13this:set_text(listdelete(this.text, line));
14player:tell("Line deleted.");
15endif
16endif

encrypt

Spec this with/using anyFlags rdOwner #2Definer #9

Referenced by

none

Source

1set_task_perms(player);
2key = $lock_utils:parse_keyexp(iobjstr, player);
3if (typeof(key) == STR)
4player:tell("That key expression is malformed:");
5player:tell("  ", key);
6else
7try
8this.encryption_key = key;
9player:tell("Encrypted ", this.name, " with this key:");
10player:tell("  ", $lock_utils:unparse_key(key));
11except error (ANY)
12player:tell(error[2], ".");
13endtry
14endif

decrypt

Spec this none noneFlags rdOwner #2Definer #9

Referenced by

none

Source

1set_task_perms(player);
2try
3dobj.encryption_key = 0;
4player:tell("Decrypted ", dobj.name, ".");
5except error (ANY)
6player:tell(error[2], ".");
7endtry

text

Spec this none thisFlags rxdOwner #2Definer #9

Referenced by

Source

1cp = caller_perms();
2if ($perm_utils:controls(cp, this) || this:is_readable_by(cp))
3return this.text;
4else
5return E_PERM;
6endif

is_readable_by

Spec this none thisFlags rxdOwner #2Definer #9

Referenced by

Source

1key = this.encryption_key;
2return (key == 0) || $lock_utils:eval_key(key, args[1]);

set_text

Spec this none thisFlags rxdOwner #2Definer #9

Referenced by

Source

1cp = caller_perms();
2newtext = args[1];
3if ($perm_utils:controls(cp, this) || this:is_writable_by(cp))
4if (typeof(newtext) == LIST)
5this.text = newtext;
6else
7return E_TYPE;
8endif
9else
10return E_PERM;
11endif

is_writable_by

Spec this none thisFlags rxdOwner #2Definer #9

Referenced by

Source

1who = args[1];
2wr = this.writers;
3if ($perm_utils:controls(who, this))
4return 1;
5elseif (typeof(wr) == LIST)
6return who in wr;
7else
8return wr;
9endif

mailme @mailme

Spec this none noneFlags rdOwner #2Definer #9

Referenced by

none

Source

1"Usage:  mailme <note>";
2"  uses $network to sends the text of this note to your REAL internet email address.";
3if (!this:is_readable_by(player))
4return player:tell("Sorry, but it seems to be written in some code that you can't read.");
5elseif (!player.email_address)
6return player:tell("Sorry, you don't have a registered email address.");
7elseif (!$network.active)
8return player:tell("Sorry, internet mail is disabled.");
9elseif (!(text = this:text()))
10return player:tell($string_utils:pronoun_sub("%T is empty--there wouldn't be any point to mailing it."));
11endif
12player:tell("Mailing ", this:title(), " to ", player.email_address, ".");
13player:tell("... ", length(text), " lines ...");
14suspend(0);
15$network:sendmail(player.email_address, this:titlec(), "", @text);