Advertisement
Treedestroyed

HS_DynamicSetting_MaxMonsters

Mar 14th, 2018
1,005
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class HS_DynamicSetting_MaxMonsters extends HS_DynamicSetting
  2.     within KFGameInfo_HardSurvival;
  3.  
  4. protected function string ReadIndicator()
  5. {
  6.     return Outer.MaxMonsters;
  7. }
  8.  
  9. protected function WriteIndicator( const out string Ind )
  10. {
  11.     Outer.MaxMonsters = Ind;
  12. }
  13.  
  14. function bool StageIndicator( const out string Raw, out string StatusMsg, const optional bool ForceOverwrite = false )
  15. {
  16.     super.StageIndicator(Raw, StatusMsg);
  17.    
  18.     if (DiffEnum == 0)
  19.     {
  20.         StagedValue = "12,16,20,24,28,32";
  21.     }
  22.     if (DiffEnum == 1)
  23.     {
  24.         StagedValue = "18,22,26,30,34,36,38,40,42,44";
  25.     }
  26.     if (DiffEnum == 2)
  27.     {
  28.         StagedValue = "24,28,32,36,40,44,48,52,56,60";
  29.     }
  30. }
  31.  
  32. protected function float ReadValue()
  33. {
  34.     return float(Outer.MaxMonstersInt);
  35. }
  36.  
  37. protected function WriteValue( const out float Val )
  38. {
  39.     Outer.MaxMonstersInt = Round(Val);
  40. }
  41.  
  42. protected function string PrettyValue( const float RawValue )
  43. {
  44.     return string(Round(RawValue));
  45. }
  46.  
  47. defaultproperties
  48. {
  49.     IniDefsArrayName="MaxMonstersDefs"
  50.     OptionName="MaxMonsters"
  51.     MinSettingValue=0
  52.     MaxSettingValue=10000
  53.  
  54.     ChatCommandNames=("!mm")
  55.     ChatWriteParamHintFragment="int, 0 to use unmodded default"
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement