public void WalkToTingAndUseHandItem(Ting pOtherTing) { rememberToHackComputerAfterSittingDown = false; if (pOtherTing.HasInteractionPointHere (this.position)) { UseHandItemToInteractWith (pOtherTing); return; } PrepareForNewWalkBehaviour(pOtherTing.position, pOtherTing, WalkMode.WALK_TO_TING_AND_USE_HAND_ITEM); }
/// <summary> /// If the other ting is pickupable, the character will just pick it up and not do anything with it. /// If the other ting is not pickupable, the character will interact directly with it using the InteractWith() function. /// </summary> public void WalkToTingAndInteract(Ting pOtherTing) { rememberToHackComputerAfterSittingDown = false; if(isAvatar && pOtherTing is Door) { Door door = pOtherTing as Door; if(door.isBusy) { _worldSettings.Notify(name, "Door in use, will wait in line"); rememberToUseDoorAfterWaitingPolitely = door; WalkTo (new WorldCoordinate(room.name, door.waitingPoint)); return; } } if (pOtherTing.HasInteractionPointHere (this.position)) { if (pOtherTing.canBePickedUp) { logger.Log (name + " will pick up " + pOtherTing + " directly, no need to move"); PickUp (pOtherTing); } else { logger.Log (name + " will interact directly with " + pOtherTing + ", no need to move"); InteractWith (pOtherTing); } return; } if(pOtherTing is Character && MimanGrimmApiDefinitions.AreTingsWithinDistance(this, pOtherTing, 10)) { Character otherCharacter = pOtherTing as Character; if(this.sitting || this.laying || otherCharacter.HasNoFreeInteractionPoints()) { #if LOG logger.Log(name + " is using direct interaction with " + otherCharacter); #endif InteractWith(pOtherTing); return; } } PrepareForNewWalkBehaviour(pOtherTing.position, pOtherTing, WalkMode.WALK_TO_TING_AND_INTERACT); }