Skip to content

Commit

Permalink
Multiship 0.5 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
CCraigen committed Dec 6, 2023
1 parent 38b03f9 commit 389113d
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 27 deletions.
4 changes: 2 additions & 2 deletions GameMod/MPMatchInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ public static void DrawMatchInfo(UIElement uie, Vector2 position)
uie.DrawStringSmall(GetColliderName(MPModPrivateData.ShipMeshCollider), position, TEXT_SIZE, StringOffset.RIGHT, UIManager.m_col_ui2, uie.m_alpha);
position.y += LINE_SIZE;
}
if (MPModPrivateData.ShipScale != 0)
/*if (MPModPrivateData.ShipScale != 0)
{
show = true;
uie.DrawStringSmall("SHIP SCALE:", position - Vector2.right * LEFT_OFFSET, TEXT_SIZE, StringOffset.LEFT, UIManager.m_col_ui1, 1f, 120f);
uie.DrawStringSmall(MPModPrivateData.ShipScale * 100f + "%", position, TEXT_SIZE, StringOffset.RIGHT, UIManager.m_col_ui2, uie.m_alpha);
position.y += LINE_SIZE;
}
}*/
if (MPModPrivateData.ClassicSpawnsEnabled)
{
show = true;
Expand Down
4 changes: 2 additions & 2 deletions GameMod/MPMatchPresets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static MPMatchPresets()
damageNumbers = true,
assistScoring = true,
teamCount = 2,
shipMeshCollider = 0,
shipMeshCollider = 2, // CCF this is temporary
shipsAllowed = 1, // CCF this is temporary
shipScale = 0,
thunderboltPassthrough = false
Expand Down Expand Up @@ -151,7 +151,7 @@ static MPMatchPresets()
assistScoring = true,
teamCount = 2,
damageNumbers = true,
shipMeshCollider = 0,
shipMeshCollider = 2, // CCF this is temporary
shipsAllowed = 1, // CCF this is temporary
shipScale = 0,
thunderboltPassthrough = false
Expand Down
2 changes: 1 addition & 1 deletion GameMod/MPShips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace GameMod
// Handles asset replacement for different Ship types
public static class MPShips
{
public const string MULTISHIP_VERSION = "MULTISHIP-0.5a3";
public const string MULTISHIP_VERSION = "MULTISHIP-0.5";

public static Dictionary<NetworkInstanceId, Ship> SelectedShips = new Dictionary<NetworkInstanceId, Ship>(); // stores the PlayerShip's netId and the associated Ship reference
public static Dictionary<int, int> LobbyShips = new Dictionary<int, int>(); // (lobby_id, idx) stores a lobby_id and the associated Ship index for translation at instantiation
Expand Down
66 changes: 47 additions & 19 deletions GameMod/Primaries/Flakshell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@ public override void Fire(float refire_multiplier)
Vector3 c_up = ship.c_up;
//Vector3 c_forward = ship.c_forward;

ps.FiringVolumeModifier = 0.9f;
ps.FiringVolumeModifier = 0.7f;

/*
if (ship.flak_fire_count < 4)
{
//ship.flak_fire_count++;
ship.flak_fire_count++;
}
*/

if (ps.isLocalPlayer)
{
GameManager.m_audio.PlayCue2D(337, 0.7f, 0.5f, 0f, true);
GameManager.m_audio.PlayCue2D(338, 0.7f, 0.5f, 0f, true);
GameManager.m_audio.PlayCue2D(337, 0.6f, 0.5f, 0f, true);
GameManager.m_audio.PlayCue2D(338, 0.6f, 0.5f, 0f, true);
}
else
{
GameManager.m_audio.PlayCuePos(337, ps.c_transform.position, 0.7f, 0.5f, 0f);
GameManager.m_audio.PlayCuePos(338, ps.c_transform.position, 0.7f, 0.5f, 0f);
GameManager.m_audio.PlayCuePos(337, ps.c_transform.position, 0.6f, 0.5f, 0f);
GameManager.m_audio.PlayCuePos(338, ps.c_transform.position, 0.6f, 0.5f, 0f);
}

// originally ProjectileManager.PlayerFire()
Expand Down Expand Up @@ -119,7 +121,9 @@ public override void DrawHUDReticle(Vector2 pos, float m_alpha)
/*
public override void Explode(Projectile proj, bool damaged_something, FXWeaponExplosion m_death_particle_override, float strength, WeaponUnlock m_upgrade)
{
base.Explode(proj, true, m_death_particle_override, strength, m_upgrade);
Debug.Log("CCF flak damaged something = " + damaged_something);
base.Explode(proj, damaged_something, m_death_particle_override, strength, m_upgrade);
//base.Explode(proj, true, m_death_particle_override, strength, m_upgrade);
//GameManager.m_light_manager.CreateLightFlash(proj.c_transform.position, Color.white, 10f, 25f, 0.2f, false);
//SFXCueManager.PlayCuePos(SFXCue.exp_creeper, proj.c_transform.position, 0.5f);
Expand All @@ -138,17 +142,17 @@ public override GameObject GenerateProjPrefab()
projectile.m_type = (ProjPrefab)projprefab;

projectile.m_damage_robot = 15f;
projectile.m_damage_player = 3f;
projectile.m_damage_mp = 3f;
projectile.m_damage_player = 6f;
projectile.m_damage_mp = 6f;
projectile.m_damage_energy = false;
projectile.m_stun_multiplier = 1f;
projectile.m_push_force_robot = 1f;
projectile.m_push_force_player = 1f;
projectile.m_push_torque_robot = 1f;
projectile.m_lifetime_min = 0.26f;
projectile.m_lifetime_min = 0.23f;
projectile.m_lifetime_max = -1;
projectile.m_lifetime_robot_multiplier = 1;
projectile.m_init_speed_min = 50f;
projectile.m_init_speed_min = 60f;
projectile.m_init_speed_max = -1;
projectile.m_init_speed_robot_multiplier = 1;
projectile.m_acceleration = 0;
Expand Down Expand Up @@ -216,27 +220,51 @@ public override void AddWeaponExplosions(ref List<GameObject> ex)
ps1speed.constantMin = 9;
ps1speed.constantMax = 10;
ps1main.startSpeed = ps1speed;
ps1main.simulationSpeed = 2f;

Renderer rend1 = sparks1.GetComponent<Renderer>();
Material mat1 = rend1.material;
mat1.SetFloat("_CoreStrength", 105f);
mat1.SetFloat("_Exponent", 9f);
rend1.material = mat1;

GameObject sparks2 = go.transform.GetChild(2).gameObject;
var ps2main = sparks2.GetComponent<ParticleSystem>().main;
var ps2speed = ps2main.startSpeed;
ps2speed.constantMin = 8;
ps2speed.constantMax = 10;
ps2main.startSpeed = ps2speed;
ps2main.simulationSpeed = 2f;

Renderer rend2 = sparks2.GetComponent<Renderer>();
Material mat2 = rend2.material;
mat2.SetFloat("_CoreStrength", 105f);
mat2.SetFloat("_Exponent", 9f);
rend2.material = mat1;

GameObject ring1 = go.transform.GetChild(1).gameObject;
var ps3main = ring1.GetComponent<ParticleSystem>().main;
var ps3speed = ps3main.startSpeed;
ps3speed.constantMin = 6;
ps3speed.constantMax = 7;
ps3main.startSpeed = ps3speed;
ps3main.simulationSpeed = 2f;

GameObject ring2 = go.transform.GetChild(3).gameObject;
var ps4main = ring2.GetComponent<ParticleSystem>().main;
var ps4speed = ps4main.startSpeed;
ps4speed.constantMin = 8;
ps4speed.constantMax = 9;
ps4main.startSpeed = ps4speed;
ps4main.simulationSpeed = 2f;

var ps5main = go.GetComponent<ParticleSystem>().main; // smoke is on the main GameObject
var ps5size = ps4main.startSize;
ps5size.constantMin = 6.5f;
ps5size.constantMax = 8;
ps5main.startSize = ps5size;
ps5main.simulationSpeed = 2f;


projectile.m_death_particle_default = (FXWeaponExplosion)ex.Count;
projectile.m_death_particle_robot = (FXWeaponExplosion)ex.Count;
Expand All @@ -247,12 +275,12 @@ public override void AddWeaponExplosions(ref List<GameObject> ex)

explosion.m_exp_force = 1f;
explosion.m_exp_radius = 4f;
explosion.m_damage_radius = 5f;
explosion.m_damage_radius = 5.5f;
explosion.m_damage_radius_player = 5f;
explosion.m_damage_radius_mp = 5f;
explosion.m_player_damage = 15f;
explosion.m_damage_radius_mp = 5.5f;
explosion.m_player_damage = 18f;
explosion.m_robot_damage = 20f;
explosion.m_mp_damage = 15f;
explosion.m_mp_damage = 18f;
explosion.m_camera_shake_type = CameraShakeType.EXPLODE_SMALL;
explosion.m_camera_shake_intensity = 0.3f;

Expand All @@ -271,13 +299,13 @@ public override void AddWeaponExplosions(ref List<GameObject> ex)
explosion.m_damage_radius = 3.5f;
explosion.m_damage_radius_player = 3.5f;
explosion.m_damage_radius_mp = 3.5f;
explosion.m_player_damage = 10f;
explosion.m_robot_damage = 20f;
explosion.m_mp_damage = 10f;
explosion.m_player_damage = 8f;
explosion.m_robot_damage = 12f;
explosion.m_mp_damage = 8f;
explosion.m_camera_shake_type = CameraShakeType.EXPLODE_SMALL;
explosion.m_camera_shake_intensity = 0.5f;

ex.Add(go);
ex.Add(goDirect);
}
}
}
2 changes: 1 addition & 1 deletion GameMod/Ships/Kodachi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public Kodachi()
name = "entity_special_player_ship";
description = new string[3]
{
"A short-range enforcement ship. Surprisingly well-armed and shielded.",
"A short-range enforcement gunship. Surprisingly well-armed and shielded.",
"Its low mass and small size trade overall speed for maneuvering performance.",
"Because of this, the Kodachi is able to out-turn any of its competitors."
};
Expand Down
4 changes: 2 additions & 2 deletions GameMod/Ships/Magnum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public Magnum()
boostMulti = 2f;
boostMod = 2.2f;

//boostBurst = 0.8f;
boostBurst = 0.9f;
boostBurst = 0.8f;
//boostBurst = 0.9f;

SetHandling();
}
Expand Down

0 comments on commit 389113d

Please sign in to comment.