Architect Class #8

Parent #6Owner #10Flags fertileSource MurpgCore-0.4/MurpgCore-0.4.db

5 verbs · 72 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
propsany none nonerwd#844
editany none nonerwd#840
des*ignany any anyrwd#815
who_stringthis none thisrwxd#835
sa*yany any anyrwd#817

Properties

PropertyDefinerFlagsOwnerValue
owned_objects#8rw#10{}
editing_prop#8rw#10""
editing_obj#8rw#10#-1
editing_loc#8rw#10#-1
insert_point#8rw#100
prompt_on#6rw#10<clear>
color#3rw#10<clear>
base_hear#3rw#10<clear>
base_see#3rw#10<clear>
base_smell#3rw#10<clear>
prompt_string#3rw#10<clear>
base_hp#3rw#10<clear>
cur_hp#3rw#10<clear>
password#3rw#10<clear>
messages#3rw#10<clear>
base_feel#3rw#10<clear>
base_taste#3rw#10<clear>
known_languages#3rw#10<clear>
current_language#3rw#10<clear>
gender#3rw#10<clear>
afk#3rw#10<clear>
base_str#3rw#10<clear>
base_int#3rw#10<clear>
base_hea#3rw#10<clear>
base_spd#3rw#10<clear>
base_cnc#3rw#10<clear>
held#3rw#10<clear>
help_db#3rw#10#30
wielded#3rw#10<clear>
worn#3rw#10<clear>
species#3rw#10<clear>
height#3rw#10<clear>
current_channels#3rw#10{"design"}
position#3rw#10<clear>
consciousness#3rw#10<clear>
base_ac#3rw#10<clear>
skills#3rw#10<clear>
base_dex#3rw#10<clear>
base_con#3rw#10<clear>
combat_stance#3rw#10<clear>
known_players#3rw#10<clear>
targets#3rw#10<clear>
last_connected#3rw#10<clear>
combat_init#3rw#10<clear>
combat_weapon#3rw#10<clear>
base_endurance#3rw#10<clear>
cur_endurance#3rw#10<clear>
base_focus#3rw#10<clear>
cur_focus#3rw#10<clear>
current_spell#3rw#10<clear>
paths#3rw#10<clear>
prompt_colors#3rw#10<clear>
finished#3rw#10<clear>
full_name#3rw#10<clear>
total_points#3rw#10<clear>
form_members#3rw#10<clear>
leader#3rw#10<clear>
start_location#3rw#10<clear>
description#1rw#10<clear>
aliases#1rw#10<clear>
home#1rw#10<clear>
short_desc#1rw#10<clear>
core#1rw#101
handedness#1rw#10<clear>
base_enc#1rw#10<clear>
base_weight#1rw#10<clear>
capacity#1rw#10<clear>
max_fit#1rw#10<clear>
pprep#1rw#10<clear>
gprep#1rw#10<clear>
generic_name#1rw#10<clear>
age#1rw#10<clear>

Ancestry

Ancestors (nearest first): #6 Player Class#3 Animate Class#11 Game Class#1 Root Class

Children: #9 Coder Class

Call graph

calls n8_0 #8:props n3_2 #3:tell n8_0->n3_2 n3_86 #3:match n8_0->n3_86 n20_6 #20:sort n8_0->n20_6 n3_8 #3:tell_raw n8_0->n3_8 n8_1 #8:edit n8_1->n3_2 n20_0 #20:parse_prop_ref n8_1->n20_0 n1_4 #1:move_to n8_1->n1_4 n8_2 #8:des*ign n8_2->n3_2 n1_6 #1:descendants n8_2->n1_6 n8_4 #8:sa*y n8_4->n3_2 n3_12 #3:sa*y n8_4->n3_12

Source

props

Spec any none noneFlags rwdOwner #10Definer #8

Referenced by

none

Source

1"$architect:props any none none";
2{?target = ""} = args;
3if (length(target) == 0)
4player:tell("Display properties for what object?");
5else
6result = player:match(target);
7if (result == {})
8player:tell(("%W" + target) + "%w is not a valid object reference.");
9elseif (length(result) > 1)
10x = 1;
11player:tell(("Which %W" + target) + "%w do you mean?");
12for each in (result)
13player:tell(((((tostr(x) + ":  ") + each.name) + " (") + tostr(each)) + ")");
14x = x + 1;
15endfor
16else
17target = result[1];
18proplist = $utils:sort(target:properties());
19player:tell("%WProperties on ", target.name, " (", tostr(target), "):");
20player:tell("%gFundamental Object Attributes:");
21player:tell("  Is Player --> ", is_player(target));
22player:tell("  Parent --> ", parent(target));
23player:tell("  Children --> ", toliteral(children(target)));
24player:tell("%GBuiltin Properties:");
25player:tell("  Owner --> ", target.owner);
26player:tell("  Location --> ", target.location);
27player:tell("  Contents --> ", toliteral(target.contents));
28player:tell("  Programmer --> ", target.programmer);
29player:tell("  Wizard --> ", target.wizard);
30player:tell("  rwf --> ", target.r, target.w, target.f);
31player:tell("%wAdditional Properties:");
32for prop in (proplist)
33defined_on = target;
34while (!(prop in properties(defined_on)))
35defined_on = parent(defined_on);
36endwhile
37value = toliteral(target.(prop));
38if (length(value) > 80)
39value = "[too long; use EVAL to display.]";
40endif
41player:tell_raw("  ", prop, " (", tostr(defined_on), ") --> ", value);
42endfor
43endif
44endif

