CleverRaven/Cataclysm-DDA — pull request #9183 by BevapDin (2014-09-22 11:54:32+00:00)
Title: Debug message upon invalid monster group

Regarding #9181 (does technically not fix it):

The map of monster groups is accessed directly *without* checking whether the entry actually exists. If the entry does not exist, a default created monster group is returned. That group has the default monster id "" (empty string).

I can reproduce the message in #9181, with the changes in this PR, a message still appears, but says "Unable to get group 'GROUP_POWER_WORKERS'". The current version would not print that message but return an empty monster group (see above). The monster type id taken from that group is empty, but there is obviously no such monster type defined leading to the message mentioned in #9181.

This PR makes all access to a specific item in the monster group map go through the proper function, which checks for the existence of the requested entry and prints the message above if the entry does not exist.

I can not find the string "GROUP_POWER_WORKERS" anywhere in the current master branch. It seems it has been removed with cb321c6c11bb1f0756a4057d9a62f8f9f384d0ca. But old saves will still contain that monster group ident and lead to the debug message.