Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
python_unit_wrap.h
Go to the documentation of this file.
1 #ifndef WHICH_UNIT_EXPORT_NUMBER
2 #define WHICH_UNIT_EXPORT_NUMBER 0
3 #endif
4 #if ( ( WHICH_UNIT_EXPORT_NUMBER == 3) || (WHICH_UNIT_EXPORT_NUMBER == 2 ) )
5 #else
6 WRAPPED2( bool, AutoPilotTo, UnitWrapper, un, bool, ignore_energy_requirement, false )
8 voidWRAPPED0( SetTurretAI )
9 voidWRAPPED0( DisableTurretAI )
10 voidWRAPPED3( leach, float, XshieldPercent, float, YrechargePercent, float, ZenergyPercent )
11 WRAPPED0( int, getFgSubnumber, -1 )
12 WRAPPED0( std::string, getFgID, std::string( "" ) )
13 voidWRAPPED1( setFullname, std::string, name )
14 WRAPPED0( std::string, getFullname, std::string() )
15 WRAPPED0( std::string, getFullAIDescription, std::string() )
16 voidWRAPPED3( setTargetFg, std::string, primary, std::string, secondary, std::string, tertiary )
17 voidWRAPPED1( ReTargetFg, int, which_target )
18 WRAPPED0( bool, isStarShip, false )
19 WRAPPED0( bool, isPlanet, false )
20 WRAPPED0( bool, isJumppoint, false )
21 WRAPPED1( bool, isEnemy, UnitWrapper, other, false )
22 WRAPPED1( bool, isFriend, UnitWrapper, other, false )
23 WRAPPED1( bool, isNeutral, UnitWrapper, other, false )
24 WRAPPED1( float, getRelation, UnitWrapper, other, 0 )
25 voidWRAPPED1( ToggleWeapon, bool, Missile )
26 voidWRAPPED1( SelectAllWeapon, bool, Missile )
27 voidWRAPPED1( Split, int, level )
28 
29 voidWRAPPED0( Init )
30 voidWRAPPED1( ActivateJumpDrive, int, destination )
31 voidWRAPPED0( DeactivateJumpDrive )
32 voidWRAPPED0( Destroy )
33 WRAPPED1( Vector, LocalCoordinates, UnitWrapper, un, Vector( 0, 0, 0 ) )
34 WRAPPED3( bool, InRange, UnitWrapper, target, bool, cone, bool, cap, false )
35 WRAPPED0( float, CloakVisible, false )
36 voidWRAPPED1( Cloak, bool, cloak )
37 voidWRAPPED0( RemoveFromSystem )
38 WRAPPED4( QVector, PositionITTS, QVector, local_posit, Vector, local_velocity, float, speed, bool, steadyITTS, QVector( 0, 0, 0 ) )
39 WRAPPED0( QVector, Position, QVector( 0, 0, 0 ) )
40 WRAPPED0( QVector, LocalPosition, QVector( 0, 0, 0 ) )
41 
42 WRAPPED0( UnitWrapper, Threat, UnitWrapper() )
43 voidWRAPPED1( TargetTurret, UnitWrapper, targ )
44 voidWRAPPED2( Threaten, UnitWrapper, targ, float, danger )
45 voidWRAPPED0( ResetThreatLevel )
46 voidWRAPPED2( Fire, unsigned int, Missile, bool, OnlyCollideWithTarget )
47 voidWRAPPED0( UnFire )
48 WRAPPED0( float, computeLockingPercent, 0 ) //how locked are we
49 WRAPPED0( float, FShieldData, 0 )
50 WRAPPED0( float, RShieldData, 0 )
51 WRAPPED0( float, LShieldData, 0 )
52 WRAPPED0( float, BShieldData, 0 )
53 WRAPPED0( float, FuelData, 0 )
54 WRAPPED0( float, EnergyData, 0 )
55 WRAPPED0( float, GetHull, 0 )
56 WRAPPED0( float, GetHullPercent, 0 )
57 WRAPPED0( float, rSize, 0 )
58 #endif
59 #if WHICH_UNIT_EXPORT_NUMBER == 1 || WHICH_UNIT_EXPORT_NUMBER == 3
60 #else
61 WRAPPED1( double, getMinDis, QVector, pnt, 0 ) //for clicklist
62 WRAPPED3( float, querySphere, QVector, start, QVector, end, float, my_unit_radius, 0 )
63 voidWRAPPED0( PrimeOrders )
64 voidWRAPPED1( LoadAIScript, std::string, aiscript )
65 WRAPPED0( bool, LoadLastPythonAIScript, false )
66 WRAPPED0( bool, EnqueueLastPythonAIScript, false )
67 voidWRAPPED1( SetPosition, QVector, pos )
68 voidWRAPPED1( SetCurPosition, QVector, pos )
69 voidWRAPPED1( SetPosAndCumPos, QVector, pos )
70 voidWRAPPED1( Rotate, Vector, axis )
71 voidWRAPPED1( ApplyForce, Vector, Vforce )
72 voidWRAPPED1( ApplyLocalForce, Vector, Vforce )
73 voidWRAPPED1( Accelerate, Vector, Vforce )
74 voidWRAPPED2( ApplyTorque, Vector, Vforce, QVector, Location )
75 voidWRAPPED2( ApplyBalancedLocalTorque, Vector, Vforce, Vector, Location )
76 voidWRAPPED1( ApplyLocalTorque, Vector, torque )
77 WRAPPED2( float, DealDamageToHull, Vector, pnt, float, Damage, 0 )
78 WRAPPED2( Vector, ClampThrust, Vector, thrust, bool, afterburn, Vector( 0, 0, 0 ) )
79 voidWRAPPED2( Thrust, Vector, amt, bool, afterburn )
80 voidWRAPPED1( LateralThrust, float, amt )
81 voidWRAPPED1( VerticalThrust, float, amt )
82 voidWRAPPED1( LongitudinalThrust, float, amt )
83 WRAPPED2( Vector, ClampVelocity, Vector, velocity, bool, afterburn, Vector( 0, 0, 0 ) )
84 WRAPPED1( Vector, ClampAngVel, Vector, vel, Vector( 0, 0, 0 ) )
85 WRAPPED1( Vector, ClampTorque, Vector, torque, Vector( 0, 0, 0 ) )
86 voidWRAPPED2( SetOrientation, QVector, q, QVector, r )
87 WRAPPED1( Vector, UpCoordinateLevel, Vector, v, Vector( 0, 0, 0 ) )
88 WRAPPED1( Vector, DownCoordinateLevel, Vector, v, Vector( 0, 0, 0 ) )
89 WRAPPED1( Vector, ToLocalCoordinates, Vector, v, Vector( 0, 0, 0 ) )
90 WRAPPED1( Vector, ToWorldCoordinates, Vector, v, Vector( 0, 0, 0 ) )
91 WRAPPED0( Vector, GetAngularVelocity, Vector( 0, 0, 0 ) )
92 WRAPPED0( Vector, GetVelocity, Vector( 0, 0, 0 ) )
93 voidWRAPPED1( SetVelocity, Vector, v )
94 voidWRAPPED1( SetAngularVelocity, Vector, v )
95 #endif
96 #if WHICH_UNIT_EXPORT_NUMBER == 1 || WHICH_UNIT_EXPORT_NUMBER == 2
97 #else
98 WRAPPED0( float, GetMoment, 0 )
99 WRAPPED0( float, GetMass, 0 )
100 WRAPPED0( int, LockMissile, 0 )
101 voidWRAPPED1( EjectCargo, int, index )
102 WRAPPED1( float, PriceCargo, std::string, s, 0 )
103 WRAPPED0( int, numCargo, 0 )
104 WRAPPED1( bool, IsCleared, UnitWrapper, dockingunit, false )
105 voidWRAPPED5( ImportPartList, std::string, category, float, price, float, pricedev, float, quantity, float, quantdev )
106 WRAPPED1( bool, RequestClearance, UnitWrapper, dockingunit, false )
107 WRAPPED1( bool, isDocked, UnitWrapper, dockingUnit, false )
108 WRAPPED1( bool, Dock, UnitWrapper, unitToDockWith, false )
109 
110 voidWRAPPED1( setCombatRole, std::string, role )
111 
112 WRAPPED0( std::string, getCombatRole, "INERT" ) //legacy function returns getUnitType
113 
114 voidWRAPPED1( setAttackPreference, std::string, role )
115 
116 WRAPPED0( std::string, getAttackPreference, "INERT" )
117 
118 voidWRAPPED1( setUnitRole, std::string, role )
119 
120 WRAPPED0( std::string, getUnitRole, "INERT" )
121 
122 WRAPPED1( bool, UnDock, UnitWrapper, unitToDockWith, false )
123 WRAPPED0( int, DockedOrDocking, 0 )
124 WRAPPED0( int, GetNumMounts, 0 )
125 EXPORT_UTIL0( UnitWrapper, owner )
126 voidEXPORT_UTIL2( performDockingOperations, UnitWrapper, unitToDockWith, int, acootuallydock )
127 
128 EXPORT_UTIL0( std::string, getFactionName )
129 EXPORT_UTIL0( int, getFactionIndex )
130 voidEXPORT_UTIL1( setFactionIndex, int, factionname )
131 voidEXPORT_UTIL1( setFactionName, std::string, factionname )
132 EXPORT_UTIL1( float, getFactionRelation, UnitWrapper, their_unit )
133 EXPORT_UTIL1( float, getRelationToFaction, int, their_faction )
134 EXPORT_UTIL1( float, getRelationFromFaction, int, my_faction )
135 EXPORT_UTIL0( std::string, getName )
136 voidEXPORT_UTIL1( setName, std::string, name )
137 voidEXPORT_UTIL1( SetHull, float, hull )
138 EXPORT_UTIL0( std::string, getFlightgroupName )
139 EXPORT_UTIL0( UnitWrapper, getFlightgroupLeader )
140 EXPORT_UTIL1( bool, setFlightgroupLeader, UnitWrapper, un )
141 EXPORT_UTIL0( std::string, getFgDirective )
143 EXPORT_UTIL1( bool, setFgDirective, std::string, inp )
144 //EXPORT_UTIL0(int,getFgSubnumber)
145 EXPORT_UTIL3( int, removeCargo, std::string, s, int, quantity, bool, erasezero )
146 EXPORT_UTIL3( int, removeWeapon, std::string, name, int, offset, bool, loop )
147 EXPORT_UTIL5( float, upgrade, std::string, file, int, mountoffset, int, subunitoffset, bool, force, bool, loop_through_mounts )
148 EXPORT_UTIL1( int, addCargo, Cargo, carg )
149 EXPORT_UTIL1( int, forceAddCargo, Cargo, carg )
150 EXPORT_UTIL2( bool, incrementCargo, float, percentagechange, int, quantity )
151 EXPORT_UTIL1( bool, decrementCargo, float, percentagechange )
152 EXPORT_UTIL1( float, getDistance, UnitWrapper, un )
153 //EXPORT_UTIL0(float, getPlanetRadiusPercent)
154 EXPORT_UTIL1( float, getSignificantDistance, UnitWrapper, sig )
155 EXPORT_UTIL1( int, hasCargo, std::string, mycarg )
156 EXPORT_UTIL1( Cargo, GetCargoIndex, int, index );
157 EXPORT_UTIL1( Cargo, GetCargo, std::string, cargname )
158 EXPORT_UTIL0( std::string, getUnitSystemFile )
159 EXPORT_UTIL0( float, getCredits )
160 voidEXPORT_UTIL1( addCredits, float, credits )
161 EXPORT_UTIL0( bool, isSignificant )
162 EXPORT_UTIL0( bool, isCapitalShip )
163 EXPORT_UTIL0( bool, isDockableUnit )
164 EXPORT_UTIL0( bool, isSun )
165 EXPORT_UTIL0( bool, isAsteroid )
166 voidEXPORT_UTIL1( switchFg, std::string, arg )
167 EXPORT_UTIL2( int, communicateTo, UnitWrapper, other_unit, float, mood )
168 EXPORT_UTIL1( bool, commAnimation, std::string, anim )
169 EXPORT_UTIL1( bool, JumpTo, std::string, system )
170 EXPORT_UTIL0( int, isPlayerStarship )
171 voidEXPORT_UTIL1( setECM, int, NewECM ) //short fix
172 EXPORT_UTIL0( int, getECM ) //short fix
173 voidEXPORT_UTIL1( setSpeed, float, speed )
174 EXPORT_UTIL0( float, maxSpeed )
175 EXPORT_UTIL0( float, maxAfterburnerSpeed )
177 
178 voidEXPORT_UTIL5( orbit, UnitWrapper, orbitee, float, speed, QVector, R, QVector, S, QVector, center )
179 WRAPPED0( int, RepairCost, 0 )
180 WRAPPED0( int, RepairUpgrade, 0 )
181 EXPORT_UTIL3( float, PercentOperational, std::string, content, std::string, category, bool, countHullAndArmorAsFull )
182 WRAPPED1( Vector, MountPercentOperational, int, whichMount, Vector( -1.0f, -1.0f, -1.0f ) )
183 #endif
184