Changeset 377

Show
Ignore:
Timestamp:
07/27/07 11:59:49 (1 year ago)
Author:
takkaria
Message:

Fixes for #253 and #218:

  • Give items that provide light descriptions in obj-info.c.
  • Describe the NO_FUEL flag.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/angband-3.0.8/lib/edit/object.txt

    r374 r377  
    31283128P:0:1d1:0:0:0 
    31293129F:EASY_KNOW 
    3130 D:It is equippable as a light source with a radius of 2 squares, 
    3131 D: or 1 square if it has less than 1500 turns of light remaining. 
    3132 D:  It may also be used to fuel another torch, up to a maximum of 6000 
     3130D:It may be used to fuel another torch, up to a maximum of 6000 
    31333131D: turns of light. 
    31343132 
     
    31403138P:0:1d1:0:0:0 
    31413139F:EASY_KNOW | IGNORE_FIRE 
    3142 D:It is equippable as a light source with a radius of 2 squares. 
    3143 D:  It may also be used to fuel another lantern. 
     3140D:It may be used to fuel another lantern. 
    31443141 
    31453142N:348:& Flask~ of oil 
  • branches/angband-3.0.8/src/obj-info.c

    r220 r377  
    381381        bool something = FALSE; 
    382382 
     383        /* Describe lights */ 
     384        if (o_ptr->tval == TV_LITE || (f3 & TR3_LITE)) 
     385        { 
     386                bool artifact = artifact_p(o_ptr); 
     387                bool no_fuel = (f3 & TR3_NO_FUEL) ? TRUE : FALSE; 
     388                int rad = 0; 
     389 
     390                if (artifact) 
     391                        rad = 3; 
     392                else if (o_ptr->tval == TV_LITE) 
     393                        rad = 2; 
     394 
     395                if (f3 & TR3_LITE) rad++; 
     396 
     397                p_text_out("It usually provides light of radius "); 
     398                text_out_c(TERM_L_GREEN, format("%d", rad)); 
     399                if (no_fuel && !artifact) 
     400                        text_out(", and never needs refuelling"); 
     401                else if (o_ptr->tval == TV_LITE && o_ptr->sval == SV_LITE_TORCH) 
     402                        text_out(", though this is reduced when running of out fuel"); 
     403                text_out(".  "); 
     404 
     405                something = TRUE; 
     406        } 
     407 
    383408        /* Collect stuff which can't be categorized */ 
    384409        if (f3 & (TR3_BLESSED))     good[gc++] = "is blessed by the gods"; 
     
    386411        if (f3 & (TR3_SLOW_DIGEST)) good[gc++] = "slows your metabolism"; 
    387412        if (f3 & (TR3_FEATHER))     good[gc++] = "makes you fall like a feather"; 
    388         if (((o_ptr->tval == TV_LITE) && artifact_p(o_ptr)) || (f3 & (TR3_LITE))) 
    389                 good[gc++] = "lights the dungeon around you"; 
    390413        if (f3 & (TR3_REGEN))       good[gc++] = "speeds your regeneration"; 
    391414