Misc little things

- Some item abilities didn't appear in the editor ability selection dialog
- If have (+take) nodes took by default (ie when left at -1)
- Rename button in edit terrain dialog, as the old name barely fit
This commit is contained in:
2015-06-30 12:53:42 -04:00
parent c1dbe192a1
commit 74273783b9
4 changed files with 8 additions and 8 deletions

View File

@@ -95,7 +95,7 @@
<field name='arena' top='275' left='467' height='16' width='64'/> <field name='arena' top='275' left='467' height='16' width='64'/>
<button name='pickarena' type='regular' top='299' left='467'>Choose</button> <button name='pickarena' type='regular' top='299' left='467'>Choose</button>
<button name='picktown' type='regular' top='299' left='532'>Custom</button> <button name='picktown' type='regular' top='299' left='532'>Custom</button>
<button name='object' top='344' left='467' type='large'>Object Details</button> <button name='object' top='344' left='467' type='large'>Object Detail</button>
<text top='63' left='430' width='60' height='14'>Map icon:</text> <text top='63' left='430' width='60' height='14'>Map icon:</text>
<pict name='seemap' top='86' left='465' type='map' num='0'/> <pict name='seemap' top='86' left='465' type='map' num='0'/>
<field name='map' top='62' left='495' width='80' height='16'/> <field name='map' top='62' left='495' width='80' height='16'/>

View File

@@ -3364,13 +3364,13 @@ void ifthen_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
break; break;
case eSpecType::IF_HAS_GOLD: case eSpecType::IF_HAS_GOLD:
if(univ.party.gold >= spec.ex1a) { if(univ.party.gold >= spec.ex1a) {
if(spec.ex2a) take_gold(spec.ex1a,true); if(spec.ex2a > 0) take_gold(spec.ex1a,true);
*next_spec = spec.ex1b; *next_spec = spec.ex1b;
} }
break; break;
case eSpecType::IF_HAS_FOOD: case eSpecType::IF_HAS_FOOD:
if(univ.party.food >= spec.ex1a) { if(univ.party.food >= spec.ex1a) {
if(spec.ex2a) take_food(spec.ex1a,true); if(spec.ex2a > 0) take_food(spec.ex1a,true);
*next_spec = spec.ex1b; *next_spec = spec.ex1b;
} }
break; break;
@@ -3382,14 +3382,14 @@ void ifthen_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
if(univ.town.items[i].variety != eItemType::NO_ITEM && univ.town.items[i].special_class == (unsigned)spec.ex2a if(univ.town.items[i].variety != eItemType::NO_ITEM && univ.town.items[i].special_class == (unsigned)spec.ex2a
&& l == univ.town.items[i].item_loc) { && l == univ.town.items[i].item_loc) {
*next_spec = spec.ex2b; *next_spec = spec.ex2b;
if(spec.ex2c) { if(spec.ex2c > 0) {
*redraw = 1; *redraw = 1;
univ.town.items[i].variety = eItemType::NO_ITEM; univ.town.items[i].variety = eItemType::NO_ITEM;
} }
} }
break; break;
case eSpecType::IF_HAVE_ITEM_CLASS: case eSpecType::IF_HAVE_ITEM_CLASS:
if(univ.party.check_class(spec.ex1a,spec.ex2a)) if(univ.party.check_class(spec.ex1a,spec.ex2a > 0))
*next_spec = spec.ex1b; *next_spec = spec.ex1b;
break; break;
case eSpecType::IF_EQUIP_ITEM_CLASS: case eSpecType::IF_EQUIP_ITEM_CLASS:
@@ -3399,7 +3399,7 @@ void ifthen_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
if(univ.party[i].items[j].variety != eItemType::NO_ITEM && univ.party[i].items[j].special_class == (unsigned)spec.ex1a if(univ.party[i].items[j].variety != eItemType::NO_ITEM && univ.party[i].items[j].special_class == (unsigned)spec.ex1a
&& univ.party[i].equip[j]) { && univ.party[i].equip[j]) {
*next_spec = spec.ex1b; *next_spec = spec.ex1b;
if(spec.ex2c) { if(spec.ex2a > 0) {
*redraw = 1; *redraw = 1;
univ.party[i].take_item(j); univ.party[i].take_item(j);
if(i == stat_window) if(i == stat_window)

View File

@@ -842,7 +842,7 @@ void place_party(short direction) {
where_in_a++; where_in_a++;
how_many_ok--; how_many_ok--;
// if(how_many_ok > 1) { // if(how_many_ok > 1) {
while(!spot_ok[where_in_a]) while(!spot_ok[where_in_a] && where_in_a < 14)
where_in_a++; where_in_a++;
// } // }
} }

View File

@@ -1878,7 +1878,7 @@ static bool edit_item_abil_event_filter(cDialog& me, std::string hit, cItem& ite
giveError("You can only give an ability of this sort to an non-missile item which can be equipped (like armor, or a ring).",&me); giveError("You can only give an ability of this sort to an non-missile item which can be equipped (like armor, or a ring).",&me);
return true; return true;
} }
i = choose_text_res("item-abilities", 30, 58, int(item.ability), &me, "Choose General Ability (inherent)"); i = choose_text_res("item-abilities", 30, 60, int(item.ability), &me, "Choose General Ability (inherent)");
if(i < 0) return true; if(i < 0) return true;
item.ability = eItemAbil(i + 30); item.ability = eItemAbil(i + 30);
put_item_abils_in_dlog(me, item, which); put_item_abils_in_dlog(me, item, which);