Trading request system (#1460)

* mapping public stores update

* base selling platform update

* basic UI setup

* Update coin icon textures

Refreshed the c, g, p, and s coin images in the interface textures. This likely improves their appearance or corrects previous visual issues.

* parse requests data into UI

* selling platform UI state now include price

Updated the selling platform UI to display the calculated price of placed items. Moved the UpdateSellingUIState logic from the shared system to the server system, and modified the CP14SellingPlatformUiState to include a price field. The client window now uses the state-provided price instead of a hardcoded value.

* Update selling UI state on item placed or removed

Added event subscriptions for ItemPlacedEvent and ItemRemovedEvent to update the selling UI state when items are placed or removed from the selling platform. Refactored UpdateSellingUIState to remove the user parameter, as it is no longer needed.

* sell button works now

Replaces the previous sell request mechanism with a new CP14TradingSellAttempt message for selling items on the platform. Updates client and server logic to use this new message, adds a CanSell helper for item validation, and refactors related UI and event handling code for improved clarity and maintainability.

* auto pricing requirements

* Refactor reputation reward to use cashback rate

Reputation rewards for selling requests are now calculated as a percentage (cashback) of the sale price, rather than a fixed value. Updated the relevant UI, server logic, and prototype fields to reflect this change. Also cleaned up the brad_potions.yml prototype file by removing a duplicate entry and correcting an ID.

* request rerolling
This commit is contained in:
Red
2025-06-23 01:21:25 +03:00
committed by GitHub
parent fb76a9d80d
commit b1a9fca5ee
53 changed files with 31114 additions and 5958 deletions

View File

@@ -207,9 +207,9 @@ public sealed class CP14ModularCraftSystem : CP14SharedModularCraftSystem
}
}
if (TryComp<StaticPriceComponent>(part, out var staticPartPrice))
if (TryComp<Shared.Cargo.Components.StaticPriceComponent>(part, out var staticPartPrice))
{
var startStaticPrice = EnsureComp<StaticPriceComponent>(start);
var startStaticPrice = EnsureComp<Shared.Cargo.Components.StaticPriceComponent>(start);
startStaticPrice.Price += staticPartPrice.Price;
}