Oolite
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@interface PlayerEntity (ScriptMethods)
31
32- (unsigned)score;
33- (void)setScore:(unsigned)value;
34
35- (double)creditBalance;
36- (void)setCreditBalance:(double)value;
37
38- (NSString*)dockedStationName;
39- (NSString*)dockedStationDisplayName;
41
42- (void)awardCommodityType:(NSString*)type amount:(OOCargoQuantity)amount;
43
44- (void)resetScannerZoom;
45
48
49- (void)setMissionChoice:(NSString*)newChoice;
50- (void)setMissionChoice:(NSString*)newChoice withEvent:(BOOL)withEvent;
51- (void)setMissionChoice:(NSString*)newChoice keyPress:(NSString*)keyPress;
52- (void)setMissionChoice:(NSString*)newChoice keyPress:(NSString*)keyPress withEvent:(BOOL)withEvent;
54
56
57- (unsigned)systemPseudoRandom100;
58- (unsigned)systemPseudoRandom256;
60
61- (NSDictionary*)passengerContractMarker:(OOSystemID)system;
62- (NSDictionary*)parcelContractMarker:(OOSystemID)system;
63- (NSDictionary*)cargoContractMarker:(OOSystemID)system;
64- (NSDictionary*)defaultMarker:(OOSystemID)system;
65- (NSDictionary*)validatedMarker:(NSDictionary*)marker;
66
67- (NSString*)keyBindingDescription2:(NSString*)binding;
68- (NSString*)getKeyBindingDescription:(NSArray*)keyList;
69- (NSString*)keyCodeDescription:(OOKeyCode)code;
70- (NSString*)keyCodeDescriptionShort:(OOKeyCode)code;
71
72- (NSString*)commanderKillsAsString;
73- (NSString*)commanderBountyAsString;
76
77@end
78
79/* OOGalacticCoordinatesFromInternal()
80 Given internal coordinates ranging from 0 to 255 on each axis, return
81 corresponding coordinates in user-meaningful coordinates by scaling by
82 0.4 on the X axis and 0.2 on the Y axis.
83
84 OOInternalCoordinatesFromGalactic()
85 Inverse operation.
86
87 For valid floating-point comparisons, it is imperative that the same
88 calculation be used consistently.
89 */
90Vector OOGalacticCoordinatesFromInternal(NSPoint internalCoordinates);
91NSPoint OOInternalCoordinatesFromGalactic(Vector galacticCoordinates);
uint16_t OOKeyCode
Definition OOTypes.h:163
int16_t OOSystemID
Definition OOTypes.h:183
uint8_t OOGalaxyID
Definition OOTypes.h:182
uint32_t OOCargoQuantity
Definition OOTypes.h:155
double OOTimeDelta
Definition OOTypes.h:193
NSPoint OOInternalCoordinatesFromGalactic(Vector galacticCoordinates)
Vector OOGalacticCoordinatesFromInternal(NSPoint internalCoordinates)