generic drug container #347
Aliases: generic drug container
7 verbs · 35 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
set_doses | this none this | rxd | #347 | 6 |
set_max_doses | this none this | rxd | #347 | 6 |
set_drug | this none this | rxd | #347 | 6 |
burn_up | this none this | rxd | #347 | 14 |
can_glob | this none this | rxd | #347 | 4 |
cooked_blood | this none this | rxd | #347 | 5 |
tree_tag | this none this | rxd | #347 | 6 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
max_doses | #347 | rc | #361 | 10 |
doses | #347 | r | #361 | 0 |
drug | #347 | rc | #361 | #-1 |
full_msg | #347 | rc | #361 | "%DT is already full." |
no_engrave | #347 | rc | #361 | 1 |
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 drug container"} |
description | #1 | rc | #361 | "Something that looks like it might be used to store a drug." |
object_size | #1 | r | #29 | {3999, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | list of 3{"Delicious drugs! Use 'em, abuse 'em, just don't lose 'em. Some give you nice bonuses. Some give you serious problems. Some do both! Which is which? Who cares!", "", "PRO TIP: Drug use is wrong and offends Christ."} |
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): #5 generic thing → #1 root
Children: #198 generic pill
Call graph
Source
set_doses
Referenced by
none
Source
1value = args[1]; 2if (typeof(value) == NUM) 3this.doses = value; 4else 5return E_INVARG; 6endif
set_max_doses
Referenced by
none
Source
1value = args[1]; 2if (typeof(value) == NUM) 3this.max_doses = value; 4else 5return E_INVARG; 6endif
set_drug
Referenced by
none
Source
1value = args[1]; 2if (typeof(value) == OBJ) 3this.drug = value; 4else 5return E_INVARG; 6endif
burn_up
Referenced by
none
Source
1if (this.drug.vaporizable) 2where = this:room(); 3chance = this.doses * 2; 4if (where.outdoor) 5chance = chance / 2; 6endif 7if (random(100) <= chance) 8where:announce_all("A cloud of ", this.drug.name, " fumes wafts out from the fire."); 9for x in (where:occupants($living)) 10x:ingest(this.drug, 1, $drug_vectors.inhalation); 11endfor 12endif 13endif 14$rpg:junk(this);
can_glob
Referenced by
none
Source
1if (this.doses != parent(this).doses) 2return 0; 3endif 4return pass(@args);
cooked_blood
Referenced by
none
Source
1if (valid(this.drug)) 2return {{this.drug, time(), this.doses}}; 3else 4return {}; 5endif
tree_tag
Referenced by
- #198:tree_tag line 1:
pass(
Source
1r = pass(@args); 2if (valid(this.drug)) 3r = tostr(r, " ", $su:nn(this.drug)); 4endif 5r = tostr(r, " doses: ", this.doses, "/", this.max_doses); 6return r;