generic clothing #117
Aliases: generic clothing, clothing
9 verbs · 35 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
title | this none this | rxd | #117 | 5 |
shield_rating | this none this | rxd | #117 | 3 |
d*rop th*row | this none none | rxd | #117 | 7 |
remove | this none none | rxd | #117 | 10 |
don wear | this none none | rd | #117 | 16 |
set_wornness | this none this | rxd | #117 | 10 |
value | this none this | rxd | #117 | 1 |
wear_msg remove_msg wearing_msg curse_msg | this none this | rxd | #117 | 1 |
moveto | this none this | rxd | #117 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
wornness | #117 | r | #36 | 0 |
armor | #117 | r | #36 | 0.5 |
cursed | #117 | r | #36 | 0 |
body_area | #117 | rc | #36 | "torso" |
wear_msg | #117 | rc | #36 | "%N %<puts> on %p %t." |
remove_msg | #117 | rc | #36 | "%N %<removes> %p %t." |
wearing_msg | #117 | rc | #36 | "%O %<is/are> wearing %p %t." |
curse_msg | #117 | rc | #36 | "%N %<struggles> desperately to remove %t, but without success." |
help_msg | #117 | rc | #36 | "You can wear it or remove it." |
returning | #108 | rc | #36 | <clear> |
how_long | #108 | rc | #36 | <clear> |
been_told | #108 | rc | #36 | <clear> |
home | #108 | rc | #36 | <clear> |
child_limit | #108 | rc | #36 | <clear> |
recycle_at_death | #108 | rc | #36 | <clear> |
drop_failed_msg | #5 | rc | #36 | <clear> |
drop_succeeded_msg | #5 | rc | #36 | <clear> |
odrop_failed_msg | #5 | rc | #36 | <clear> |
odrop_succeeded_msg | #5 | rc | #36 | <clear> |
otake_succeeded_msg | #5 | rc | #36 | <clear> |
otake_failed_msg | #5 | rc | #36 | <clear> |
take_succeeded_msg | #5 | rc | #36 | <clear> |
take_failed_msg | #5 | rc | #36 | <clear> |
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 | 0 |
aliases | #1 | rc | #36 | {"generic clothing", "clothing"} |
description | #1 | rc | #36 | <clear> |
object_size | #1 | r | #36 | {5666, -1090650497} |
html | #1 | rc | #36 | <clear> |
Ancestry
Ancestors (nearest first): #108 generic replicating & returning thing → #5 generic thing → #102 subthing → #1 Root Class
Children: #122 generic handcuffs
Call graph
Source
title
Referenced by
- #117:remove line 2:
this:title - #117:don line 10:
this:title
Source
1if (!this.wornness) 2return this:ansi_title(); 3endif 4(ticks_left() < 4000) && suspend(0); 5return $string_utils:pronoun_sub(this:wearing_msg(), this.location);
shield_rating
Referenced by
none
Source
1"Useful only if worn."; 2rating = this.cursed ? -1.0 * this.armor | this.armor; 3return this.wornness ? rating | 0.0;
d*rop th*row
Referenced by
none
Source
1if ((this.location == player) && this.wornness) 2this:remove(@args); 3endif 4if ((this.location == player) && this.cursed) 5return; 6endif 7pass(@args);
remove
Referenced by
- #117:d*rop line 2:
this:remove
Source
1if (this.location != player) 2player:tell("You don't have ", this:title(), "."); 3elseif (this.wornness == 0) 4player:tell(this:titlec(), " is not being worn."); 5elseif (this.cursed) 6$you:say_action(this:curse_msg()); 7else 8this.wornness = 0; 9$you:say_action(this:remove_msg()); 10endif
don wear
Referenced by
none
Source
1"Check for similar item already worn"; 2for x in (player:contents()) 3if (ba = `x.body_area ! E_PROPNF => ""') 4if (x.wornness && (this.body_area == ba)) 5return player:tell("You are already wearing ", x.name, " on your ", ba, "."); 6endif 7endif 8endfor 9if (this.location != player) 10player:tell("You don't have ", this:title(), "."); 11elseif (this.wornness == 1) 12player:tell(this.name, " is already being worn!"); 13else 14$you:say_action(this:wear_msg()); 15this:set_wornness(1); 16endif
set_wornness
Referenced by
- #117:don line 15:
this:set_wornness - #122:_cuff line 5:
this:set_wornness - #122:_uncuff line 1:
this:set_wornness - #122:rem*ove line 10:
this:set_wornness
Source
1if (args[1]) 2this.wornness = 1; 3fork (2) 4if (`!this.location.gender ! E_PROPNF => 1') 5this.wornness = 0; 6endif 7endfork 8else 9this.wornness = 0; 10endif
value
Referenced by
none
Source
1return ((value = (7.5 * ((1.0 + this.armor) ^ 5)) + this.value_base) > 0.0) ? value | 0.0;
wear_msg remove_msg wearing_msg curse_msg
Referenced by
- #117:title line 5:
this:wearing_msg - #117:remove line 6:
this:curse_msg - #117:remove line 9:
this:remove_msg - #117:don line 14:
this:wear_msg - #122:rem*ove line 11:
this:remove_msg
Source
1return $string_utils:subst(this.(verb), {{"%t", this:ansi_title()}, {"%T", $string_utils:capitalize(this:ansi_title())}}, 1);
moveto
Referenced by
- #122:_cuff line 2:
this:moveto - #122:_uncuff line 2:
this:moveto
Source
1this.wornness = 0; 2pass(@args);