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

JBAddonJailCard.JBJailCardMessage


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
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
//==============================================================================
// JBJailCardMessage
// Copyright 2007 by [GSF]JohnDoe <gsfjohndoe@hotmail.com>
// $Id: JBJailCardMessage.uc,v 1.5 2007-05-19 15:06:55 johndoe Exp $
//
// LocalMessage class for the JailCard addon for Jailbreak.
//
// SWITCHES:
//          100 - pickup message
//          200 - used message
//          300 - use now message
//          400 - dropped message
//
// CHANGELOG:
// 14 jan 2007 - Class created
//               Added custom sound
// 10 feb 2007 - Added GetRelatedString
//               Changed JailCardString[1]
//               Added PlayMySound method
// 11 feb 2007 - Added pickup and use-now messages
// 12 feb 2007 - Added female used string and dropped string
//               Removed PlayMySound method
//==============================================================================

class JBJailCardMessage extends LocalMessage;


//==============================================================================
// Properties
//==============================================================================

var localized string JailCardString[9];
var Color Yellow;


//==============================================================================
// GetString
//
// Assemble the message
//==============================================================================

static function string GetString(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1,
    optional PlayerReplicationInfo RelatedPRI_2,
    optional Object OptionalObject
    )
{
    switch (Switch) {
        case 100:
            return (RelatedPRI_1.GetHumanReadableName() $ Default.JailCardString[1]);
        break;
        case 200:
            if(RelatedPRI_1.bIsFemale)
                return (RelatedPRI_1.GetHumanReadableName() $ Default.JailCardString[4]);
            else
                return (RelatedPRI_1.GetHumanReadableName() $ Default.JailCardString[3]);
        break;
        case 400:
            if(RelatedPRI_1.bIsFemale)
                return (RelatedPRI_1.GetHumanReadableName() $ Default.JailCardString[7]);
            else
                return (RelatedPRI_1.GetHumanReadableName() $ Default.JailCardString[6]);
        break;
    }
}


//==============================================================================
// GetString
//
// Assemble the message
//==============================================================================

static function string GetRelatedString(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1,
    optional PlayerReplicationInfo RelatedPRI_2,
    optional Object OptionalObject
    )
{
    switch (Switch) {
        case 100:
            return Default.JailCardString[0];
        break;
        case 200:
            return Default.JailCardString[2];
        break;
        case 300:
            return Default.JailCardString[5];
        break;
        case 400:
            return Default.JailCardString[8];
        break;
    }
}


// ============================================================================
// GetColor
//
// Returns the color to use for the given message.
// ============================================================================

static function color GetConsoleColor( PlayerReplicationInfo RelatedPRI_1 )
{
       return Default.Yellow;
}


//=============================================================================
// default properties
//=============================================================================

defaultproperties
{
    // strings
    JailCardString(0)="Get Out Of Jail Free Card!";
    JailCardString(1)=" picked up a Jail Card!";
    JailCardString(2)="You used your Jail Card.";
    JailCardString(3)=" used his Jail Card.";
    JailCardString(4)=" used her Jail Card.";
    JailCardString(5)="Select and use your Jail Card to escape!";
    JailCardString(6)=" dropped his Jail Card!";
    JailCardString(7)=" dropped her Jail Card!";
    JailCardString(8)="You dropped your Jail Card!";

    // colours
    Yellow=(R=255,G=255,B=0,A=255);
    DrawColor=(R=255,G=255,B=0,A=255);
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: So 16.3.2008 13:48:06.000 - Creation time: Do 14.8.2014 09:58:42.714 - Created with UnCodeX