Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

adds replace long and short staff on weapons

Open Knut-Aage-Hofseth opened this issue 7 months ago • 1 comments

Summary

Bugfixes "Add replace option for fault fixing short and long staffs in fault_fixes_melee"

Purpose of change

Closes #81298 Adds recipes for replacing a long or short staff in fault_fixes_melee. Change based on recipe from fault_fixes_tools.

Describe the solution

Copied mend_handle_long_replace and refactored it into mend_staff_long_replace as well as the short one.

Describe alternatives you've considered

Doing as Guardiandll suggested at reddit and only add the fault to the list in the mend_handle_long_replace. I worried that might cause issues with the other possible faults, cracked and chipped f.eks on a shaft that was replaced with a fault_fix that did not remove those specific faults.

Testing

Didn't actually do testing on this.

Additional context

Should the material components for this be changed to be a spear shaft instead of a long stick or 2x4

Knut-Aage-Hofseth avatar Jun 16 '25 10:06 Knut-Aage-Hofseth

(~[slow] ~[.],starting_items)=> (continued from above) ERROR : src/generic_factory.h:489 [const T &generic_factory<fault>::obj(const string_id<T> &) const [T = fault]] invalid fault id "fault_staff_short_broken_half"
(~[slow] ~[.],starting_items)=> 10:28:19.405 ERROR : src/generic_factory.h:489 [const T &generic_factory<fault>::obj(const string_id<T> &) const [T = fault]] invalid fault id "fault_staff_short_off"
(~[slow] ~[.],starting_items)=> 10:28:19.405 ERROR : src/generic_factory.h:489 [const T &generic_factory<fault>::obj(const string_id<T> &) const [T = fault]] invalid fault id "fault_staff_long_off"

GuardianDll avatar Jun 16 '25 14:06 GuardianDll