More Traits. ComputerPers FIX
О материале
«More Traits. ComputerPers FIX» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
✅ Fixed Functions in MoreTraits.lua Critical Fixes (Prevent Crashes):
-
GymGoer (line 3239) Issue: player:getCurrentState() could return nil Fix: Added check currentState and currentState == FitnessState.instance()
-
GymGoerUpdate (line 3250) Issue: player:getFitness() could return nil, multiple getBodyPart() calls without checks Fix: Added fitness check at function start Replaced all player:getFitness() calls with fitness variable Added safe checks for all getBodyPart() calls (arms, legs, chest, abs)
-
TerminatorGun (line 3974) Issue: Repeated player:getCurrentState() calls without nil checks Fix: Added currentState and checks for both branches (Terminator and antigun)
Important Fixes (Weapon):
-
martial (line 1827) Issue: Direct weapon:getType() call without safe check Fix: Added weapon.getType and weapon:getType() or nil check
-
actionhero (line 2262) Issue: Missing weapon == nil check, direct weapon:getType() call Fix: Added weapon == nil checks and safe getType() call
-
mundane (line 3642) Issue: Missing weapon == nil check, direct weapon:getModData() call Fix: Added weapon == nil and _actor ~= player checks
Additional Fixes (Stability):
-
GlassBody (line 3496) Issue: Direct getBodyPart() call without result check Fix: Added neckPart and neckPart:getAdditionalPain() > 0 check
-
RestfulSleeper (line 3917) Issue: Direct access to getBodyPart() methods without checks Fix: Added Neck and Neck:getAdditionalPain() > 0 check
-
RestfulSleeperWakeUp (line 3941) Issue: Direct access to getBodyPart() methods without checks Fix: Added Neck and Neck:getAdditionalPain() > 0 check
Total: 9 Functions Fixed All fixes prevent crashes like:
-
“Object tried to call nil in prospear”
-
“Attempt to call method on nil value”
-
Crashes during bare-handed attacks (Shove)
-
Crashes during GymGoer trait exercises
-
Crashes during Terminator trait shooting
Fixed a crash when attacking (including Shove/unarmed) due to nil weapon or missing weapon categories in trait event handlers. Added safe checks for weapon/category access (getCategories/getSubCategory) to prevent “Object tried to call nil in prospear”. Hardened handlers: prospear, problunt, problade, progun, tavernbrawler, and martial. No gameplay/balance changes — only stability improvements.
Functions now safely handle nil values and missing methods.
Workshop ID: 3587315482 Mod ID: CP_MoreTraits
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.