generic lighter #128

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

Aliases: generic lighter

2 verbs · 49 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
lightany with/using thisrxd#12849
use_finishthis none thisrxd#12820

Properties

PropertyDefinerFlagsOwnerValue
self_only#335rc#361<clear>
recycle_when_empty#335rc#361<clear>
charges#335rc#361100
use_start_msg#335rc#361""
use_on_start_msg#335rc#361""
speed#335rc#361<clear>
charges_msg#335rc#361<clear>
throwaway_msg#335rc#361<clear>
use_finish_msg#335rc#361"%DN %<lights> %p %d."
use_on_finish_msg#335rc#361"%N %<lights> %dd with %p %i."
use_action#335rc#361<clear>
charges_max#335rc#361<clear>
empty_msg#335rc#361<clear>
in_use#335rc#361<clear>
hold_to_use#335rc#361<clear>
self_allowed#335rc#361<clear>
must_allow#335rc#361<clear>
empty_form#335rc#361<clear>
hurts_target#335rc#361<clear>
handed#5rc#361<clear>
wield_msg#5rc#361<clear>
unwield_msg#5rc#361<clear>
size#5rc#361<clear>
look_place_msg#5rc#361<clear>
value#5rc#361<clear>
get_msg#5rc#361<clear>
drop_msg#5rc#361<clear>
get_fail_msg#5rc#361<clear>
junk_ok#5rc#361<clear>
floats#5rc#361<clear>
long_name_msg#5rc#361<clear>
article#5rc#361<clear>
setup_list#5rc#361<clear>
health#5rc#361<clear>
health_max#5rc#361<clear>
min_skill#5rc#361<clear>
skill#5rc#361<clear>
recipe_for#5rc#361<clear>
carried_msg#5rc#361<clear>
aliases#1rc#361{"generic lighter"}
description#1rc#361"A plastic cylinder with a metal striker wheel on top. You probably stole it from someone...or else someone's about to steal it from you. That's just how it goes with lighters."
object_size#1r#29{3953, 1298433815}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361{"It's a lighter. Mostly used to light smokables like cigarettes, joints, and bongs."}
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): #335 generic usable device with charges#5 generic thing#1 root

Children: none

Call graph

calls n128_0 #128:light n107_43 #107:tell n128_0->n107_43 n1_31 #1:dname n128_0->n1_31 n44_0 #44:match n128_0->n44_0 n45_2 #45:has_verb n128_0->n45_2 n45_0 #45:has_property n128_0->n45_0 n1_66 #1:announce_action_text n128_0->n1_66 n6_169 #6:dnamec n128_0->n6_169 n103_1 #103:spawn n128_0->n103_1 n103_2 #103:junk n128_0->n103_2 n92_2 #92:queue_action n128_0->n92_2 n1_30 #1:name n128_0->n1_30 n128_1 #128:use_finish n128_1->n45_2 n20_34 #20:pronoun_sub n128_1->n20_34

Source

light

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

Referenced by

none

Source

1if (this.location != player)
2player:tell("You can't use ", this:dname(), " if you don't have it!");
3endif
4if (!valid(dobj))
5dobj = $match_utils:match(dobjstr, {@player.contents, @player.location.contents});
6endif
7if (is_a(player.location, #1047))
8player:tell("It's a pretty good lighter.  Striker seems to work well, the ergonomics are sensible, the color perfectly complements your eyes.  But somehow you don't think it's good enough to light anything underwater.  By the way did you notice you're UNDERWATER?");
9return;
10endif
11if (!valid(dobj))
12player:tell("There doesn't seem to be any \"", dobjstr, "\" here to light.");
13return 0;
14elseif (msg = $ou:has_verb(dobj, "wont_burn") ? dobj:wont_burn() | "no")
15if (msg != "no")
16player:tell("You can't light ", dobj:dname(), ", ", msg, ".");
17else
18if ($ou:has_property(dobj, "fuel_value") && (dobj.fuel_value > 0))
19if (player.location.outdoor)
20if (fires = player.location:occupants(#35148))
21fire = fires[1];
22player:aat(player:dnamec(), " adds ", dobj:iname(), " to ", fire:dname(), ".");
23fire.fuel = fire.fuel + dobj.fuel_value;
24else
25fire = $rpg:spawn(#31812);
26fire:moveto(player.location);
27fire.fuel = dobj.fuel_value;
28player:aat(player:dnamec(), " gathers kindling and builds a campfire around ", dobj:dname(), ".");
29endif
30$rpg:junk(dobj);
31fork (5)
32if (!fire.lit)
33player:queue_action(this.use_action, {this, fire}, 1, (((verb + " ") + fire.name) + " with ") + this:name());
34endif
35endfork
36else
37player:tell("Maybe you should go outside if you want to build a fire.");
38return 0;
39endif
40else
41player:tell("You can't light ", dobj:dname(), ".");
42endif
43endif
44return 0;
45elseif (dobj.lit)
46player:tell(dobj:dnamec(), " is still burning.");
47return 0;
48endif
49player:queue_action(this.use_action, {this, dobj}, 1, (((verb + " ") + dobjstr) + " with ") + this:name());

use_finish

Spec this none thisFlags rxdOwner #361Definer #128

Referenced by

none

Source

1":use_finish(OBJ who, OBJ on)";
2"Do stuff at the end of using.";
3"This is what children of #627 should override.";
4who = args[1];
5on = args[2];
6loc = on.location;
7who:_wield(this);
8if (loc == who)
9who:_wield(on, 1);
10endif
11if ($ou:has_verb(on, "do_light"))
12on:do_light();
13endif
14if (loc == who)
15who:aat($su:ps(this.use_finish_msg, who, this, loc, on, this));
16else
17who:aat($su:ps(this.use_on_finish_msg, who, this, loc, on, this));
18endif
19who.location:broadcast_event(0, this.use_action, who, {this, on});
20return 1;