Skip to content

Commit 4a9c078

Browse files
committed
Add various events for buying, selling, and upgrading Odyssey weapons and suits.
1 parent 51fea49 commit 4a9c078

41 files changed

Lines changed: 2492 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,19 @@ Full details of the variables available for each noted event, and VoiceAttack in
1010
* The `Organic` object has been revised to include a credit `value` property (set whenever the species is identified and when organic data is sold).
1111
* The `Organic` object has been revised to include a credit `bonus` property (set when you have registered a first footfall on the body and when organic data is sold).
1212
* Events
13-
*
13+
* `Hand weapon purchased` added.
14+
* `Hand weapon sold` added.
15+
* `Hand weapon upgraded` added.
16+
* `Suit purchased` updated with revised properties.
17+
* `Suit sold` added.
18+
* `Suit upgraded` added.
19+
* Speech Responder
20+
* `Hand weapon purchased` added.
21+
* `Hand weapon sold` added.
22+
* `Hand weapon upgraded` added.
23+
* `Suit purchased` updated.
24+
* `Suit sold` added.
25+
* `Suit upgraded` added.
1426
* VoiceAttack Responder
1527
* (**BREAKING CHANGE**) Updated to target VoiceAttack 2.0.0+. VoiceAttack 1.X is no longer supported.
1628
* Under the hood, EDDI now runs as a separate process from VoiceAttack. Only the plugin component of EDDI runs within the VoiceAttack process. This should improve stability and performance for both EDDI and VoiceAttack.

DataDefinitions/EddiDataDefinitions.csproj

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@
99
<OutputPath>..\bin\Release\</OutputPath>
1010
</PropertyGroup>
1111
<ItemGroup>
12+
<Compile Update="Properties\SuitMod.Designer.cs">
13+
<DependentUpon>SuitMod.resx</DependentUpon>
14+
<DesignTime>True</DesignTime>
15+
<AutoGen>True</AutoGen>
16+
</Compile>
17+
<Compile Update="Properties\HandWeaponType.Designer.cs">
18+
<DependentUpon>HandWeaponType.resx</DependentUpon>
19+
<DesignTime>True</DesignTime>
20+
<AutoGen>True</AutoGen>
21+
</Compile>
22+
<Compile Update="Properties\HandWeaponMod.Designer.cs">
23+
<DependentUpon>HandWeaponMod.resx</DependentUpon>
24+
<DesignTime>True</DesignTime>
25+
<AutoGen>True</AutoGen>
26+
</Compile>
1227
<Compile Update="Properties\CodexStellarBodyType.Designer.cs">
1328
<DesignTime>True</DesignTime>
1429
<AutoGen>True</AutoGen>
@@ -129,6 +144,11 @@
129144
<AutoGen>True</AutoGen>
130145
<DependentUpon>StationState.resx</DependentUpon>
131146
</Compile>
147+
<Compile Update="Properties\HandWeapon.Designer.cs">
148+
<DependentUpon>HandWeapon.resx</DependentUpon>
149+
<DesignTime>True</DesignTime>
150+
<AutoGen>True</AutoGen>
151+
</Compile>
132152
<Compile Update="Properties\Suit.Designer.cs">
133153
<DependentUpon>Suit.resx</DependentUpon>
134154
<AutoGen>True</AutoGen>
@@ -424,6 +444,18 @@
424444
<ProjectReference Include="..\Utilities\Utilities.csproj" />
425445
</ItemGroup>
426446
<ItemGroup>
447+
<EmbeddedResource Update="Properties\SuitMod.resx">
448+
<LastGenOutput>SuitMod.Designer.cs</LastGenOutput>
449+
<Generator>PublicResXFileCodeGenerator</Generator>
450+
</EmbeddedResource>
451+
<EmbeddedResource Update="Properties\HandWeaponType.resx">
452+
<LastGenOutput>HandWeaponType.Designer.cs</LastGenOutput>
453+
<Generator>PublicResXFileCodeGenerator</Generator>
454+
</EmbeddedResource>
455+
<EmbeddedResource Update="Properties\HandWeaponMod.resx">
456+
<LastGenOutput>HandWeaponMod.Designer.cs</LastGenOutput>
457+
<Generator>PublicResXFileCodeGenerator</Generator>
458+
</EmbeddedResource>
427459
<EmbeddedResource Update="Properties\CodexStellarBodyType.resx">
428460
<Generator>PublicResXFileCodeGenerator</Generator>
429461
<LastGenOutput>CodexStellarBodyType.Designer.cs</LastGenOutput>
@@ -549,6 +581,10 @@
549581
<Generator>PublicResXFileCodeGenerator</Generator>
550582
<LastGenOutput>StationState.Designer.cs</LastGenOutput>
551583
</EmbeddedResource>
584+
<EmbeddedResource Update="Properties\HandWeapon.resx">
585+
<LastGenOutput>HandWeapon.Designer.cs</LastGenOutput>
586+
<Generator>PublicResXFileCodeGenerator</Generator>
587+
</EmbeddedResource>
552588
<EmbeddedResource Update="Properties\Suit.resx">
553589
<Generator>PublicResXFileCodeGenerator</Generator>
554590
<LastGenOutput>Suit.Designer.cs</LastGenOutput>

