Compare commits

..

No commits in common. "a5d74b92c8052f07f85b4be2f0be3ffda351451b" and "9823729aa83087b2c5106215afb865ce007b6731" have entirely different histories.

9 changed files with 59 additions and 62 deletions

View File

@ -1,24 +0,0 @@
name: Build Docker image
on:
push:
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Log in to container registry
uses: docker/login-action@v3
with:
username: openwf
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
openwf/spaceninjaserver:latest
openwf/spaceninjaserver:${{ github.sha }}

View File

@ -1,7 +1,7 @@
services:
spaceninjaserver:
openwf:
# build: .
image: openwf/spaceninjaserver:latest
image: ghcr.io/spaceninjaserver/SpaceNinjaServer:latest
environment:
APP_MONGODB_URL: mongodb://openwfagent:spaceninjaserver@mongodb:27017/

View File

@ -195,7 +195,7 @@ export const getInventoryResponse = async (
if (config.universalPolarityEverywhere) {
const Polarity: IPolarity[] = [];
for (let i = 0; i != 12; ++i) {
for (let i = 0; i != 10; ++i) {
Polarity.push({
Slot: i,
Value: ArtifactPolarity.Any

View File

@ -3,23 +3,12 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
import { RequestHandler } from "express";
import { ExportMisc } from "warframe-public-export-plus";
export const addXpController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const inventory = await getInventory(accountId);
const request = req.body as IAddXpRequest;
for (const [category, gear] of Object.entries(request)) {
for (const clientItem of gear) {
const dbItem = inventory[category as TEquipmentKey].id(clientItem.ItemId.$oid);
if (dbItem) {
if (dbItem.ItemType in ExportMisc.uniqueLevelCaps) {
if ((dbItem.Polarized ?? 0) < 5) {
dbItem.Polarized = 5;
}
}
}
}
addGearExpByCategory(inventory, gear, category as TEquipmentKey);
}
await inventory.save();

View File

@ -155,7 +155,7 @@ export const importInventory = (db: TInventoryDatabaseDocument, client: Partial<
if (client.Upgrades !== undefined) {
replaceArray<IUpgradeDatabase>(db.Upgrades, client.Upgrades.map(convertUpgrade));
}
for (const key of ["RawUpgrades", "MiscItems", "Consumables"] as const) {
for (const key of ["RawUpgrades", "MiscItems"] as const) {
if (client[key] !== undefined) {
db[key].splice(0, db[key].length);
client[key].forEach(x => {

View File

@ -240,14 +240,7 @@ export const addItem = async (
}
};
} else if (ExportResources[typeName].productCategory == "CrewShips") {
const inventoryChanges = {
...addCrewShip(inventory, typeName),
// fix to unlock railjack modding, item bellow supposed to be obtained from archwing quest
...(!inventory.CrewShipHarnesses?.length
? addCrewShipHarness(inventory, "/Lotus/Types/Game/CrewShip/RailJack/DefaultHarness")
: {})
};
const inventoryChanges = addCrewShip(inventory, typeName);
return { InventoryChanges: inventoryChanges };
} else if (ExportResources[typeName].productCategory == "ShipDecorations") {
const changes = [
@ -817,17 +810,6 @@ const addCrewShip = (
return inventoryChanges;
};
const addCrewShipHarness = (
inventory: TInventoryDatabaseDocument,
typeName: string,
inventoryChanges: IInventoryChanges = {}
): IInventoryChanges => {
const index = inventory.CrewShipHarnesses.push({ ItemType: typeName }) - 1;
inventoryChanges.CrewShipHarnesses ??= [];
(inventoryChanges.CrewShipHarnesses as object[]).push(inventory.CrewShipHarnesses[index].toJSON());
return inventoryChanges;
};
//TODO: wrong id is not erroring
export const addGearExpByCategory = (
inventory: TInventoryDatabaseDocument,
@ -841,10 +823,12 @@ export const addGearExpByCategory = (
return;
}
const item = category.id(ItemId.$oid);
if (item) {
const itemIndex = ItemId ? category.findIndex(item => item._id?.equals(ItemId.$oid)) : -1;
if (itemIndex !== -1) {
const item = category[itemIndex];
item.XP ??= 0;
item.XP += XP;
inventory.markModified(`${categoryName}.${itemIndex}.XP`);
const xpinfoIndex = inventory.XPInfo.findIndex(x => x.ItemType == item.ItemType);
if (xpinfoIndex !== -1) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -368,7 +368,7 @@
</div>
<div data-route="/webui/cheats, /webui/settings" data-title="Cheats | OpenWF WebUI">
<div class="row g-3">
<div class="col-md-6">
<div class="col-lg-4">
<div class="card mb-3">
<h5 class="card-header">Server</h5>
<div class="card-body">
@ -479,7 +479,7 @@
</div>
</div>
</div>
<div class="col-md-6">
<div class="col-lg-4">
<div class="card mb-3">
<h5 class="card-header">Account</h5>
<div class="card-body">
@ -488,6 +488,26 @@
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card mb-3">
<h5 class="card-header">Client</h5>
<div id="client-cheats-nok" class="card-body">
Client cheats are currently unavailable. This could be because your client is not running or using a DLL without an HTTP interface.
</div>
<div id="client-cheats-ok" class="card-body d-none">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="skip_mission_start_timer" />
<label class="form-check-label" for="skip_mission_start_timer">
Skip Mission Start Timer
</label>
</div>
<div class="form-group mt-3">
<label class="form-label" for="fov_override">FOV Override (0 to disable)</label>
<input id="fov_override" class="form-range" type="range" min="0" value="0" max="2260000" step="10000">
</div>
</div>
</div>
</div>
</div>
</div>
<div data-route="/webui/import" data-title="Import | OpenWF WebUI">

View File

@ -915,6 +915,34 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
});
}
}, 10);
fetch("http://localhost:61558/ping", { mode: "no-cors" })
.then(() => {
$("#client-cheats-ok").removeClass("d-none");
$("#client-cheats-nok").addClass("d-none");
fetch("http://localhost:61558/skip_mission_start_timer")
.then(res => res.text())
.then(res => {
document.getElementById("skip_mission_start_timer").checked = res == "1";
});
document.getElementById("skip_mission_start_timer").onchange = function () {
fetch("http://localhost:61558/skip_mission_start_timer?" + this.checked);
};
fetch("http://localhost:61558/fov_override")
.then(res => res.text())
.then(res => {
document.getElementById("fov_override").value = parseFloat(res) * 10000;
});
document.getElementById("fov_override").oninput = function () {
fetch("http://localhost:61558/fov_override?" + this.value);
};
})
.catch(function () {
$("#client-cheats-nok").removeClass("d-none");
$("#client-cheats-ok").addClass("d-none");
});
});
function doUnlockAllFocusSchools() {