changeset 2171:ebd97df1c19a

Implement basic support for different location types in city maps.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 12 Oct 2019 19:25:19 +0300
parents afad5e1b347d
children b2a4c906175b
files misc/arelium.loc misc/misc.css mkcitymap.c
diffstat 3 files changed, 42 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/misc/arelium.loc	Sat Oct 12 19:00:45 2019 +0300
+++ b/misc/arelium.loc	Sat Oct 12 19:25:19 2019 +0300
@@ -3,7 +3,7 @@
 #
 118	; 14	; 0	;Iron manhole in the street|Sewer entrance;;;;
 107	; 18	; 0	;The Brewery;;;;
-14	; 19	; 0	;Tower of Infizinity|Guild: Sentinels of Infizinity;;;;
+14	; 19	; 1G	;Tower of Infizinity|Guild: Sentinels of Infizinity;;;;
 72	; 19	; 0	;City Rat Collector;;;;
 95	; 21	; 0	;Chess room;;;;
 116	; 21	; 0	;BatMUD Lumberyard (non-functional);;;;
@@ -13,28 +13,28 @@
 93	; 24	; 0	;Reversi room;;;;
 107	; 25	; 0	;Tince's Tobacco Shop;;;;
 95	; 27	; 0	;Gambling hall;;;;
-103	; 27	; 0	;Ugly Joe's restaurant|Butcher's shop;;;;merchant subguild
+103	; 27	; 2G	;Ugly Joe's restaurant|Butcher's shop;;;;merchant subguild
 111	; 27	; 0	;Collector Cards Store;;;;
-26	; 29	; 0	;Law office;;;;merchant subguild
+26	; 29	; 2G	;Law office;;;;merchant subguild
 104	; 29	; 0	;The Royal Danish Candystore;;;;
 67	; 30	; 0	;Lottery Office|Lottery|TP lottery|Exp lottery;;;;
 116	; 30	; 0	;Club Sarnath;;;;
 97	; 31	; 0	;Dubbha's Grocery|Food shop;;;;
-101	; 31	; 0	;The Adventurer's Outfitter|Clothing store;;;;merchant subguild
-22	; 32	; 0	;Brotherhood of Wizardry|Mage guild;;;;
+101	; 31	; 2G	;The Adventurer's Outfitter|Clothing store;;;;merchant subguild
+22	; 32	; 1G	;Brotherhood of Wizardry|Mage guild;;;;
 59	; 33	; 0	;Society joining room;;;;
 62	; 33	; 0	;Player city marker shop;;;;
 65	; 33	; 0	;Assassination game sign up room;;;;
 87	; 33	; 0	;The Arelium Bank;;;;
-95	; 33	; 0	;Luxury Armoury|Ruuben;;;;merchant subguild
-13	; 35	; 0	;School of Folklorists;;;;
-17	; 35	; 0	;Brotherhood of Wizardry|Mage guild;;;;
-27	; 35	; 0	;Brotherhood of Wizardry|Mage guild;;;;
+95	; 33	; 2G	;Luxury Armoury|Ruuben;;;;merchant subguild
+13	; 35	; 1G	;School of Folklorists;;;;
+17	; 35	; 1G	;Brotherhood of Wizardry|Mage guild;;;;
+27	; 35	; 1G	;Brotherhood of Wizardry|Mage guild;;;;
 75	; 35	; 0	;Clock;;;;
 87	; 36	; 0	;The auctioneer;;;;
-95	; 36	; 0	;Luxury Weaponsmith|Luxury weapon shop|Nastassja;;;;merchant subguild
+95	; 36	; 2G	;Luxury Weaponsmith|Luxury weapon shop|Nastassja;;;;merchant subguild
 103	; 36	; 0	;Asidonhopo's General Store|Mapper scrolls (for ships)|Reagent pouches|Wands of nothing|Scrolls of charging;;;;
-22	; 38	; 0	;Brotherhood of Wizardry|Mage guild;;;;
+22	; 38	; 1G	;Brotherhood of Wizardry|Mage guild;;;;
 63	; 38	; 0	;Arelium Police Station;;;;
 93	; 38	; 0	;The General Store;;;;
 106	; 38	; 0	;Arelium Exchange Office;;;;
@@ -46,13 +46,13 @@
 72	; 41	; 0	;The Bathibition Art Gallery;;;;
 82	; 41	; 0	;Material Exchange;;;;
 104	; 42	; 0	;City Armoury|Armourer;;;;
-89	; 43	; 0	;City Smithy|Weaponsmith;;;;Merchant subguild
+89	; 43	; 2G	;City Smithy|Weaponsmith;;;;merchant subguild
 95	; 43	; 0	;Chinese Armour Shop|Armourer;;;;
