Game Utils #313
Aliases: Game Utils, gu
1 verbs · 11 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
find_in_spawns | this none this | rxd | #313 | 36 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
help_msg | #72 | rc | #361 | <clear> |
aliases | #1 | rc | #361 | {"Game Utils", "gu"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {2057, 1298434705} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
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): #72 Generic Utilities Package → #1 root
Children: none
Call graph
Source
find_in_spawns
Referenced by
- #317:@dropgrep line 7:
$gu:find_in_spawns
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;