-----确诊后直接去治疗的修改方法----
参考别人的帖子...忘记是哪个贴了
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);
}
}
}
谢谢分享啊。早早的就想知道这里如何修改。奈何没有大神指点啊!:D 可惜不能改%数 后面几乎都8x全科的 还是要跑诊断 tgg035220 发表于 2018-9-27 21:19
可惜不能改%数 后面几乎都8x全科的 还是要跑诊断
// Token: 0x06000D2D RID: 3373 RVA: 0x0000AC37 File Offset: 0x00008E37
public bool FullyDiagnosed()
{
return this.DiagnosisCertainty >= GameAlgorithms.Config.DiagnosisCertaintyLevel;
}
可以的。你找到这一处。改成
public bool FullyDiagnosed()
{
return this.DiagnosisCertainty >= 80f;
}
这样就是80%算确诊
页:
[1]