ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_misc.C
(Generate patch)

Comparing deliantra/server/server/c_misc.C (file contents):
Revision 1.58 by root, Fri Apr 27 19:53:05 2007 UTC vs.
Revision 1.76 by root, Thu Oct 15 21:40:42 2009 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * it under the terms of the GNU General Public License as published by 9 * the terms of the Affero GNU General Public License as published by the
10 * the Free Software Foundation; either version 2 of the License, or 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * (at your option) any later version. 11 * option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the Affero GNU General Public License
19 * along with this program; if not, write to the Free Software 19 * and the GNU General Public License along with this program. If not, see
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * <http://www.gnu.org/licenses/>.
21 * 21 *
22 * The authors can be reached via e-mail at <crossfire@schmorp.de> 22 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 23 */
24 24
25#include <global.h> 25#include <global.h>
26#include <loader.h> 26#include <loader.h>
27#include <sproto.h> 27#include <sproto.h>
28 28
29/* Handles misc. input request - things like hash table, malloc, maps, etc */ 29/* Handles misc. input request - things like hash table, malloc, maps, etc */
30 30
31int
32command_motd (object *op, char *params)
33{
34 display_motd (op);
35 return 1;
36}
37
38#ifdef DEBUG_MALLOC_LEVEL
39int
40command_malloc_verify (object *op, char *parms)
41{
42 extern int malloc_verify (void);
43
44 if (!malloc_verify ())
45 new_draw_info (NDI_UNIQUE, 0, op, "Heap is corrupted.");
46 else
47 new_draw_info (NDI_UNIQUE, 0, op, "Heap checks out OK.");
48 return 1;
49}
50#endif
51
52int
53command_whereabouts (object *op, char *params)
54{
55 //TODO: should obviously not waste space in struct region for this.
56 /*
57 * reset the counter on the region, then use it to store the number of
58 * players there.
59 * I don't know how thread-safe this would be, I suspect not very....
60 */
61 for_all_regions (rgn)
62 rgn->counter = 0;
63
64 for_all_players (pl)
65 if (pl->ob->map)
66 ++pl->ob->region ()->counter;
67
68 /* we only want to print out by places with a 'longname' field... */
69 for_all_regions (rgn)
70 {
71 if (!rgn->longname && rgn->counter > 0)
72 {
73 if (rgn->parent)
74 {
75 rgn->parent->counter += rgn->counter;
76 rgn->counter = 0;
77 }
78 else /*uh oh, we shouldn't be here. */
79 LOG (llevError, "command_whereabouts() Region %s with no longname has no parent", &rgn->name);
80 }
81 }
82
83 new_draw_info_format (NDI_UNIQUE, 0, op, "In the world currently there are:");
84
85 for_all_regions (rgn)
86 if (rgn->counter)
87 new_draw_info_format (NDI_UNIQUE, 0, op, "%u players %s", rgn->counter, &rgn->longname);
88
89 return 1;
90}
91
92typedef struct 31typedef struct
93{ 32{
94 char namebuf[MAX_BUF]; 33 char namebuf[MAX_BUF];
95 int login_order; 34 int login_order;
96} chars_names; 35} chars_names;
97 36
98int 37int
99command_time (object *op, char *params) 38command_time (object *op, char *params)
100{ 39{
101 print_tod (op); 40 print_tod (op);
102 return 1;
103}
104
105int
106command_weather (object *op, char *params)
107{
108#if 0
109 int wx, wy, temp, sky;
110 char buf[MAX_BUF];
111
112 if (settings.dynamiclevel < 1)
113 return 1;
114
115 if (op->map == NULL)
116 return 1;
117
118 if (worldmap_to_weathermap (op->x, op->y, &wx, &wy, op->map) != 0)
119 return 1;
120
121 if (QUERY_FLAG (op, FLAG_WIZ))
122 {
123 /* dump the weather, Dm style! Yo! */
124 new_draw_info_format (NDI_UNIQUE, 0, op, "Real temp: %d", real_world_temperature (op->x, op->y, op->map));
125 new_draw_info_format (NDI_UNIQUE, 0, op, "Base temp: %d", weathermap[wx][wy].temp);
126 new_draw_info_format (NDI_UNIQUE, 0, op, "Humid: %d", weathermap[wx][wy].humid);
127 new_draw_info_format (NDI_UNIQUE, 0, op, "Wind: dir=%d speed=%d", weathermap[wx][wy].winddir, weathermap[wx][wy].windspeed);
128 new_draw_info_format (NDI_UNIQUE, 0, op, "Pressure: %d", weathermap[wx][wy].pressure);
129 new_draw_info_format (NDI_UNIQUE, 0, op, "Avg Elevation: %d", weathermap[wx][wy].avgelev);
130 new_draw_info_format (NDI_UNIQUE, 0, op, "Rainfall: %d Water: %d", weathermap[wx][wy].rainfall, weathermap[wx][wy].water);
131 }
132
133 temp = real_world_temperature (op->x, op->y, op->map);
134 new_draw_info_format (NDI_UNIQUE, 0, op, "It's currently %d degrees " "Centigrade out.", temp);
135
136 /* humid */
137 if (weathermap[wx][wy].humid < 20)
138 new_draw_info (NDI_UNIQUE, 0, op, "It is very dry.");
139 else if (weathermap[wx][wy].humid < 40)
140 new_draw_info (NDI_UNIQUE, 0, op, "It is very comfortable today.");
141 else if (weathermap[wx][wy].humid < 60)
142 new_draw_info (NDI_UNIQUE, 0, op, "It is a bit muggy.");
143 else if (weathermap[wx][wy].humid < 80)
144 new_draw_info (NDI_UNIQUE, 0, op, "It is muggy.");
145 else
146 new_draw_info (NDI_UNIQUE, 0, op, "It is uncomfortably muggy.");
147
148 /* wind */
149 switch (weathermap[wx][wy].winddir)
150 {
151 case 1:
152 sprintf (buf, "north");
153 break;
154 case 2:
155 sprintf (buf, "northeast");
156 break;
157 case 3:
158 sprintf (buf, "east");
159 break;
160 case 4:
161 sprintf (buf, "southeast");
162 break;
163 case 5:
164 sprintf (buf, "south");
165 break;
166 case 6:
167 sprintf (buf, "southwest");
168 break;
169 case 7:
170 sprintf (buf, "west");
171 break;
172 case 8:
173 sprintf (buf, "northwest");
174 break;
175 }
176 if (weathermap[wx][wy].windspeed < 5)
177 new_draw_info_format (NDI_UNIQUE, 0, op, "There is a mild breeze " "coming from the %s.", buf);
178 else if (weathermap[wx][wy].windspeed < 10)
179 new_draw_info_format (NDI_UNIQUE, 0, op, "There is a strong breeze " "coming from the %s.", buf);
180 else if (weathermap[wx][wy].windspeed < 15)
181 new_draw_info_format (NDI_UNIQUE, 0, op, "There is a light wind " "coming from the %s.", buf);
182 else if (weathermap[wx][wy].windspeed < 25)
183 new_draw_info_format (NDI_UNIQUE, 0, op, "There is a strong wind " "coming from the %s.", buf);
184 else if (weathermap[wx][wy].windspeed < 35)
185 new_draw_info_format (NDI_UNIQUE, 0, op, "There is a heavy wind " "coming from the %s.", buf);
186 else
187 new_draw_info_format (NDI_UNIQUE, 0, op, "The wind from the %s is " "incredibly strong!", buf);
188
189 sky = weathermap[wx][wy].sky;
190 if (temp <= 0 && sky > SKY_OVERCAST && sky < SKY_FOG)
191 sky += 10; /*let it snow */
192 switch (sky)
193 {
194 case SKY_CLEAR:
195 new_draw_info (NDI_UNIQUE, 0, op, "There isn''t a cloud in the sky.");
196 break;
197 case SKY_LIGHTCLOUD:
198 new_draw_info (NDI_UNIQUE, 0, op, "There are a few light clouds in the sky.");
199 break;
200 case SKY_OVERCAST:
201 new_draw_info (NDI_UNIQUE, 0, op, "The sky is cloudy and dreary.");
202 break;
203 case SKY_LIGHT_RAIN:
204 new_draw_info (NDI_UNIQUE, 0, op, "It is raining softly.");
205 break;
206 case SKY_RAIN:
207 new_draw_info (NDI_UNIQUE, 0, op, "It is raining.");
208 break;
209 case SKY_HEAVY_RAIN:
210 new_draw_info (NDI_UNIQUE, 0, op, "It is raining heavily.");
211 break;
212 case SKY_HURRICANE:
213 new_draw_info (NDI_UNIQUE, 0, op, "There is a heavy storm! You should go inside!");
214 break;
215 case SKY_FOG:
216 new_draw_info (NDI_UNIQUE, 0, op, "It''s foggy and miserable.");
217 break;
218 case SKY_HAIL:
219 new_draw_info (NDI_UNIQUE, 0, op, "It''s hailing out! Take cover!");
220 break;
221 case SKY_LIGHT_SNOW:
222 new_draw_info (NDI_UNIQUE, 0, op, "Snow is gently falling from the sky.");
223 break;
224 case SKY_SNOW:
225 new_draw_info (NDI_UNIQUE, 0, op, "It''s snowing out.");
226 break;
227 case SKY_HEAVY_SNOW:
228 new_draw_info (NDI_UNIQUE, 0, op, "The snow is falling very heavily now.");
229 break;
230 case SKY_BLIZZARD:
231 new_draw_info (NDI_UNIQUE, 0, op, "A full blown blizzard is in effect. You might want to take cover!");
232 break;
233 }
234#endif
235 return 1;
236}
237
238int
239command_hiscore (object *op, char *params)
240{
241 display_high_score (op, op == NULL ? 9999 : 50, params);
242 return 1; 41 return 1;
243} 42}
244 43
245int 44int
246command_debug (object *op, char *params) 45command_debug (object *op, char *params)
280 } 79 }
281 return 0; 80 return 0;
282} 81}
283 82
284int 83int
285command_dumpfriendlyobjects (object *op, char *params)
286{
287 dump_friendly_objects ();
288 return 0;
289}
290
291int
292command_printlos (object *op, char *params)
293{
294 if (op)
295 print_los (op);
296 return 0;
297}
298
299
300int
301command_version (object *op, char *params) 84command_version (object *op, char *params)
302{ 85{
303 version (op); 86 version (op);
304 return 0; 87 return 0;
305}
306
307#ifndef BUG_LOG
308# define BUG_LOG "bug_log"
309#endif
310void
311bug_report (const char *reportstring)
312{
313 FILE *fp;
314
315 if ((fp = fopen (BUG_LOG, "a")) != NULL)
316 {
317 fprintf (fp, "%s\n", reportstring);
318 fclose (fp);
319 }
320 else
321 {
322 LOG (llevError, "Cannot write bugs file %s: %s\n", BUG_LOG, strerror (errno));
323 }
324} 88}
325 89
326/* Prints out some useful information for the character. Everything we print 90/* Prints out some useful information for the character. Everything we print
327 * out can be determined by the docs, so we aren't revealing anything extra - 91 * out can be determined by the docs, so we aren't revealing anything extra -
328 * rather, we are making it convenient to find the values. params have 92 * rather, we are making it convenient to find the values. params have
331int 95int
332command_statistics (object *pl, char *params) 96command_statistics (object *pl, char *params)
333{ 97{
334 if (!pl->contr) 98 if (!pl->contr)
335 return 1; 99 return 1;
336 new_draw_info_format (NDI_UNIQUE, 0, pl, " Experience: %" PRId64, pl->stats.exp);
337 new_draw_info_format (NDI_UNIQUE, 0, pl, " Next Level: %" PRId64, level_exp (pl->level + 1, pl->expmul));
338 new_draw_info (NDI_UNIQUE, 0, pl, "\nStat Nat/Real/Max");
339 100
340 new_draw_info_format (NDI_UNIQUE, 0, pl, "Str %2d/ %3d/%3d", 101 dynbuf_text &msg = msg_dynbuf; msg.clear ();
341 pl->contr->orig_stats.Str, pl->stats.Str, 20 + pl->arch->clone.stats.Str); 102
342 new_draw_info_format (NDI_UNIQUE, 0, pl, "Dex %2d/ %3d/%3d", 103 msg << " Experience: " << pl->stats.exp << '\n'
343 pl->contr->orig_stats.Dex, pl->stats.Dex, 20 + pl->arch->clone.stats.Dex); 104 << " Next Level: " << level_exp (pl->level + 1, pl->expmul) << '\n'
344 new_draw_info_format (NDI_UNIQUE, 0, pl, "Con %2d/ %3d/%3d", 105 << "\n Stat Nat/Real/Max\n";
345 pl->contr->orig_stats.Con, pl->stats.Con, 20 + pl->arch->clone.stats.Con); 106
346 new_draw_info_format (NDI_UNIQUE, 0, pl, "Int %2d/ %3d/%3d", 107 for (int i = 0; i < NUM_STATS; ++i)
347 pl->contr->orig_stats.Int, pl->stats.Int, 20 + pl->arch->clone.stats.Int); 108 msg.printf (" %s %2d/ %3d/%3d\n", short_stat_name [i], pl->contr->orig_stats.stat (i), pl->stats.stat (i), 20 + pl->arch->stats.stat (i));
348 new_draw_info_format (NDI_UNIQUE, 0, pl, "Wis %2d/ %3d/%3d", 109
349 pl->contr->orig_stats.Wis, pl->stats.Wis, 20 + pl->arch->clone.stats.Wis); 110 msg << "\nYou are " << (pl->contr->peaceful ? "peaceful" : "hostile") << '.';
350 new_draw_info_format (NDI_UNIQUE, 0, pl, "Pow %2d/ %3d/%3d", 111
351 pl->contr->orig_stats.Pow, pl->stats.Pow, 20 + pl->arch->clone.stats.Pow); 112 pl->contr->infobox (MSG_CHANNEL ("statistics"), msg);
352 new_draw_info_format (NDI_UNIQUE, 0, pl, "Cha %2d/ %3d/%3d",
353 pl->contr->orig_stats.Cha, pl->stats.Cha, 20 + pl->arch->clone.stats.Cha);
354 new_draw_info_format (NDI_UNIQUE, 0, pl, "\nAttack Mode: %s", pl->contr->peaceful ? "Peaceful" : "Hostile");
355 113
356 /* Can't think of anything else to print right now */ 114 /* Can't think of anything else to print right now */
357 return 0; 115 return 0;
358} 116}
359 117
360int 118int
361command_fix_me (object *op, char *params) 119command_fix_me (object *op, char *params)
362{ 120{
363 sum_weight (op); 121 op->update_weight ();
364 op->update_stats (); 122 op->update_stats ();
365 new_draw_info (NDI_UNIQUE, 0, op, "Your character was fixed."); 123 new_draw_info (NDI_UNIQUE, 0, op, "Your character was fixed.");
366 124
367 return 1; 125 return 1;
368} 126}
369 127
370int 128int
371command_logs (object *op, char *params)
372{
373 new_draw_info (NDI_UNIQUE, 0, op, "Nobody is currently logging kills.");
374
375 return 1;
376}
377
378int
379command_bowmode (object *op, char *params) 129command_bowmode (object *op, char *params)
380{ 130{
381 bowtype_t oldtype = op->contr->bowtype; 131 bowtype_t oldtype = op->contr->bowtype;
382 static const char *const types[] = { "normal", "threewide", "spreadshot", "firenorth", 132 static const char *const types[] = {
133 "normal", "threewide", "spreadshot", "firenorth",
383 "firene", "fireeast", "firese", "firesouth", 134 "firene", "fireeast", "firese", "firesouth",
384 "firesw", "firewest", "firenw", "bestarrow" 135 "firesw", "firewest", "firenw", "bestarrow"
385 }; 136 };
386 char buf[MAX_BUF]; 137 char buf[MAX_BUF];
387 int i, found; 138 int i, found;
403 } 154 }
404 155
405 if (!found) 156 if (!found)
406 { 157 {
407 sprintf (buf, "bowmode: Unknown options %s, valid options are:", params); 158 sprintf (buf, "bowmode: Unknown options %s, valid options are:", params);
159
408 for (i = 0; i <= bow_bestarrow; i++) 160 for (i = 0; i <= bow_bestarrow; i++)
409 { 161 {
410 strcat (buf, " "); 162 strcat (buf, " ");
411 strcat (buf, types[i]); 163 strcat (buf, types[i]);
412 if (i < bow_nw) 164 if (i < bow_nw)
423} 175}
424 176
425int 177int
426command_showpets (object *op, char *params) 178command_showpets (object *op, char *params)
427{ 179{
428 objectlink *obl, *next;
429 int counter = 0, target = 0; 180 int counter = 0, target = 0;
430 int have_shown_pet = 0; 181 int have_shown_pet = 0;
431 182
183 dynbuf_text &msg = msg_dynbuf; msg.clear ();
184
432 if (params != NULL) 185 if (params)
433 target = atoi (params); 186 target = atoi (params);
187
434 for (obl = first_friendly_object; obl != NULL; obl = next) 188 for (objectlink *obl = first_friendly_object; obl; obl = obl->next)
435 { 189 {
436 object *ob = obl->ob; 190 object *ob = obl->ob;
437 191
438 next = obl->next;
439 if (ob->owner == op) 192 if (ob->owner == op)
440 { 193 {
441 if (target == 0) 194 if (target == 0)
442 { 195 {
443 if (counter == 0) 196 if (counter == 0)
444 new_draw_info (NDI_UNIQUE, 0, op, "Pets:"); 197 msg << "T<Pets>\n\n";
198
445 new_draw_info_format (NDI_UNIQUE, 0, op, "%d %s - level %d", ++counter, &ob->name, ob->level); 199 msg.printf (" %3d %s, level %d\n", ++counter, &ob->name, ob->level);
446 } 200 }
447 else if (!have_shown_pet && ++counter == target) 201 else if (!have_shown_pet && ++counter == target)
448 { 202 {
449 new_draw_info_format (NDI_UNIQUE, 0, op, "level %d %s", ob->level, &ob->name); 203 msg.printf ("T<%s>\n\n"
450 new_draw_info_format (NDI_UNIQUE, 0, op, "%d/%d HP, %d/%d SP", ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp); 204 " level %d\n"
451 /* this is not a nice way to do this, it should be made to be more like the statistics command */ 205 " %d/%d HP, %d/%d SP\n"
452 new_draw_info_format (NDI_UNIQUE, 0, op, "Str %d", ob->stats.Str); 206 " Str %2d\n"
453 new_draw_info_format (NDI_UNIQUE, 0, op, "Dex %d", ob->stats.Dex); 207 " Dex %2d\n"
454 new_draw_info_format (NDI_UNIQUE, 0, op, "Con %d", ob->stats.Con); 208 " Con %2d\n"
455 new_draw_info_format (NDI_UNIQUE, 0, op, "Int %d", ob->stats.Int); 209 " Int %2d\n"
456 new_draw_info_format (NDI_UNIQUE, 0, op, "Wis %d", ob->stats.Wis); 210 " Wis %2d\n"
457 new_draw_info_format (NDI_UNIQUE, 0, op, "Cha %d", ob->stats.Cha); 211 " Cha %2d\n"
458 new_draw_info_format (NDI_UNIQUE, 0, op, "Pow %d", ob->stats.Pow); 212 " Pow %2d\n"
459 new_draw_info_format (NDI_UNIQUE, 0, op, "wc %d damage %d ac %d ", ob->stats.wc, ob->stats.dam, ob->stats.ac); 213 " wc %d damage %d ac %d\n",
214 &ob->name,
215 &ob->name,
216 ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp,
217 ob->stats.Str,
218 ob->stats.Dex,
219 ob->stats.Con,
220 ob->stats.Int,
221 ob->stats.Wis,
222 ob->stats.Cha,
223 ob->stats.Pow,
224 ob->stats.wc, ob->stats.dam, ob->stats.ac);
225
460 have_shown_pet = 1; 226 have_shown_pet = 1;
461 } 227 }
462 } 228 }
463 } 229 }
230
464 if (counter == 0) 231 if (counter == 0)
465 new_draw_info (NDI_UNIQUE, 0, op, "you have no pets."); 232 msg << "you have no pets.";
466 else if (target != 0 && have_shown_pet == 0) 233 else if (target != 0 && have_shown_pet == 0)
467 new_draw_info (NDI_UNIQUE, 0, op, "no such pet."); 234 msg << "no such pet.";
235
236 op->contr->infobox (MSG_CHANNEL ("pets"), msg);
237
468 return 0; 238 return 0;
469} 239}
470 240
471int 241int
472command_resistances (object *op, char *params) 242command_resistances (object *op, char *params)
473{ 243{
474 int i; 244 dynbuf_text &msg = msg_dynbuf; msg.clear ();
475 245
476 if (!op) 246 msg << "Resistances:\n\n";
477 return 0;
478 247
479 for (i = 0; i < NROFATTACKS; i++) 248 for (int i = 0; i < NROFATTACKS; i++)
480 {
481 if (i == ATNR_INTERNAL) 249 if (i != ATNR_INTERNAL)
482 continue; 250 msg.printf (" %-20s %+4d\n", attacktype_desc [i], op->resist [i]);
483
484 new_draw_info_format (NDI_UNIQUE, 0, op, "%-20s %+5d", attacktype_desc[i], op->resist[i]);
485 }
486 251
487 /* If dragon player, let's display natural resistances */ 252 /* If dragon player, let's display natural resistances */
488 if (is_dragon_pl (op)) 253 if (is_dragon_pl (op))
489 {
490 int attack;
491 object *tmp;
492
493 for (tmp = op->inv; tmp != NULL; tmp = tmp->below) 254 for (object *tmp = op->inv; tmp; tmp = tmp->below)
494 {
495 if ((tmp->type == FORCE) && (strcmp (tmp->arch->name, "dragon_skin_force") == 0)) 255 if ((tmp->type == FORCE) && tmp->arch->archname == shstr_dragon_skin_force)
496 { 256 {
497 new_draw_info (NDI_UNIQUE, 0, op, "\nNatural skin resistances:"); 257 msg << "\nOf those, these are natural skin resistances:\n\n";
258
498 for (attack = 0; attack < NROFATTACKS; attack++) 259 for (int attack = 0; attack < NROFATTACKS; attack++)
499 {
500 if (atnr_is_dragon_enabled (attack)) 260 if (atnr_is_dragon_enabled (attack))
501 { 261 msg.printf (" %-20s %+4d\n", change_resist_msg [attack], tmp->resist [attack]);
502 new_draw_info_format (NDI_UNIQUE, 0, op, "%s: %d", change_resist_msg[attack], tmp->resist[attack]); 262
503 }
504 }
505 break; 263 break;
506 } 264 }
507 } 265
508 } 266 op->contr->infobox (MSG_CHANNEL ("resistances"), msg);
509 267
510 return 0; 268 return 0;
511} 269}
512 270
513/* 271/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines