Wearable Class #41
1 verbs · 20 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
fits | this none this | rwxd | #41 | 14 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
where | #41 | rw | #10 | "" |
quantity | #41 | rw | #10 | 1 |
body_type | #41 | rw | #10 | {} |
fits | #41 | rw | #10 | {0, 100, 0, 2000} |
base_ac | #41 | rw | #10 | 10 |
ac_mod | #41 | 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: none
Source
fits
Referenced by
none
Source
1"$wearable:fits() this none this"; 2"takes OBJ animate, returns list {0|1, message}"; 3target = args[1]; 4if (target.height < this.fits[1]) 5return {0, "You are too short to wear that item."}; 6elseif (target.height > this.fits[2]) 7return {0, "You are too tall to wear that item."}; 8elseif (target.base_weight < this.fits[3]) 9return {0, "You are too small to wear that item."}; 10elseif (target.base_weight > this.fits[4]) 11return {0, "You are too large to wear that item."}; 12else 13return {1, "This item fits you just fine."}; 14endif