Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
PlayerEntityScriptMethods.h
Go to the documentation of this file.
1/*
2
3PlayerEntityScriptMethods.h
4
5Methods for use by scripting mechanisms.
6
7
8Oolite
9Copyright (C) 2004-2013 Giles C Williams and contributors
10
11This program is free software; you can redistribute it and/or
12modify it under the terms of the GNU General Public License
13as published by the Free Software Foundation; either version 2
14of the License, or (at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
24MA 02110-1301, USA.
25
26*/
27
28#import "PlayerEntity.h"
29
30
31@interface PlayerEntity (ScriptMethods)
32
33- (unsigned) score;
34- (void) setScore:(unsigned)value;
35
36- (double) creditBalance;
37- (void) setCreditBalance:(double)value;
38
39- (NSString *) dockedStationName;
40- (NSString *) dockedStationDisplayName;
41- (BOOL) dockedAtMainStation;
42
43- (void) awardCommodityType:(NSString *)type amount:(OOCargoQuantity)amount;
44
45- (void) resetScannerZoom;
46
49
50- (void) setMissionChoice:(NSString *)newChoice;
51- (void) setMissionChoice:(NSString *)newChoice withEvent:(BOOL) withEvent;
52- (void) setMissionChoice:(NSString *)newChoice keyPress:(NSString *)keyPress;
53- (void) setMissionChoice:(NSString *)newChoice keyPress:(NSString *)keyPress withEvent:(BOOL) withEvent;
55
57
58- (unsigned) systemPseudoRandom100;
59- (unsigned) systemPseudoRandom256;
61
62- (NSDictionary *) passengerContractMarker:(OOSystemID)system;
63- (NSDictionary *) parcelContractMarker:(OOSystemID)system;
64- (NSDictionary *) cargoContractMarker:(OOSystemID)system;
65- (NSDictionary *) defaultMarker:(OOSystemID)system;
66- (NSDictionary *) validatedMarker:(NSDictionary *)marker;
67
68- (NSString *) keyBindingDescription2:(NSString *)binding;
69- (NSString *) getKeyBindingDescription:(NSArray *)keyList;
70- (NSString *) keyCodeDescription:(OOKeyCode)code;
71- (NSString *) keyCodeDescriptionShort:(OOKeyCode)code;
72
73- (NSString *) commanderKillsAsString;
74- (NSString *) commanderBountyAsString;
77
78@end
79
80
81/* OOGalacticCoordinatesFromInternal()
82 Given internal coordinates ranging from 0 to 255 on each axis, return
83 corresponding coordinates in user-meaningful coordinates by scaling by
84 0.4 on the X axis and 0.2 on the Y axis.
85
86 OOInternalCoordinatesFromGalactic()
87 Inverse operation.
88
89 For valid floating-point comparisons, it is imperative that the same
90 calculation be used consistently.
91 */
92Vector OOGalacticCoordinatesFromInternal(NSPoint internalCoordinates);
93NSPoint OOInternalCoordinatesFromGalactic(Vector galacticCoordinates);
uint16_t OOKeyCode
Definition OOTypes.h:186
int16_t OOSystemID
Definition OOTypes.h:211
uint8_t OOGalaxyID
Definition OOTypes.h:210
uint32_t OOCargoQuantity
Definition OOTypes.h:176
double OOTimeDelta
Definition OOTypes.h:224
NSPoint OOInternalCoordinatesFromGalactic(Vector galacticCoordinates)
Vector OOGalacticCoordinatesFromInternal(NSPoint internalCoordinates)