Last active
January 10, 2021 03:07
-
-
Save Noxville/420272855e9f2b3401e38ff2791b8042 to your computer and use it in GitHub Desktop.
diff output purchasing shard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updated CDOTAPlayer 18 | |
--- changed property m_iCursor.0000 from 439 to 373 | |
--- changed property m_iCursor.0001 from 137 to 259 | |
--- changed property m_iShopPanel from 12 to 15 | |
updated CDOTAGamerulesProxy 152 | |
--- changed property m_pGameRules.m_fGameTime from 2188.132 to 2188.199 | |
--- changed property m_pGameRules.m_iNetTimeOfDay from 19543 to 19550 | |
--- changed property m_pGameRules.m_iFoWFrameNumber from 11 to 12 | |
updated CDOTAFogOfWarTempViewers 161 | |
--- changed property m_TempViewerInfo.0012.m_nGridX from 30 to 31 | |
--- changed property m_TempViewerInfo.0012.m_nGridY from 154 to 150 | |
updated CDOTAFogOfWarTempViewers 162 | |
--- changed property m_TempViewerInfo.0030.m_nGridX from 33 to 34 | |
--- changed property m_TempViewerInfo.0030.m_nGridY from 147 to 143 | |
--- changed property m_TempViewerInfo.0030.m_bValid from false to true | |
updated CDOTA_Unit_Hero_Tiny 310 | |
--- changed property CBodyComponent.m_vecX from 34.0 to 64.0 | |
--- changed property CBodyComponent.m_vecY from 38.65625 to 39.0625 | |
--- changed property m_flMana from 486.00046 to 487.00046 | |
--- changed property m_flStartSequenceCycle from 0.23117447 to 0.34911442 | |
updated CDOTA_Unit_Courier 336 | |
--- changed property CBodyComponent.m_vecX from 37.71875 to 21.8125 | |
--- changed property CBodyComponent.m_vecY from 177.78125 to 157.125 | |
--- changed property CBodyComponent.m_vecZ from 14.21875 to 17.125 | |
--- changed property CBodyComponent.m_angRotation from [0.0, 226.40625, 0.0] to [0.0, 232.03125, 0.0] | |
--- changed property m_flStartSequenceCycle from 0.809965 to 0.82996017 | |
updated CDOTA_Unit_Hero_Alchemist 387 | |
--- changed property m_iHealth from 2289 to 2291 | |
--- changed property m_flMana from 721.5632 to 723.5632 | |
updated CDOTA_Unit_Hero_StormSpirit 836 | |
--- changed property m_anglediff from 8 to 0 | |
--- changed property m_iHealth from 1161 to 1153 | |
--- changed property CBodyComponent.m_angRotation from [0.0, 18.28125, 0.0] to [0.0, 26.71875, 0.0] | |
--- changed property m_flMana from 859.2508 to 861.2508 | |
--- changed property m_flStartSequenceCycle from 0.029159546 to 0.05831909 | |
updated CDOTA_Unit_Hero_DoomBringer 872 | |
--- changed property CBodyComponent.m_vecX from 77.3125 to 54.21875 | |
--- changed property CBodyComponent.m_vecY from 206.53125 to 202.625 | |
--- changed property m_flMana from 604.93805 to 605.93805 | |
--- changed property m_flStartSequenceCycle from 0.8172941 to 0.8778262 | |
updated CDOTA_Unit_Hero_DarkWillow 911 | |
--- changed property m_anglediff from 0 to 160 | |
--- changed property CBodyComponent.m_vecX from 46.875 to 35.15625 | |
--- changed property CBodyComponent.m_vecY from 41.59375 to 38.8125 | |
--- changed property CBodyComponent.m_angRotation from [0.0, 192.65625, 0.0] to [0.0, 208.125, 0.0] | |
--- changed property m_iParity from 5 to 7 | |
--- changed property m_flStartSequenceCycle from 0.07298178 to 0.08420659 | |
updated CDOTA_Unit_Courier 937 | |
--- changed property m_anglediff from 0 to 125 | |
--- changed property CBodyComponent.m_vecX from 222.53125 to 225.6875 | |
--- changed property CBodyComponent.m_vecY from 154.90625 to 167.21875 | |
--- changed property CBodyComponent.m_angRotation from [0.0, 74.53125, 0.0] to [0.0, 90.0, 0.0] | |
--- changed property m_hItems.0000 from 4344293 to 16777215 | |
--- changed property m_iParity from 11 to 12 | |
--- changed property m_flStartSequenceCycle from 0.6841217 to 0.73674047 | |
--- changed property m_nCourierState from 6 to 8 | |
--- changed property m_hCourierStateEntity from 14304143 to 16777215 | |
updated CDOTA_Unit_Hero_MonkeyKing 951 | |
--- changed property m_flMana from 610.0631 to 611.0631 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Diff: | |
def __init__(self, topic): | |
self.topic = topic.strip() | |
self.lines = list() | |
def add_sub(self, sub): | |
self.lines.append("--- " + sub.strip()) | |
def valid(self): | |
if not self.lines: | |
return False | |
for banned in ["CDOTA_BaseNPC_Creep_Lane", "CDOTA_BaseNPC_Creep_Neutral"]: | |
if banned in self.topic: | |
return False | |
filtered_out = ["CBodyComponent.m_vec", "m_flStartSequenceCycle", "m_iCursor.000", "CBodyComponent.m_cell", | |
"CBodyComponent.m_nNewSequenceParity", "CBodyComponent.m_nResetEventsParity", "m_fCooldown", "m_iHealth", | |
"m_NetworkActivity", "m_NetworkSequenceIndex", "m_iNetWorth"] | |
filt = [_ for _ in self.lines if not any(w in _ for w in filtered_out)] | |
return len(filt) > 0 | |
def __repr__(self): | |
return self.topic + ("\n" if len(self.lines) else "") + "\n".join(self.lines) | |
diffs = [] | |
with open('fuck.in') as fin: | |
curr = None | |
for l in [e for e in fin.readlines()]: | |
if curr == None: | |
curr = Diff(l) | |
if l.startswith(' '): | |
curr.add_sub(l) | |
else: | |
diffs.append(curr) | |
curr = Diff(l) | |
diffs.append(curr) | |
for dif in diffs: | |
if dif.valid(): | |
print(dif) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment