big map #202

Parent #1Owner #361Flags read, fertileSource hellcore/hellcore.db

Aliases: big map

6 verbs · 23 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
@setup-areasthis none nonerxd#20215
area_link_iconsthis none thisrxd#2025
@reset-mapsthis none nonerxd#20225
@merge-iconsany in/inside/into thisrxd#20237
store_sorted_rooms_by_zthis none thisrxd#20212
reset_maps_additionalthis none thisrxd#2020

Properties

PropertyDefinerFlagsOwnerValue
areas#202rc#361{}
blank_normal_icon#202rc#361" "
blank_client_icon#202rc#361" "
icon_block_z#202rc#361{}
icon_block_data#202rc#361{}
sky_z#202rc#361-1
sky_normal_icon#202rc#361"~1b[46m~1b[37m~1b[1moO~1b[0m"
sky_client_icon#202rc#361" "
underground_z#202rc#3611
underground_normal_icon#202rc#361" "
underground_client_icon#202rc#361" "
z_sorted_rooms#202rc#361{}
extra_icons_for_painting#202rc#361{}
aliases#1rc#361{"big map"}
description#1rc#361<clear>
object_size#1r#29{4549, 1298434458}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #1 root

Children: none

Call graph

calls n202_0 #202:@setup-areas n107_43 #107:tell n202_0->n107_43 n20_59 #20:name_and_number n202_0->n20_59 n202_2 #202:@reset-maps n202_2->n107_43 n202_2->n20_59 n202_4 #202:store_sorted_rooms_by_z n202_2->n202_4 n48_8 #48:suspend_if_needed n202_2->n48_8 n202_5 #202:reset_maps_additional n202_2->n202_5 n202_4->n48_8 n47_14 #47:sort n202_4->n47_14 n202_3 #202:@merge-icons n202_3->n107_43 n202_3->n20_59 n48_4 #48:yes_or_no n202_3->n48_4 n48_2 #48:read n202_3->n48_2

Source

@setup-areas

Spec this none noneFlags rxdOwner #361Definer #202

Referenced by

none

Source

1if (!player.programmer)
2player:tell("Fuck off.");
3return;
4endif
5if (this.f)
6player:tell("Can't do this on a fertile object.");
7return;
8endif
9for area in (this.areas)
10if (area.bigmap != this)
11player:tell($su:nn(area), " needed updating, old value was ", $su:nn(area.bigmap), ".");
12area.bigmap = this;
13endif
14endfor
15player:tell("Done!");

Spec this none thisFlags rxdOwner #361Definer #202

Referenced by

none

Source

1icons = {};
2for area in (this.areas)
3icons = listappend(icons, {area, area.area_link_icons});
4endfor
5return icons;

@reset-maps

Spec this none noneFlags rxdOwner #361Definer #202

Referenced by

none

Source

1if (!player.programmer)
2player:tell("Fuck off.");
3return;
4endif
5if (this.f)
6player:tell("Can't do that on a fertile object, boss.");
7return;
8endif
9fork (0)
10player:tell("Updating cache of z sorted rooms...");
11this:store_sorted_rooms_by_z();
12suspend(1);
13player:tell("Resetting:");
14stime = time();
15done = {};
16for area in (this.areas)
17done = setadd(done, area);
18player:tell("  ", $su:nn(area), " (left: ", $su:nn($set_utils:diff(this.areas, done)), ")");
19area:reset_map();
20$cu:sin(2);
21endfor
22etime = time() - stime;
23player:tell("done, generation time: ", tostr(etime / 60), " minutes, ", tostr(etime % 60), " seconds.");
24this:reset_maps_additional();
25endfork

@merge-icons

Spec any in/inside/into thisFlags rxdOwner #361Definer #202

Referenced by

none

Source

1if (!is_a(dobj, $area))
2player:tell(dobjstr, " is not an area.");
3return;
4endif
5area = dobj;
6if (!area.icon_blocks)
7player:tell($su:nn(area), " has no icon blocks.");
8return;
9endif
10if (!(area in this.areas))
11if (!$cu:yes_or_no((($su:nn(area) + " is not in ") + $su:nn(this)) + "'s areas, do it anyway?"))
12player:tell("Cancelling.");
13return;
14endif
15endif
16while (1)
17try
18z = $cu:read(("z to insert " + $su:nn(area)) + "'s icon_blocks into");
19z = toint(z);
20except (ANY)
21player:tell("Try a number.");
22continue;
23endtry
24break;
25endwhile
26idx = z in this.icon_block_z;
27if (!idx)
28this.icon_block_z = setadd(this.icon_block_z, z);
29this.icon_block_data = listappend(this.icon_block_data, {});
30idx = z in this.icon_block_z;
31endif
32if (!idx)
33player:tell("Failed to find Z in data.");
34return;
35endif
36this.icon_block_data[idx] = {@this.icon_block_data[idx], @area.icon_blocks};
37player:tell("Done.");

store_sorted_rooms_by_z

Spec this none thisFlags rxdOwner #361Definer #202

Referenced by

Source

1rooms = {};
2for area in (this.areas)
3rooms = {@rooms, @area:occupants_suspended($room)};
4$cu:sin(1);
5endfor
6heights = {};
7for height in (rooms)
8heights = listappend(heights, height.z * -1);
9$cu:sin(1);
10endfor
11rooms = $lu:sort(rooms, heights);
12this.z_sorted_rooms = rooms;

reset_maps_additional

Spec this none thisFlags rxdOwner #361Definer #202

Referenced by

Source

No program (verb defined but unprogrammed).