FN_TurnOnLightsTask

Restores lighting to the warehouse after a power outage. Activates lights and materials, plays ambience, and signals task completion with audio and visuals.

Main Responsibilities

  • Enables point lights and emissive materials.
  • Triggers feedback and completes the task.
  • Optionally flickers red light before recovery.

Enable Lights

private void EnableLights() {
  FN_Sound_Manager.PlaySound(SoundType.Click, 1.5f);

  foreach (GameObject go_light in go_pointLights)
    go_light.SetActive(true);

  ApplyEmissionColor(emissionColor * emissionIntensity);

  foreach (MeshRenderer mr in mr_lightMeshes)
    mat.SetColor("_EmissionColor", emissionColor * emissionIntensity);

  MarkTaskComplete();
}
restores lights and completes task
Before and after lights activation

Failure Flicker (Optional)

private IEnumerator FlickerRedRoutine() {
  for (int i = 0; i < 3; i++) {
    SetLightColor(Color.red);
    yield return new WaitForSeconds(0.2f);
    SetLightColor(Color.black);
    yield return new WaitForSeconds(0.2f);
  }
  EnableLights();
}
flickers red before recovery
Red flickering lights on failure

Mark Completion

public override void MarkTaskComplete() {
  if (!bl_isCompleted) {
    bl_isCompleted = true;
    FN_Sound_Manager.PlaySound(SoundType.TaskComplete, 1f);
    base.MarkTaskComplete();
  }
}
plays completion sound and advances tasks
Task complete moment

In-Game Demo

← Return to Warehouse Game Overview