you #35
Aliases: you
4 verbs · 25 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
verb_sub | this none this | rxd | #35 | 18 |
say_action | this none this | rx | #35 | 33 |
fixpos | this none this | rxd | #35 | 6 |
say_action2 | this none this | rx | #35 | 14 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
conjugations | #35 | r | #36 | {{"is", "are"}, {"was", "were"}, {"does", "do"}, {"has", "have"}} |
help_msg | #35 | rc | #36 | list of 18{"This object is useful for announcing messages that switch between third and second person when addressed to the appropriate parties in a room.", "", "Verbs:", "", " :verb_sub(STR verbspec) -> conjugates the given verb into singular form", " :say_action(message [,who [,thing, [,where]]]) -> appropriately pronoun ", " substituted message announced to where, which defaults to who.location", " where who defaults to player.", " Ex: if player=#123 (Munchkin), dobj=#456 (Frebblebit), and iobj=#789", " (Bob) and they are all in the same room,", " $you:say_action(\"%N %<waves> happily to %d and %i.\") would do this:", "", "Munchkin sees: You wave happily to Frebblebit and Bob.", "Frebblebit sees: Munchkin waves happily to you and Bob.", "Bob sees: Munchkin waves happily to Frebblebit and you.", "Everyone else sees: Munchkin waves happily to Frebblebit and Bob.", "", " :say_action2(actor, recipient, message) -> Like :say_action, but preparses cases where the actor is not player, or actor==dobj (the recipient)"} |
gender | #94 | rc | #36 | "2nd" |
pqc | #94 | rc | #36 | "Yours" |
pq | #94 | rc | #36 | "yours" |
ppc | #94 | rc | #36 | "Your" |
pp | #94 | rc | #36 | "your" |
prc | #94 | rc | #36 | "Yourself" |
pr | #94 | rc | #36 | "yourself" |
poc | #94 | rc | #36 | "You" |
po | #94 | rc | #36 | "you" |
psc | #94 | rc | #36 | "You" |
ps | #94 | rc | #36 | "you" |
value_base | #102 | r | #2 | <clear> |
damage_base | #102 | r | #2 | <clear> |
x_loc | #102 | r | #36 | <clear> |
y_loc | #102 | r | #36 | <clear> |
ansi_title | #102 | r | #36 | <clear> |
obvious | #102 | r | #36 | <clear> |
build_help | #102 | rc | #36 | <clear> |
key | #1 | c | #36 | <clear> |
aliases | #1 | rc | #36 | {"you"} |
description | #1 | rc | #36 | {"An object useful for pronoun substitution for switching between third and second person. See `help $you' for details."} |
object_size | #1 | r | #36 | {6514, -1090650497} |
html | #1 | rc | #36 | <clear> |
Ancestry
Ancestors (nearest first): #94 Generic Gendered Object → #102 subthing → #1 Root Class
Children: none
Call graph
Source
verb_sub
Referenced by
- #3:say line 4:
$you:verb_sub - #3:-* line 8:
$you:verb_sub - #3:-* line 18:
$you:verb_sub - #3:-* line 21:
$you:verb_sub - #35:verb_sub line 6:
this:verb_sub - #91:say line 7:
$you:verb_sub - #95:say line 9:
$you:verb_sub - #104:com*mand line 21:
$you:verb_sub - #116:direct_say line 12:
$you:verb_sub - #116:direct_say line 16:
$you:verb_sub - #116:direct_say line 19:
$you:verb_sub
Source
1"$you:verb_sub(STR verbspec) -> returns verbspec conjugated for singular use as if `you' were saying it."; 2return $gender_utils:get_conj(args[1], this); 3x = args[1]; 4len = length(x); 5if ((len > 3) && (rindex(x, "n't") == (len - 3))) 6return this:verb_sub(x[1..len - 3]) + "n't"; 7endif 8for y in (this.conjugations) 9if (x == y[1]) 10return y[2]; 11endif 12endfor 13for y in ({{"ches", "ch"}, {"ies", "y"}, {"sses", "ss"}, {"shes", "sh"}, {"s", ""}}) 14if ((len > length(y[1])) && (rindex(x, y[1]) == ((len - length(y[1])) + 1))) 15return x[1..len - length(y[1])] + y[2]; 16endif 17endfor 18return x;
say_action
Referenced by
- #35:say_action2 line 9:
this:say_action - #91:follow line 20:
$you:say_action - #91:follow line 40:
$you:say_action - #91:follow line 60:
$you:say_action - #91:surrender line 1:
$you:say_action - #91:release line 3:
$you:say_action - #91:_release line 3:
$you:say_action - #91:transfer_ammo line 32:
$you:say_action - #91:transfer_ammo line 34:
$you:say_action - #91:_loot line 5:
$you:say_action - #91:_loot line 13:
$you:say_action - #91:@roll line 19:
$you:say_action - #91:@roll line 21:
$you:say_action - #91:@roll line 23:
$you:say_action - #102:wield line 6:
$you:say_action - #102:wield line 12:
$you:say_action - #104:sit line 14:
$you:say_action - #104:sit line 16:
$you:say_action - #104:sit line 20:
$you:say_action - #104:stand line 3:
$you:say_action - #104:stand line 5:
$you:say_action - #104:swim line 10:
$you:say_action - #104:swim line 12:
$you:say_action - #104:swim line 16:
$you:say_action - #104:dry line 3:
$you:say_action - #104:dry line 5:
$you:say_action - #104:push line 32:
$you:say_action - #104:push line 34:
$you:say_action - #104:attack_bypass line 12:
$you:say_action - #104:attack_bypass line 13:
$you:say_action - #104:attack line 35:
$you:say_action - #104:dig line 12:
$you:say_action - #107:release line 3:
$you:say_action - #107:eat line 6:
$you:say_action - #107:_release line 3:
$you:say_action - #107:_loot line 6:
$you:say_action - #109:load line 18:
$you:say_action - #109:unwield line 2:
$you:say_action - #116:_loot line 10:
$you:say_action - #116:_loot line 18:
$you:say_action - #116:ask line 12:
$you:say_action - #117:remove line 6:
$you:say_action - #117:remove line 9:
$you:say_action - #117:don line 14:
$you:say_action - #118:move line 23:
$you:say_action - #118:move line 27:
$you:say_action - #119:player_to_loc line 8:
$you:say_action - #119:l*ook line 18:
$you:say_action - #119:@maze*-move line 7:
$you:say_action - #119:@maze*-move line 29:
$you:say_action - #119:@maze*-move line 32:
$you:say_action - #122:_cuff line 3:
$you:say_action - #122:rem*ove line 11:
$you:say_action - #124:parse line 66:
$you:say_action - #127:turn line 7:
$you:say_action - #127:turn line 17:
$you:say_action - #127:light line 6:
$you:say_action - #127:light line 16:
$you:say_action - #129:payme line 17:
$you:say_action - #130:move line 18:
$you:say_action - #130:move line 21:
$you:say_action - #131:eat line 11:
$you:say_action - #132:eat line 11:
$you:say_action - #133:worship line 2:
$you:say_action - #133:worship line 16:
$you:say_action - #133:donate line 19:
$you:say_action - #134:tell line 23:
$you:say_action - #134:sell line 5:
$you:say_action - #134:ask line 11:
$you:say_action - #134:collect_cash line 8:
$you:say_action - #134:buy line 5:
$you:say_action - #135:huh line 13:
$you:say_action - #140:o*ut line 4:
$you:say_action - #140:dr*op line 9:
$you:say_action - #140:g*et line 5:
$you:say_action - #140:enter line 4:
$you:say_action - #151:special_dig_verb line 3:
$you:say_action - #164:pr*ess line 1:
$you:say_action
Source
1"$you:say_action(message [,who [,thing, [,where]]])."; 2"announce 'message' with pronoun substitution as if it were just "; 3" where:announce_all($string_utils:pronoun_sub(message, who, thing, where)); "; 4"except that who (player), dobj, and iobj get modified messages, with the appropriate use of 'you' instead of their name."; 5"who default player"; 6"thing default object that called this verb"; 7"where default who.location"; 8{msg, ?who = player, ?thing = caller, ?where = who.location} = args; 9you = this; 10if (typeof(msg) == LIST) 11tell = ""; 12for x in (msg) 13tell = tell + ((typeof(x) == STR) ? x | x[random(length(x))]); 14endfor 15else 16tell = msg; 17endif 18who:tell($string_utils:pronoun_sub(this:fixpos(tell, "%n"), you, thing, where)); 19if ($object_utils:has_callable_verb(where, "announce_all_but")) 20where:announce_all_but({dobj, who, iobj}, $string_utils:pronoun_sub(tell, who, thing, where)); 21endif 22if (valid(dobj) && (dobj != who)) 23x = dobj; 24dobj = you; 25x:tell($string_utils:pronoun_sub(this:fixpos(tell, "%d"), who, thing, where)); 26dobj = x; 27endif 28if (valid(iobj) && (!(iobj in {who, dobj}))) 29x = iobj; 30iobj = you; 31x:tell($string_utils:pronoun_sub(this:fixpos(tell, "%i"), who, thing, where)); 32iobj = x; 33endif
fixpos
Referenced by
- #35:say_action line 18:
this:fixpos - #35:say_action line 25:
this:fixpos - #35:say_action line 31:
this:fixpos
Source
1"This is horribly dwimmy. E.g. %x's gets turned into your, %X's gets turned into Your, and %X'S gets turned into YOUR. --Nosredna"; 2upper = $string_utils:uppercase(args[2]); 3allupper = upper + "'S"; 4upper = upper + "'s"; 5lower = $string_utils:lowercase(args[2]) + "'s"; 6return strsub(strsub(strsub(args[1], lower, "your", 1), upper, "Your", 1), allupper, "YOUR", 1);
say_action2
Referenced by
- #91:take_hit line 9:
$you:say_action2 - #120:do_heal line 25:
$you:say_action2 - #120:do_heal line 31:
$you:say_action2 - #120:do_heal line 34:
$you:say_action2
Source
1"USAGE: $you:say_action2(doer, doee, STRING)"; 2attacker = args[1]; 3dobj = victim = args[2]; 4blurb = args[3]; 5if (player == attacker) 6if (victim == attacker) 7blurb = $string_utils:subst(args[3], {{"%d", "%r"}, {"%d's", "%p"}}); 8endif 9this:say_action(blurb); 10else 11blurb = $string_utils:subst(args[3], {{"%d", "you"}, {"%d's", "your"}}); 12attacker.location:announce_all_but({victim}, $string_utils:pronoun_sub(args[3], attacker)); 13victim:tell($string_utils:pronoun_sub(blurb, attacker)); 14endif