generic gatekeeper #143
Aliases: generic gatekeeper
9 verbs · 169 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
_check_door | this none this | rxd | #143 | 33 |
_check_for_guarded_doors | this none this | rxd | #143 | 6 |
suggest_next_action | this none this | rxd | #143 | 17 |
give_keys_to | this none this | rxd | #143 | 7 |
hear_event_pick | this none this | rxd | #143 | 8 |
hear_event_knock | this none this | rxd | #143 | 16 |
answer_door_for | this none this | rxd | #143 | 2 |
_wander | this none this | rxd | #143 | 7 |
_brainscan | this none this | rxd | #143 | 12 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
guarded_doors | #143 | rc | #29 | {} |
lockpick_msg | #143 | rc | #29 | "%T sees you picking the lock and springs into action!" |
olockpick_msg | #143 | rc | #29 | "%T sees %dn picking the lock and springs into action!" |
attack_lockpickers_chance | #143 | rc | #29 | 50 |
answer_doors | #143 | rc | #29 | 0 |
last_answer_time | #143 | rc | #29 | 0 |
wait_threshhold | #143 | rc | #29 | 10 |
species | #142 | rc | #29 | <clear> |
scavenge_chance | #142 | rc | #29 | <clear> |
nest | #142 | rc | #29 | <clear> |
forbidden_rooms | #142 | rc | #29 | <clear> |
areas | #142 | rc | #29 | <clear> |
genders | #142 | rc | #29 | <clear> |
names_adj | #142 | rc | #29 | <clear> |
names_base_neuter | #142 | rc | #29 | <clear> |
recycle_on_die | #142 | rc | #29 | 0 |
treasure | #142 | rc | #29 | {} |
comments | #142 | rc | #29 | <clear> |
defend_sibs_chance | #142 | rc | #29 | <clear> |
aggression_chance | #142 | rc | #29 | <clear> |
random_homes | #142 | rc | #29 | <clear> |
turf_size | #142 | rc | #29 | <clear> |
antigang_chance | #142 | rc | #29 | <clear> |
food | #142 | rc | #29 | <clear> |
feed_msg | #142 | rc | #29 | <clear> |
tracking | #142 | rc | #29 | <clear> |
track_speed | #142 | rc | #29 | <clear> |
friendly_species | #142 | rc | #29 | <clear> |
nest_container | #142 | rc | #29 | <clear> |
default_alias | #142 | rc | #29 | <clear> |
extra_aliases | #142 | rc | #29 | <clear> |
kill_target | #142 | rc | #29 | <clear> |
tactics_chance | #142 | rc | #29 | <clear> |
spawned_by | #142 | rc | #29 | <clear> |
contract_value | #142 | rc | #29 | 50 |
suggest_area | #142 | rc | #29 | <clear> |
no_cower | #142 | rc | #29 | <clear> |
weapon_drop_chance | #142 | rc | #29 | <clear> |
hoard_in_nest | #142 | rc | #29 | <clear> |
wields_weapons | #106 | rc | #29 | <clear> |
public_wander_only | #106 | rc | #29 | <clear> |
bravery | #106 | rc | #29 | 500 |
enemies | #106 | rc | #29 | {} |
lastrooms | #106 | rc | #29 | <clear> |
wander_chance | #106 | rc | #29 | <clear> |
last_greet_time | #106 | r | #361 | <clear> |
conversation | #106 | rc | #29 | <clear> |
_conversation | #106 | r | #361 | <clear> |
dunno_msg | #106 | rc | #29 | <clear> |
spawns_with | #106 | rc | #29 | <clear> |
accepted_gifts | #106 | rc | #29 | <clear> |
greet_msg | #106 | rc | #29 | <clear> |
wander_speed | #106 | rc | #29 | <clear> |
reacting_to | #106 | rc | #29 | <clear> |
lastaction | #106 | rw | #361 | <clear> |
comment_chance | #106 | rc | #29 | <clear> |
respawn_time | #106 | rc | #29 | <clear> |
death_time | #106 | rc | #29 | 1237677662 |
nemeses | #106 | rc | #29 | <clear> |
nemesis_lifetime | #106 | rc | #29 | <clear> |
junk_on_death | #106 | rc | #29 | <clear> |
say_fight_msg | #106 | rc | #29 | <clear> |
wander_last_try | #106 | rc | #29 | <clear> |
destination | #106 | rc | #29 | <clear> |
last_wander_time | #106 | rc | #29 | <clear> |
last_comment_time | #106 | rc | #29 | <clear> |
max_contents | #106 | rc | #29 | <clear> |
beg_health | #106 | rc | #29 | <clear> |
beg_chance | #106 | rc | #29 | <clear> |
beg_msg | #106 | rc | #29 | <clear> |
reload_guns | #106 | rc | #29 | <clear> |
clothing | #106 | rwc | #29 | <clear> |
wardrobe | #106 | rc | #29 | <clear> |
stay_home | #106 | rc | #29 | <clear> |
respawn_clothing | #106 | rc | #29 | <clear> |
walk_last_try | #106 | rc | #29 | <clear> |
ignore_next_say | #106 | rc | #29 | <clear> |
did_damage | #106 | rc | #29 | <clear> |
walk_speed | #106 | rc | #29 | <clear> |
here_for_something | #106 | rc | #29 | <clear> |
hands | #107 | rc | #29 | <clear> |
wielding | #107 | rc | #29 | <clear> |
health | #107 | rc | #29 | 0 |
unarmed_weapon | #107 | rc | #29 | <clear> |
size | #107 | rc | #29 | <clear> |
posture | #107 | rc | #29 | <clear> |
gender | #107 | rc | #29 | <clear> |
respawn | #107 | rc | #29 | <clear> |
corpse | #107 | rc | #29 | <clear> |
has_proper_name | #107 | rc | #29 | <clear> |
die_msg | #107 | rc | #29 | <clear> |
body_parts | #107 | rc | #29 | <clear> |
wearing | #107 | rc | #29 | <clear> |
armor | #107 | rc | #29 | <clear> |
last_swing_message | #107 | rc | #29 | <clear> |
health_max | #107 | rc | #29 | <clear> |
fighting | #107 | rc | #29 | {} |
last_dodge_time | #107 | rc | #29 | <clear> |
following | #107 | rc | #29 | <clear> |
icon | #107 | rc | #29 | <clear> |
say_msg | #107 | rc | #29 | <clear> |
say_to_msg | #107 | rc | #29 | <clear> |
afterlife | #107 | rc | #29 | <clear> |
get_msg | #107 | rc | #29 | <clear> |
drop_msg | #107 | rc | #29 | <clear> |
blood | #107 | rc | #29 | <clear> |
squeals | #107 | rc | #29 | <clear> |
prc | #107 | rc | #29 | <clear> |
ppc | #107 | rc | #29 | <clear> |
poc | #107 | rc | #29 | <clear> |
psc | #107 | rc | #29 | <clear> |
pr | #107 | rc | #29 | <clear> |
pp | #107 | rc | #29 | <clear> |
po | #107 | rc | #29 | <clear> |
ps | #107 | rc | #29 | <clear> |
pq | #107 | rc | #29 | <clear> |
pqc | #107 | rc | #29 | <clear> |
brief | #107 | rc | #29 | <clear> |
knockout | #107 | rc | #29 | <clear> |
knockout_msg | #107 | rc | #29 | <clear> |
body | #107 | rc | #29 | <clear> |
wake_msg | #107 | rc | #29 | <clear> |
owake_msg | #107 | rc | #29 | <clear> |
oknockout_msg | #107 | rc | #29 | <clear> |
friends | #107 | rc | #29 | <clear> |
home | #107 | rc | #29 | <clear> |
respawn_msg | #107 | rc | #29 | <clear> |
move_action | #107 | rc | #29 | <clear> |
heart | #107 | rc | #29 | 0 |
last_heartbeat | #107 | rc | #29 | <clear> |
dead | #107 | rc | #29 | 1237677662 |
_tohit_next | #107 | rc | #29 | <clear> |
last_words_msg | #107 | rc | #29 | <clear> |
attacked | #107 | rc | #29 | <clear> |
opens_doors | #107 | rc | #29 | 1 |
movable_by_explosion | #107 | rc | #29 | <clear> |
obscured | #107 | rc | #29 | <clear> |
obscured_desc_msg | #107 | rc | #29 | <clear> |
cooldowns | #107 | rc | #29 | <clear> |
combat_rounds | #107 | rc | #29 | <clear> |
encumbrance | #107 | rc | #29 | <clear> |
respawn_handler | #107 | rc | #29 | <clear> |
distant_form_msg | #107 | rc | #29 | <clear> |
block_msg | #107 | rc | #29 | <clear> |
attack_on_block | #107 | rc | #29 | <clear> |
last_stunned | #107 | rc | #29 | <clear> |
nude_descs | #107 | rc | #29 | <clear> |
skills | #107 | rc | #29 | <clear> |
explode_msg | #107 | rc | #29 | <clear> |
death_listeners | #107 | rc | #29 | <clear> |
queue | #92 | r | #361 | {} |
preemptible | #92 | r | #361 | 1 |
executing | #92 | r | #361 | <clear> |
process_queue | #92 | r | #361 | <clear> |
help_msg | #92 | rc | #29 | list of 15{"A generic creature which does all the shit $monster does, and also looks after any $door. The $gatekeeper will open/close lock/unlock doors in the same room as it if their state varies from the desired state in .guarded_doors.", "", "$gatekeeper.guarded_doors ", " => {{OBJ door_objnum, BOOL open/closed state, BOOL locked/unlocked state}, ...}", "\t1 = open | 0 = closed", "\t1 = locked | 0 = unlocked", "", "$gatekeeper:_check_door($door) ", " - Makes sure a door is in the desired state.", "", "$gatekeeper:_check_for_guarded_doors() ", " - Checks for guarded doors in the .location to possibly rectify.", "", "$gatekeeper:suggest_next_action()", " - Makes a call to :_check_for_guarded_doors."} |
last_action | #92 | r | #361 | <clear> |
article | #92 | rc | #29 | <clear> |
last_last_action | #92 | rc | #29 | <clear> |
action_count | #92 | rc | #29 | <clear> |
aliases | #1 | rc | #29 | {"generic gatekeeper"} |
description | #1 | rc | #29 | <clear> |
object_size | #1 | r | #29 | {12078, 1298433821} |
hidden_verbs | #1 | rc | #29 | <clear> |
phelp_msg | #1 | rc | #29 | <clear> |
weight | #1 | rc | #29 | <clear> |
owner_verbs | #1 | rc | #29 | <clear> |
plural_name | #1 | rc | #29 | <clear> |
client_image | #1 | rc | #29 | <clear> |
listening | #1 | rc | #29 | <clear> |
Ancestry
Ancestors (nearest first): #142 generic monster → #106 generic NPC → #154 generic living creature → #107 generic creature → #92 generic actor → #1 root
Children: none
Call graph
Source
_check_door
Referenced by
- #143:_check_for_guarded_doors line 4:
this:_check_door
Source
1{door} = args; 2here = this.location; 3for doorspec in (this.guarded_doors) 4if (doorspec[1] == door) 5{door, aperturestate, lockstate} = doorspec; 6if ((time() - this.last_answer_time) > this.wait_threshhold) 7if (((aperturestate != door.open) && (!door:_is_locked())) && door.operational) 8verb = aperturestate ? "open" | "close"; 9actionspec = {door, {verb}}; 10return actionspec; 11endif 12if (((lockstate != door:_is_locked()) && (!door.open)) && door.operational) 13verb = lockstate ? "lock" | "unlock"; 14for lock in (door:occupants($lock)) 15if ((lock:_can_be_unlocked_by(this) && lock.operational) && (lock:locked() != lockstate)) 16actionspec = {door, {verb}}; 17return actionspec; 18endif 19endfor 20endif 21if (!door.operational) 22actionspec = {$actions.repair, {door}, 1, "repair " + door.name}; 23return actionspec; 24endif 25for lock in (door:occupants($lock)) 26if (!lock.operational) 27actionspec = {$actions.repair, {door}, 1, "repair " + door.name}; 28return actionspec; 29endif 30endfor 31endif 32endif 33endfor
_check_for_guarded_doors
Referenced by
- #143:suggest_next_action line 8:
this:_check_for_guarded_doors
Source
1for each in (this.guarded_doors) 2door = each[1]; 3if (door.location == this.location) 4return this:_check_door(door); 5endif 6endfor
suggest_next_action
Referenced by
none
Source
1if (r = this:_fight()) 2return {r, 0}; 3elseif (r = this:_aggression()) 4return {r, 0}; 5elseif (r = this:_scavenge()) 6this.lastaction = "s"; 7return {r, 2}; 8elseif (r = this:_check_for_guarded_doors()) 9this.lastaction = "g"; 10return {r, 3}; 11elseif (r = this:_comment()) 12this.lastaction = "c"; 13return {r, 10}; 14elseif (r = this:_wander()) 15this.lastaction = "w"; 16return {r, this.wander_speed}; 17endif
give_keys_to
Referenced by
none
Source
1actor = args[1]; 2for each in (this.contents) 3if ($ou:isa(each, $key)) 4this:give_to(each, actor); 5return each; 6endif 7endfor
hear_event_pick
Referenced by
none
Source
1{start_finish, object, actor, cl} = args; 2if ((random() % 100) >= this.attack_lockpickers_chance) 3if (start_finish == 1) 4actor:tell($su:ps(this.lockpick_msg, actor, this, this.location)); 5this.location:announce_all_but({actor}, $su:ps(this.olockpick_msg, actor, this, this.location)); 6this:start_fighting(actor); 7endif 8endif
hear_event_knock
Referenced by
none
Source
1who = args[3]; 2door = args[4][1]; 3if (this.answer_doors) 4answer = 0; 5for x in (this.guarded_doors) 6if (x[1] == door) 7answer = 1; 8endif 9endfor 10if (answer) 11if (this:answer_door_for(who)) 12this:queue_action(door, {"open"}); 13this.last_answer_time = time(); 14endif 15endif 16endif
answer_door_for
Referenced by
- #143:hear_event_knock line 11:
this:answer_door_for
Source
1who = args[1]; 2return 1;
_wander
Referenced by
- #143:suggest_next_action line 14:
this:_wander
Source
1door = this.guarded_doors[1][1]; 2if (this.location != door.location) 3return {this.move_action, {this.location:next_hop_to(door.location)}, 1, ""}; 4this:jumpstart(); 5else 6return pass(args); 7endif
_brainscan
Referenced by
none
Source
1pass(who = args[1]); 2if (d = this.guarded_doors) 3nd = {}; 4for x in (d) 5if (x[1].location == this.location) 6nd = {@nd, x[1]}; 7endif 8endfor 9if (nd) 10this:_whisper(who, "I can't let anyone get through ", $su:english_list($lu:map_verb(nd, "dname")), "."); 11endif 12endif