Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
// ============================================================================ // JBAddonPersistence // Copyright 2006 by Mitchell "mdavis" Davis <mitchelld02@yahoo.com> // // This addon will allow winning players to keep their weapons for the next // round. // ============================================================================ class JBAddonPersistence extends JBAddon CacheExempt; // ============================================================================ // Variables // ============================================================================ var() const editconst string Build; var() config bool bUprising; var() config int nHealth; //============================================================================= // Localization //============================================================================= var localized string UprisingText, UprisingDesc; var localized string HealthTransferText, HealthTransferDesc; // ============================================================================ // PostBeginPlay // // Register the new rules to the current map. // ============================================================================ function PostBeginPlay() { local JBGameRulesPersistence PersistentRules; Super.PostBeginPlay(); PersistentRules = Spawn(class'JBGameRulesPersistence'); if(PersistentRules != None) { if(Level.Game.GameRulesModifiers == None) Level.Game.GameRulesModifiers = PersistentRules; else Level.Game.AddGameModifier(PersistentRules); } else { Log("***Failed to add JBGameRulesPersistence***"); Destroy(); } } //============================================================================= // FillPlayInfo // // Adds configurable Avenger 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(), "bUprising", default.UprisingText, 0, 0, "Text", "3;1:200"); PlayInfo.AddSetting(PlayInfoGroup(), "nHealth", default.HealthTransferText, 0, 0, "Text", "3;1:200"); //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 "bUprising": return default.UprisingDesc; case "nHealth": return default.HealthTransferDesc; } } //============================================================================= // Default properties //============================================================================= defaultproperties { ConfigMenuClassName="JBAddonPersistence.JBGUIPanelConfigPersistence" bUprising = false; UprisingText="The Uprising" UprisingDesc="Giving capturing players' weapons to the captured." nHealth = 0; HealthTransferText="Health Transfer" HealthTransferDesc="Give a percentage of health from the capturing players to the captured players." Build="%%%%-%%-%% %%:%%" FriendlyName="Persistence" Description="The winning team will be able to keep their weapons and other attributes upon the start of a new round." } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |