Advertisement
Guest User

Helium Rain Spacecraft description

a guest
Sep 30th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 9.68 KB | None | 0 0
  1. /** Base description of a ship component */
  2. USTRUCT()
  3. struct FFlareSpacecraftComponentDescription
  4. {
  5.     GENERATED_USTRUCT_BODY()
  6.  
  7.     /** Part internal name */
  8.     UPROPERTY(EditAnywhere, Category = Content) FName Identifier;
  9.  
  10.     /** Part size */
  11.     UPROPERTY(EditAnywhere, Category = Content) TEnumAsByte<EFlarePartType::Type> Type;
  12.  
  13.     /** Part size */
  14.     UPROPERTY(EditAnywhere, Category = Content) TEnumAsByte<EFlarePartSize::Type> Size;
  15.  
  16.     /** Part name */
  17.     UPROPERTY(EditAnywhere, Category = Content) FText Name;
  18.  
  19.     /** Part description */
  20.     UPROPERTY(EditAnywhere, Category = Content) FText Description;
  21.  
  22.     /** Part cost */
  23.     UPROPERTY(EditAnywhere, Category = Content) int32 Cost;
  24.  
  25.     /** Hit point for component armor. Absorb first damages */
  26.     UPROPERTY(EditAnywhere, Category = Content) float ArmorHitPoints;
  27.  
  28.     /** Hit point for component fonctionnaly. Absorb when no more armor. Component not working when no more hit points */
  29.     UPROPERTY(EditAnywhere, Category = Content) float HitPoints;
  30.  
  31.     /** Part mesh name */
  32.     UPROPERTY(EditAnywhere, Category = Content) UStaticMesh* Mesh;
  33.  
  34.     /** Effect used when destroyed*/
  35.     UPROPERTY(EditAnywhere, Category = Content) UParticleSystem* DestroyedEffect;
  36.  
  37.     /** Part mesh preview image */
  38.     UPROPERTY(EditAnywhere, Category = Content) FSlateBrush MeshPreviewBrush;
  39.  
  40.     /** General characteristic structure */
  41.     UPROPERTY(EditAnywhere, Category = Content) FFlareSpacecraftComponentGeneralCharacteristics GeneralCharacteristics;
  42.  
  43.     /** Engine characteristic structure */
  44.     UPROPERTY(EditAnywhere, Category = Content) FFlareSpacecraftComponentEngineCharacteristics EngineCharacteristics;
  45.  
  46.     /** Weapon characteristic structure */
  47.     UPROPERTY(EditAnywhere, Category = Content) FFlareSpacecraftComponentWeaponCharacteristics WeaponCharacteristics;
  48.  
  49. };
  50.  
  51.  
  52. /** Component general characteristic */
  53. USTRUCT()
  54. struct FFlareSpacecraftComponentGeneralCharacteristics
  55. {
  56.     GENERATED_USTRUCT_BODY()
  57.  
  58.     // Contain the ship crew.
  59.     UPROPERTY(EditAnywhere, Category = Content) bool LifeSupport;
  60.  
  61.     // Is a electric system.
  62.     UPROPERTY(EditAnywhere, Category = Content) bool ElectricSystem;
  63.  
  64.     // Heat radiation surface in m^2
  65.     UPROPERTY(EditAnywhere, Category = Content) float HeatSink;
  66.  
  67.     // Heat production on usage in KiloWatt on max usage
  68.     UPROPERTY(EditAnywhere, Category = Content) float HeatProduction;
  69.  
  70.     // Cargo volume un m^3
  71.     UPROPERTY(EditAnywhere, Category = Content) float Cargo;
  72. };
  73.  
  74. /** Engine characteristic */
  75. USTRUCT()
  76. struct FFlareSpacecraftComponentEngineCharacteristics
  77. {
  78.     GENERATED_USTRUCT_BODY()
  79.  
  80.     UPROPERTY(EditAnywhere, Category = Content) bool IsEngine;
  81.  
  82.     // Engine thrust in KN
  83.     UPROPERTY(EditAnywhere, Category = Content) float EnginePower;
  84.  
  85.     //  Value represents global rcs system initial capabilities. Angular acceleration un °/s^2
  86.     UPROPERTY(EditAnywhere, Category = Content) float AngularAccelerationRate;
  87.  
  88.     /** Sound played when firing */
  89.     UPROPERTY(EditAnywhere, Category = Content) USoundCue* EngineSound;
  90. };
  91.  
  92. /** Bomb characteristic */
  93. USTRUCT()
  94. struct FFlareSpacecraftComponentBombCharacteristics
  95. {
  96.     GENERATED_USTRUCT_BODY()
  97.  
  98.     /** Is a gun  */
  99.     UPROPERTY(EditAnywhere, Category = Content) bool IsBomb;
  100.  
  101.     /** Bomb mesh */
  102.     UPROPERTY(EditAnywhere, Category = Content) UStaticMesh* BombMesh;
  103.  
  104.     /** Distance before armed */
  105.     UPROPERTY(EditAnywhere, Category = Content) float ActivationDistance;
  106.  
  107.     /** Bomb forward velocity in m/s */
  108.     UPROPERTY(EditAnywhere, Category = Content) float DropLinearVelocity;
  109.  
  110.     /** Bomb angular velocity in °/s */
  111.     UPROPERTY(EditAnywhere, Category = Content) float DropAngularVelocity;
  112. };
  113.  
  114. /** Gun characteristic */
  115. USTRUCT()
  116. struct FFlareSpacecraftComponentGunCharacteristics
  117. {
  118.     GENERATED_USTRUCT_BODY()
  119.  
  120.     /** Is a gun  */
  121.     UPROPERTY(EditAnywhere, Category = Content) bool IsGun;
  122.  
  123.     /** Shell kinetic energy in KJ */
  124.     UPROPERTY(EditAnywhere, Category = Content) float KineticEnergy;
  125.  
  126.     /** Weapon firerate in ammo/min */
  127.     UPROPERTY(EditAnywhere, Category = Content) float AmmoRate;
  128.  
  129.     /** Weapon ammo velocity in m/s */
  130.     UPROPERTY(EditAnywhere, Category = Content) float AmmoVelocity;
  131.  
  132.     /** Weapon ammo range before disappear in meter */
  133.     UPROPERTY(EditAnywhere, Category = Content) float AmmoRange;
  134.  
  135.     /** Weapon ammo precision in ° */
  136.     UPROPERTY(EditAnywhere, Category = Content) float AmmoPrecision;
  137.  
  138.     /** Weapon barrel count */
  139.     UPROPERTY(EditAnywhere, Category = Content) int32 GunCount;
  140.  
  141.     /** Alterned fire. If true, the gun don't fire at same time */
  142.     UPROPERTY(EditAnywhere, Category = Content) bool AlternedFire;
  143.  
  144.     /** If true, the gun fire one shell at each fire activation */
  145.     UPROPERTY(EditAnywhere, Category = Content) bool SemiAutomaticFire;
  146.  
  147.     /** Effect used when firing */
  148.     UPROPERTY(EditAnywhere, Category = Content) UParticleSystem* FiringEffect;
  149.  
  150.     /** Effect used for tracer ammunitions */
  151.     UPROPERTY(EditAnywhere, Category = Content) UParticleSystem* TracerEffect;
  152.  
  153.     /** Decal used when an explosion hit a ship */
  154.     UPROPERTY(EditAnywhere, Category = Content) UMaterialInterface* ExplosionMaterial;
  155. };
  156.  
  157. /** Turret characteristic */
  158. USTRUCT()
  159. struct FFlareSpacecraftComponentTurretCharacteristics
  160. {
  161.     GENERATED_USTRUCT_BODY()
  162.  
  163.     /** Is a turret */
  164.     UPROPERTY(EditAnywhere, Category = Content) bool IsTurret;
  165.  
  166.     /** Turret base angular velocity */
  167.     UPROPERTY(EditAnywhere, Category = Content) float TurretAngularVelocity;
  168.  
  169.     /** Turret barrels angular velocity */
  170.     UPROPERTY(EditAnywhere, Category = Content) float BarrelsAngularVelocity;
  171.  
  172.     /** Turret max angle. If >= 180 full rotation is possible */
  173.     UPROPERTY(EditAnywhere, Category = Content) float TurretMaxAngle;
  174.  
  175.     /** Turret min angle. If <= -180 full rotation is possible */
  176.     UPROPERTY(EditAnywhere, Category = Content) float TurretMinAngle;
  177.  
  178.     /** Turret barrels max angle.  If >= 180 full rotation is possible */
  179.     UPROPERTY(EditAnywhere, Category = Content) float BarrelsMaxAngle;
  180.  
  181.     /** Turret barrels min angle. If <= -180 full rotation is possible */
  182.     UPROPERTY(EditAnywhere, Category = Content) float BarrelsMinAngle;
  183.  
  184.     /** Turret mesh */
  185.     UPROPERTY(EditAnywhere, Category = Content) UStaticMesh* TurretMesh;
  186.  
  187.     /** Barrel mesh */
  188.     UPROPERTY(EditAnywhere, Category = Content) UStaticMesh* BarrelsMesh;
  189.  
  190.     /** Sound played on turret rotation */
  191.     UPROPERTY(EditAnywhere, Category = Content) USoundCue* TurretRotationSound;
  192.  
  193.     /** Sound played on barrel rotation*/
  194.     UPROPERTY(EditAnywhere, Category = Content) USoundCue* BarrelRotationSound;
  195.  
  196. };
  197.  
  198. /** Weapon characteristics */
  199. USTRUCT()
  200. struct FFlareSpacecraftComponentWeaponCharacteristics
  201. {
  202.     GENERATED_USTRUCT_BODY()
  203.  
  204.     /** Is a weapon */
  205.     UPROPERTY(EditAnywhere, Category = Content) bool IsWeapon;
  206.  
  207.     /** Weapon order in weapon groups */
  208.     UPROPERTY(EditAnywhere, Category = Content) int32 Order;
  209.  
  210.     /** Alterned weapons. If true, all the weapons don't fire at same time */
  211.     UPROPERTY(EditAnywhere, Category = Content) bool AlternedWeapon;
  212.  
  213.     /** Damage type */
  214.     UPROPERTY(EditAnywhere, Category = Content) TEnumAsByte<EFlareShellDamageType::Type> DamageType;
  215.  
  216.     /** Explosion (or fragment) energy in KJ */
  217.     UPROPERTY(EditAnywhere, Category = Content) float ExplosionPower;
  218.  
  219.     /** Shell fragment count (for HE shell) */
  220.     UPROPERTY(EditAnywhere, Category = Content) int32 AmmoFragmentCount;
  221.  
  222.     /** Ammo damage radius */
  223.     UPROPERTY(EditAnywhere, Category = Content) float AmmoDamageRadius;
  224.  
  225.     /** Ammo explosion effective radius (for HE shell) */
  226.     UPROPERTY(EditAnywhere, Category = Content) float AmmoExplosionRadius;
  227.  
  228.     /** Weapon ammo max capacity */
  229.     UPROPERTY(EditAnywhere, Category = Content) int32 AmmoCapacity;
  230.  
  231.     /** Damage type */
  232.     UPROPERTY(EditAnywhere, Category = Content) TEnumAsByte<EFlareShellFuzeType::Type> FuzeType;
  233.  
  234.     /** If proximity fuse, below this distance the shell will explode */
  235.     UPROPERTY(EditAnywhere, Category = Content) float FuzeMinDistanceThresold;
  236.  
  237.     /** If proximity fuse, above this distance the shell will no trig*/
  238.     UPROPERTY(EditAnywhere, Category = Content) float FuzeMaxDistanceThresold;
  239.  
  240.     /** Sound played on impact */
  241.     UPROPERTY(EditAnywhere, Category = Content) USoundCue* ImpactSound;
  242.  
  243.     /** Sound played on damage */
  244.     UPROPERTY(EditAnywhere, Category = Content) USoundCue* DamageSound;
  245.  
  246.     /** Sound played when firing */
  247.     UPROPERTY(EditAnywhere, Category = Content) USoundCue* FiringSound;
  248.  
  249.     /** Effect shown with a shell explode */
  250.     UPROPERTY(EditAnywhere, Category = Content) UParticleSystem* ExplosionEffect;
  251.  
  252.     /** Effect shown with a shell or a fragment impact a target */
  253.     UPROPERTY(EditAnywhere, Category = Content) UParticleSystem* ImpactEffect;
  254.  
  255.     /** Gun characteristic structure */
  256.     UPROPERTY(EditAnywhere, Category = Content) FFlareSpacecraftComponentGunCharacteristics GunCharacteristics;
  257.  
  258.     /** Turret characteristic structure */
  259.     UPROPERTY(EditAnywhere, Category = Content) FFlareSpacecraftComponentTurretCharacteristics TurretCharacteristics;
  260.  
  261.     /** Bomb characteristic structure */
  262.     UPROPERTY(EditAnywhere, Category = Content) FFlareSpacecraftComponentBombCharacteristics BombCharacteristics;
  263.  
  264. };
  265.  
  266. /** Part type values */
  267. UENUM()
  268. namespace EFlarePartType
  269. {
  270.     enum Type
  271.     {
  272.         None,
  273.         OrbitalEngine,
  274.         RCS,
  275.         Weapon,
  276.         Meta,
  277.         InternalComponent,
  278.         Num
  279.     };
  280. }
  281.  
  282. /** Shell fuze type */
  283. UENUM()
  284. namespace EFlareShellFuzeType
  285. {
  286.     enum Type
  287.     {
  288.         Contact, // The shell explode on contact
  289.         Proximity, // The shell explode near the target
  290.     };
  291. }
  292.  
  293. /** Shell damage type */
  294. UENUM()
  295. namespace EFlareShellDamageType
  296. {
  297.     enum Type
  298.     {
  299.         HighExplosive, // Explosion send shell pieces around at hight velocity.
  300.         ArmorPiercing, // Not explosive shell, The damage are done by kinetic energy. Classique bullets.
  301.         HEAT, // Heat Explosive Anti Tank. The explosion is focalized in a hot beam of metal melting armor.
  302.     };
  303. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement