Line data Source code
1 0 : /* 2 : 3 : OOCharacter.h 4 : 5 : Represents an NPC person (as opposed to an NPC ship). 6 : 7 : Oolite 8 : Copyright (C) 2004-2013 Giles C Williams and contributors 9 : 10 : This program is free software; you can redistribute it and/or 11 : modify it under the terms of the GNU General Public License 12 : as published by the Free Software Foundation; either version 2 13 : of the License, or (at your option) any later version. 14 : 15 : This program is distributed in the hope that it will be useful, 16 : but WITHOUT ANY WARRANTY; without even the implied warranty of 17 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 : GNU General Public License for more details. 19 : 20 : You should have received a copy of the GNU General Public License 21 : along with this program; if not, write to the Free Software 22 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 23 : MA 02110-1301, USA. 24 : 25 : */ 26 : 27 : #import <Foundation/Foundation.h> 28 : #import "OOTypes.h" 29 : #import "legacy_random.h" 30 : #import "OOJSPropID.h" 31 : 32 : @class OOJSScript; 33 : 34 : 35 0 : @interface OOCharacter: NSObject 36 : { 37 : @private 38 0 : NSString *_name; 39 0 : NSString *_shortDescription; 40 0 : OOSystemID _originSystem; 41 0 : Random_Seed _genSeed; 42 0 : int _legalStatus; 43 0 : OOCreditsQuantity _insuranceCredits; 44 0 : NSArray *_scriptActions; 45 0 : OOJSScript *_script; 46 : } 47 : 48 0 : - (id) initWithRole:(NSString *)role andOriginalSystem:(OOSystemID)s; 49 : 50 0 : + (OOCharacter *) characterWithRole:(NSString *)c_role andOriginalSystem:(OOSystemID)s; 51 0 : + (OOCharacter *) randomCharacterWithRole:(NSString *)c_role andOriginalSystem:(OOSystemID)s; 52 0 : + (OOCharacter *) characterWithDictionary:(NSDictionary *)c_dict; 53 : 54 0 : - (NSString*) planetOfOrigin; 55 0 : - (OOSystemID) planetIDOfOrigin; 56 0 : - (NSString*) species; 57 : 58 0 : - (void) basicSetUp; 59 0 : - (BOOL) castInRole:(NSString *)role; 60 : 61 0 : - (NSString *) name; 62 0 : - (void) setName:(NSString *)value; 63 : 64 0 : - (NSString *) shortDescription; 65 0 : - (void) setShortDescription:(NSString *)value; 66 : 67 0 : - (int) legalStatus; 68 0 : - (void) setLegalStatus:(int)value; 69 : 70 0 : - (OOCreditsQuantity) insuranceCredits; 71 0 : - (void) setInsuranceCredits:(OOCreditsQuantity)value; 72 : 73 0 : - (NSArray *) legacyScript; 74 0 : - (void) setLegacyScript:(NSArray *)scriptActions; 75 0 : - (OOJSScript *)script; 76 0 : - (void) setCharacterScript:(NSString *)scriptName; 77 0 : - (void) doScriptEvent:(jsid)message; 78 : 79 0 : - (NSDictionary *) infoForScripting; 80 : 81 : @end