;#うちこむ人にバランス栄養 #カロリーメイトリキッド ;https://www.otsuka.co.jp/c […]
;#うちこむ人にバランス栄養 #カロリーメイトリキッド ;https://www.otsuka.co.jp/c […]
;#うちこむ人にバランス栄養 #カロリーメイトリキッド ;https://www.otsuka.co.jp/cmt/to_programmer/ ;Author: YOS G-spec #runtime "hsp3cl" #enum global PROTEIN = 0 #enum global FAT #enum global CARBOHYDRATE #enum global VITAMIN #enum global MINERAL #enum global nutritionLen #module Liquid name,nutrition #modcfunc lName return name #modfunc lRefNutrition array ref dim ref,length(nutrition) foreach nutrition: ref.cnt = nutrition.cnt: loop: return #modinit str _name,array _nutrition name = _name foreach _nutrition nutrition.cnt = _nutrition.cnt loop return #global #module Human healthy #modinit healthy = 0 return #modfunc status if healthy { mes "HEALTHY > Good!\n" } else { mes "HEALTHY > Bad...\n" } return #modfunc drink var drinking mes "DRINK > "+lName(drinking) lRefNutrition drinking, nutrition #define isNutritions \ nutrition.PROTEIN & \ nutrition.FAT & \ nutrition.CARBOHYDRATE & \ nutrition.VITAMIN & \ nutrition.MINERAL if isNutritions { mes "\"Delicious!\"" healthy = 1 } else { mes "\"Cool!\"" } return #global dim nutrition, nutritionLen nutrition.PROTEIN = 1 nutrition.FAT = 1 nutrition.CARBOHYDRATE = 1 nutrition.VITAMIN = 1 nutrition.MINERAL = 1 dim waterNutrition, nutritionLen waterNutrition.MINERAL = 1 newmod calorieMateLIQUID, Liquid, "CalorieMateLIQUID", nutrition newmod water, Liquid, "Water", waterNutrition newmod h, Human status h drink h, water status h drink h, calorieMateLIQUID status h