123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- class GreenBellPepper : Edible_Base
- {
- override bool CanBeCookedOnStick()
- {
- return true;
- }
- override bool CanBeCooked()
- {
- return true;
- }
-
- override bool IsFruit()
- {
- return true;
- }
-
- override bool CanDecay()
- {
- return true;
- }
-
- override void SetActions()
- {
- super.SetActions();
-
- AddAction(ActionForceFeed);
- AddAction(ActionEat);
- AddAction(ActionCreateIndoorFireplace);
- AddAction(ActionCreateIndoorOven);
- }
-
- override void EEOnCECreate()
- {
- int rand = Math.RandomInt(0,10);
- float baseTemp = GetGame().GetMission().GetWorldData().GetBaseEnvTemperature();
- if ( baseTemp <= GameConstants.COLD_AREA_TEMPERATURE_THRESHOLD )
- {
- int randQ = Math.RandomFloat(10,80);
- SetQuantity( randQ );
- if ( rand >= 9 )
- {
- ChangeFoodStage( FoodStageType.ROTTEN );
- SetHealth( "", "", GetMaxHealth()*0.1 );
-
- }
- else
- {
- ChangeFoodStage( FoodStageType.DRIED );
- SetHealth( "", "", GetMaxHealth()*0.4 );
- }
- }
- else
- {
- if ( rand > 6 )
- {
- ChangeFoodStage( FoodStageType.ROTTEN );
- SetHealth( "", "", GetMaxHealth()*0.1 );
- }
- else if ( rand > 2 )
- {
- ChangeFoodStage( FoodStageType.DRIED );
- SetHealth( "", "", GetMaxHealth()*0.4 );
- }
- }
- }
- }
|