big map #202
Aliases: big map
6 verbs · 23 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
@setup-areas | this none none | rxd | #202 | 15 |
area_link_icons | this none this | rxd | #202 | 5 |
@reset-maps | this none none | rxd | #202 | 25 |
@merge-icons | any in/inside/into this | rxd | #202 | 37 |
store_sorted_rooms_by_z | this none this | rxd | #202 | 12 |
reset_maps_additional | this none this | rxd | #202 | 0 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
areas | #202 | rc | #361 | {} |
blank_normal_icon | #202 | rc | #361 | " " |
blank_client_icon | #202 | rc | #361 | " " |
icon_block_z | #202 | rc | #361 | {} |
icon_block_data | #202 | rc | #361 | {} |
sky_z | #202 | rc | #361 | -1 |
sky_normal_icon | #202 | rc | #361 | "~1b[46m~1b[37m~1b[1moO~1b[0m" |
sky_client_icon | #202 | rc | #361 | " " |
underground_z | #202 | rc | #361 | 1 |
underground_normal_icon | #202 | rc | #361 | " " |
underground_client_icon | #202 | rc | #361 | " " |
z_sorted_rooms | #202 | rc | #361 | {} |
extra_icons_for_painting | #202 | rc | #361 | {} |
aliases | #1 | rc | #361 | {"big map"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {4549, 1298434458} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
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): #1 root
Children: none
Call graph
Source
@setup-areas
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!");
area_link_icons
Referenced by
none
Source
1icons = {}; 2for area in (this.areas) 3icons = listappend(icons, {area, area.area_link_icons}); 4endfor 5return icons;
@reset-maps
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
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
Referenced by
- #202:@reset-maps line 11:
this:store_sorted_rooms_by_z
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
Referenced by
- #202:@reset-maps line 24:
this:reset_maps_additional
Source
No program (verb defined but unprogrammed).