return TRUE;
} else {
// only some of the needed keys were given
- l.itemkeys &~= valid;
+ l.itemkeys &= ~valid;
return TRUE;
}
}
other.itemkeys |= self.itemkeys;
play2(other, self.noise);
- centerprint(other, self.message);
+ Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
};
/**
if (key_used) {
// one or more keys were given, but others are still missing!
play2(other, self.noise1);
- centerprint(other, strcat("You also need ", item_keys_keylist(self.itemkeys), "!"));
+ Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_DOOR_LOCKED_ALSONEED, item_keys_keylist(self.itemkeys));
other.key_door_messagetime = time + 2;
} else if (other.key_door_messagetime <= time) {
// no keys were given
play2(other, self.noise2);
- centerprint(other, strcat("You need ", item_keys_keylist(self.itemkeys), "!"));
+ Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_DOOR_LOCKED_NEED, item_keys_keylist(self.itemkeys));
other.key_door_messagetime = time + 2;
}
} else {
// all keys were given!
play2(other, self.noise);
- centerprint(other, self.message);
+ Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
if (self.target)
trigger_keylock_trigger(self.target);