Currency Class #38
2 verbs · 17 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
describe_to | this none this | rwxd | #38 | 20 |
weight | this none this | rwxd | #38 | 4 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
plural_name | #38 | rw | #10 | "Currency Class" |
quantity | #38 | rw | #10 | 0 |
unit_weight | #38 | rw | #10 | 0 |
description | #1 | rw | #10 | <clear> |
aliases | #1 | rw | #10 | <clear> |
home | #1 | rw | #10 | <clear> |
short_desc | #1 | rw | #10 | <clear> |
core | #1 | rw | #10 | 1 |
handedness | #1 | rw | #10 | <clear> |
base_enc | #1 | rw | #10 | <clear> |
base_weight | #1 | rw | #10 | <clear> |
capacity | #1 | rw | #10 | <clear> |
max_fit | #1 | rw | #10 | <clear> |
pprep | #1 | rw | #10 | <clear> |
gprep | #1 | rw | #10 | <clear> |
generic_name | #1 | rw | #10 | <clear> |
age | #1 | rw | #10 | <clear> |
Ancestry
Ancestors (nearest first): #95 Thing Class → #11 Game Class → #1 Root Class
Children: #17 Shiny Coin
Source
describe_to
Referenced by
none
Source
1"#38:describe_to(target) this none this"; 2"returns 0 if target isn't a valid animate objidnum"; 3"second arg: 0 is for one line desc, e.g. a room look. 1 is for multiline desc, e.g."; 4"look at this, 2 is same as 1."; 5{target, ?msglen = 0} = args; 6if (!target:is_a($animate)) 7return 0; 8else 9shownum = ""; 10if (target:is_a($architect)) 11shownum = (" (" + tostr(this)) + ")"; 12endif 13sees_str = (this.quantity == 1) ? ("A " + this.name) + " lies here." | ((((tostr(this.quantity) + " ") + this.plural_name) + shownum) + " lie here."); 14if (msglen == 0) 15target:sees(3, {sees_str}); 16elseif (msglen > 1) 17target:sees(3, {sees_str}); 18target:sees(3, {this.description}); 19endif 20endif
weight
Referenced by
none
Source
1"#38:weight this none this"; 2"returns actual weight of object. quantity x unit_weight rounded to nearest whole number."; 3weight = tofloat(this.unit_weight) * tofloat(this.quantity); 4return toint(weight);