Dungeon Crawl Stone Soup Tracker - DCSS
Viewing Issue Advanced Details
8417 Patches minor have not tried 2014-04-23 04:40 2014-06-18 17:03
floatingatoll Both  
wheals All  
normal Both  
resolved 0.15 ancient branch  
0.15-a0-205-g67e6867 done  
none    
none 0.15 ancient branch  
0008417: godprayer.cc: Kiku/Necronomicon fixes, check result of move_item_to_grid and fix return value
godprayer.cc function _altar_prayer, in the context of wishing for a Necronomicon from Kiku, reported a warning where did_something was being assigned and then ignored.

This led to two discoveries.

First, the result of move_item_to_grid (when a Necronomicon is granted) is not checked, so if it fails for some reason the user might still be informed that they received a Necro, incrorectly.

Second, while this function used to require a 'return true' to prevent sacrificing a Necro to Kiku, that code was removed in 0.7.0 and it is now safe (and probably desirable) to return the value of did_something instead. This decays a failed request into a typical prayer, to the best of my understanding anyways.

Patch attached to implement both the move_item_to_grid result check and repair the Necro-Kiku return values, per IRC discussion.

I'm not entirely sure how to test this patch beyond compiling it.
? file icon kiku_necro.patch [^] (1,239 bytes) 2014-04-23 04:40 [Show Content]
Issue History
2014-04-23 04:40 floatingatoll New Issue
2014-04-23 04:40 floatingatoll File Added: kiku_necro.patch
2014-06-18 17:03 wheals Note Added: 0026549
2014-06-18 17:03 wheals Status new => resolved
2014-06-18 17:03 wheals Fixed in Branch => 0.15 development branch
2014-06-18 17:03 wheals Resolution open => done
2014-06-18 17:03 wheals Assigned To => wheals

Notes
(0026549)
wheals   
2014-06-18 17:03   
The code in question has since been refactored to make the return value not an issue, but the case of movement failure still was one; fixed in 26e17d37.