LCOV - code coverage report
Current view: top level - Core/Entities - PlayerEntityContracts.h (source / functions) Hit Total Coverage
Test: coverxygen.info Lines: 0 63 0.0 %
Date: 2025-05-28 07:50:54 Functions: 0 0 -

          Line data    Source code
       1           0 : /*
       2             : 
       3             : PlayerEntityContracts.h
       4             : 
       5             : Methods relating to passenger and cargo contract handling.
       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 "PlayerEntity.h"
      28             : #import "PlayerEntityLegacyScriptEngine.h"
      29             : #import "GuiDisplayGen.h"
      30             : 
      31           0 : #define PASSENGER_KEY_NAME                              @"name"
      32             : 
      33           0 : #define CARGO_KEY_ID                                    @"id"
      34           0 : #define CARGO_KEY_TYPE                                  @"co_type"
      35           0 : #define CARGO_KEY_AMOUNT                                @"co_amount"
      36           0 : #define CARGO_KEY_DESCRIPTION                   @"cargo_description"
      37             : 
      38           0 : #define CONTRACT_KEY_START                              @"start"
      39           0 : #define CONTRACT_KEY_DESTINATION                @"destination"
      40           0 : #define CONTRACT_KEY_DESTINATION_NAME   @"destination_name"
      41           0 : #define CONTRACT_KEY_LONG_DESCRIPTION   @"long_description"
      42           0 : #define CONTRACT_KEY_DEPARTURE_TIME             @"departure_time"
      43           0 : #define CONTRACT_KEY_ARRIVAL_TIME               @"arrival_time"
      44           0 : #define CONTRACT_KEY_FEE                                @"fee"
      45           0 : #define CONTRACT_KEY_PREMIUM                    @"premium"
      46           0 : #define CONTRACT_KEY_RISK                               @"risk"
      47             : 
      48           0 : #define MAX_CONTRACT_REP                        70
      49             : 
      50           0 : #define GUI_ROW_PASSENGERS_LABELS       1
      51           0 : #define GUI_ROW_PASSENGERS_START        2
      52           0 : #define GUI_ROW_CARGO_LABELS            8
      53           0 : #define GUI_ROW_CARGO_START                     9
      54           0 : #define GUI_ROW_CONTRACT_INFO_START     15
      55             : 
      56           0 : #define GUI_ROW_SHIPYARD_LABELS         1
      57           0 : #define GUI_ROW_SHIPYARD_START          2
      58           0 : #define GUI_ROW_SHIPYARD_INFO_START     15
      59           0 : #define GUI_ROW_NO_SHIPS                        10
      60             : 
      61           0 : #define MAX_ROWS_SHIPS_FOR_SALE         12
      62             : 
      63             : @interface PlayerEntity (Contracts)
      64             : 
      65           0 : - (NSString *) processEscapePods;               // removes pods from cargo bay and treats categories of characters carried
      66           0 : - (NSString *) checkPassengerContracts; // returns messages from any passengers whose status have changed
      67             : 
      68           0 : - (NSDictionary *) reputation;
      69             : 
      70           0 : - (int) passengerReputation;
      71           0 : - (void) increasePassengerReputation:(unsigned)amount;
      72           0 : - (void) decreasePassengerReputation:(unsigned)amount;
      73             : 
      74           0 : - (int) parcelReputation;
      75           0 : - (void) increaseParcelReputation:(unsigned)amount;
      76           0 : - (void) decreaseParcelReputation:(unsigned)amount;
      77             : 
      78           0 : - (int) contractReputation;
      79           0 : - (void) increaseContractReputation:(unsigned)amount;
      80           0 : - (void) decreaseContractReputation:(unsigned)amount;
      81           0 : - (OOCargoQuantity) contractedVolumeForGood:(OOCommodityType) good;
      82             : 
      83           0 : - (void) erodeReputation;
      84           0 : - (void) normaliseReputation;
      85             : 
      86           0 : - (void) addMessageToReport:(NSString*) report;
      87             : 
      88             : // - (void) setGuiToContractsScreen;
      89             : //- (BOOL) pickFromGuiContractsScreen;
      90             : //- (void) highlightSystemFromGuiContractsScreen;
      91             : 
      92           0 : - (BOOL) addPassenger:(NSString*)Name start:(unsigned)start destination:(unsigned)destination eta:(double)eta fee:(double)fee advance:(double)advance risk:(unsigned)risk;      // for js scripting
      93           0 : - (BOOL) removePassenger:(NSString*)Name;       // for js scripting
      94           0 : - (BOOL) addParcel:(NSString*)Name start:(unsigned)start destination:(unsigned)destination eta:(double)eta fee:(double)fee premium:(double)premium risk:(unsigned)risk; // for js scripting
      95           0 : - (BOOL) removeParcel:(NSString*)Name;  // for js scripting
      96           0 : - (BOOL) awardContract:(unsigned)qty commodity:(NSString*)commodity start:(unsigned)start destination:(unsigned)destination eta:(double)eta fee:(double)fee premium:(double)premium;    // for js scripting.
      97           0 : - (BOOL) removeContract:(NSString*)commodity destination:(unsigned)destination; // for js scripting
      98             : 
      99           0 : - (NSArray *) passengerList;
     100           0 : - (NSArray *) parcelList;
     101           0 : - (NSArray *) contractList;
     102           0 : - (void) setGuiToManifestScreen;
     103           0 : - (void) setManifestScreenRow:(id)object inColor:(OOColor*)color forRow:(OOGUIRow)row ofRows:(OOGUIRow)max_rows andOffset:(OOGUIRow)offset inMultipage:(BOOL)multi;
     104             : 
     105             : 
     106           0 : - (void) setGuiToDockingReportScreen;
     107             : 
     108             : // ---------------------------------------------------------------------- //
     109             : 
     110           0 : - (void) setGuiToShipyardScreen:(NSUInteger)skip;
     111             : 
     112           0 : - (void) showShipyardModel:(NSString *)shipKey shipData:(NSDictionary *)shipDict personality:(uint16_t)personality;
     113           0 : - (void) showShipyardInfoForSelection;
     114           0 : - (NSInteger) missingSubEntitiesAdjustment;
     115           0 : - (void) showTradeInInformationFooter;
     116             : 
     117           0 : - (OOCreditsQuantity) priceForShipKey:(NSString *)key;
     118           0 : - (BOOL) buySelectedShip;
     119           0 : - (BOOL) replaceShipWithNamedShip:(NSString *)shipName;
     120           0 : - (void) newShipCommonSetup:(NSString *)shipKey yardInfo:(NSDictionary *)ship_info baseInfo:(NSDictionary *)ship_base_dict; 
     121             : 
     122             : @end

Generated by: LCOV version 1.14