Last active
November 30, 2020 15:51
-
-
Save caligari87/ba9f53b78d287d75fcd1de2aa0cfa62d to your computer and use it in GitHub Desktop.
Example Ugly as Sin food addon. Place in a .pk3 file and load after Ugly as Sin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version "4.5" | |
// Food items that can be directly eaten | |
class ExampleMod_RedApple : UaS_Consumable { | |
default { | |
UaS_Consumable.Calories 95; // Calories | |
UaS_Consumable.Fluid 85; // Millilitres (remember most non-dehydrated foods have a lot of water in them) | |
UaS_Consumable.Bulk 10; // influences number of "bites" it takes to consume foods. | |
UaS_Consumable.Description "A medium-sized red apple."; | |
// UaS_Consumable.OpenMessage1 ""; // Random messages on opening packaged items | |
// UaS_Consumable.OpenMessage2 ""; | |
// UaS_Consumable.OpenMessage3 ""; | |
// +UaS_Consumable.PACKAGED; // Food item must be individually opened, like candybars | |
// +UaS_Consumable.RESEALABLE; // Food item can be re-sealed, like a water bottle. | |
// +UaS_Consumable.DRINKABLE; // Liquid, drunk instead of chewed | |
Inventory.PickupMessage "Picked up a red apple"; | |
tag "Red Apple"; | |
Inventory.Icon "HSCVA0"; // Same graphic used for inventory icon and pickup sprite | |
} | |
} | |
// "Container" that gives multiple consumables when opened. | |
// Can hold items not in current modlist, for maximum compatibility | |
class ExampleMod_RedAppleBag : UaS_FoodPackage { | |
default { | |
UaS_FoodPackage.Description "A bag of red apples."; | |
UaS_FoodPackage.OpenMessage1 "These look delicious!"; // Random messages on opening package | |
UaS_FoodPackage.OpenMessage2 "Snow White would die for this."; | |
UaS_FoodPackage.OpenMessage3 "Are these honeycrisp!?"; | |
Inventory.PickupMessage "Picked up a bag of apples"; | |
tag "Bag of Apples"; | |
Inventory.Icon "HSCVA0"; | |
} | |
override void Contents() { | |
AddItem("ExampleMod_RedApple", 5); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment