Changeset 859

Show
Ignore:
Timestamp:
04/28/08 23:04:22 (4 months ago)
Author:
takkaria
Message:

Remove the race field in the owner_type struct in favour of providing it textually.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/edit/shop_own.txt

    r858 r859  
    1212# Format: 
    1313# N:store:owner idx:owner name 
    14 # I:race idx:purse 
     14# I:purse 
     15 
    1516 
    1617 
     
    2021 
    2122# General Store 
    22 N:0:0:Bilbo the Friendly 
    23 I:3:5000 
    24 N:0:1:Rincewind the Chicken 
    25 I:0:10000 
    26 N:0:2:Snafu the Midget 
    27 I:4:20000 
    28 N:0:3:Lyar-el the Comely 
    29 I:2:30000 
     23N:0:0:Bilbo the Friendly (Hobbit) 
     24I:5000 
     25N:0:1:Rincewind the Chicken (Human) 
     26I:10000 
     27N:0:2:Snafu the Midget (Gnome) 
     28I:20000 
     29N:0:3:Lyar-el the Comely (Elf) 
     30I:30000 
    3031 
    3132# Armoury 
    32 N:1:0:Kon-Dar the Ugly 
    33 I:6:5000 
    34 N:1:1:Darg-Low the Grim 
    35 I:0:10000 
    36 N:1:2:Decado the Handsome 
    37 I:8:25000 
    38 N:1:3:Mauglin the Grumpy 
    39 I:5:30000 
     33N:1:0:Kon-Dar the Ugly (Half-Orc) 
     34I:5000 
     35N:1:1:Darg-Low the Grim (Human) 
     36I:10000 
     37N:1:2:Decado the Handsome (Dundan) 
     38I:25000 
     39N:1:3:Mauglin the Grumpy (Dwarf) 
     40I:30000 
    4041 
    4142# Weapon Smith 
    42 N:2:0:Ithyl-Mak the Beastly 
    43 I:7:5000 
    44 N:2:1:Arndal Beast-Slayer 
    45 I:1:10000 
    46 N:2:2:Tarl Beast-Master 
    47 I:3:25000 
    48 N:2:3:Oglign Dragon-Slayer 
    49 I:5:30000 
     43N:2:0:Ithyl-Mak the Beastly (Half-Troll) 
     44I:5000 
     45N:2:1:Arndal Beast-Slayer (Half-Elf) 
     46I:10000 
     47N:2:2:Tarl Beast-Master (Hobbit) 
     48I:25000 
     49N:2:3:Oglign Dragon-Slayer (Dwarf) 
     50I:30000 
    5051 
    5152# Temple 
    52 N:3:0:Ludwig the Humble 
    53 I:0:15000 
    54 N:3:1:Gunnar the Paladin 
    55 I:0:20000 
    56 N:3:2:Delilah the Pure 
    57 I:2:25000 
    58 N:3:3:Bosk the Wise 
    59 I:5:30000 
     53N:3:0:Ludwig the Humble (Human) 
     54I:15000 
     55N:3:1:Gunnar the Paladin (Human) 
     56I:20000 
     57N:3:2:Delilah the Pure (Elf) 
     58I:25000 
     59N:3:3:Bosk the Wise (Dwarf) 
     60I:30000 
    6061 
    6162# Alchemist 
    62 N:4:0:Mauser the Chemist 
    63 I:1:10000 
    64 N:4:1:Wizzle the Chaotic 
    65 I:3:10000 
    66 N:4:2:Ga-nat the Greedy 
    67 I:4:15000 
    68 N:4:3:Vella the Slender 
    69 I:0:15000 
     63N:4:0:Mauser the Chemist (Half-Elf) 
     64I:10000 
     65N:4:1:Wizzle the Chaotic (Hobbit) 
     66I:10000 
     67N:4:2:Ga-nat the Greedy (Gnome) 
     68I:15000 
     69N:4:3:Vella the Slender (Human) 
     70I:15000 
    7071 
    7172# Magic Shop 
    72 N:5:0:Ariel the Sorceress 
    73 I:1:15000 
    74 N:5:1:Buggerby the Great 
    75 I:4:20000 
    76 N:5:2:Inglorian the Mage 
    77 I:0:25000 
    78 N:5:3:Luthien Starshine 
    79 I:9:30000 
     73N:5:0:Ariel the Sorceress (Half-Elf) 
     74I:15000 
     75N:5:1:Buggerby the Great (Gnome) 
     76I:20000 
     77N:5:2:Inglorian the Mage (Human) 
     78I:25000 
     79N:5:3:Luthien Starshine (High-Elf) 
     80I:30000 
    8081 
    8182# Black Market 
    82 N:6:0:Lo-Hak the Awful 
    83 I:7:15000 
    84 N:6:1:Histor the Goblin 
    85 I:10:20000 
    86 N:6:2:Durwin the Shifty 
    87 I:6:25000 
    88 N:6:3:Drago the Fair 
    89 I:2:30000 
     83N:6:0:Lo-Hak the Awful (Half-Troll) 
     84I:15000 
     85N:6:1:Histor the Goblin (Kobold) 
     86I:20000 
     87N:6:2:Durwin the Shifty (Half-Orc) 
     88I:25000 
     89N:6:3:Drago the Fair (Elf) 
     90I:30000 
    9091 
    9192# Home 
    9293N:7:0:Your home 
    93 I:99:
     94I:
    9495N:7:1:Your home 
    95 I:99:
     96I:
    9697N:7:2:Your home 
    97 I:99:
     98I:
    9899N:7:3:Your home 
    99 I:99:
     100I:
  • trunk/src/init1.c

    r857 r859  
    29662966        else if (buf[0] == 'I') 
    29672967        { 
    2968                 int idx, gld, inflate; 
     2968                int purse; 
    29692969 
    29702970                /* There better be a current ot_ptr */ 
     
    29722972 
    29732973                /* Scan for the values */ 
    2974                 if (2 != sscanf(buf+2, "%d:%d", 
    2975                                     &idx, &gld)) return (PARSE_ERROR_GENERIC); 
     2974                if (1 != sscanf(buf+2, "%d", &purse)) return (PARSE_ERROR_GENERIC); 
    29762975 
    29772976                /* Save the values */ 
    2978                 ot_ptr->owner_race = idx; 
    2979                 ot_ptr->max_cost = gld; 
     2977                ot_ptr->max_cost = purse; 
    29802978        } 
    29812979        else 
  • trunk/src/store.c

    r856 r859  
    16961696        else 
    16971697        { 
    1698                 cptr store_name = (f_name + f_info[FEAT_SHOP_HEAD + store_current].name); 
    1699                 cptr owner_name = &(b_name[ot_ptr->owner_name]); 
    1700                 cptr race_name = p_name + p_info[ot_ptr->owner_race].name; 
    1701  
    1702                 /* Put the owner name and race */ 
    1703                 strnfmt(buf, sizeof(buf), "%s (%s)", owner_name, race_name); 
    1704                 put_str(buf, scr_places_y[LOC_OWNER], 1); 
     1698                const char *store_name = (f_name + f_info[FEAT_SHOP_HEAD + store_current].name); 
     1699                const char *owner_name = &b_name[ot_ptr->owner_name]; 
     1700 
     1701                /* Put the owner name */ 
     1702                put_str(owner_name, scr_places_y[LOC_OWNER], 1); 
    17051703 
    17061704                /* Show the max price in the store (above prices) */ 
  • trunk/src/types.h

    r856 r859  
    576576{ 
    577577        u32b owner_name;        /* Name (offset) */ 
    578  
    579578        s32b max_cost;          /* Purse limit */ 
    580  
    581         byte owner_race;        /* Owner race */ 
    582579}; 
    583580