edit

Spec any none noneFlags rwdOwner #10Definer #8

Referenced by

none

Source

1"parse args[1] for obj and prop, if list of strings, send arch to editor";
2if (player.location == $editor)
3player:tell("You are already in the Editor!");
4elseif (length(args) != 1)
5player:tell("%Gsyntax: %Wedit objnum.propname");
6else
7obj_and_prop = $utils:parse_prop_ref(args[1]);
8if (obj_and_prop == 0)
9player:tell("%Gsyntax: %Wedit objnum.propname");
10else
11objref = obj_and_prop[1];
12propref = obj_and_prop[2];
13targobj = toobj(objref);
14"must use objnum, not name reference";
15if ((objref[1] != "#") || ((objref != "#0") && (targobj == #0)))
16player:tell("%Gsyntax: %Wedit objnum.propname");
17elseif (!valid(targobj))
18player:tell("Object %W", objref, "%w does not exist.");
19elseif (!targobj:has_prop(propref))
20player:tell(targobj.name, " does not have a property named %W", propref, "%w.");
21"check to see if propref is a list of strings";
22elseif (typeof(targobj.(propref)) != LIST)
23player:tell("You can only edit properties that are of type LIST and that only contain strings.");
24else
25for each in (targobj.(propref))
26if (typeof(each) != STR)
27player:tell("You can only edit properties that are of type LIST and that only contain strings.");
28return 0;
29endif
30endfor
31"propref is list of strings, engage editing mode";
32player:tell("You are being %Wtransported%w to the editor, and are now editing %W", args[1], "%w.");
33player.editing_prop = propref;
34player.editing_obj = targobj;
35player.editing_loc = player.location;
36player.insert_point = 1;
37player:move_to($editor);
38endif
39endif
40endif

des*ign

Spec any any anyFlags rwdOwner #10Definer #8

Referenced by

none

Source

1"$architect:design any any any";
2if (player in $architect:descendants())
3if (!("design" in player.current_channels))
4player:tell("%WYour channel has been turned on.%w");
5player.current_channels = setadd(player.current_channels, "design");
6endif
7for designer in ($channels.design_channel)
8if ("design" in designer.current_channels)
9designer:tell();
10designer:tell((((($channels.design_prefix + " ") + player.name) + ": ") + argstr) + "%w");
11endif
12endfor
13else
14player:tell($bad_command);
15endif

who_string

Spec this none thisFlags rwxdOwner #10Definer #8

Referenced by

none

Source

1"$architect:who_string() this none this";
2viewer = args[1];
3gender = {"N", "B", "F", "M"}[this.gender in {"neither", "both", "female", "male"}];
4"afk";
5if (this.afk)
6afk = $who.afk + "  ";
7else
8afk = "       ";
9endif
10"editing";
11if (this.location:is_a($editor))
12edit = $who.editing + "  ";
13else
14edit = "           ";
15endif
16"idle";
17idle = idle_seconds(this);
18if (idle > 3600)
19idle = $who.dormant + "  ";
20elseif (idle > 1800)
21idle = $who.vegetating + "  ";
22elseif (idle >= 600)
23idle = $who.idle + "  ";
24else
25idle = "        ";
26endif
27"admin";
28if (this in $admins)
29admin = $who.admin;
30else
31admin = "";
32endif
33name_string = $utils:padr(this.name, 16, " ");
34who_string = ((((((("%Y[%yArch " + gender) + "%Y] ") + name_string) + afk) + edit) + idle) + admin) + "%w";
35return who_string;

sa*y

Spec any any anyFlags rwdOwner #10Definer #8

Referenced by

none

Source

1"$architect:say any any any";
2if (player.location == $editor)
3article = {};
4old_article = player.editing_obj.(player.editing_prop);
5for x in [1..player.insert_point - 1]
6article = {@article, old_article[x]};
7endfor
8article = {@article, argstr};
9for x in [player.insert_point..length(old_article)]
10article = {@article, old_article[x]};
11endfor
12player.editing_obj.(player.editing_prop) = article;
13player:tell("Line added.");
14player.insert_point = player.insert_point + 1;
15else
16pass(@args);
17endif