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