Skip to content

Commit

Permalink
Use SIDs instead of IDs (for real)
Browse files Browse the repository at this point in the history
  • Loading branch information
maddie480 authored Sep 4, 2024
1 parent e186934 commit aa440b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Entities/FlagTouchSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ internal static bool HandleCollectedFlagTouchSwitch(string flag, bool inverted,
level.Session.SetFlag(flag + "_switch" + id, true);
}

if (MaxHelpingHandMapDataProcessor.FlagTouchSwitches[level.Session.Area.ID][(int) level.Session.Area.Mode][new KeyValuePair<string, bool>(flag, inverted)]
if (MaxHelpingHandMapDataProcessor.FlagTouchSwitches[level.Session.Area.SID][(int) level.Session.Area.Mode][new KeyValuePair<string, bool>(flag, inverted)]
.All(touchSwitchID => touchSwitchID.Level == level.Session.Level || level.Session.GetFlag(flag + "_switch" + touchSwitchID.ID))
&& allTouchSwitchesInRoom.All(touchSwitch => touchSwitch.Activated || touchSwitch.isHidden())
&& allMovingFlagTouchSwitchesInRoom.All(touchSwitch => touchSwitch.Switch.Activated || MovingFlagTouchSwitch.IsHidden(touchSwitch))) {
Expand Down Expand Up @@ -313,8 +313,8 @@ internal static bool HandleCollectedFlagTouchSwitch(string flag, bool inverted,

// set flags for switch gates.
bool allGatesTriggered = true;
if (MaxHelpingHandMapDataProcessor.FlagSwitchGates[level.Session.Area.ID][(int) level.Session.Area.Mode].ContainsKey(flag)) {
Dictionary<EntityID, bool> allGates = MaxHelpingHandMapDataProcessor.FlagSwitchGates[level.Session.Area.ID][(int) level.Session.Area.Mode][flag];
if (MaxHelpingHandMapDataProcessor.FlagSwitchGates[level.Session.Area.SID][(int) level.Session.Area.Mode].ContainsKey(flag)) {
Dictionary<EntityID, bool> allGates = MaxHelpingHandMapDataProcessor.FlagSwitchGates[level.Session.Area.SID][(int) level.Session.Area.Mode][flag];
foreach (KeyValuePair<EntityID, bool> gate in allGates) {
if (gate.Value) {
// the gate is persistent; set the flag
Expand Down

0 comments on commit aa440b1

Please sign in to comment.