Skip to content

Commit

Permalink
Merge pull request #11 from Fasguy/dev
Browse files Browse the repository at this point in the history
Changes
  • Loading branch information
Fasguy authored Aug 12, 2022
2 parents bb6bac8 + 39cbbb2 commit d0eee84
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { strFromU8, unzip } from 'fflate';
Expand Down Expand Up @@ -49,7 +49,16 @@ export class CraftingRecipeRandomizerViewComponent implements OnInit {
this._activityMonitor.startActivity({
text: "Downloading necessary data...",
promise: new Promise<void>((res, rej) => {
this._http.get(`resources/crafting-recipe-randomizer/${version}/data.zip`, { responseType: 'arraybuffer' })
let requestOptions: any = {
responseType: 'arraybuffer',
headers: new HttpHeaders({
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
'Pragma': 'no-cache',
'Expires': '0'
})
};

this._http.get(`resources/crafting-recipe-randomizer/${version}/data.zip`, requestOptions)
.subscribe({
next: data => {
unzip(new Uint8Array(data), (err, result) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { strFromU8, unzip } from 'fflate';
Expand Down Expand Up @@ -49,7 +49,16 @@ export class LootTableRandomizerViewComponent implements OnInit {
this._activityMonitor.startActivity({
text: "Downloading necessary data...",
promise: new Promise<void>((res, rej) => {
this._http.get(`resources/loot-table-randomizer/${version}/data.zip`, { responseType: 'arraybuffer' })
let requestOptions: any = {
responseType: 'arraybuffer',
headers: new HttpHeaders({
'Cache-Control': 'no-cache, no-store, must-revalidate, post-check=0, pre-check=0',
'Pragma': 'no-cache',
'Expires': '0'
})
};

this._http.get(`resources/loot-table-randomizer/${version}/data.zip`, requestOptions)
.subscribe({
next: data => {
unzip(new Uint8Array(data), (err, result) => {
Expand Down
13 changes: 13 additions & 0 deletions projects/toolbox-main/src/resources/data/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,18 @@
"removals": []
},
"notes": "This changelog sort-of starts where the old Minecraft Randomizer left-off development-wise."
},
{
"version": "1.0.1",
"build_date": "2022-08-12",
"changes": {
"additions": [],
"modifications": [
"The files that contain the necessary data for the Loot-Table Randomizer (data.zip) are now requested un-cached",
"The files that contain the necessary data for the Crafting-Recipe Randomizer (data.zip) are now requested un-cached"
],
"removals": []
},
"notes": ""
}
]

0 comments on commit d0eee84

Please sign in to comment.