Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0008869 [DCSS] Patches text N/A 2014-08-13 11:46 2014-09-21 10:51
Reporter nagdon View Status public  
Assigned To wheals
Priority normal Resolution done  
Status closed   Product Branch 0.16 ancient branch
Summary 0008869: Clarify why teleportation/hasting is unavailable
Description The attached patch replaces the "You cannot teleport/haste right now." messages with ones describing why it is impossible to teleport/haste.

I hope there aren't grammar issues with the messages.

This was suggested in the following thread:
https://crawl.develz.org/tavern/viewtopic.php?f=8&t=12916 [^]
Additional Information
Tags No tags attached.
Attached Files ? file icon 0001-Clarify-why-teleportation-hasting-is-unavailable.patch [^] (13,564 bytes) 2014-08-13 11:46 [Show Content]
? file icon clarify_notele_msg_v2.patch [^] (18,271 bytes) 2014-08-13 20:55 [Show Content]

- Relationships

-  Notes
(0026998)
neil (administrator)
2014-08-13 17:17

I like the idea, but I don't like that code duplication. Perhaps scan_artefacts could take an optional vector<string>*, filling in the problems if that pointer is non-NULL.
(0027000)
nagdon (reporter)
2014-08-13 21:01

I uploaded a version without code duplication.

I added vector<item_def> * arguments (vector<string> * wasn't enough because I handle weapons and amulets differently from other items) to the actor::scan_artefacts() and actor::has_notele_item() methods (scan_artefacts() is called from has_notele_item() and I call has_notele_item()). The message generation isn't much shorter, but now it doesn't duplicate code.
(0027313)
wheals (administrator)
2014-09-19 23:07

The code looks good and it seems to work with some testing, pushed to trunk in 0.16-a0-701-g91f9442.
(0027317)
nagdon (reporter)
2014-09-20 11:10

I found a minor bug in my code: in player.cc line 7130, a negation is missing.
The line is "found_nonartefact = is_artefact(*amulet);" and this should be "found_nonartefact = !is_artefact(*amulet);" instead.
(0027331)
wheals (administrator)
2014-09-21 04:23

Good catch, fixed in 0.16-a0-719-g46fedb6.

- Issue History
Date Modified Username Field Change
2014-08-13 11:46 nagdon New Issue
2014-08-13 11:46 nagdon File Added: 0001-Clarify-why-teleportation-hasting-is-unavailable.patch
2014-08-13 17:17 neil Note Added: 0026998
2014-08-13 20:55 nagdon File Added: clarify_notele_msg_v2.patch
2014-08-13 21:01 nagdon Note Added: 0027000
2014-09-19 23:07 wheals Note Added: 0027313
2014-09-19 23:07 wheals Status new => resolved
2014-09-19 23:07 wheals Fixed in Branch => 0.16 development branch
2014-09-19 23:07 wheals Resolution open => done
2014-09-19 23:07 wheals Assigned To => wheals
2014-09-20 11:10 nagdon Note Added: 0027317
2014-09-20 11:10 nagdon Status resolved => new
2014-09-20 11:10 nagdon Resolution done => reopened
2014-09-21 04:23 wheals Note Added: 0027331
2014-09-21 04:23 wheals Status new => resolved
2014-09-21 04:23 wheals Resolution reopened => done
2014-09-21 10:50 nagdon Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker