- juraj.horvathspecialist
- Posts : 146
Reputation : 8
Join date : 2018-08-07
Age : 45
Location : Bratislava, Slovak Republic
[Enhancement/Bug] [dnSpy] Some parameters from department configuration are ignored
Wed Jan 01, 2020 11:54 pm
Description
Some parameters (exactly MinHospitalizationDoctorsDay, MinHospitalizationDoctorNight, MinHospitalizationNursesDay, MinHospitalizationNursesNight, MinSurgeonsDay, MinAnestezilogistDay and MinSurgeryNurseDay) are ignored in validation of hospitalization part of any department.
I was investigating, if changing mentioned parameters (I want to create non-surgical department) has any effect. I found that effect is more-less none, the game ignores parameters. I dig deeper into problem with dnSpy and found surprise in Lopital.Department.ValidateInpatients method
m_surgeryStaff and m_inpatientStaff are used in hospital part validation, so by above code, you have to have at least 1 surgeon, 1 surgeon assistant, 1 anesthesiologist, 3 nurses and (voila!) surgery nurses by configuration, also you must have at least 1 doctor at day and night, 3 nurses at day and 1 nurse at night. This can be easily fixed (more-less) by replacing hardcoded constants with configuration, the only problem is night surgical staff - in current state it does not have any configuration items.
Some parameters (exactly MinHospitalizationDoctorsDay, MinHospitalizationDoctorNight, MinHospitalizationNursesDay, MinHospitalizationNursesNight, MinSurgeonsDay, MinAnestezilogistDay and MinSurgeryNurseDay) are ignored in validation of hospitalization part of any department.
I was investigating, if changing mentioned parameters (I want to create non-surgical department) has any effect. I found that effect is more-less none, the game ignores parameters. I dig deeper into problem with dnSpy and found surprise in Lopital.Department.ValidateInpatients method
- Code:
this.m_departmentPersistentData.m_departmentValidity.m_surgeryStaff = (this.m_departmentPersistentData.m_departmentValidity.m_surgeonsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeonAssistCountDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_anesthesiologistsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeryNursesDay >= this.m_departmentPersistentData.m_departmentType.Entry.MinSurgeryNurseDay && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesDay >= 3);
this.m_departmentPersistentData.m_departmentValidity.m_surgeryStaffNight = (this.m_departmentPersistentData.m_departmentValidity.m_surgeonsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeonAssistCountNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_anesthesiologistsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeryNursesNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesNight >= 3);
...
this.m_departmentPersistentData.m_departmentValidity.m_inpatientStaff = (this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesDay >= 3 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesNight >= 1);
this.m_departmentPersistentData.m_departmentValidity.m_inpatientStaffDay = (this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesDay >= 3);
this.m_departmentPersistentData.m_departmentValidity.m_inpatientStaffNight = (this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesNight >= 1);
m_surgeryStaff and m_inpatientStaff are used in hospital part validation, so by above code, you have to have at least 1 surgeon, 1 surgeon assistant, 1 anesthesiologist, 3 nurses and (voila!) surgery nurses by configuration, also you must have at least 1 doctor at day and night, 3 nurses at day and 1 nurse at night. This can be easily fixed (more-less) by replacing hardcoded constants with configuration, the only problem is night surgical staff - in current state it does not have any configuration items.
- ondrej.oxymorondeveloper
- Posts : 605
Reputation : 55
Join date : 2018-03-23
Re: [Enhancement/Bug] [dnSpy] Some parameters from department configuration are ignored
Fri Jan 17, 2020 4:34 pm
juraj.horvath wrote:Description
Some parameters (exactly MinHospitalizationDoctorsDay, MinHospitalizationDoctorNight, MinHospitalizationNursesDay, MinHospitalizationNursesNight, MinSurgeonsDay, MinAnestezilogistDay and MinSurgeryNurseDay) are ignored in validation of hospitalization part of any department.
I was investigating, if changing mentioned parameters (I want to create non-surgical department) has any effect. I found that effect is more-less none, the game ignores parameters. I dig deeper into problem with dnSpy and found surprise in Lopital.Department.ValidateInpatients method
- Code:
this.m_departmentPersistentData.m_departmentValidity.m_surgeryStaff = (this.m_departmentPersistentData.m_departmentValidity.m_surgeonsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeonAssistCountDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_anesthesiologistsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeryNursesDay >= this.m_departmentPersistentData.m_departmentType.Entry.MinSurgeryNurseDay && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesDay >= 3);
this.m_departmentPersistentData.m_departmentValidity.m_surgeryStaffNight = (this.m_departmentPersistentData.m_departmentValidity.m_surgeonsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeonAssistCountNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_anesthesiologistsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_surgeryNursesNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesNight >= 3);
...
this.m_departmentPersistentData.m_departmentValidity.m_inpatientStaff = (this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesDay >= 3 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesNight >= 1);
this.m_departmentPersistentData.m_departmentValidity.m_inpatientStaffDay = (this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsDay >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesDay >= 3);
this.m_departmentPersistentData.m_departmentValidity.m_inpatientStaffNight = (this.m_departmentPersistentData.m_departmentValidity.m_inpatientDoctorsNight >= 1 && this.m_departmentPersistentData.m_departmentValidity.m_inpatientNursesNight >= 1);
m_surgeryStaff and m_inpatientStaff are used in hospital part validation, so by above code, you have to have at least 1 surgeon, 1 surgeon assistant, 1 anesthesiologist, 3 nurses and (voila!) surgery nurses by configuration, also you must have at least 1 doctor at day and night, 3 nurses at day and 1 nurse at night. This can be easily fixed (more-less) by replacing hardcoded constants with configuration, the only problem is night surgical staff - in current state it does not have any configuration items.
Hi and thank you for noticing this. This is actually something we have on our TODO list and we plan to address that with some changes we plan in the future:)
- MoominLittlesocksresident
- Posts : 24
Reputation : 6
Join date : 2019-09-25
Age : 32
Location : Cardiff, Wales
Re: [Enhancement/Bug] [dnSpy] Some parameters from department configuration are ignored
Sun Feb 09, 2020 1:26 pm
Thank you for finding this Juraj! Very eager for this bug to be fixed.
- Sponsored content
Permissions in this forum:
You cannot reply to topics in this forum