generic thing #5
Aliases: generic thing
31 verbs · 30 properties · 37 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
give hand | this at/to any | rxd | #5 | 19 |
hold wield draw equip w*ield | this none none | rxd | #5 | 5 |
try_wield | this none this | rxd | #5 | 7 |
unwielded_by | this none this | rxd | #5 | 2 |
description | this none this | rxd | #5 | 7 |
tell_stat | this none this | rxd | #5 | 2 |
#5:look_place_msg_backup | this none this | rxd | #5 | 8 |
floats | this none this | rxd | #5 | 1 |
recycle | this none this | rxd | #5 | 4 |
iname | this none this | rxd | #5 | 17 |
long_name_msg | this none this | rxd | #5 | 1 |
@setup | this none none | rxd | #5 | 10 |
throw toss | this any any | rxd | #5 | 12 |
squeal_msg | this none this | rxd | #5 | 1 |
check_skill | this none this | rxd | #5 | 7 |
on_spawn | this none this | rxd | #5 | 1 |
set_junk_ok | this none this | rxd | #5 | 5 |
_eat | this none this | rxd | #5 | 12 |
tree_tag | this none this | rxd | #5 | 7 |
value | this none this | rxd | #5 | 1 |
stash | this none none | rxd | #5 | 9 |
can_glob | this none this | rxd | #5 | 22 |
is_junkable | this none this | rxd | #5 | 11 |
break*down | this none none | rxd | #5 | 9 |
find_recipe | this none this | rxd | #5 | 39 |
thrown_at | this none this | rxd | #5 | 17 |
on_craft | this none this | rxd | #5 | 3 |
improv*ise | any with/using this | rxd | #5 | 27 |
on_failed_breakdown | this none this | rxd | #5 | 5 |
_push | this none this | rxd | #5 | 21 |
entomb | this none this | rxd | #5 | 5 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
handed | #5 | rc | #361 | 1 |
wield_msg | #5 | rc | #361 | "%DN gets out %p %t." |
unwield_msg | #5 | rc | #361 | "%DN puts away %p %t." |
size | #5 | rc | #361 | 0 |
look_place_msg | #5 | rc | #361 | "" |
value | #5 | rc | #361 | 0 |
get_msg | #5 | rc | #361 | "" |
drop_msg | #5 | rc | #361 | "" |
get_fail_msg | #5 | rc | #361 | "it seems to be fastened down" |
junk_ok | #5 | rc | #361 | 0 |
floats | #5 | rc | #361 | 0 |
long_name_msg | #5 | rc | #361 | "" |
article | #5 | rc | #361 | 0 |
setup_list | #5 | rc | #361 | {"weight,weight in grams (500g = 1 lb),100", "value,dollar value,0", "description,description"} |
health | #5 | rc | #361 | 20 |
health_max | #5 | rc | #361 | 20 |
min_skill | #5 | rc | #361 | 0 |
skill | #5 | rc | #361 | #-1 |
recipe_for | #5 | rc | #361 | #-1 |
carried_msg | #5 | rc | #361 | "" |
aliases | #1 | rc | #361 | {"generic thing"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {21469, 1298433815} |
hidden_verbs | #1 | rc | #361 | list of 10{"hold", "stow", "@setup", "throw", "give", "junk", "appraise", "stash", "breakdown", "improvise"} |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rwc | #361 | 100 |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
#1 root
#5 generic thing
- #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
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
Source
give hand
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
Referenced by
- #95:hold line 4:
pass(
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
Referenced by
- #95:try_wield line 2:
pass( - #111:try_wield line 8:
pass(
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
Referenced by
none
Source
1"Do whatever is necessary when we're unwielded by someone. Usually nothing."; 2return;
description
Referenced by
- #54:description line 1:
pass( - #95:description line 1:
pass( - #115:description line 1:
pass( - #137:look_self line 3:
this:description - #168:display line 1:
this:description - #223:read line 11:
this:description - #335:description line 1:
pass(
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
Referenced by
- #95:tell_stat line 1:
pass(
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
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
Referenced by
none
Source
1return this.floats;
recycle
Referenced by
- #115:recycle line 2:
pass( - #118:recycle line 1:
pass( - #145:recycle line 14:
pass( - #167:recycle line 17:
pass( - #338:recycle line 4:
pass(
Source
1if (is_a(this.location, $creature)) 2this.location.wielding = setremove(this.location.wielding, this); 3endif 4return pass(@args);
iname
Referenced by
- #5:give line 11:
this:iname - #5:#5:look_place_msg_backup line 3:
this:iname - #5:throw line 11:
this:iname - #5:stash line 9:
this:iname - #5:improv*ise line 9:
this:iname - #5:improv*ise line 13:
this:iname - #95:at*tack line 10:
this:iname - #111:_repair_check line 3:
this:iname - #111:try_wear line 29:
what:iname - #111:try_wear line 32:
what:iname - #127:install line 11:
this:iname - #127:install line 24:
this:iname - #127:install line 30:
this:iname - #133:read line 29:
this:iname - #135:grenade line 17:
this:iname - #137:junk line 1:
this:iname - #147:make line 17:
this:iname - #147:make line 21:
this:iname - #187:list_name line 2:
this:iname - #335:use line 5:
this:iname - #335:use line 12:
this:iname - #335:use line 16:
this:iname - #335:use line 34:
this:iname - #335:do_use_start line 4:
this:iname - #338:fill line 9:
this:iname
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
Referenced by
- #5:iname line 1:
this:long_name_msg
Source
1return this.(verb);
@setup
Referenced by
- #95:@setup line 1:
pass( - #111:@setup line 1:
pass(
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
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
Referenced by
none
Source
1return "";
check_skill
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
Referenced by
- #338:on_spawn line 18:
pass(
Source
1this.junk_ok = 1;
set_junk_ok
Referenced by
none
Source
1if (((this.f || children(this)) || verbs(this)) || properties(this)) 2return E_PERM; 3else 4this.junk_ok = args[1]; 5endif
_eat
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
Referenced by
- #95:tree_tag line 16:
pass( - #111:tree_tag line 7:
pass( - #124:tree_tag line 1:
pass( - #127:tree_tag line 1:
pass( - #135:tree_tag line 1:
pass( - #137:tree_tag line 1:
pass( - #138:tree_tag line 1:
pass( - #145:tree_tag line 1:
pass( - #203:tree_tag line 1:
pass( - #208:tree_tag line 1:
pass( - #347:tree_tag line 1:
pass(
Source
1v = this.value; 2tag = ""; 3if (v) 4v = tostr(v); 5tag = tostr($ansi.green, "$", $su:right(v, -7), $ansi.reset); 6endif 7return tag;
value
Referenced by
none
Source
1return this.value;
stash
Referenced by
- #135:stash line 4:
pass(
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
Referenced by
- #54:can_glob line 4:
pass( - #95:can_glob line 4:
pass( - #111:can_glob line 4:
pass( - #135:can_glob line 1:
pass( - #138:can_glob line 11:
pass( - #153:can_glob line 4:
pass( - #335:can_glob line 4:
pass( - #338:can_glob line 4:
pass( - #347:can_glob line 4:
pass(
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
Referenced by
- #135:is_junkable line 4:
pass(
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
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
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
Referenced by
- #95:thrown_at line 4:
pass( - #135:thrown_at line 5:
pass(
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
Referenced by
none
Source
1maker = args[1]; 2check = args[2]; 3return this;
improv*ise
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
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
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
Referenced by
- #115:entomb line 3:
pass( - #173:entomb line 3:
pass( - #338:entomb line 5:
pass(
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);