DataDefinitions/HandWeapon.cs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+

2+
using System;
3+
using System.Linq;
4+
using Utilities;
5+
6+
namespace EddiDataDefinitions
7+
{
8+
public class HandWeapon ( string edname, HandWeaponType type, Manufacturer manufacturer, int price ) : ResourceBasedLocalizedEDName<HandWeapon>( edname, edname )
9+
{
10+
static HandWeapon ()
11+
{
12+
resourceManager = Properties.HandWeapon.ResourceManager;
13+
resourceManager.IgnoreCase = true;
14+
missingEDNameHandler = edname => new HandWeapon( edname, null, null, 0 );
15+
}
16+
17+
// dummy used to ensure that the static constructor has run
18+
public HandWeapon () : this( "", null, null, 0 )
19+
{ }
20+
21+
// Kinetic Weapons
22+
public static readonly HandWeapon KarmaAR50 = new( "Wpn_M_AssaultRifle_Kinetic_FAuto", HandWeaponType.AssaultRifle, Manufacturer.KinematicArmaments, 100000 );
23+
public static readonly HandWeapon KarmaC44 = new( "Wpn_M_SubMachineGun_Kinetic_FAuto", HandWeaponType.SubMachineGun, Manufacturer.KinematicArmaments, 50000 );
24+
public static readonly HandWeapon KarmaP15 = new( "Wpn_S_Pistol_Kinetic_SAuto", HandWeaponType.Pistol, Manufacturer.KinematicArmaments, 75000 );
25+
26+
// Thermal Weapons
27+
public static readonly HandWeapon TKAphelion = new( "Wpn_M_AssaultRifle_Laser_FAuto", HandWeaponType.AssaultRifle, Manufacturer.Takada, 100000 );
28+
public static readonly HandWeapon TKEclipse = new( "Wpn_M_SubMachineGun_Laser_FAuto", HandWeaponType.SubMachineGun, Manufacturer.Takada, 50000 );
29+
public static readonly HandWeapon TKZenith = new( "Wpn_S_Pistol_Laser_SAuto", HandWeaponType.Pistol, Manufacturer.Takada, 75000 );
30+
31+
// Plasma Weapons
32+
public static readonly HandWeapon ManticoreExecutioner = new( "Wpn_M_Sniper_Plasma_Charged", HandWeaponType.SniperRifle, Manufacturer.Manticore, 175000 );
33+
public static readonly HandWeapon ManticoreIntimidator = new( "Wpn_M_Shotgun_Plasma_DoubleBarrel", HandWeaponType.Shotgun, Manufacturer.Manticore, 100000 );
34+
public static readonly HandWeapon ManticoreOppressor = new( "Wpn_M_AssaultRifle_Plasma_FAuto", HandWeaponType.AssaultRifle, Manufacturer.Manticore, 125000 );
35+
public static readonly HandWeapon ManticoreTormentor = new( "Wpn_S_Pistol_Plasma_Charged", HandWeaponType.Pistol, Manufacturer.Manticore, 50000 );
36+
37+
// Other Weapons
38+
public static readonly HandWeapon KarmaL6 = new( "Wpn_M_Launcher_Rocket_SAuto", HandWeaponType.RocketLauncher, Manufacturer.KinematicArmaments, 175000 );
39+
40+
[PublicAPI( "The weapon's type, as an object" )]
41+
public HandWeaponType type { get; } = type;
42+
43+
[PublicAPI( "The weapon's manufacturer, as an object" )]
44+
public Manufacturer manufacturer { get; } = manufacturer;
45+
46+
[PublicAPI( "The weapon's standard grade 1 price" )]
47+
public int price { get; } = price;
48+
49+
public static HandWeapon FromNameOrEdName ( string edname, string name )
50+
{
51+
var handweapon = AllOfThem.FirstOrDefault(handweapon => handweapon.edname.Equals(edname, StringComparison.OrdinalIgnoreCase));
52+
if ( handweapon is null )
53+
{
54+
Logging.Warn( $"Unknown hand weapon with edname '{edname}' and localized name '{name}'" );
55+
handweapon = new HandWeapon( edname, null, null, 0 );
56+
}
57+
return handweapon;
58+
}
59+
}
60+
}

