Skip to content

Commit

Permalink
Merge pull request #230 from Gemster312/sc2-next
Browse files Browse the repository at this point in the history
Maps begin pitch black until Archipelago is fully loaded
  • Loading branch information
Ziktofel authored Aug 1, 2024
2 parents f6d8638 + b9046a7 commit 7913125
Show file tree
Hide file tree
Showing 8 changed files with 429 additions and 0 deletions.
68 changes: 68 additions & 0 deletions Mods/ArchipelagoCore.SC2Mod/Base.SC2Data/Lib5BD4895D.galaxy
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ void lib5BD4895D_InitVariables () {
lib5BD4895D_gv_aP_Core_Faction_KERRIGAN_SWARM_SWITCHABLE_TO_PRIMAL_ZERG = "ks_pz";
lib5BD4895D_gv_aP_Core_Faction_DAELAAM = "da";
lib5BD4895D_gv_aP_Core_Faction_NOVA = "nova";
lib5BD4895D_gv_aP_Core_blackScreen_dialog = c_invalidDialogId;
lib5BD4895D_gv_aP_Core_blackScreen = c_invalidDialogControlId;
lib5BD4895D_gv_chatbox.lv_mainpanel = c_invalidDialogId;
lib5BD4895D_gv_chatbox.lv_chatpanel = c_invalidDialogId;
lib5BD4895D_gv_chatbox.lv_hiddenpanel = c_invalidDialogId;
Expand Down Expand Up @@ -1635,6 +1637,70 @@ bool auto_lib5BD4895D_gf_AP_Core_objectiveFadeHelper_TriggerFunc (bool testConds
}

// Triggers
//--------------------------------------------------------------------------------------------------
// Trigger: AP_Core_mapLoadStart
//--------------------------------------------------------------------------------------------------
bool lib5BD4895D_gt_AP_Core_mapLoadStart_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}

DialogCreate(4000, 3000, c_anchorCenter, 0, 0, true);
lib5BD4895D_gv_aP_Core_blackScreen_dialog = DialogLastCreated();
DialogSetImageVisible(lib5BD4895D_gv_aP_Core_blackScreen_dialog, false);
DialogControlCreate(lib5BD4895D_gv_aP_Core_blackScreen_dialog, c_triggerControlTypeImage);
lib5BD4895D_gv_aP_Core_blackScreen = DialogControlLastCreated();
DialogControlSetFullDialog(lib5BD4895D_gv_aP_Core_blackScreen, PlayerGroupAll(), true);
libNtve_gf_SetDialogItemImage(lib5BD4895D_gv_aP_Core_blackScreen, "Assets\\Textures\\ui_ingame_blackmask.dds", PlayerGroupAll());
libNtve_gf_SetDialogItemBlendMode(lib5BD4895D_gv_aP_Core_blackScreen, c_triggerBlendModeAlpha, PlayerGroupAll());
DialogSetVisible(lib5BD4895D_gv_aP_Core_blackScreen_dialog, PlayerGroupAll(), true);
return true;
}

//--------------------------------------------------------------------------------------------------
void lib5BD4895D_gt_AP_Core_mapLoadStart_Init () {
lib5BD4895D_gt_AP_Core_mapLoadStart = TriggerCreate("lib5BD4895D_gt_AP_Core_mapLoadStart_Func");
TriggerAddEventMapInit(lib5BD4895D_gt_AP_Core_mapLoadStart);
}

//--------------------------------------------------------------------------------------------------
// Trigger: AP_Core_mapLoadEnd
//--------------------------------------------------------------------------------------------------
bool lib5BD4895D_gt_AP_Core_mapLoadEnd_Func (bool testConds, bool runActions) {
// Variable Declarations
fixed lv_duration;

// Automatic Variable Declarations
// Variable Initialization
lv_duration = 0.25;

// Conditions
if (testConds) {
if (!((lib5BD4895D_gv_aP_Core_initFinished == true))) {
return false;
}
}

// Actions
if (!runActions) {
return true;
}

TriggerEnable(TriggerGetCurrent(), false);
DialogControlFadeTransparency(lib5BD4895D_gv_aP_Core_blackScreen, PlayerGroupAll(), lv_duration, 0.0);
Wait(lv_duration, c_timeReal);
DialogDestroy(lib5BD4895D_gv_aP_Core_blackScreen_dialog);
return true;
}

//--------------------------------------------------------------------------------------------------
void lib5BD4895D_gt_AP_Core_mapLoadEnd_Init () {
lib5BD4895D_gt_AP_Core_mapLoadEnd = TriggerCreate("lib5BD4895D_gt_AP_Core_mapLoadEnd_Func");
TriggerAddEventTimePeriodic(lib5BD4895D_gt_AP_Core_mapLoadEnd, 0.1, c_timeGame);
}

//--------------------------------------------------------------------------------------------------
// Trigger: AP_Core_controllerInit
//--------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -2078,6 +2144,8 @@ void lib5BD4895D_gt_AP_Core_objectiveTimerUpdate_Init () {
}

void lib5BD4895D_InitTriggers () {
lib5BD4895D_gt_AP_Core_mapLoadStart_Init();
lib5BD4895D_gt_AP_Core_mapLoadEnd_Init();
lib5BD4895D_gt_AP_Core_controllerInit_Init();
lib5BD4895D_gt_AP_Core_dontHideController_Init();
lib5BD4895D_gt_AP_Core_keepControllerAlive_Init();
Expand Down
4 changes: 4 additions & 0 deletions Mods/ArchipelagoCore.SC2Mod/Base.SC2Data/Lib5BD4895D_h.galaxy
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ string lib5BD4895D_gv_aP_Core_Faction_KERRIGAN_SWARM;
string lib5BD4895D_gv_aP_Core_Faction_KERRIGAN_SWARM_SWITCHABLE_TO_PRIMAL_ZERG;
string lib5BD4895D_gv_aP_Core_Faction_DAELAAM;
string lib5BD4895D_gv_aP_Core_Faction_NOVA;
int lib5BD4895D_gv_aP_Core_blackScreen_dialog;
int lib5BD4895D_gv_aP_Core_blackScreen;
unit lib5BD4895D_gv_aP_Core_controller;
unit lib5BD4895D_gv_aP_Core_controller2;
bool[lib5BD4895D_gv_aP_Core_LOCATIONS_PER_MAP + 1] lib5BD4895D_gv_aP_Core_locations_sent;
Expand Down Expand Up @@ -166,6 +168,8 @@ void lib5BD4895D_gf_AP_Core_setObjectiveFailed (int lp_objective);
void lib5BD4895D_gf_AP_Core_objectiveFadeHelper (fixed lp_time);

// Trigger Declarations
trigger lib5BD4895D_gt_AP_Core_mapLoadStart;
trigger lib5BD4895D_gt_AP_Core_mapLoadEnd;
trigger lib5BD4895D_gt_AP_Core_controllerInit;
trigger lib5BD4895D_gt_AP_Core_dontHideController;
trigger lib5BD4895D_gt_AP_Core_keepControllerAlive;
Expand Down
Binary file modified Mods/ArchipelagoCore.SC2Mod/DocumentHeader
Binary file not shown.
Binary file modified Mods/ArchipelagoCore.SC2Mod/GameText.version
Binary file not shown.
1 change: 1 addition & 0 deletions Mods/ArchipelagoCore.SC2Mod/Preload.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Preload>
<Asset path="assets\textures\ui_ingame_blackmask.dds" Type="Image"/>
<Actor id="SYSTEM_ActorConfig"/>
<Unit id="AP_Core_Controller"/>
<Unit id="AP_Core_Controller2"/>
Expand Down
Loading

0 comments on commit 7913125

Please sign in to comment.