Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

JBAddonArenaLockdown.JBAddonArenaLockdown


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
// ============================================================================
// JBAddonArenaLockdown
// Copyright 2006 by Jrubzjeknf <rrvanolst@hotmail.com>
// $Id: JBAddonArenaLockdown.uc,v 1.4 2007-05-14 13:03:14 jrubzjeknf Exp $
//
// The only way to get out of jail is by winning the arena match!
// ============================================================================

class JBAddonArenaLockdown extends JBAddon config cacheexempt;


//=============================================================================
// Configuration
//=============================================================================

var config bool bCrossBaseSpawning;
var config byte SelectionMethod;


//=============================================================================
// Localization
//=============================================================================

var localized string CrossBaseSpawningText, CrossBaseSpawningDesc;
var localized string SelectionMethodText, SelectionMethodDesc;
var localized string SelectionMethodOptions;


//=============================================================================
// Variables
//=============================================================================

var() const editconst string Build;
var JBGameRulesArenaLockdown ArenaLockdownRules;


// ============================================================================
// PostBeginPlay
//
// Registers the addon's GameRules.
// ============================================================================

function PostBeginPlay()
{
  Super.PostBeginPlay();

  ArenaLockdownRules = Spawn(Class'JBGameRulesArenaLockdown');

  if(ArenaLockdownRules != None) {
    if(Level.Game.GameRulesModifiers == None)
      Level.Game.GameRulesModifiers = ArenaLockdownRules;
    else
      Level.Game.GameRulesModifiers.AddGameRules(ArenaLockdownRules);

    ArenaLockdownRules.bCrossBaseSpawning = bCrossBaseSpawning;
    ArenaLockdownRules.SelectionMethod    = SelectionMethod;
  }
  else
    LOG("!!!!!"@name$".PostBeginPlay() : Fail to register the JBGameRulesArenaLockdown !!!!!");
}


//=============================================================================
// FillPlayInfo
//
// Adds configurable ArenaLockdown properties to the web admin interface.
//=============================================================================

static function FillPlayInfo(PlayInfo PlayInfo)
{
  // add current class to stack
  PlayInfo.AddClass(default.Class);

  // now register any mutator settings
  PlayInfo.AddSetting(PlayInfoGroup(), "bCrossBaseSpawning", default.CrossBaseSpawningText, 0, 1, "Check");
  PlayInfo.AddSetting(PlayInfoGroup(), "SelectionMethod",    default.SelectionMethodText,   0, 2, "Select", default.SelectionMethodOptions);

  // remove mutator class from class stack
  PlayInfo.PopClass();
}


//=============================================================================
// GetDescriptionText
//
// Returns a description text for the specified property.
//=============================================================================

static event string GetDescriptionText(string PropName)
{
  Switch (PropName) {
    case "bCrossBaseSpawning": return default.CrossBaseSpawningDesc;
    case "SelectionMethod":    return default.SelectionMethodDesc;
  }
}


// ============================================================================
// Default properties
// ============================================================================

defaultproperties
{
  Build = "%%%%-%%-%% %%:%%"

  CrossBaseSpawningText  = "Random base spawning"
  CrossBaseSpawningDesc  = "Players can be spawned in their enemy's base, so that basecamping is discouraged."
  SelectionMethodText    = "Selection method"
  SelectionMethodDesc    = "Choose how the arena players will be picked from their jail."
  SelectionMethodOptions = "0;Queue;1;Random"

  FriendlyName = "Arena Lockdown"
  Description  = "The only way to get out of jail is by winning the arena match!"
  ConfigMenuClassName="JBAddonArenaLockdown.JBGUIPanelConfigArenaLockdown"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mi 16.5.2007 17:24:34.000 - Creation time: Do 14.8.2014 09:58:41.611 - Created with UnCodeX