generic thing #5

Parent #1Owner #361Flags obsolete1, read, fertileSource hellcore/hellcore.db

Aliases: generic thing

31 verbs · 30 properties · 37 children

Verbs

VerbSpecFlagsDefinerLines
give handthis at/to anyrxd#519
hold wield draw equip w*ieldthis none nonerxd#55
try_wieldthis none thisrxd#57
unwielded_bythis none thisrxd#52
descriptionthis none thisrxd#57
tell_statthis none thisrxd#52
#5:look_place_msg_backupthis none thisrxd#58
floatsthis none thisrxd#51
recyclethis none thisrxd#54
inamethis none thisrxd#517
long_name_msgthis none thisrxd#51
@setupthis none nonerxd#510
throw tossthis any anyrxd#512
squeal_msgthis none thisrxd#51
check_skillthis none thisrxd#57
on_spawnthis none thisrxd#51
set_junk_okthis none thisrxd#55
_eatthis none thisrxd#512
tree_tagthis none thisrxd#57
valuethis none thisrxd#51
stashthis none nonerxd#59
can_globthis none thisrxd#522
is_junkablethis none thisrxd#511
break*downthis none nonerxd#59
find_recipethis none thisrxd#539
thrown_atthis none thisrxd#517
on_craftthis none thisrxd#53
improv*iseany with/using thisrxd#527
on_failed_breakdownthis none thisrxd#55
_pushthis none thisrxd#521
entombthis none thisrxd#55

Properties

PropertyDefinerFlagsOwnerValue
handed#5rc#3611
wield_msg#5rc#361"%DN gets out %p %t."
unwield_msg#5rc#361"%DN puts away %p %t."
size#5rc#3610
look_place_msg#5rc#361""
value#5rc#3610
get_msg#5rc#361""
drop_msg#5rc#361""
get_fail_msg#5rc#361"it seems to be fastened down"
junk_ok#5rc#3610
floats#5rc#3610
long_name_msg#5rc#361""
article#5rc#3610
setup_list#5rc#361{"weight,weight in grams (500g = 1 lb),100", "value,dollar value,0", "description,description"}
health#5rc#36120
health_max#5rc#36120
min_skill#5rc#3610
skill#5rc#361#-1
recipe_for#5rc#361#-1
carried_msg#5rc#361""
aliases#1rc#361{"generic thing"}
description#1rc#361<clear>
object_size#1r#29{21469, 1298433815}
hidden_verbs#1rc#361
list of 10{"hold", "stow", "@setup", "throw", "give", "junk", "appraise", "stash", "breakdown", "improvise"}
phelp_msg#1rc#361<clear>
weight#1rwc#361100
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #1 root

Children: #8 LambdaCore generic container (use $container instead), #57 Recycling Center, #68 Generic Feature Object, #81 password verifier, #111 generic clothing, #115 generic device, #123 generic treasure, #124 generic lock, #127 generic weapon mod, #129 generic dispenser, #130 wristpad, #133 generic note, #136 generic schematic, #138 generic food, #144 generic climbing rope, #145 generic recipe, #150 Heart Of God, #151 generic switch, #152 generic camera, #153 key, #168 scoreboard chip, #174 generic menu-based terminal, #176 generic newbie sign, #187 generic glob, #208 generic lockpick, #209 generic new powerplant, #214 Mjolnir, #219 Garbage Vault, #240 generic ambience, #255 generic smashable thing, #263 generic colorful screen, #283 spawn stats tracker, #285 radio, #307 generic weapon forge, #324 Web Server, #335 generic usable device with charges, #347 generic drug container

Call graph

calls n5_0 #5:give n107_43 #107:tell n5_0->n107_43 n44_0 #44:match n5_0->n44_0 n5_9 #5:iname n5_0->n5_9 n92_2 #92:queue_action n5_0->n92_2 n5_10 #5:long_name_msg n5_9->n5_10 n1_30 #1:name n5_9->n1_30 n98_1 #98:article_for n5_9->n98_1 n5_1 #5:hold n5_1->n92_2 n5_4 #5:description n1_8 #1:description n5_4->n1_8 n47_57 #47:as_list n5_4->n47_57 n5_5 #5:tell_stat n5_5->n107_43 n1_34 #1:tell_stat n5_5->n1_34 n5_6 #5:#5:look_place_msg_backup n5_6->n5_9 n5_8 #5:recycle n1_1 #1:recycle n5_8->n1_1 n5_11 #5:@setup n5_11->n107_43 n103_7 #103:do_setup n5_11->n103_7 n5_12 #5:throw n5_12->n107_43 n5_12->n44_0 n5_12->n5_9 n5_12->n92_2 n1_31 #1:dname n5_12->n1_31 n5_17 #5:_eat n1_58 #1:junk_ok n5_17->n1_58 n45_0 #45:has_property n5_17->n45_0 n20_34 #20:pronoun_sub n5_17->n20_34 n103_2 #103:junk n5_17->n103_2 n5_18 #5:tree_tag n20_2 #20:right n5_18->n20_2 n5_20 #5:stash n5_20->n107_43 n5_20->n5_9 n5_20->n92_2 n5_23 #5:break*down n5_23->n107_43 n5_23->n92_2 n5_23->n1_31 n5_24 #5:find_recipe n5_24->n107_43 n5_24->n1_31 n45_6 #45:ancestors n5_24->n45_6 n45_27 #45:branches_suspended n5_24->n45_27 n47_16 #47:slice n5_24->n47_16 n48_8 #48:suspend_if_needed n5_24->n48_8 n5_25 #5:thrown_at n1_39 #1:dnamec n5_25->n1_39 n1_13 #1:moveto n5_25->n1_13 n5_27 #5:improv*ise n5_27->n107_43 n5_27->n5_9 n5_27->n92_2 n107_0 #107:_wield n5_27->n107_0 n5_28 #5:on_failed_breakdown n5_28->n1_31 n5_28->n1_13 n5_29 #5:_push n5_29->n107_43 n5_29->n92_2 n5_29->n1_31 n47_27 #47:flatten n5_29->n47_27 n1_66 #1:announce_action_text n5_29->n1_66 n6_169 #6:dnamec n5_29->n6_169 n5_30 #5:entomb n1_68 #1:entomb n5_30->n1_68

Source

give hand

Spec this at/to anyFlags rxdOwner #361Definer #5

Referenced by

none

Source

1set_task_perms(callers() ? caller_perms() | player);
2if (this.location != player)
3player:tell("You don't have that!");
4elseif (!valid(player.location))
5player:tell("I see no \"", iobjstr, "\" here.");
6elseif ((!valid(iobj = $match_utils:match(iobjstr, player.location:occupants($living)))) || (iobj.location != player.location))
7player:tell("I see no \"", iobjstr, "\" here.");
8elseif (iobj == player)
9player:tell("Give it to yourself?");
10elseif (!is_a(iobj, $creature))
11player:tell("It doesn't even make sense to give ", this:iname(), " to ", iobj:iname(), ".");
12elseif (!iobj:reachable_by(player))
13player:tell(iobj:dnamec(), " is out of your reach.");
14else
15if (this in player.wearing)
16player:queue_action($actions.remove, {this}, 1, "remove " + this.name);
17endif
18player:queue_action($actions.give, {this, iobj}, 1, (("give " + this.name) + " to ") + iobj:name());
19endif

hold wield draw equip w*ield

Spec this none noneFlags rxdOwner #361Definer #5

Referenced by

Source

1if ((this.handed > 1) || ($skills.quickdraw:check(player, this.size, 1) < 0))
2player:queue_action($actions.wield, {this}, 1, (verb + " ") + argstr);
3else
4player:queue_action($actions.wield, {this}, 1, (verb + " ") + argstr);
5endif

try_wield

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1who = args[1];
2if (this.min_skill)
3if (this.skill:raw(who) < this.min_skill)
4who:tell("You're not sure you feel qualified to be using this.");
5endif
6endif
7return 1;

unwielded_by

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1"Do whatever is necessary when we're unwielded by someone.  Usually nothing.";
2return;

