generic replicating & returning thing #108
Aliases: generic replicating & returning thing, homer
5 verbs · 26 properties · 7 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
notify tell | this none this | rxd | #108 | 6 |
go_home | this none this | rxd | #108 | 5 |
replicate | this none this | rxd | #108 | 34 |
recycle_at_death | this none this | rxd | #108 | 4 |
init_for_core | this none this | rxd | #108 | 17 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
returning | #108 | rc | #2 | 0 |
how_long | #108 | rc | #2 | 3600 |
been_told | #108 | rc | #2 | 0 |
home | #108 | rc | #2 | #62 |
child_limit | #108 | rc | #2 | 8 |
recycle_at_death | #108 | rc | #2 | 0 |
drop_failed_msg | #5 | rc | #2 | <clear> |
drop_succeeded_msg | #5 | rc | #2 | <clear> |
odrop_failed_msg | #5 | rc | #2 | <clear> |
odrop_succeeded_msg | #5 | rc | #2 | <clear> |
otake_succeeded_msg | #5 | rc | #2 | <clear> |
otake_failed_msg | #5 | rc | #2 | <clear> |
take_succeeded_msg | #5 | rc | #2 | <clear> |
take_failed_msg | #5 | rc | #2 | <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 | #2 | list of 8{"@set these properties:", ".returning => 0 or 1", ".recycle_at_death => 0 or 1", ".how_long => integer for seconds until returning", ".home => object #", ".child_limit => integer for the max # of children than can be created with this:replicate()", " ", "Type 'help $homer:replicate' for more info."} |
key | #1 | c | #2 | 0 |
aliases | #1 | rc | #2 | {"generic replicating & returning thing", "homer"} |
description | #1 | rc | #2 | <clear> |
object_size | #1 | r | #36 | {4734, -1090650497} |
html | #1 | rc | #2 | <clear> |
Ancestry
Ancestors (nearest first): #5 generic thing → #102 subthing → #1 Root Class
Children: #109 generic weapon, #117 generic clothing, #120 generic medical kit, #127 generic light, #163 Educational Standards, #165 school explosion bomb, #166 school implosion bomb
Call graph
Source
notify tell
Referenced by
none
Source
1suspend(1); 2if ((this.returning && (!this.been_told)) && (this.location != this.home)) 3this.been_told = 1; 4$scheduler:schedule(this.how_long, this, "go_home"); 5endif 6pass(@args);
go_home
Referenced by
none
Source
1if ($object_utils:has_verb(this, "_unwield")) 2this:_unwield(); 3endif 4this:moveto(this.home); 5this.been_told = 0;
replicate
Referenced by
- #127:replicate line 1:
pass(
Source
1"Usage: weapon:replicate() => new obj or $nothing"; 2"Tests to see if this is fertile first."; 3"The new object will have a child limit of 0."; 4"To protect your MOO from evil lowlifes, the maximum child limit on any object of this type is 40!"; 5"WIZ PERMS"; 6try 7this.child_limit = (this.child_limit > 40) ? 40 | this.child_limit; 8kiddies = children(this); 9if ((x = length(kiddies)) && (this.child_limit < 27)) 10for i in [1..x] 11if (!kiddies[i].f) 12$building_utils:set_names(kiddies[i], $string_utils:from_list({tostr(this.name, " [", $string_utils.alphabet[i], "]"), @this.aliases, tostr("[", $string_utils.alphabet[i], "]")}, ",")); 13endif 14endfor 15endif 16if ((x < this.child_limit) && this.f) 17if (this.owner.ownership_quota <= 0) 18this.owner.ownership_quota = 1; 19else 20this.owner.ownership_quota = this.owner.ownership_quota + 1; 21endif 22nobj = $recycler:_create(this, this.owner); 23if (this.child_limit < 27) 24$building_utils:set_names(nobj, $string_utils:from_list({tostr(this.name, " [", $string_utils.alphabet[x + 1], "]"), @this.aliases, tostr("[", $string_utils.alphabet[x + 1], "]")}, ",")); 25else 26$building_utils:set_names(nobj, $string_utils:from_list(this.aliases, ",")); 27endif 28nobj.child_limit = 0; 29return nobj; 30endif 31return $nothing; 32except v (ANY) 33return $nothing; 34endtry
recycle_at_death
Referenced by
none
Source
1if (this.recycle_at_death && (!this.f)) 2return $recycler:_recycle(this); 3endif 4return;
init_for_core
Referenced by
- #109:init_for_core line 33:
pass( - #127:init_for_core line 7:
pass( - #163:init_for_core line 19:
pass(
Source
1if (caller_perms().wizard) 2if (this == $homer) 3this.returning = 0; 4this.how_long = 3600; 5this.been_told = 0; 6this.home = $player_start; 7this.child_limit = 8; 8this.recycle_at_death = 0; 9else 10for p in (properties($homer)) 11if ((!p) in {"build_help", "help_msg"}) 12clear_property(this, p); 13endif 14endfor 15endif 16return pass(@args); 17endif