generic lighter #128
Aliases: generic lighter
2 verbs · 49 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
light | any with/using this | rxd | #128 | 49 |
use_finish | this none this | rxd | #128 | 20 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
self_only | #335 | rc | #361 | <clear> |
recycle_when_empty | #335 | rc | #361 | <clear> |
charges | #335 | rc | #361 | 100 |
use_start_msg | #335 | rc | #361 | "" |
use_on_start_msg | #335 | rc | #361 | "" |
speed | #335 | rc | #361 | <clear> |
charges_msg | #335 | rc | #361 | <clear> |
throwaway_msg | #335 | rc | #361 | <clear> |
use_finish_msg | #335 | rc | #361 | "%DN %<lights> %p %d." |
use_on_finish_msg | #335 | rc | #361 | "%N %<lights> %dd with %p %i." |
use_action | #335 | rc | #361 | <clear> |
charges_max | #335 | rc | #361 | <clear> |
empty_msg | #335 | rc | #361 | <clear> |
in_use | #335 | rc | #361 | <clear> |
hold_to_use | #335 | rc | #361 | <clear> |
self_allowed | #335 | rc | #361 | <clear> |
must_allow | #335 | rc | #361 | <clear> |
empty_form | #335 | rc | #361 | <clear> |
hurts_target | #335 | rc | #361 | <clear> |
handed | #5 | rc | #361 | <clear> |
wield_msg | #5 | rc | #361 | <clear> |
unwield_msg | #5 | rc | #361 | <clear> |
size | #5 | rc | #361 | <clear> |
look_place_msg | #5 | rc | #361 | <clear> |
value | #5 | rc | #361 | <clear> |
get_msg | #5 | rc | #361 | <clear> |
drop_msg | #5 | rc | #361 | <clear> |
get_fail_msg | #5 | rc | #361 | <clear> |
junk_ok | #5 | rc | #361 | <clear> |
floats | #5 | rc | #361 | <clear> |
long_name_msg | #5 | rc | #361 | <clear> |
article | #5 | rc | #361 | <clear> |
setup_list | #5 | rc | #361 | <clear> |
health | #5 | rc | #361 | <clear> |
health_max | #5 | rc | #361 | <clear> |
min_skill | #5 | rc | #361 | <clear> |
skill | #5 | rc | #361 | <clear> |
recipe_for | #5 | rc | #361 | <clear> |
carried_msg | #5 | rc | #361 | <clear> |
aliases | #1 | rc | #361 | {"generic lighter"} |
description | #1 | rc | #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 | #1 | r | #29 | {3953, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | {"It's a lighter. Mostly used to light smokables like cigarettes, joints, and bongs."} |
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): #335 generic usable device with charges → #5 generic thing → #1 root
Children: none
Call graph
Source
light
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
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;