generic glob #187
Aliases: generic glob, glob
14 verbs · 32 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
_pop | this none this | rxd | #187 | 16 |
_push | this none this | rxd | #187 | 18 |
_vanish | this none this | rxd | #187 | 5 |
weight | this none this | rx | #187 | 4 |
value | this none this | rx | #187 | 1 |
_update | this none this | rxd | #187 | 2 |
can_push | this none this | rxd | #187 | 8 |
give_as_gift | this none this | rxd | #187 | 1 |
list_name | this none this | rxd | #187 | 5 |
description | this none this | rxd | #187 | 5 |
list_as | this none this | rxd | #187 | 1 |
can_glob | this none this | rxd | #187 | 1 |
moveto | this none this | rxd | #187 | 28 |
item_list | this none this | rxd | #187 | 5 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
item | #187 | rc | #361 | #-1 |
amount | #187 | rc | #361 | 0 |
handed | #5 | rc | #361 | <clear> |
wield_msg | #5 | rc | #361 | <clear> |
unwield_msg | #5 | rc | #361 | <clear> |
size | #5 | rc | #361 | <clear> |
look_place_msg | #5 | rc | #361 | <clear> |
value | #5 | rc | #361 | <clear> |
get_msg | #5 | rc | #361 | <clear> |
drop_msg | #5 | rc | #361 | <clear> |
get_fail_msg | #5 | rc | #361 | <clear> |
junk_ok | #5 | rc | #361 | 0 |
floats | #5 | rc | #361 | <clear> |
long_name_msg | #5 | rc | #361 | <clear> |
article | #5 | rc | #361 | <clear> |
setup_list | #5 | rc | #361 | <clear> |
health | #5 | rc | #361 | <clear> |
health_max | #5 | rc | #361 | <clear> |
min_skill | #5 | rc | #361 | <clear> |
skill | #5 | rc | #361 | <clear> |
recipe_for | #5 | rc | #361 | <clear> |
carried_msg | #5 | rc | #361 | <clear> |
aliases | #1 | rc | #361 | {"generic glob", "glob"} |
description | #1 | rc | #361 | "A shorthand for a bunch of objects." |
object_size | #1 | r | #29 | {6506, 1298434454} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rwc | #361 | 0 |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #5 generic thing → #1 root
Children: none
Call graph
Source
_pop
Referenced by
- #187:give_as_gift line 1:
this:_pop
Source
1if (this.amount > 0) 2this.amount = this.amount - 1; 3new = $rpg:spawn(this.item); 4else 5new = #-1; 6endif 7if (this.amount < 1) 8fork (0) 9if (is_a(this, $glob)) 10this:_vanish(); 11endif 12endfork 13else 14this:_update(); 15endif 16return new;
_push
Referenced by
- #188:enterfunc line 12:
$glob:_push
Source
1what = args[1]; 2$cu:sin(0); 3if (this.f) 4location = what.location; 5newglob = $rpg:spawn(this); 6if (newglob:_push(what)) 7newglob:moveto(location); 8return newglob; 9endif 10return #-1; 11endif 12if (this:can_push(what)) 13this.item = parent(what); 14this.amount = this.amount + 1; 15what:moveto($tomb); 16this:_update(); 17return this.amount; 18endif
_vanish
Referenced by
- #187:_pop line 10:
this:_vanish
Source
1if (this.f || (this.amount > 0)) 2return E_QUOTA; 3endif 4this.junk_ok = 1; 5this:moveto($tomb);
weight
Referenced by
none
Source
1if (this.amount) 2return this.item.weight * this.amount; 3endif 4return 0;
value
Referenced by
none
Source
1return this.item.value * this.amount;
_update
Referenced by
- #187:_pop line 14:
this:_update - #187:_push line 16:
this:_update
Source
1this.name = this.item.name; 2this.aliases = this.item.aliases;
can_push
Referenced by
- #187:_push line 12:
this:can_push
Source
1what = args[1]; 2"if (valid(this.item) && (!is_a(what, this.item)))"; 3if (valid(this.item) && (parent(what) != this.item)) 4return 0; 5elseif (!what:can_glob()) 6return 0; 7endif 8return 1;
give_as_gift
Referenced by
none
Source
1return this:_pop();
list_name
Referenced by
none
Source
1if (this.amount < 2) 2return this:iname(); 3else 4return tostr($su:aggregate_number(this.amount), " ", this.item:plural_name()); 5endif
description
Referenced by
none
Source
1if (valid(this.item)) 2return this.item:description(); 3else 4return this.description; 5endif
list_as
Referenced by
none
Source
1return this.item;
can_glob
Referenced by
none
Source
1return 0;
moveto
Referenced by
- #187:_vanish line 5:
this:moveto
Source
1dest = args[1]; 2if ((!this.f) && is_a(this.location, $globtainer)) 3if (dest != this.location) 4if (!is_a(dest, $globtainer)) 5this.amount = this.amount - 1; 6if (this.amount > 0) 7newglob = $rpg:spawn($glob); 8newglob.item = this.item; 9newglob.amount = this.amount; 10newglob:_update(); 11newglob:moveto(this.location); 12endif 13item = this.item; 14#42:_chparent(this, item); 15this.name = item.name; 16this.aliases = item.aliases; 17else 18for x in (dest.contents) 19if ((parent(x) == $glob) && (x.item == this.item)) 20x.amount = x.amount + this.amount; 21move(this, $tomb); 22return x; 23endif 24endfor 25endif 26endif 27endif 28return pass(@args);
item_list
Referenced by
none
Source
1ret = {}; 2for count in [1..tonum(this.amount)] 3ret = {@ret, this.item}; 4endfor 5return ret;