游戏狂人
- 贡献度
- 118
- 金元
- 8423
- 积分
- 1314
- 精华
- 0
- 注册时间
- 2009-11-4
|
参考别人的帖子...忘记是哪个贴了
ProcessDiagnosis
---------------------------------------新加的
if (patient.FullyDiagnosed()) //判断是不是确诊了.默认90%就算确诊了
{
//这一句是送去治疗
patient.SendToTreatmentRoom(patient.Illness.GetTreatmentRoom(patient, researchManager), true);
return;
}
--------------------------
改完后看起来如下
private void ProcessDiagnosis(Patient patient)
{
Level level = patient.Level;
ResearchManager researchManager = level.ResearchManager;
if (this._doctor.ModifiersComponent != null)
{
this._doctor.ModifiersComponent.ApplyInteractWithOtherModifiers(patient);
}
float certainty = GameAlgorithms.GetDiagnosisCertainty(patient, this._room, this._doctor, researchManager).Certainty;
patient.ReceiveDiagnosis(this._room, this._doctor, certainty);
this._room.OnUnitProcessed();
if (this._room.Definition._type == RoomDefinition.Type.GPOffice)
{
if (patient.FullyDiagnosed())
{
patient.SendToTreatmentRoom(patient.Illness.GetTreatmentRoom(patient, researchManager), true);
}
else
{
patient.SendToDiagnosisRoom(DiagnosisTreatmentComponent.GetDiagnosisRoom(patient, this._doctor));
}
}
else
{
if (patient.FullyDiagnosed())
{
patient.SendToTreatmentRoom(patient.Illness.GetTreatmentRoom(patient, researchManager), true);
return;
}
Room bestRoomOfType = GameAlgorithms.GetBestRoomOfType(level.WorldState, RoomDefinition.Type.GPOffice, patient);
if (bestRoomOfType != null)
{
patient.GotoRoom(bestRoomOfType, ReasonUseRoom.Diagnosis, false, -1);
}
else
{
patient.WaitForRoomToBeBuilt(RoomDefinition.Type.GPOffice, ReasonUseRoom.Diagnosis, GameAlgorithms.Config.PatientWaitLongTime);
}
}
}
|
|