generic replicating & returning thing #108

Parent #5Owner #2Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: generic replicating & returning thing, homer

5 verbs · 26 properties · 7 children

Verbs

VerbSpecFlagsDefinerLines
notify tellthis none thisrxd#1086
go_homethis none thisrxd#1085
replicatethis none thisrxd#10834
recycle_at_deaththis none thisrxd#1084
init_for_corethis none thisrxd#10817

Properties

PropertyDefinerFlagsOwnerValue
returning#108rc#20
how_long#108rc#23600
been_told#108rc#20
home#108rc#2#62
child_limit#108rc#28
recycle_at_death#108rc#20
drop_failed_msg#5rc#2<clear>
drop_succeeded_msg#5rc#2<clear>
odrop_failed_msg#5rc#2<clear>
odrop_succeeded_msg#5rc#2<clear>
otake_succeeded_msg#5rc#2<clear>
otake_failed_msg#5rc#2<clear>
take_succeeded_msg#5rc#2<clear>
take_failed_msg#5rc#2<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#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#1c#20
aliases#1rc#2{"generic replicating & returning thing", "homer"}
description#1rc#2<clear>
object_size#1r#36{4734, -1090650497}
html#1rc#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

calls n108_0 #108:notify n99_17 #99:schedule n108_0->n99_17 n1_11 #1:notify n108_0->n1_11 n108_1 #108:go_home n52_2 #52:has_verb n108_1->n52_2 n5_2 #5:moveto n108_1->n5_2 n108_2 #108:replicate n21_1 #21:set_names n108_2->n21_1 n20_5 #20:from_list n108_2->n20_5 n63_2 #63:_create n108_2->n63_2 n108_3 #108:recycle_at_death n63_1 #63:_recycle n108_3->n63_1 n108_4 #108:init_for_core n102_1 #102:init_for_core n108_4->n102_1

Source

notify tell

Spec this none thisFlags rxdOwner #2Definer #108

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

Spec this none thisFlags rxdOwner #2Definer #108

Referenced by

none

Source

1if ($object_utils:has_verb(this, "_unwield"))
2this:_unwield();
3endif
4this:moveto(this.home);
5this.been_told = 0;

replicate

Spec this none thisFlags rxdOwner #2Definer #108

Referenced by

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

Spec this none thisFlags rxdOwner #2Definer #108

Referenced by

none

Source

1if (this.recycle_at_death && (!this.f))
2return $recycler:_recycle(this);
3endif
4return;

init_for_core

Spec this none thisFlags rxdOwner #2Definer #108

Referenced by

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