description

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1d = pass(@args);
2if (typeof(`this.inscription ! E_PROPNF => 0') == STR)
3ds = ("An inscription reads: '" + this.inscription) + "'.";
4return {@$lu:as_list(d), ds};
5else
6return d;
7endif

tell_stat

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1pass(@args);
2player:tell("  Weight:    ", tofloat(this.weight) / 1000.0, " kg  (", this.size, " size mod, ", this.handed, ((("-handed)   " + $ansi.green) + "$") + tostr(this.value)) + $ansi.reset);

#5:look_place_msg_backup

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1if (!this.(verb))
2if (this.weight < 0)
3return ("There's " + this:iname()) + " here.";
4endif
5return "";
6else
7return this.(verb);
8endif

floats

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1return this.floats;

recycle

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1if (is_a(this.location, $creature))
2this.location.wielding = setremove(this.location.wielding, this);
3endif
4return pass(@args);

iname

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1name = (m = this:long_name_msg()) ? m | this:name();
2if (!name)
3return "";
4endif
5if (this.article == "")
6return name;
7elseif (!this.article)
8if (index("aeiou", name[1]))
9return "an " + name;
10elseif (index("bcdfghjklmnpqrstvwxyz", name[1]))
11return "a " + name;
12else
13return ($english_utils:article_for(name) + " ") + name;
14endif
15else
16return (this.article + " ") + name;
17endif

long_name_msg

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1return this.(verb);

@setup

Spec this none noneFlags rxdOwner #361Definer #5

Referenced by

Source

1if (!player.programmer)
2player:tell("You cheatin' bastard.");
3return;
4endif
5if ((!player.wizard) && (player != this.owner))
6player:tell("It's not yours.");
7return;
8endif
9$rpg:do_setup(this);
10return 1;

throw toss

Spec this any anyFlags rxdOwner #361Definer #5

Referenced by

none

Source

1target = $mu:match(iobjstr, player.location.contents);
2if (!valid(target))
3player:tell("What's a '", iobjstr, "'?");
4elseif (this.location != player)
5player:tell("You're not carrying ", this:dname(), ".");
6elseif (target == player)
7player:tell("Really? I don't think you are serious.");
8elseif ((target.location == player.location) && ((is_a(target, $exit) && target.passable) || is_a(target, $living)))
9player:queue_action($actions.throw, {this, target}, 1, "throw " + this.name);
10else
11player:tell("You can't throw ", this:iname(), " ", prepstr, " ", iobjstr, ".");
12endif

squeal_msg

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1return "";

check_skill

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1who = args[1];
2mod = args[2];
3dont_improve = (length(args) > 2) ? args[3] | 0;
4if ((raw = this.skill:raw(who)) < this.min_skill)
5mod = mod + ((raw - this.min_skill) * 4);
6endif
7return this.skill:check(who, mod, dont_improve);

on_spawn

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1this.junk_ok = 1;

set_junk_ok

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1if (((this.f || children(this)) || verbs(this)) || properties(this))
2return E_PERM;
3else
4this.junk_ok = args[1];
5endif

_eat

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1"Copied from generic food (#1570):_eat by Satan (#2) Thu Jul  1 13:14:59 2004 PDT";
2who = args[1];
3if (this:junk_ok())
4bites = (length(args) > 1) ? args[2] | 1;
5if ($ou:has_property(who, "feed_msg"))
6m = who.feed_msg;
7else
8m = "%DN eats %it.";
9endif
10who:aat($su:ps(m));
11return $rpg:junk(this);
12endif

tree_tag

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1v = this.value;
2tag = "";
3if (v)
4v = tostr(v);
5tag = tostr($ansi.green, "$", $su:right(v, -7), $ansi.reset);
6endif
7return tag;

value

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1return this.value;

stash

Spec this none noneFlags rxdOwner #361Definer #5

Referenced by

Source

1"Stash this in your location to make it hard to find.";
2if ((this.location != player) && (!is_a(this, $cache)))
3player:tell("You'd have to be holding it.");
4return;
5elseif ((is_a(player.location, #761) || is_a(player.location, #1047)) || is_a(player.location, #1034))
6player:tell("That's ridiculous.");
7return;
8endif
9player:queue_action($actions.stash, {this, player.location}, 1, "stash " + this:iname());

can_glob

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1"Can I be replaced by a freshly spawned sibling?";
2"Generally yes for cookie cutter items, no for anything customized or half full.";
3if (this.health < parent(this).health)
4return 0;
5elseif (this.contents)
6return 0;
7elseif (properties(this))
8return 0;
9elseif (this.f)
10return 0;
11elseif (verbs(this))
12return 0;
13elseif (`this.admin_customized ! E_PROPNF => 0')
14return 0;
15elseif (!this.junk_ok)
16return 0;
17elseif (this.weight == -1)
18return 0;
19elseif (this.owner != #984)
20return 0;
21endif
22return 1;

is_junkable

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1"1 if this object is okay to junk, 0 otherwise.";
2if (((((!this.f) && (!children(this))) && (!verbs(this))) && (!properties(this))) && this.junk_ok)
3for x in (this.contents)
4if (!is_a(x, $decal))
5return 0;
6endif
7endfor
8return 1;
9else
10return 0;
11endif

break*down

Spec this none noneFlags rxdOwner #361Definer #5

Referenced by

none

Source

1if (this.weight == -1)
2player:tell("That's way too permanent for you to break down.");
3return;
4endif
5if (this.location == player)
6player:queue_action($actions.breakdown, {this});
7else
8player:tell("You have to be holding ", this:dname(), " to break it apart.");
9endif

find_recipe

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1ancestor = this.f ? this | $ou:ancestors(this)[1];
2who = args[1];
3if (who:cooldown_check("science-appraise", 600, 1))
4items = {};
5for item in ($ou:branches_suspended($recipe))
6if (ancestor in $lu:slice(item.ingredients, 1))
7items = setadd(items, item);
8endif
9$cu:sin();
10endfor
11check = #228054:check(who, 0, 1);
12if ((items != {}) && (check > 0))
13tellitem = items[random(length(items))];
14detail = "something.  Hmm.";
15benches = {};
16for bench in ($ou:branches_suspended(#5144))
17if (gamevalid(bench.recipe_type) && is_a(tellitem, bench.recipe_type))
18benches = setadd(benches, bench);
19endif
20endfor
21if (length(benches) > 0)
22workbench = benches[random(length(benches))];
23else
24workbench = #-1;
25endif
26if (valid(tellitem.discoverer))
27if (check > 5)
28detail = tellitem.makes:iname() + ".";
29elseif (((check > 2) && (check <= 5)) && valid(workbench))
30detail = ("something on " + workbench:iname()) + ".";
31endif
32else
33if ((check > 5) && valid(workbench))
34detail = ("something on " + workbench:iname()) + ".";
35endif
36endif
37player:tell("You're pretty sure ", this:dname(), " can be used to make " + detail);
38endif
39endif

thrown_at

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1target = args[1];
2thrower = args[2];
3if (is_a(target, $creature))
4body = target:random_bodypart();
5target:aat(this:dnamec(), " hits ", target:dname(), " in ", body:dname(), ".");
6else
7body = $bodypart;
8target.location:announce_all(this:dnamec(), " hits ", target:dname(), ".");
9endif
10dmax = this.weight / 400;
11this:moveto(target.location);
12if (dmax < 2)
13return;
14endif
15dmax = min(10, dmax);
16damage = random(dmax);
17`target:take_damage($damages.beating, damage, body, thrower) ! E_VERBNF => 0';

on_craft

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1maker = args[1];
2check = args[2];
3return this;

improv*ise

Spec any with/using thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1if (!player:_wield(this))
2return;
3endif
4if (!dobjstr)
5player:queue_action($actions.improv, {this}, 1, "improvise with " + this.name);
6else
7r = $actions.improv:improv_recipes(this);
8if (!r)
9player:tell("You can't think of anything to make out of ", this:iname(), ".");
10else
11recipe = $actions.improv:match_product(dobjstr, r);
12if (!valid(recipe))
13player:tell("You don't see any way to make that from ", this:iname(), ".");
14else
15ing = $actions.improv:ingredients_list(recipe);
16using = {this};
17found = 0;
18for x in (ing)
19if ((!found) && is_a(this, x))
20found = 1;
21ing = setremove(ing, x);
22endif
23endfor
24player:queue_action($actions.improv, {recipe, ing, using}, 1, "improvise " + recipe.makes:iname());
25endif
26endif
27endif

on_failed_breakdown

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

none

Source

1{who, check} = args;
2if (check < -3)
3who:tell("Ah, crap!  You ruined ", this:dname(), " in the attempt.");
4this:moveto($tomb);
5endif

_push

Spec this none thisFlags rxdOwner #29Definer #5

Referenced by

none

Source

1who = args[1];
2where = args[2];
3if (this.location == who)
4who:tell("You'd have to put it down first.");
5return;
6endif
7if (who.fighting || (who in $lu:flatten($lu:map_prop(who.location:occupants($living), "fighting"))))
8return player:tell("You can't push anything while you are in combat.");
9endif
10if (is_a(this, $furniture) && ((this.sitting != {}) || (this.reclining != {})))
11player:tell("It'd be awfully hard to push this thing with people on top of it.");
12return;
13endif
14if (this.weight < 0)
15player:aat(player:dnamec(), " shoves hard at ", this:dname(), " with ", player.pp, " shoulder, but it won't budge.");
16return;
17elseif (this.weight < 10000)
18player:tell("You'd look a bit silly trying to push something so small don't you think?");
19return;
20endif
21return player:queue_action($actions.push, {this, where});

entomb

Spec this none thisFlags rxdOwner #361Definer #5

Referenced by

Source

1"Copied from generic thing (#5):recycle by Gilmore (#98) Wed Jun  2 21:43:18 2010 CDT";
2if (is_a(this.location, $creature))
3this.location.wielding = setremove(this.location.wielding, this);
4endif
5return pass(@args);