- Added 'ininventory item, amount' option to SBARINFO to check for a minimum

amount instead of mere presence in the inventory.
- Fixed: Door lock messages were overwritten by remote messages.

SVN r1346 (trunk)
This commit is contained in:
Christoph Oelckers 2009-01-02 17:49:48 +00:00
commit 35edd15386
4 changed files with 16 additions and 1 deletions

View file

@ -1292,6 +1292,7 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
this->ParseSBarInfoBlock(sc, cmd.subBlock);
break;
case SBARINFO_ININVENTORY:
cmd.special2 = cmd.special3 = 0;
sc.MustGetToken(TK_Identifier);
if(sc.Compare("not"))
{
@ -1306,6 +1307,13 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
{
sc.ScriptError("'%s' is not a type of inventory item.", sc.String);
}
if (sc.CheckToken(','))
{
sc.MustGetNumber();
if (i == 0) cmd.special2 = sc.Number;
else cmd.special3 = sc.Number;
}
if(sc.CheckToken(TK_OrOr))
{
cmd.flags |= SBARINFOEVENT_OR;