Пример #1
0
bool CBrain::UseWithOtherMsg(CUseWithOtherMsg *msg) {
	CBrainSlot *slot = dynamic_cast<CBrainSlot *>(msg->_other);
	if (!slot)
		return CCarry::UseWithOtherMsg(msg);

	if (isEquals("CentralCore")) {
		setVisible(false);
		petMoveToHiddenRoom();
		CAddHeadPieceMsg headpieceMsg(getName());
		headpieceMsg.execute("CentralCoreSlot");
	} else if (!slot->_occupied && slot->getName() != "CentralCoreSlot") {
		// Brain card goes into vacant slot
		setVisible(false);
		petMoveToHiddenRoom();
		CAddHeadPieceMsg headpieceMsg(getName());
		headpieceMsg.execute(msg->_other);
		playSound(TRANSLATE("z#116.wav", "z#647.wav"));
		setPosition(Point(0, 0));
		setVisible(false);
		_pieceAdded = true;
	} else {
		// Trying to put brain card into an already occupied slot
		petAddToInventory();
	}

	return true;
}
Пример #2
0
bool CPetDragChev::MouseDragEndMsg(CMouseDragEndMsg *msg) {
	CSuccUBus *succubus = dynamic_cast<CSuccUBus *>(msg->_dropTarget);

	if (succubus) {
		CSetChevRoomBits chevMsg(_destRoomFlags);
		chevMsg.execute(succubus);
		petMoveToHiddenRoom();
	} else {
		CPetControl *petControl = getPetControl();
		if (!petControl || !petControl->contains(msg->_mousePos)
				|| msg->_mousePos.x >= 528 || !petControl->checkDragEnd(this))
			petMoveToHiddenRoom();
	}

	return true;
}
Пример #3
0
bool CDoorbot::PutBotBackInHisBoxMsg(CPutBotBackInHisBoxMsg *msg) {
	petMoveToHiddenRoom();
	_npcFlags &= ~(NPCFLAG_START_IDLING | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_DOORBOT_INTRO);
	if (msg->_value)
		performAction(true);

	return true;
}
Пример #4
0
bool CChicken::ActMsg(CActMsg *msg) {
	if (msg->_action == "GoToPET") {
		setVisible(true);
		petAddToInventory();
	} else if (msg->_action == "Tomato") {
		_string6 = "Tomato";
		loadFrame(4);
		_visibleFrame = 4;
	} else if (msg->_action == "Mustard") {
		_string6 = "Mustard";
		loadFrame(5);
		_visibleFrame = 5;
	} else if (msg->_action == "Bird") {
		_string6 = "Bird";
		loadFrame(2);
		_visibleFrame = 2;
	} else if (msg->_action == "None") {
		setVisible(false);
	} else if (msg->_action == "Clean") {
		_string6 = "None";
		loadFrame(3);
		_field12C = 0;
		_visibleFrame = 3;
	}
	else if (msg->_action == "Dispense Chicken") {
		_string6 = "None";
		_field13C = 0;
		_field12C = 1;
		loadFrame(1);
		_visibleFrame = 1;
		_v1 = 120;
	} else if (msg->_action == "Hot") {
		_v1 = 120;
	} else if (msg->_action == "Eaten") {
		setVisible(false);
		petMoveToHiddenRoom();
		_field13C = 1;
	}

	return true;
}
Пример #5
0
bool CBellBot::PutBotBackInHisBoxMsg(CPutBotBackInHisBoxMsg *msg) {
	petMoveToHiddenRoom();
	_npcFlags &= ~NPCFLAG_START_IDLING;
	return true;
}