generic clothing #117

Parent #108Owner #36Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: generic clothing, clothing

9 verbs · 35 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
titlethis none thisrxd#1175
shield_ratingthis none thisrxd#1173
d*rop th*rowthis none nonerxd#1177
removethis none nonerxd#11710
don wearthis none nonerd#11716
set_wornnessthis none thisrxd#11710
valuethis none thisrxd#1171
wear_msg remove_msg wearing_msg curse_msgthis none thisrxd#1171
movetothis none thisrxd#1172

Properties

PropertyDefinerFlagsOwnerValue
wornness#117r#360
armor#117r#360.5
cursed#117r#360
body_area#117rc#36"torso"
wear_msg#117rc#36"%N %<puts> on %p %t."
remove_msg#117rc#36"%N %<removes> %p %t."
wearing_msg#117rc#36"%O %<is/are> wearing %p %t."
curse_msg#117rc#36"%N %<struggles> desperately to remove %t, but without success."
help_msg#117rc#36"You can wear it or remove it."
returning#108rc#36<clear>
how_long#108rc#36<clear>
been_told#108rc#36<clear>
home#108rc#36<clear>
child_limit#108rc#36<clear>
recycle_at_death#108rc#36<clear>
drop_failed_msg#5rc#36<clear>
drop_succeeded_msg#5rc#36<clear>
odrop_failed_msg#5rc#36<clear>
odrop_succeeded_msg#5rc#36<clear>
otake_succeeded_msg#5rc#36<clear>
otake_failed_msg#5rc#36<clear>
take_succeeded_msg#5rc#36<clear>
take_failed_msg#5rc#36<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#36<clear>
key#1c#360
aliases#1rc#36{"generic clothing", "clothing"}
description#1rc#36<clear>
object_size#1r#36{5666, -1090650497}
html#1rc#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

calls n117_0 #117:title n102_3 #102:ansi_title n117_0->n102_3 n20_34 #20:pronoun_sub n117_0->n20_34 n117_7 #117:wear_msg n117_0->n117_7 n117_7->n102_3 n20_15 #20:capitalize n117_7->n20_15 n117_2 #117:d*rop n117_3 #117:remove n117_2->n117_3 n5_1 #5:dr*op n117_2->n5_1 n117_3->n117_0 n117_3->n117_7 n6_18 #6:tell n117_3->n6_18 n1_4 #1:titlec n117_3->n1_4 n35_1 #35:say_action n117_3->n35_1 n117_4 #117:don n117_4->n117_0 n117_4->n117_7 n117_4->n6_18 n117_4->n35_1 n1_29 #1:contents n117_4->n1_29 n117_5 #117:set_wornness n117_4->n117_5 n117_8 #117:moveto n5_2 #5:moveto n117_8->n5_2

Source

title

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #117

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

Spec this none noneFlags rxdOwner #36Definer #117

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

Spec this none noneFlags rxdOwner #36Definer #117

Referenced by

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

Spec this none noneFlags rdOwner #36Definer #117

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

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #117

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

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

Source

1return $string_utils:subst(this.(verb), {{"%t", this:ansi_title()}, {"%T", $string_utils:capitalize(this:ansi_title())}}, 1);

moveto

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

Source

1this.wornness = 0;
2pass(@args);