DataDefinitions/HandWeaponMod.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+

2+
namespace EddiDataDefinitions
3+
{
4+
public class HandWeaponMod : ResourceBasedLocalizedEDName<HandWeaponMod>
5+
{
6+
static HandWeaponMod ()
7+
{
8+
resourceManager = Properties.HandWeaponMod.ResourceManager;
9+
resourceManager.IgnoreCase = false;
10+
missingEDNameHandler = edname => new HandWeaponMod( edname );
11+
}
12+
13+
public static readonly HandWeaponMod AudioMasking = new( "weapon_suppression_unpressurised");
14+
public static readonly HandWeaponMod FasterHandling = new( "weapon_handling");
15+
public static readonly HandWeaponMod GreaterRange = new( "weapon_range");
16+
public static readonly HandWeaponMod HeadshotDamage = new( "weapon_headshotdamage");
17+
public static readonly HandWeaponMod HipFireAccuracy = new( "weapon_accuracy");
18+
public static readonly HandWeaponMod MagazineSize = new( "weapon_clipsize");
19+
public static readonly HandWeaponMod NoiseSuppressor = new( "weapon_suppression_pressurised");
20+
public static readonly HandWeaponMod ReloadSpeed = new( "weapon_reloadspeed");
21+
public static readonly HandWeaponMod Scope = new( "weapon_scope");
22+
public static readonly HandWeaponMod Stability = new( "weapon_stability");
23+
public static readonly HandWeaponMod StowedReloading = new( "weapon_backpackreloading");
24+
25+
// dummy used to ensure that the static constructor has run
26+
public HandWeaponMod () : this("")
27+
{ }
28+
29+
private HandWeaponMod ( string edname ) : base( edname, edname )
30+
{ }
31+
32+
public new static HandWeaponMod FromEDName ( string edname )
33+
{
34+
var tidiedEdName = edname.Replace("_kinetic", "").Replace( "_laser", "" ).Replace( "_plasma", "" );
35+
return ResourceBasedLocalizedEDName<HandWeaponMod>.FromEDName( tidiedEdName );
36+
}
37+
}
38+
}

DataDefinitions/HandWeaponType.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+

2+
namespace EddiDataDefinitions
3+
{
4+
public class HandWeaponType : ResourceBasedLocalizedEDName<HandWeaponType>
5+
{
6+
static HandWeaponType ()
7+
{
8+
resourceManager = Properties.HandWeaponType.ResourceManager;
9+
resourceManager.IgnoreCase = false;
10+
missingEDNameHandler = (edname) => new HandWeaponType( edname );
11+
}
12+
13+
public static readonly HandWeaponType AssaultRifle = new( "AssaultRifle");
14+
public static readonly HandWeaponType Pistol = new( "Pistol");
15+
public static readonly HandWeaponType RocketLauncher = new( "RocketLauncher");
16+
public static readonly HandWeaponType Shotgun = new( "Shotgun");
17+
public static readonly HandWeaponType SniperRifle = new( "SniperRifle");
18+
public static readonly HandWeaponType SubMachineGun = new( "SubMachineGun");
19+
20+
// dummy used to ensure that the static constructor has run
21+
public HandWeaponType () : this("")
22+
{ }
23+
24+
private HandWeaponType ( string edname ) : base( edname, edname )
25+
{ }
26+
}
27+
}

