Skip to content

Commit

Permalink
Added ficsmas, fixed icons
Browse files Browse the repository at this point in the history
  • Loading branch information
greeny committed Dec 7, 2024
1 parent b410239 commit 74b691c
Show file tree
Hide file tree
Showing 2,312 changed files with 53,857 additions and 980 deletions.
52,491 changes: 52,491 additions & 0 deletions data/data1.0-ficsmas.json

Large diffs are not rendered by default.

2,232 changes: 1,291 additions & 941 deletions data/data1.0.json

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions src/Data/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,7 @@ export class Data

public static get resourceAmounts()
{
return DataProvider.version === '1.0' ? {
Desc_OreIron_C: 92100,
Desc_OreCopper_C: 36900,
Desc_Stone_C: 69900,
Desc_Coal_C: 42300,
Desc_OreGold_C: 15000,
Desc_LiquidOil_C: 12600,
Desc_RawQuartz_C: 13500,
Desc_Sulfur_C: 10800,
Desc_OreBauxite_C: 12300,
Desc_OreUranium_C: 2100,
Desc_NitrogenGas_C: 12000,
Desc_SAM_C: 10200,
Desc_Water_C: Number.MAX_SAFE_INTEGER,
} : {
return DataProvider.version === '0.8' ? {
Desc_OreIron_C: 70380,
Desc_OreCopper_C: 28860,
Desc_Stone_C: 52860,
Expand All @@ -56,26 +42,26 @@ export class Data
Desc_NitrogenGas_C: 12000,
Desc_SAM_C: 0,
Desc_Water_C: Number.MAX_SAFE_INTEGER,
} : {
Desc_OreIron_C: 92100,
Desc_OreCopper_C: 36900,
Desc_Stone_C: 69900,
Desc_Coal_C: 42300,
Desc_OreGold_C: 15000,
Desc_LiquidOil_C: 12600,
Desc_RawQuartz_C: 13500,
Desc_Sulfur_C: 10800,
Desc_OreBauxite_C: 12300,
Desc_OreUranium_C: 2100,
Desc_NitrogenGas_C: 12000,
Desc_SAM_C: 10200,
Desc_Water_C: Number.MAX_SAFE_INTEGER,
};
}

public static get resourceWeights()
{
return DataProvider.version === '1.0' ? {
Desc_OreIron_C: 1,
Desc_OreCopper_C: 2.4959349593495936,
Desc_Stone_C: 1.3175965665236051,
Desc_Coal_C: 2.1773049645390072,
Desc_OreGold_C: 6.140000000000001,
Desc_LiquidOil_C: 7.30952380952381,
Desc_RawQuartz_C: 6.822222222222222,
Desc_Sulfur_C: 8.527777777777779,
Desc_OreBauxite_C: 7.487804878048781,
Desc_OreUranium_C: 43.85714285714286,
Desc_NitrogenGas_C: 7.675000000000001,
Desc_SAM_C: 9.029411764705882,
Desc_Water_C: 0,
} : {
return DataProvider.version === '0.8' ? {
Desc_OreIron_C: 1,
Desc_OreCopper_C: 2.438669438669439,
Desc_Stone_C: 1.3314415437003406,
Expand All @@ -89,6 +75,20 @@ export class Data
Desc_NitrogenGas_C: 5.865,
Desc_SAM_C: 10000,
Desc_Water_C: 0,
} : {
Desc_OreIron_C: 1,
Desc_OreCopper_C: 2.4959349593495936,
Desc_Stone_C: 1.3175965665236051,
Desc_Coal_C: 2.1773049645390072,
Desc_OreGold_C: 6.140000000000001,
Desc_LiquidOil_C: 7.30952380952381,
Desc_RawQuartz_C: 6.822222222222222,
Desc_Sulfur_C: 8.527777777777779,
Desc_OreBauxite_C: 7.487804878048781,
Desc_OreUranium_C: 43.85714285714286,
Desc_NitrogenGas_C: 7.675000000000001,
Desc_SAM_C: 9.029411764705882,
Desc_Water_C: 0,
};
}

Expand Down
3 changes: 3 additions & 0 deletions src/Data/DataProvider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import rawData08 from '@data/data.json';
import rawData10 from '@data/data1.0.json';
import rawData10Ficsmas from '@data/data1.0-ficsmas.json';
import {IJsonSchema} from '@src/Schema/IJsonSchema';
import model from '@src/Data/Model';

Expand All @@ -21,6 +22,8 @@ export class DataProvider
DataProvider.data = rawData08;
} else if (version === '1.0') {
DataProvider.data = rawData10;
} else if (version === '1.0-ficsmas') {
DataProvider.data = rawData10Ficsmas;
}

model.change(DataProvider.data);
Expand Down
9 changes: 7 additions & 2 deletions src/Module/AppModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,12 @@ export class AppModule
$rootScope.aprilMode = April.isApril();
$rootScope.aprilModePossible = April.isAprilPossible();

const v = document.location.href.indexOf('/1.0') === -1 ? '0.8' : '1.0';
let v = '0.8';
if (document.location.href.indexOf('/1.0-ficsmas') !== -1) {
v = '1.0-ficsmas';
} else if (document.location.href.indexOf('/1.0') !== -1) {
v = '1.0';
}
$rootScope.version = v;
DataProvider.change(v);

Expand All @@ -360,7 +365,7 @@ export class AppModule

$transitions.onStart({}, (transition: ITransitionObject<{version: string, share?: string}>) => {
const version = transition.params().version;
const valid = ['0.8', '1.0'];
const valid = ['0.8', '1.0', '1.0-ficsmas'];
if (!valid.includes(version)) {
transition.abort();
$state.go(transition.to().name + '', {...transition.params(), version: '0.8'}, {location: 'replace', reload: true, inherit: true});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class ManufacturerDetailsComponentController
if (this.building.metadata.powerConsumption && this.building.metadata.powerConsumptionExponent) {
return Numbers.round(this.building.metadata.powerConsumption * Math.pow(this.options.overclock / 100, this.building.metadata.powerConsumptionExponent));
}
return 0;
}

public get minPowerConsumption(): number|undefined
Expand Down
11 changes: 9 additions & 2 deletions src/Module/Controllers/ProductionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ export class ProductionController
private readonly $rootScope: IRootScope,
)
{
this.storageKey = $rootScope.version === '1.0' ? 'production1' : 'tmpProduction';
if ($rootScope.version === '1.0') {
this.storageKey = 'production1';
} else if ($rootScope.version === '1.0-ficsmas') {
this.storageKey = 'production-ficsmas';
} else {
this.storageKey = 'tmpProduction';
}

scope.$timeout = $timeout;
scope.saveState = () => {
this.saveState();
Expand All @@ -63,7 +70,7 @@ export class ProductionController
if ('share' in query) {
axios({
method: 'GET',
url: 'https://api.satisfactorytools.com/v1/share/' + encodeURIComponent(query.share),
url: 'https://api.satisfactorytools.com/v2/share/' + encodeURIComponent(query.share),
}).then((response) => {
$timeout(0).then(() => {
const tabData: IProductionData = response.data.data;
Expand Down
1 change: 1 addition & 0 deletions src/Schema/IBuildingSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface IBuildingSchema
{

slug: string;
icon?: string;
name: string;
description: string;
className: string;
Expand Down
1 change: 1 addition & 0 deletions src/Schema/IItemSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface IItemSchema
{

slug: string;
icon?: string;
name: string;
sinkPoints: number;
description: string;
Expand Down
1 change: 1 addition & 0 deletions src/Schema/ISchematicSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface ISchematicSchema
type: string;
name: string;
slug: string;
icon?: string;
cost: IItemAmountSchema[];
unlock: ISchematicUnlockSchema;
requiredSchematics: string[];
Expand Down
11 changes: 10 additions & 1 deletion src/Tools/Production/ProductionTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,16 @@ export class ProductionTab

const calc = () => {
const apiRequest: IProductionDataApiRequest = angular.copy(this.data.request) as IProductionDataApiRequest;
apiRequest.gameVersion = this.version === '0.8' ? '0.8.0' : '1.0.0';
switch (this.version) {
case '0.8':
apiRequest.gameVersion = '0.8.0';
break;
case '1.0-ficsmas':
apiRequest.gameVersion = '1.0.0-ficsmas';
break;
default:
apiRequest.gameVersion = '1.0.0';
}

const blockedMachines = apiRequest.blockedMachines || [];
const allowedAlts: string[] = [];
Expand Down
4 changes: 2 additions & 2 deletions templates/Components/codexComponent.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="recipe-list">
<div class="card text-center item-card" ng-repeat="item in ctrl.filterService.filterEntities() | orderBy:'name'">
<a ng-if="!item.requiredSchematics" class="recipe-name stretched-link" ui-sref="{{ctrl.entityPreviewState}}({item: item.slug})">
<img class="recipe-image" ng-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : item.slug}}_64.png">
<img class="recipe-image" ng-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : (item.icon || item.slug)}}_64.png">
{{item.name}}
</a>
<a ng-if="item.requiredSchematics" class="recipe-name stretched-link pt-2" ui-sref="{{ctrl.entityPreviewState}}({item: item.slug})">
<img class="recipe-image" ng-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : item.slug}}_64.png">
<img class="recipe-image" ng-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : (item.icon || item.slug)}}_64.png">
{{item.name}}
<small class="text-muted d-block">
{{ctrl.getSchematicType(item.type)}}
Expand Down
8 changes: 8 additions & 0 deletions templates/Directives/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
<a class="dropdown-item" ng-class="{'active': $root.version == '1.0'}" ng-click="$root.changeVersion('1.0')">
1.0
</a>
<a class="dropdown-item" ng-class="{'active': $root.version == '1.0-ficsmas'}" ng-click="$root.changeVersion('1.0-ficsmas')">
1.0 (Ficsmas)
</a>
</div>
</li>
<li class="nav-item dropdown">
Expand Down Expand Up @@ -98,6 +101,11 @@ <h6 class="dropdown-header">Support me</h6>
</nav>

<div class="container-fluid px-xl-5 px-lg-4 px-md-3 px-sm-2 px-1" style="margin-top: 60px;">
<div class="alert alert-danger alert-dismissible fade show" ng-if="$root.version == '1.0'">
<b>Looking for FICSMAS production?</b> Change your version in top right corner! Merry FICSMAS!
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>

<div ui-view></div>

<hr>
Expand Down
4 changes: 2 additions & 2 deletions templates/Directives/itemIcon.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script type="text/ng-template" id="templateWithTooltip">
<img ng-if="itemEntity"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAADAFBMVEVOXWxOXWwCAgIDAwMEBAQFBQUGB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aprilMode ? 'snutt' : itemEntity.slug}}_{{imageSize}}.png"
img-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : (itemEntity.icon || itemEntity.slug)}}_{{imageSize}}.png"
width="{{size}}"
height="{{size}}"
tooltip
Expand All @@ -16,7 +16,7 @@
<script type="text/ng-template" id="templateWithoutTooltip">
<img ng-if="itemEntity"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAADAFBMVEVOXWxOXWwCAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWmpqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+wsLCxsbGysrKzs7O0tLS1tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHCwsLDw8PExMTFxcXGxsbHx8fIyMjJycnKysrLy8vMzMzNzc3Ozs7Pz8/Q0NDR0dHS0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm5ubn5+fo6Ojp6enq6urr6+vs7Ozt7e3u7u7v7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6+vr7+/v8/Pz9/f3+/v7////yiEV7AAAADElEQVR42mJgAAgwAAACAAFPbVnhAAAAAElFTkSuQmCC"
img-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : itemEntity.slug}}_{{imageSize}}.png"
img-src="/assets/images/items/{{$root.aprilMode ? 'snutt' : (itemEntity.icon || itemEntity.slug)}}_{{imageSize}}.png"
width="{{size}}"
height="{{size}}"
lazy-load>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/assets/images/items/bp-eqdesczipline-c_64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added www/assets/images/items/desc-beam-c_256.png
Binary file added www/assets/images/items/desc-beam-c_64.png
Binary file added www/assets/images/items/desc-berry-c_256.png
Binary file added www/assets/images/items/desc-berry-c_64.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added www/assets/images/items/desc-candycane-c_256.png
Binary file added www/assets/images/items/desc-candycane-c_64.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added www/assets/images/items/desc-cyberwagon-c_256.png
Binary file added www/assets/images/items/desc-cyberwagon-c_64.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 74b691c

Please sign in to comment.