public override void OnDestroyed( WoodenBox lootbox ) { Item book; if( Utility.RandomBool( ) ) { book = new BlueBook( ); } else { book = new BrownBook( ); } if( book != null || !book.Deleted ) lootbox.DropItem( book ); if( Utility.RandomDouble( ) < 0.25 ) { Item loot; if( Utility.RandomBool( ) ) { loot = new ScribesPen( ); } else { loot = new MapmakersPen( ); } if( loot != null || !loot.Deleted ) lootbox.DropItem( loot ); } }
public void PackItems() { AddItem(new BlueBook()); var candle = new CandleLong(); candle.Hue = 34; candle.Name = "Be My Valentine"; DropItem(candle); var book = new BlueBook(); book.Hue = 30; DropItem(book); DropItem(new RedPoinsettia()); }
public override void OnDestroyed(WoodenBox lootbox) { Item book; if (Utility.RandomBool( )) { book = new BlueBook( ); } else { book = new BrownBook( ); } if (book != null || !book.Deleted) { lootbox.DropItem(book); } if (Utility.RandomDouble( ) < 0.25) { Item loot; if (Utility.RandomBool( )) { loot = new ScribesPen( ); } else { loot = new MapmakersPen( ); } if (loot != null || !loot.Deleted) { lootbox.DropItem(loot); } } }