Game Utils #313

Parent #72Owner #361Flags readSource hellcore/hellcore.db

Aliases: Game Utils, gu

1 verbs · 11 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
find_in_spawnsthis none thisrxd#31336

Properties

PropertyDefinerFlagsOwnerValue
help_msg#72rc#361<clear>
aliases#1rc#361{"Game Utils", "gu"}
description#1rc#361<clear>
object_size#1r#29{2057, 1298434705}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #72 Generic Utilities Package#1 root

Children: none

Call graph

calls n313_0 #313:find_in_spawns n45_32 #45:fertile_branches n313_0->n45_32 n47_27 #47:flatten n313_0->n47_27 n107_43 #107:tell n313_0->n107_43

Source

find_in_spawns

Spec this none thisFlags rxdOwner #361Definer #313

Referenced by

Source

1":find_in_drops(OBJ parent) => LIST children of parent that are available from .spawns_with on NPCs/monsters.";
2{parent} = args;
3objs = {};
4monsters = $ou:fertile_branches($monster);
5npckids = setremove(children($npc), $monster);
6npckids = $lu:flatten($lu:map_arg($ou, "leaves_suspended", npckids));
7npckids = {@npckids, @monsters};
8for npc in (npckids)
9home = npc.home;
10respawn = npc.respawn;
11if ((valid(home) && is_a(area(home), $real_area)) || (valid(respawn) && is_a(area(respawn), $real_area)))
12"valid npc";
13drops = {};
14junks = npc.junk_on_death;
15for x in (npc.spawns_with)
16if (typeof(x) == LIST)
17x = x[1];
18endif
19if (!(x in junks))
20drops = {@drops, x};
21endif
22endfor
23for drop in (drops)
24if (typeof(drop) != OBJ)
25player:tell("npc: ", npc, " -- drop: ", drop);
26return {};
27endif
28if (is_a(drop, parent))
29objs = setadd(objs, drop);
30endif
31yield 1;
32endfor
33endif
34yield 1;
35endfor
36return objs;