Skip to content

Commit

Permalink
Add NEXUS sound when absorbed factories produce units on Gamma 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Aug 16, 2023
1 parent 42d337b commit aa9f6d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion data/base/script/campaign/libcampaign_includes/events.js
Expand Up @@ -163,6 +163,11 @@ function cam_eventDroidBuilt(droid, structure)
{
return;
}
if (camGetNexusState() && droid.player === CAM_NEXUS && __camNextLevel === "CAM3C" && camRand(100) < 7)
{
// Occasionally hint that NEXUS is producing units on Gamma 5.
playSound(CAM_PRODUCTION_COMPLETE_SND);
}
if (!camDef(__camFactoryInfo))
{
return;
Expand Down Expand Up @@ -364,7 +369,7 @@ function cam_eventGameLoaded()
//Plays Nexus sounds if nexusActivated is true.
function cam_eventObjectTransfer(obj, from)
{
if (from === CAM_HUMAN_PLAYER && obj.player === CAM_NEXUS && __camNexusActivated === true)
if (camGetNexusState() && from === CAM_HUMAN_PLAYER && obj.player === CAM_NEXUS)
{
let snd;
if (obj.type === STRUCTURE)
Expand Down
2 changes: 1 addition & 1 deletion data/base/script/campaign/libcampaign_includes/nexus.js
Expand Up @@ -75,7 +75,7 @@ function camAbsorbPlayer(who, to)
//;;
function camHackIntoPlayer(player, to)
{
if (__camNexusActivated === false)
if (!camGetNexusState())
{
return;
}
Expand Down

0 comments on commit aa9f6d3

Please sign in to comment.