// Maria's food stock

ON INIT {
>>FREE_REFILL 
 SET_SHOP YES
 SHOP_CATEGORY PROVISIONS
 SHOP_MULTIPLY 1.1
 INVENTORY ADDMULTI "PROVISIONS\\FOOD_LEEK\\FOOD_LEEK" 4
 INVENTORY ADDMULTI "PROVISIONS\\GARLIC\\GARLIC" 4
 INVENTORY ADDMULTI "PROVISIONS\\CARROT\\CARROT" 4
 INVENTORY ADDMULTI "PROVISIONS\\FOOD_APPLE\\FOOD_APPLE" 7
 INVENTORY ADDMULTI "PROVISIONS\\FOOD_FISH\\FOOD_FISH" 7
 INVENTORY ADDMULTI "PROVISIONS\\FOOD_CHICKEN_UNCOOKED\\FOOD_CHICKEN_UNCOOKED" 8
 INVENTORY ADDMULTI "PROVISIONS\\BREAD\\BREAD" 7
 INVENTORY ADDMULTI "PROVISIONS\CHEESE\CHEESE" 5
 INVENTORY ADDMULTI "PROVISIONS\\SALT\\SALT" 17
 INVENTORY ADDMULTI "PROVISIONS\\IRON_RATION\\IRON_RATION" 8
 SET §unlock 1
 SET £key "KEY_BASE_0072"
 ACCEPT
}

ON INITEND {
 SENDEVENT -ri IDENTIFY 100 ""
 ACCEPT
}

ON RESET {
 INVENTORY DESTROY
 GOTO FREE_REFILL
 ACCEPT
}

ON CUSTOM { 
  IF (^$PARAM1 == "DEAD") {
    SET_SHOP NO
    SET §unlock 0
    ACCEPT
  }
 IF (^$PARAM1 == "LOCK") {
   SET §unlock 0
   SET_SHOP NO
   ACCEPT
 }  
 IF (^$PARAM1 == "UNLOCK") {
   SET §unlock 1
   SET_SHOP YES
   ACCEPT
 }
 ACCEPT 
}
ON INVENTORY2_OPEN {
 IF (#SHOPPING == 1) ACCEPT
 SET #SHOPPING 1
 HEROSAY [tutorial_shop]
 ACCEPT
}