-112	; 43	; 0	;The Bazaar|Merchant guild|Roulette room|Slots|Blackjack|Connect4;;;;
+112	; 43	; 1G	;The Bazaar|Merchant guild|Roulette room|Slots|Blackjack|Connect4;;;;
 110	; 44	; 0	;Fortune-teller;;;;
 24	; 46	; 0	;Arelium orphanage;;;;
 67	; 46	; 0	;Gnomish Warehouse (non-functional);;;;
-83	; 46	; 0	;City Bakery|Baker;;;;merchant subguild
+83	; 46	; 2G	;City Bakery|Baker;;;;merchant subguild
 35	; 47	; 0	;Manny LeRoy's photografikal apparati corp|Camera shop;;;;You can purchase a funny camera, and other related equipment.
 57	; 47	; 0	;Lacramobo's Rent Hall;;;;
 115	; 47	; 0	;Conor's balloon services;;;;
@@ -61,16 +61,16 @@
 37	; 49	; 0	;Vax museum|Race information;;;;
 94	; 50	; 0	;Swimming Hall + Sauna;;;;
 27	; 53	; 0	;Post Office ;;;;Send items to other people via brownie mail. Disabled as of August 2011.
-82	; 53	; 0	;Hardware shop ;;;;Hardware shop; merchant subguild.
+82	; 53	; 2G	;Hardware shop ;;;;Hardware shop;merchant subguild
 37	; 55	; 0	;The Tinker's tools ;;;;Ropes, torches, bandages, stethoscopes, lock picks, water skins, blindfolds, magnifying glasses.
 20	; 51	; 0	;Church of all Gods|Church altar|Damogran/donations|Graveyard|Church dungeon|Death room|Tour guide;;;;
 88	; 51	; 0	;City Hospital|Sex change|Donate blood;;;;merchant subguild
-46	; 53	; 0	;Adventurers' Guild|Advguild|Boons/banes selection|Ability training|Dataroom|Guild leadership shrine|Quest room|Exp/quest/explore plaques|Race shrine portal;;;;
-57	; 53	; 0	;Arena|Civfighter guild;;;;
+46	; 53	; 1G	;Adventurers' Guild|Advguild|Boons/banes selection|Ability training|Dataroom|Guild leadership shrine|Quest room|Exp/quest/explore plaques|Race shrine portal;;;;
+57	; 53	; 1G	;Arena|Civfighter guild;;;;
 54	; 55	; 0	;Arelium public library;;;;
 37	; 57	; 0	;The Council Hall ;;;;BatMUD Council hall, probably not used now as the council was disbanded.
 50	; 55	; 0	;Angry Bats;;;;Clone of 'Angry Birds' game .. but in ASCII.
-102	; 55	; 0	;Fellowship of Wizardry|Civmages guild;;;;
+102	; 55	; 1G	;Fellowship of Wizardry|Civmages guild;;;;
 
 
 # Miscellaneous patches for map colours
--- a/misc/misc.css	Sat Oct 12 19:00:45 2019 +0300
+++ b/misc/misc.css	Sat Oct 12 19:25:19 2019 +0300
@@ -100,3 +100,20 @@
 div.loctab a {
   display: block;
 }
+
+a.ltloc {
+  color: red;
+  text-decoration: none;
+}
+
+a.ltloc:hover {
+  background: #888;
+}
+
+a.ltloc + .ltguild + .lt1  {
+  color: #080;
+}
+
+a.ltloc + .ltguild + .lt2  {
+  color: #0f0;
+}
--- a/mkcitymap.c	Sat Oct 12 19:00:45 2019 +0300
+++ b/mkcitymap.c	Sat Oct 12 19:25:19 2019 +0300
@@ -145,8 +145,10 @@
         for (int i = 0; i < marker->nnames; i++)
         {
             fprintf(outFile,
-                "<a class=\"loc\" id=\"listloc%d_%d\" href=\"?%d_%d\" "
+                "<a class=\"ltloc lt%s lt%d\" id=\"listloc%d_%d\" href=\"?%d_%d\" "
                 "onmouseover=\"%s('%d_%d');\" onmouseout=\"qn();\">",
+                locGetLocationType(marker->flags),
+                marker->align,
                 marker->xc, marker->yc,
                 marker->xc, marker->yc,
                 (marker->freeform || marker->nnames > 1) ? "sttq" : "qh",
@@ -169,8 +171,10 @@
 
         fprintf(outFile,
         "<div class=\"tooltip\" id=\"tt%d_%d\">"
-        "<div class=\"holder\">",
-        marker->xc, marker->yc);
+        "<div class=\"holder lt%s lt%d\">",
+        marker->xc, marker->yc,
+        locGetLocationType(marker->flags),
+        marker->align);
 
         if (marker->names[0].name != NULL)
         {