RPG RDB room #1610
Aliases: RPG RDB room
26 verbs · 23 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
set_room_flag | this none this | | #1610 | 16 |
get_room_flags | this none this | | #1610 | 2 |
clear_room_flag | this none this | | #1610 | 18 |
clear_room_flags | this none this | | #1610 | 4 |
get_weather_zone | this none this | | #1610 | 8 |
set_weather_zone | this none this | | #1610 | 18 |
description | this none this | | #1610 | 24 |
enterfunc | this none this | | #1610 | 77 |
magic_effect | this none this | | #1610 | 117 |
combat_effect | this none this | | #1610 | 39 |
set_show_weather | this none this | | #1610 | 6 |
show_weather | this none none | rxd | #1610 | 5 |
get_weather | this none this | | #1610 | 3 |
hidden_verbs | this none this | | #1610 | 6 |
ok | this none this | | #1610 | 14 |
check_lights(obsolete) | this none this | | #1610 | 20 |
add_light(obsolete) | this none this | | #1610 | 11 |
relight | this none this | | #1610 | 19 |
illuminance | this none this | | #1610 | 9 |
recalc_illum | this none this | | #1610 | 19 |
resting sleeping | this none this | | #1610 | 1 |
slight_change_msgs light_change_msgs darken_change_msgs lighter_doll_msgs darker_doll_msgs | this none this | | #1610 | 2 |
announce_light | this none this | | #1610 | 28 |
dark_description | this none this | rx | #1610 | 4 |
announce_peaceful | this none this | | #1610 | 10 |
peace_msg opeace_msg | this none this | | #1610 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
room_data | #1610 | r | — | {} |
weather_zone | #1610 | r | — | 0 |
show_weather | #1610 | r | — | 0 |
lights | #1610 | r | — | {} |
illuminance | #1610 | r | — | 0 |
light | #1610 | r | — | 0 |
last_light | #1610 | r | — | 0 |
room_lumens | #1610 | r | — | 0 |
light_change_msgs | #1610 | r | — | value (478 chars){"%N's %source provides only a feeble glow.", "Shadows are cast about %room by the pitiful %source.", "%room is slightly illuminated by %n's flickering %source.", "You can almost see %room clearly in the light.", "The light from %n's %source allows you to see details quite clearly.", "%room is well lit by the strong light from %n's %source.\"", "%room is completely lit by %n's %source.", "%room is flooded with the blinding light emanating from the powerful light source.\""} |
darken_change_msgs | #1610 | r | — | value (294 chars){"%room is cast into darkness.", "%room is now only feebly lit.", "Shadows loom darkly in %room.", "%room darkens considerably.", "You can almost see %room clearly in the light.", "You can still see details of %room quite clearly.", "%room is still well lit.", "%room is still completely lit."} |
slight_change_msgs | #1610 | r | — | {"%room becomes slightly dimmer.", "%room becomes slightly brighter."} |
lighter_doll_msgs | #1610 | r | — | value (502 chars){"%N's lightsource provides only a feeble glow.", "Shadows are cast about %room by the pitiful lightsource.", "%room is slightly illuminated by %n's flickering lightsource.", "You can almost see %room clearly in the light.", "The light from %n's lightsource allows you to see details quite clearly.", "%room is well lit by the strong light from %n's lightsource.\"", "%room is completely lit by %n's lightsource.", "%room is flooded with the blinding light emanating from the powerful light source.\""} |
darker_doll_msgs | #1610 | r | — | value (294 chars){"%room is cast into darkness.", "%room is now only feebly lit.", "Shadows loom darkly in %room.", "%room darkens considerably.", "You can almost see %room clearly in the light.", "You can still see details of %room quite clearly.", "%room is still well lit.", "%room is still completely lit."} |
peace_msg | #1610 | rc | — | "" |
opeace_msg | #1610 | rc | — | "%N %<draws> back %p weapon, preparing to lunge for %d. Suddenly, a look of calm melts %p angry features into an expression of cosmic warmth. %N %<says>, \"I love you, %d.\" You feel so peaceful." |
enabled | #1610 | | — | 1 |
residents | #1610 | | — | {#102, #82, #259} |
free_entry | #1610 | | — | 0 |
entrances | #1610 | | — | not readable (E_PERM) |
exits | #1610 | | — | not readable (E_PERM) |
key | #1610 | | — | not readable (E_PERM) |
aliases | #1610 | | — | {"RPG RDB room"} |
object_size | #1610 | | — | {27638, 1141286558} |
Ancestry
Ancestors (nearest first): #364 outside room → #6792 Generic Integrating Description Room → #3879 Matching Room → #27777 Self-Cleaning Room
Children: #258 Generic Dungeon Room
Call graph
Source
set_room_flag
Referenced by
none
Source
1":set_room_flag(<flag>) => Add <flag> to the list of room flags, if its an appropriate flag, then add other flags that that flag requires."; 2rdb = $local.rpg.room_db; 3rdb:protected(); 4{flag} = args; 5if (!(loc = flag in rdb.flag_names)) 6 return E_INVARG; 7endif 8flags = this.room_data; 9for excluded in (rdb.flag_exclude[loc]) 10 flags = setremove(flags, excluded); 11endfor 12for required in (rdb.flag_depend[loc]) 13 flags = setadd(flags, required); 14endfor 15flags = setadd(flags, flag); 16return this.room_data = flags;
get_room_flags
Referenced by
- #1610:magic_effect line 11:
this:get_room_flags - #1610:combat_effect line 9:
this:get_room_flags - #1610:show_weather line 3:
this:get_room_flags
Source
1":get_room_flags() => returns a list of flags on the room i.e {\"underwater\", \"cavern\"}"; 2return this.room_data;
clear_room_flag
Referenced by
none
Source
1":clear_room_flag(<flag>) => remove <flag> from the rooms flags, if its in there. Also remove any other flags that depend on it on. Returns the state of the rooms flags."; 2rdb = $local.rpg.room_db; 3rdb:protected(); 4rdb:wait_for_tasks(); 5{flag} = args; 6flags = this.room_data; 7names = rdb.flag_names; 8if ((!flag) in names) 9 return E_INVARG; 10endif 11depends = rdb.flag_depend; 12for n in [1..length(depends)] 13 if (flag in depends[n]) 14 flags = setremove(flags, names[n]); 15 endif 16endfor 17flags = setremove(flags, flag); 18return this.room_data = flags;
clear_room_flags
Referenced by
none
Source
1":clear_room_flags() => clears the room flags."; 2rdb = $local.rpg.room_db; 3rdb:protected(); 4this.room_data = {};
get_weather_zone
Referenced by
- #1610:show_weather line 4:
this:get_weather_zone
Source
1":get_weather_zone() = > get the name of the rooms weather zone."; 2rpg = $local.rpg; 3rdb = rpg.room_db; 4rdb:wait_for_tasks(); 5if (this.weather_zone) 6 return rdb.zone_names[this.weather_zone]; 7endif 8return "none";
set_weather_zone
Referenced by
none
Source
1":set_weather_zone(<zone name>) => Sets the weather zone of the room. none means no weather zone."; 2rdb = $local.rpg.room_db; 3rdb:protected(); 4rdb:wait_for_tasks(); 5zone = args[1]; 6if (typeof(zone) == STR) 7 if (!(zone == "none")) 8 zonenum = zone in rdb.zone_names; 9 if (!zonenum) 10 return E_INVARG; 11 endif 12 else 13 zonenum = 0; 14 endif 15else 16 return E_TYPE; 17endif 18return this.weather_zone = zonenum;
description
Referenced by
- #1131:look_self line 1:
this:description - #10161:description line 1:
pass( - #16070:description line 5:
pass(
Source
1":description() => Add the weather to the rooms .description."; 2rpg = $local.rpg; 3if ((callers()[$][2] in {"@exam", "@examine"}) && (!(player in {@rpg.gms, @rpg.wannabees}))) 4 player:tell("Use 'examine' rather than '@examine' to look at LambdaRPG rooms."); 5 kill_task(task_id()); 6endif 7if (valid(doll = rpg:get_doll(player))) 8 if (blind_msg = doll:cannot_see()) 9 return (("lighting" in this.room_data) && (this.illuminance < 1)) ? this:dark_description() | blind_msg; 10 endif 11elseif (("lighting" in this.room_data) && (this.illuminance < 1)) 12 return this:dark_description(); 13endif 14desc = pass(@args); 15rdb = rpg.room_db; 16if (this.weather_zone && this.show_weather) 17 weather = this:get_weather(); 18 w_desc = `this:weather_desc(weather) ! ANY => rdb:default_weather_desc(weather)'; 19 if (typeof(w_desc != STR)) 20 else 21 desc = `(desc + " ") + w_desc ! ANY => {@desc, w_desc}'; 22 endif 23endif 24return desc;
enterfunc
Referenced by
- #258:enterfunc line 5:
pass(
Source
1"Kill storms and windwalls if entering an inappropriate room. Add victim to drowning list, if underwater."; 2{what} = args; 3pass(what); 4(rpg = $local.rpg):secure_stack(2); 5rpg:s_i_n(0); 6{rdb, mdb, odb, l_u, t_u} = {rpg.room_db, rpg.magic_db, rpg.object_db, $list_utils, $time_utils}; 7flags = this.room_data; 8if (valid(doll = rpg:get_doll(what))) 9 if ("lighting" in flags) 10 if ("outdoors" in flags) 11 {abacus, Sun, Moon} = odb.ephemeris; 12 day = max(t_u:sun(), 0); 13 if ((Sun in this.lights) && (!day)) 14 this.lights = setadd(setremove(this.lights, Sun), Moon); 15 this:recalc_illum(); 16 elseif ((Moon in this.lights) && day) 17 this.lights = setadd(setremove(this.lights, Moon), Sun); 18 this:recalc_illum(); 19 endif 20 endif 21 (doll.lights && (what.location == this)) && this:relight(doll, 1); 22 endif 23 if ("tavern" in flags) 24 odb.natweap_db:add_natweap(doll, odb.pirate_brawling, 2); 25 endif 26 if ("submerged" in flags) 27 if (mdb:storms_cast_by(what)) 28 mdb:kill_storm(what, "silent"); 29 rpg:playertell(what, "Your conjured weather dissipates in the water."); 30 rpg:rpg_announce_all_but(this, {what}, "The conjured weather summoned by ", what.name, " dissipates in the water."); 31 endif 32 if (x = l_u:iassoc("unwind", sch = doll.schedule, 2)) 33 doll:cancel(sch[x]); 34 mdb.ww_combat_effect:remove(doll); 35 rpg:playertell(what, "Your windwall dissipates in the water."); 36 rpg:rpg_announce_all_but(this, {what}, "The windwall surrounding ", what.name, " dissipates in the water."); 37 endif 38 if (x = l_u:iassoc("bite", sch = doll.schedule, 2)) 39 doll:cancel(sch[x]); 40 mdb.bc_combat_effect:remove(doll); 41 rpg:say_action("The cloud of insects surrounding %n disperses."); 42 endif 43 if (x = l_u:iassoc("unbackfire", sch = doll.schedule, 2)) 44 doll:cancel(sch[x]); 45 rpg.magic_db.bf_combat_effect:remove(doll); 46 rpg:say_action("The aura of flame about %n is extinguished.", what); 47 endif 48 `rpg.user_utils.griffen.tides_db:do_entrance(what) ! ANY'; 49 elseif (("cavern" in flags) || ("structure" in flags)) 50 window = $nothing; 51 for t in (`this:exits() ! ANY => {}') 52 if ("outdoors" in `t.dest.room_data ! ANY => {}') 53 window = t; 54 break t; 55 endif 56 endfor 57 if (valid(window) && mdb:storms_cast_by(what)) 58 rpg:playertell(what, "Your conjured storm swirls madly outside."); 59 rpg:rpg_announce_all_but(this, {what}, "The conjured weather summoned by ", what.name, " howls just outside."); 60 elseif (mdb:storms_cast_by(what)) 61 mdb:kill_storm(what, "silent"); 62 rpg:playertell(what, "Your conjured weather dissipates in the enclosed area."); 63 rpg:rpg_announce_all_but(this, {what}, "The conjured weather summoned by ", what.name, " quickly dissipates in the enclosed area."); 64 endif 65 elseif ((("swamp" in flags) && (is_player(what) || (!("swamp_thing" in what.flags)))) && (!((mire = odb.mired_effect) in doll.combat_effects))) 66 rpg:playertell(what, "Your feet sink into the ", {"boggy", "muddy", "swampy", "oozy", "mucky"}[random($)], " ground."); 67 mire:add(doll); 68 endif 69elseif (is_player(what)) 70 rpg.object_db.recruit:maybe_offer(what); 71endif 72"Mooshie (#106469) - Fri Dec 26, 1997 - Added Griff's tide_db hook."; 73"Mooshie (#106469) - Fri Jan 2, 1998 - Updated security, de-ticking."; 74"Profane (#30788) - Sat Aug 22, 1998 - Biting clouds go away underwater, and more deticking."; 75"Profane (#30788) - Sun May 2, 1999 - backfire goes away underwater."; 76"THX (#105941) - Mon Jul 3, 2000 - Altered so that players can control a storm even if they are inside a structure/cavern _IF_ that structure is right next to an outdoor area. i.e., the storm rages just outside. Lightning qual is weakened in sheltered areas in rpg.magic_db:blast."; 77"THX (#105941) - Sat Mar 31, 2001 - Added a hack for the room lighting stuff.";
magic_effect
Referenced by
- #258:magic_effects line 36:
this:magic_effect
Source
1":magic_effect(<caster>, <qual>, <skill>, <target>) => returns a value, negative for increased magic, positive for decrease, based on stats of the room. Also will notify the caster of what might be messing with their spells."; 2(rpg = $local.rpg):secure(); 3{caster_doll, qual, skill, target_doll} = args; 4caster = caster_doll.character; 5if (rpg.magic_db.en_combat_effect in caster_doll.magic_effects) 6 caster:tell("The constricting vines prevent you from using your spell foci properly."); 7 return 500; 8endif 9rdb = rpg.room_db; 10spell = `skill.aliases[1] ! ANY => skill'; 11flags = this:get_room_flags(); 12if (this.weather_zone) 13 weather = rdb.zone_weather[this.weather_zone]; 14else 15 weather = "none"; 16endif 17strings = {}; 18spell_num = spell in {"biting_cloud", "waterwhip", "iceshell", "storm", "windwall", "stinkcloud", "calm", "predict", "firebolt", "heat"}; 19if ((spell_num == 0) || (weather == "none")) 20 value = 0; 21elseif (n = weather in {"chilly", "flakes", "snow", "blizzard"}) 22 word = "freezing weather"; 23 value = n * {-8, 1, 10, -10, 2, -2, -3, -1, -8, -8}[spell_num]; 24elseif (n = weather in {"sun", "hot", "muggy"}) 25 word = "balmy weather"; 26 value = n * {6, -1, -8, -4, 0, 1, 4, 1, 1, 2}[spell_num]; 27elseif (n = weather in {"cloudy", "overcast"}) 28 word = "drifting clouds"; 29 value = n * {0, 0, 0, 1, 0, 0, 0, 0, 0, 0}[spell_num]; 30elseif (n = weather in {"breeze", "wind", "gusts"}) 31 word = "wind"; 32 value = n * {-6, 0, 0, 1, 6, -10, -2, -2, 0, 0}[spell_num]; 33elseif (n = weather in {"drizzle", "rain", "downpour"}) 34 word = "rainy weather"; 35 value = n * {-10, 10, 1, 4, 1, -8, -2, -1, -6, -3}[spell_num]; 36elseif (weather in {"sleet", "hail"}) 37 word = "icy precipitation"; 38 value = {-30, 8, 20, 2, -1, -15, -8, -4, -20, -15}[spell_num]; 39elseif (n = weather in {"thunder", "storm", "tempest"}) 40 word = "stormy weather"; 41 value = n * {-10, 8, 1, 10, 4, -6, -5, -2, -6, -3}[spell_num]; 42elseif (n = weather in {"mist", "fog"}) 43 word = "misty air"; 44 value = n * {2, 2, 2, -10, -10, 4, 5, 0, 0, 0}[spell_num]; 45else 46 word = "<error>"; 47 value = 0; 48endif 49if (value > 1) 50 strings = setadd(strings, ("Your spell draws energy from the " + word) + "."); 51elseif (value < -1) 52 strings = setadd(strings, ("The " + word) + " interferes with your spell."); 53endif 54if ("outdoors" in flags) 55 mark = spell in {}; 56 if (mark) 57 value = value + {}[mark]; 58 endif 59endif 60if ("cavern" in flags) 61 mark = spell in {"hail", "storm", "stinkcloud", "windwall"}; 62 if (mark) 63 value = value + {10, -200, -10, -10}[mark]; 64 if (value > 0) 65 strings = setadd(strings, "Your magic draws upon the surrounding rocks for power."); 66 else 67 strings = setadd(strings, "The enclosed area interferes with the casting of the spell."); 68 endif 69 endif 70endif 71if ("structure" in flags) 72 mark = spell in {"storm", "windwall", "stinkcloud"}; 73 if (mark) 74 value = value + {-200, -10, -10}[mark]; 75 strings = setadd(strings, "The enclosed area interferes with the casting of the spell."); 76 endif 77endif 78if ("wet" in flags) 79 mark = spell in {"waterwhip", "iceshell"}; 80 if (mark) 81 value = value + {10, 10}[mark]; 82 strings = setadd(strings, "The dampness of the area feeds energy into the spell."); 83 endif 84endif 85if ("submerged" in flags) 86 mark = spell in {"firebolt", "heat", "biting_cloud", "storm", "windwall", "stinkcloud", "hail", "calm", "predict", "backfire", "parch"}; 87 if (mark) 88 value = value + {-200, -50, -200, -200, -200, -200, -50, -200, -200, -200, -200}[mark]; 89 strings = setadd(strings, "The water interferes with the spell."); 90 endif 91endif 92if ("blessed" in flags) 93 if (spell in {"biting_cloud", "iceshell", "storm", "stinkcloud", "firebolt", "heat", "hail", "shatter", "depress", "stealskill", "wound", "drain"}) 94 value = value - 20; 95 strings = setadd(strings, "The flows of magic in this blessed place are not well suited to aggressive spells."); 96 elseif (spell in {"heal", "windwall", "forcewall", "lifelink"}) 97 value = value + 20; 98 strings = setadd(strings, "Your spell draws energy from the peaceful magic of this area."); 99 endif 100endif 101if ("damned" in flags) 102 if (spell in {"biting_cloud", "iceshell", "storm", "stinkcloud", "firebolt", "heat", "hail", "shatter", "depress", "stealskill", "wound", "drain"}) 103 value = value + 20; 104 strings = setadd(strings, "Your destructive spell is empowered by the dark forces that permeate this area."); 105 elseif (spell in {"heal", "windwall", "forcewall", "lifelink"}) 106 value = value - 20; 107 strings = setadd(strings, "The evil aura of this fell place interferes with your spell."); 108 endif 109endif 110value = value - this.magic_effect; 111if (strings) 112 caster:tell($list_utils:random_element(strings)); 113endif 114"if (-value > qual)"; 115" caster:tell(\"Nothing happens.\");"; 116"endif"; 117return -value;
combat_effect
Referenced by
- #258:combat_effects line 36:
this:combat_effect
Source
1":room_combat_effect(by, target, weapon) => returns a value based on inhibition of attacker by rooms stuff. Maybe integrate?"; 2rpg = $local.rpg; 3if (!rpg:trusted(caller_perms())) 4 return E_PERM; 5endif 6rdb = rpg.room_db; 7{by, target, weapon} = args; 8by_doll = rpg:get_doll(by); 9flags = this:get_room_flags(); 10value = 0; 11strings = {}; 12if ("peaceful" in flags) 13 this:announce_peaceful(@args); 14 return E_NACC; 15elseif ("submerged" in flags) 16 if (is_player(by) && (!(parent(weapon) in rdb.seaworthy_weapon_parents))) 17 value = value - (weapon.blunt ? 60 | 20); 18 by_doll:check_fatigue(random(12)); 19 strings = setadd(strings, ("It's hard to use your " + weapon.name) + " underwater."); 20 else 21 value = value + 10; 22 endif 23endif 24if ("dim" in flags) 25 value = value - 15; 26 strings = setadd(strings, "It's a little bit difficult to see your foe in the dim light."); 27elseif ("dark" in flags) 28 value = value - 40; 29 strings = setadd(strings, "It's hard to hit your foe when it's this dark."); 30endif 31if (("sun-lit" in flags) && (rdb:time_of_day() == "night")) 32 value = value - 10; 33 strings = setadd(strings, "The darkness of night makes your foe a little hard to see."); 34endif 35if (strings) 36 by:tell($list_utils:random_element(strings)); 37endif 38return value; 39"Mooshie (#106469) - Sun Mar 3, 2002 - Added check for 'peaceful' flag. Streamline verb a lil' bit.";
set_show_weather
Referenced by
none
Source
1"Cruddy hacks to allow other GMs to set the .show_weather prop. Sets this.show_weather to args[1]"; 2if ($local.rpg.room_db:trusted(caller_perms()) || (caller_perms() == this.owner)) 3 return this.show_weather = args[1]; 4else 5 return E_PERM; 6endif
show_weather
Referenced by
none
Source
1"Give information about Room database flags on the room."; 2player:tell("----------- Report on ", this.name, " ", tostr(this), " -----------"); 3player:tell("Flags set: ", $string_utils:english_list(this:get_room_flags()), "."); 4player:tell("Weather zone: ", this:get_weather_zone(), "."); 5player:tell("----------- End of show ------------");
get_weather
Referenced by
- #1610:description line 17:
this:get_weather
Source
1$local.rpg.room_db:cycle(); 2return $local.rpg.room_db.zone_weather[this.weather_zone]; 3"Profane (#30788) - Sat Apr 14, 2001 - new cycle paradigm here.";
hidden_verbs
Referenced by
- #258:hidden_verbs line 2:
pass(
Source
1{who} = args; 2prev = pass(who); 3if (!$local.rpg:trusted(who)) 4 prev = {@prev, {$local.rpg.room_db.room_parent, "show", {"this", "none", "none"}}}; 5endif 6return prev;
ok
Referenced by
none
Source
1"An object is 'OK' for inclusion in the room's desc if it has some sort of look_msg"; 2"If the message is a string it gets included."; 3"If it's a non-string the object is invisible (must be owned by the room's owner, or a resident)."; 4"A blank look_msg or .enabled<=0 suppresses players being included."; 5{k} = args; 6if (($object_utils:has_callable_verb(k, "look_msg") && (y = k:look_msg())) || ($object_utils:has_property(k, "look_msg") && (y = k.look_msg))) 7 if (is_player(k) && ((this.enabled <= 0) || (!$string_utils:strip_chars(tostr(y), " ")))) 8 return 0; 9 elseif ((k.owner == this.owner) || (k in this.residents)) 10 return (typeof(y) == STR) ? 1 | ((typeof(y) == OBJ) ? -1 | 0); 11 else 12 return (typeof(y) == STR) && 1; 13 endif 14endif
check_lights(obsolete)
Referenced by
none
Source
1"Usage: check_lights()"; 2"Sets this.light to reflect light in the room and on dolled objects in the room."; 3(rpg = $local.rpg):secure(); 4for light in (this.lights) 5 try 6 if (valid(doll = rpg:get_doll(light))) 7 total = total + doll.room_light; 8 elseif (rpg:trusted_verb(light, "room_light")) 9 if (typeof(result = light:room_light(total, sofar)) == INT) 10 total = total + result; 11 sofar = {@sofar, light}; 12 endif 13 else 14 this.lights = setremove(this.lights, light); 15 endif 16 except (ANY) 17 this.lights = setremove(this.lights, light); 18 endtry 19endfor 20return this.light = total;
add_light(obsolete)
Referenced by
none
Source
1"Usage: add_light(OBJ light source | PC) => Adds light (or lights on PC) to room"; 2" remove_light(OBJ light source | PC) => Removes object lights from room"; 3(rpg = $local.rpg):secure(); 4{what} = args; 5if (verb == "add_light") 6 this.lights = setadd(this.lights, what); 7else 8 this.lights = setremove(this.lights, what); 9endif 10"this:check_lights();"; 11return this.lights;
relight
Referenced by
- #258:exitfunc line 17:
this:relight - #1610:enterfunc line 21:
this:relight
Source
1"Usage: relight(OBJ lightsource | doll, BOOLEAN add/remove) => Adds|Removes lightsource (or lighted doll) to|from room.lights and recalculates room illuminance."; 2{source, add} = args; 3(rpg = $local.rpg):secure(); 4if (add) 5 if (source in this.lights) 6 return; 7 elseif (source:lumens(this)) 8 this.lights = setadd(this.lights, source); 9 else 10 return; 11 endif 12elseif (source in this.lights) 13 this.lights = setremove(this.lights, source); 14else 15 return; 16endif 17this:recalc_illum(); 18this:announce_light(source, add); 19"THX (#105941) - Sat Mar 31, 2001 - Added.";
illuminance
Referenced by
none
Source
1{doll} = args; 2raw = this.(prop); 3if (raw < THRESHOLD_VALUE_WHICH_I_HAVE_NOT_FIGURED_OUT_YET) 4 for t in (doll.lights) 5 raw = raw + `t:infrared(this, raw) ! E_VERBNF => 0'; 6 endfor 7endif 8return raw; 9"THX (#105941) - Sat Mar 31, 2001 - Added";
recalc_illum
Referenced by
- #1610:enterfunc line 15:
this:recalc_illum - #1610:enterfunc line 18:
this:recalc_illum - #1610:relight line 17:
this:recalc_illum
Source
1(rpg = $local.rpg):secure(); 2lumens = this.room_lumens; 3for t in (this.lights) 4 curr = `t:lumens(this) ! E_VERBNF'; 5 if (curr) 6 lumens = lumens + curr; 7 else 8 this.lights = setremove(this.lights, t); 9 endif 10endfor 11"Gonna have to think about the following line ... This is some characteristic cross-sectional thingummy of the room."; 12reynolds_number = max(toint(sqrt(tofloat(`this.space ! ANY => 999'))), 1); 13this.illuminance = min(lumens / reynolds_number, 100); 14if (player in rpg.grand_masters) 15 rpg:playertell_lines(player, {tostr(#20:nn(this), " ", this.illuminance, " ", #20:nn(this.lights)), tostr(#20:nn(doll = rpg:get_doll(player)), " ", doll.illuminance, " ", #20:nn(doll.lights))}); 16endif 17(this in rpg.dark_rooms) && this:illumination_check(); 18"THX (#105941) - Sat Mar 31, 2001 - Added."; 19"THX (#105941) - Sun Apr 1, 2001 - Grandparent protection for the interim.";
resting sleeping
Referenced by
- #258:match_exit line 4:
this:sleeping - #258:match_exit line 7:
this:resting - #258:emote line 8:
this:sleeping - #258:emote line 11:
this:sleeping
Source
1return args ? 0 | {};
slight_change_msgs light_change_msgs darken_change_msgs lighter_doll_msgs darker_doll_msgs
Referenced by
- #1610:announce_light line 11:
this:slight_change_msgs
Source
1{source, slot} = args; 2return this.(verb)[slot];
announce_light
Referenced by
- #1610:relight line 18:
this:announce_light
Source
1{source, add} = args; 2(rpg = $local.rpg):secure(); 3if (valid(source)) 4 illum = this.illuminance; 5 prev = this.last_light; 6 factor = (illum + 5) / 10; 7 priori = (prev + 5) / 10; 8 if (factor == priori) 9 return; 10 elseif (abs(factor - priori) == 1) 11 msg = this:slight_change_msgs(source, add + 1); 12 elseif (add) 13 msg = this:((source in rpg.dolls) ? "lighter_doll_msgs" | "light_change_msgs")(source, factor); 14 else 15 msg = this:((source in rpg.dolls) ? "darker_doll_msgs" | "darken_change_msgs")(source, factor); 16 endif 17 msg = strsub(msg, "%source", source.name); 18 msg = strsub(msg, "%room", this.name); 19 if (source.location in rpg.pcs) 20 rpg:say_action(msg, source.location); 21 else 22 msg = strsub(msg, "%n's", "the"); 23 msg = strsub(msg, "%N's", "The"); 24 rpg:rpg_announce_all_but(this, {source}, msg); 25 endif 26endif 27this.last_light = this.illuminance; 28"THX (#105941) - Fri Jun 29, 2001 - Changed to call for *_msgs verb including 'source' for possible customization by builders.";
dark_description
Referenced by
- #1610:description line 9:
this:dark_description - #1610:description line 12:
this:dark_description
Source
1desc = this:read_misc_note("dark_description"); 2desc = (typeof(desc) != ERR) ? desc | ""; 3return desc || "It is too dark to see."; 4"THX (#105941) - Fri Jun 29, 2001 - If set +d, this verb will crash E_VERBNF unless on child of $local.rpg.dungeon. But #1610 will never be set with lighting on anyway. I could move the misc_notes and related verbs to #1610, but we can do that if it becomes unwieldy. Feh.";
announce_peaceful
Referenced by
- #1610:combat_effect line 13:
this:announce_peaceful
Source
1{by, target, weapon} = args; 2if (msg = this:peace_msg(@args)) 3 by:tell(msg); 4endif 5if (!(omsg = this:opeace_msg(@args))) 6elseif (msg) 7 this:announce_all_but({by}, this:opeace_msg(@args)); 8else 9 $local.rpg:say_action(omsg, @args); 10endif
peace_msg opeace_msg
Referenced by
- #1610:announce_peaceful line 2:
this:peace_msg - #1610:announce_peaceful line 5:
this:opeace_msg - #1610:announce_peaceful line 7:
this:opeace_msg
Source
1{by, target, weapon} = args; 2return $string_utils:pronoun_sub(this.(verb), by, weapon, this, target);