Skip to content

Commit

Permalink
update the l0g-101086.psm1 to use location info
Browse files Browse the repository at this point in the history
Modify the module file to expect location data from the EVTC information
generated by simpleArcParse.

This makes the scripts expect simpleArcParse version 2.4.0 at least.

With this change, there is a slight window where old encounters that
were recorded with a previous version of simpleArcParse will not be
published properly. However, newly published encounters will correctly
determine the location from the simpleArcParse data.

This has the advantage that new encounter data only needs to be added to
the simpleArcParse program, rather than needing  both a change to the
module file and to the program.

Signed-off-by: Jacob Keller <[email protected]>
  • Loading branch information
jacob-keller committed Jan 14, 2020
1 parent 7983a4b commit 17b2224
Showing 1 changed file with 18 additions and 120 deletions.
138 changes: 18 additions & 120 deletions l0g-101086.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ Function Check-SimpleArcParse-Version {
param([Parameter(Mandatory)][string]$version)

$expected_major_ver = 2
$expected_minor_ver = 2
$expected_patch_ver = 0
$expected_minor_ver = 4
$expected_patch_ver = 1

$expected_version = "v${expected_major_ver}.${expected_minor_ver}.${expected_patch_ver}"

Expand Down Expand Up @@ -1351,108 +1351,6 @@ Function Get-Discord-Players {
return $names
}

<#
.Synopsis
Given a boss name, look up the associated raid wing or fractal CM
.Description
Convert the boss name into the equivalent wing. Additionally, convert the
fractal bosses into their respective CMs as well.
.Parameter boss_name
The boss name to lookup
#>
Function Convert-Boss-To-Wing {
[CmdletBinding()]
param([Parameter(Mandatory)][string]$boss_name)

$wings = @{### Raids
# Wing 1
"Vale Guardian"=1;
"Gorseval"=1;
"Sabetha"=1;
# Wing 2
"Slothasor"=2;
"Bandit Trio"=2;
"Matthias"=2;
# Wing 3
"Keep Construct"=3;
"Twisted Castle"=3;
"Xera"=3;
# Wing 4
"Cairn"=4;
"Mursaat Overseer"=4;
"Samarog"=4;
"Deimos"=4;
# Wing 5
"Soulless Horror"=5;
"Dhuum"=5;
# Wing 6
"Conjured Amalgamate"=6;
"Largos Twins"=6;
"Qadim"=6;
# Wing 7
"Cardinal Adina"=7;
"Cardinal Sabir"=7;
"Qadim the Peerless"=7;
### Fractal names
# 99 CM
"MAMA (CM)"="99cm";
"Siax (CM)"="99cm";
"Ensolyss (CM)"="99cm";
# 100 CM
"Skorvald (CM)"="100cm";
"Artsariiv (CM)"="100cm";
"Arkk (CM)"="100cm";
# Aquatic Ruins
"Jellyfish Beast"="Aquatic Ruins";
# Mai Trin Boss
"Inquest Technician"="Mai Trin Boss";
"Mai Trin"="Mai Trin Boss";
# Chaos Isles
"Brazen Gladiator"="Chaos Isles";
# Cliffside
"Archdiviner"="Cliffside";
# Molten Boss
"Molten Effigy"="Molten Boss";
# Nightmare
"MAMA"="Nightmare";
"Siax the Unclean"="Nightmare";
"Ensolyss"="Nightmare";
# Shattered Observatory
"Skorvald the Shattered"="Shattered Observatory";
# Snowblind
"Svanir Shaman"="Snowblind";
# Solid Ocean
"The Jade Maw"="Solid Ocean";
# Swampland
"Mossman"="Swampland";
"Bloomhunger"="Swampland";
# Thaumanova Reactor
"Subject 6"="Thaumanova Reactor";
"Thaumanova Anomaly"="Thaumanova Reactor";
# Underground Facility
"Rabsovich"="Underground Facility";
"Rampaging Ice Elemental"="Underground Facility";
"Dredge Powersuit"="Underground Facility";
# Urban Battleground
"Seigemaster Dulfy"="Urban Battleground";
"Captain Ashym"="Urban Battleground";
# Volcanic
"Grawl Shaman"="Volcanic";
"Imbued Shaman"="Volcanic";
# Uncategorized
"Uncategorized Champions"="Uncategorized";
"Old Tom" ="Uncategorized";
"Raving Asura" ="Uncategorized";}

try {
return $wings[$boss_name];
} catch {
return $null
}
}

<#
.Synopsis
Get the abbreviated name for a boss, if there is one
Expand Down Expand Up @@ -1646,6 +1544,9 @@ Function Load-From-EVTC {

# Get whether the encounter is a Challenge Mote
$boss["is_cm"] = ($evtc_info.boss.is_cm -eq "YES")

# Get the encounter location
$boss["location"] = $evtc_info.boss.location
} else {
# Extract data from the old format
Load-From-Old-EVTC $config $extras_path
Expand All @@ -1666,9 +1567,6 @@ Function Load-From-EVTC {
# Get an abbreviated name, if there is one
$boss["shortname"] = Get-Abbreviated-Name $boss["name"]

# Get the wing for this encounter
$boss["wing"] = Convert-Boss-To-Wing $boss["name"]

# Get whether this encounter is a fracal
if (Is-Fractal-Encounter $boss["id"]) {
$boss["encounter_type"] = "fractal"
Expand Down Expand Up @@ -1860,8 +1758,8 @@ Function Format-And-Publish-Some {
}
}

# Determine which wings we did
$wings = $($some_bosses | ForEach-Object {$_.wing} | Get-Unique) -join ", "
# Determine which locations we have encounters for
$locations = $($some_bosses | ForEach-Object {$_.location} | Get-Unique) -join ", "

# Get the date based on the first boss in the list, since we assume all bosses were run on the same date
$date = Get-Date -Format "MMM d, yyyy" -Date $some_bosses[0].start_time
Expand All @@ -1876,11 +1774,11 @@ Function Format-And-Publish-Some {

# Print "Fractals" if this is a set of fractals, otherwise print "Wings", determined from the first encounter
if ($some_bosses[0].encounter_type -eq "fractal") {
$prefix = "Fractals: ${wings}"
$prefix = "Fractals: ${locations}"
} elseif ($some_bosses[0].encounter_type -eq "golem") {
$prefix = "Training Golems"
} else {
$prefix = "Wings : ${wings}"
$prefix = "Wings : ${locations}"
}

# Create the data object
Expand Down Expand Up @@ -2317,8 +2215,8 @@ Function Complete-UploadTo-DpsReport {
# SIG # Begin signature block
# MIIFhQYJKoZIhvcNAQcCoIIFdjCCBXICAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU+5UYBcZn+VlRBThpZG1vt6VZ
# ew2gggMYMIIDFDCCAfygAwIBAgIQLNFTiNzlwrtPtvlsLl9i3DANBgkqhkiG9w0B
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU/GhSVzu0l2h0n1d1K04F2dQx
# /O2gggMYMIIDFDCCAfygAwIBAgIQLNFTiNzlwrtPtvlsLl9i3DANBgkqhkiG9w0B
# AQsF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H
# EUCfGtAI9Og6Qd5NIwNfBfXw/lkSs+ugNr3b0JZY5NbyxuZkPSL/2P3M9XaxBbMX
# lFWNah06xw8ctccPFJrq3KhD0KnWc7FecaIRjAPqpWvvfORuRnEJ0nrofBL9LX2J
# pjpZpukZ6bH7vLQfQVF6XqqMAO3BREWEt7K8IIRVEna8abp9RkqaYrMJPmYMOWTO
# ocnJCJj5/iJ6jCquRurpxfPCHF37jXbMbg==
# SIG # End signature block

0 comments on commit 17b2224

Please sign in to comment.