--- deliantra/server/common/button.C 2009/10/12 04:02:17 1.55
+++ deliantra/server/common/button.C 2009/10/26 03:43:22 1.60
@@ -1,22 +1,23 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
+ * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Deliantra is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Deliantra is free software: you can redistribute it and/or modify it under
+ * the terms of the Affero GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the Affero GNU General Public License
+ * and the GNU General Public License along with this program. If not, see
+ * .
*
* The authors can be reached via e-mail to
*/
@@ -77,7 +78,7 @@
tmp->set_speed (0.5);
break;
- case CF_HANDLE:
+ case T_HANDLE:
SET_ANIMATION (tmp, (tmp->value = tmp->stats.maxsp ? !state : state));
update_object (tmp, UP_OBJ_FACE);
break;
@@ -85,8 +86,13 @@
case SIGN:
if (!tmp->stats.food || tmp->last_eat < tmp->stats.food)
{
- tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_sign"));
- new_info_map (NDI_UNIQUE | NDI_NAVY, tmp->map, tmp->msg);
+ tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("msg_voice"));
+
+ if (originator && originator->contr)
+ originator->contr->infobox (MSG_CHANNEL ("examine"), format ("T<%s>\n\n%s", &tmp->name, &tmp->msg));
+
+ new_info_map_except (NDI_UNIQUE | NDI_NAVY, tmp->map, originator, tmp->msg);
+
if (tmp->stats.food)
tmp->last_eat++;
}
@@ -267,6 +273,25 @@
{
tmp->value = 1;
break;
+ }
+ }
+
+ any_down = any_down || tmp->value;
+ }
+ else if (tmp->type == T_MATCH)
+ {
+ tmp->value = 0;
+
+ for (object *ab = tmp->above; ab; ab = ab->above)
+ {
+ object *head = ab->head_ ();
+
+ /* Same note regarding move_type for buttons above apply here. */
+ if (((ab->move_type & tmp->move_on) || ab->move_type == 0))
+ if (match (tmp->slaying, head, tmp, originator))
+ {
+ tmp->value = 1;
+ break;
}
}