I fixed a bug with the humiliating punishments.
line 838 of punishishments.rpy in \Lab_Rats_2-v0.40.1-pc\game sets the crisis removal requirements wrong.
It reads:
Python:
$ clear_action = Action("Clear employee busywork", employee_humiliating_work_role, "employee_humiliating_work_remove_requirement", args = the_person, requirement_args = [the_person, day + 7])
It should read:
Python:
$ clear_action = Action("Clear employee humiliating work", employee_humiliating_work_remove_requirement, "employee_humiliating_work_remove_label", args = the_person, requirement_args = [the_person, day + 7])
The check_requirements function is blowing up because it's expecting the requirement function to be passed for the requirement parameter, but is receiving the role instead. Likewise, it's expecting the effects parameter to receive a string (for some reason) containing the name of the removal function, but is receiving a string containing the name of the requirement function instead.
Fixing this should allow humiliating punishments to work properly. However if you already have humiliating punishment removal actions queued in the mandatory_crises_list, the fix will not address those as they were already added to the list incorrectly.
To address the previous erroneous crisis actions, I added a few lines above the is_action_enabled check in the advance_time label. It was line 411 of my script.rpy file that reads:
Python:
if crisis.is_action_enabled():
$ crisis.call_action()
Just above that (within the same While loop) I inserted:
Python:
if crisis.effect == "employee_humiliating_work_remove_requirement":
$ crisis.effect = "employee_humiliating_work_remove_label"
$ crisis.requirement = employee_humiliating_work_remove_requirement
$ crisis.name = "Clear employee humilating work"
That reassignment cleans any of the invalid humiliating work removal actions in mandatory_crises_list, and should become irrelevant going forward assuming the first fix I mentioned is also implemented.
I'm not a programmer, so I don't really know how to package this as a fix, but maybe someone more knowledgeable than me can do that.