DataDefinitions/Happiness.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11

22
namespace EddiDataDefinitions
33
{
4-
/// <summary>
5-
/// Economy types
6-
/// </summary>
74
public class Happiness : ResourceBasedLocalizedEDName<Happiness>
85
{
96
static Happiness()

DataDefinitions/Manufacturer.cs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
using JetBrains.Annotations;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using Utilities;
5+
6+
namespace EddiDataDefinitions
7+
{
8+
public class Manufacturer
9+
{
10+
public static readonly Manufacturer CoreDynamics = new( "Core Dynamics", [ new Translation( "Core", "kɔɹ" ), new Translation( "Dynamics", "dəˈnamɪks" ) ] );
11+
public static readonly Manufacturer FaulconDeLacy = new( "Faulcon DeLacy", [ new Translation( "Falcon", "ˈfælkən" ), new Translation( "Delacy", "dᵻlˈæ.si" ) ] );
12+
public static readonly Manufacturer Gutamaya = new( "Gutamaya", [ new Translation( "Gutamaya", "guːtəˈmaɪə" ) ] );
13+
public static readonly Manufacturer KinematicArmaments = new( "Kinematic Armaments" );
14+
public static readonly Manufacturer LakonSpaceways = new( "Lakon Spaceways", [ new Translation( "Lakon", "leɪkɒn" ), new Translation( "Spaceways", "speɪsweɪz" ) ] );
15+
public static readonly Manufacturer Manticore = new( "Manticore" );
16+
public static readonly Manufacturer Remlok = new( "Remlok" );
17+
public static readonly Manufacturer SaudKruger = new( "Saud Kruger", [ new Translation( "Saud", "saʊd" ), new Translation( "Kruger", "ˈkruːɡə" ) ] );
18+
public static readonly Manufacturer Supratech = new( "Supratech", [ new Translation( "Supratech", "su.pɹətɛk" ) ] );
19+
public static readonly Manufacturer Takada = new( "Takada", [ new Translation( "Takada", "t.ækɑːdə" ) ] );
20+
public static readonly Manufacturer ZorgonPeterson = new( "Zorgon Peterson" );
21+
22+
public static readonly List<Manufacturer> AllOfThem =
23+
[
24+
CoreDynamics,
25+
FaulconDeLacy,
26+
Gutamaya,
27+
KinematicArmaments,
28+
LakonSpaceways,
29+
Manticore,
30+
Remlok,
31+
SaudKruger,
32+
Supratech,
33+
Takada,
34+
ZorgonPeterson
35+
];
36+
37+
[Utilities.PublicAPI( "The manufacturer name" )]
38+
public string name { get; }
39+
40+
[Utilities.PublicAPI( "The phonetic name of the manufacturer, if it is known" ), UsedImplicitly]
41+
public string phoneticname => SpokenManufacturer( name ) ?? name;
42+
43+
// Not intended to be user facing
44+
45+
public List<Translation> phoneticName { get; }
46+
47+
private Manufacturer ( string name, List<Translation> phoneticName = null )
48+
{
49+
this.name = name;
50+
this.phoneticName = phoneticName;
51+
}
52+
53+
public static string SpokenManufacturer(string manufacturer)
54+
{
55+
var phoneticmanufacturer = AllOfThem.FirstOrDefault(m => m.name == manufacturer)?.phoneticName;
56+
if (phoneticmanufacturer != null)
57+
{
58+
var result = "";
59+
foreach (var item in phoneticmanufacturer)
60+
{
61+
result += "<phoneme alphabet=\"ipa\" ph=\"" + item.to + "\">" + item.from + "</phoneme> ";
62+
}
63+
return result;
64+
}
65+
// Model isn't in the dictionary
66+
return null;
67+
}
68+
}
69+
}

0 commit comments

Comments
 (0)