Torsten Schulz (local)
282f6542fe
event adjusted for epidemic
2026-01-07 11:15:20 +01:00
Torsten Schulz (local)
f96e474f32
Add random heir fallback logic in EventsWorker: Implement a new SQL query to select a random NPC heir from the same region when no children are available. Enhance error handling to log cases where no heir is found, ensuring better user feedback and maintaining character associations. Update UserCharacterWorker to utilize this new logic for heir assignment.
2026-01-07 10:14:24 +01:00
Torsten Schulz (local)
b7eafe28a1
Enhance TLS key handling in WebSocket server: Add support for SEC1 (EC PRIVATE KEY) in key loading process, improving flexibility for private key formats. Update error messages for clarity on key requirements. Include warning for clients when SSL is enabled but TLS is not active, ensuring proper connection protocols are used.
2026-01-05 16:10:10 +01:00
Torsten Schulz (local)
604c8ba300
Add character user clearing logic in EventsWorker: Implement a new SQL query to clear the user association from a deceased character before assigning a new heir. This ensures compliance with unique constraints and prevents errors during user reassignment. Enhance error handling and logging for better debugging.
2026-01-05 15:46:54 +01:00
Torsten Schulz (local)
e2630eb32a
Add heartbeat and null production start fix in ProduceWorker: Implement periodic logging to monitor worker activity and add functionality to update productions with null start timestamps. Enhance SQL queries for better data integrity and debugging capabilities.
2026-01-05 15:30:39 +01:00
Torsten Schulz (local)
108ac6c82b
Refactor QUERY_GET_BEST_PRODUCTION SQL query in Worker: Improve readability and maintainability by restructuring the query with clearer aliases and consistent use of COALESCE. Enhance join conditions and ensure proper handling of character health, resulting in more accurate production worth calculations.
2026-01-05 11:44:44 +01:00
Torsten Schulz (local)
713504d3ab
Refactor DirectorWorker SQL queries: Remove unused QUERY_GET_DIRECTOR_USER and update vehicle count retrieval to use consistent column names. This improves code clarity and maintains consistency in data handling.
2026-01-05 11:32:56 +01:00
Torsten Schulz (local)
1e4689212b
Add cleanup functionality for collapsed houses in HouseWorker: Implement methods to delete collapsed buyable houses and user houses, including notifications for affected users. Update SQL queries to support this new feature, enhancing house management and user experience.
2025-12-23 14:35:51 +01:00
Torsten Schulz (local)
da30ab0b15
Enhance character health change handling in EventsWorker: Update health change functions to return character death status, allowing for better tracking of character deaths. Implement logging of character deaths in both individual and regional health change scenarios, improving event processing and state management.
2025-12-23 14:20:41 +01:00
Torsten Schulz (local)
ade3bff5cf
Refactor revenue and tax calculations in DirectorWorker: Update pricing logic to compute revenue based on piece price and quantity, adjust profit calculations, and implement optional treasury user ID from environment variables for tax handling. This enhances accuracy in financial computations and improves code clarity.
2025-12-23 12:16:58 +01:00
Torsten Schulz (local)
431a6aff08
Implement heartbeat logging in EventsWorker: Add periodic logging to monitor the worker's activity and event triggering status. Introduce Mutex for thread-safe access to heartbeat timestamps, enhancing visibility into the worker's operational state.
2025-12-23 10:56:14 +01:00
Torsten Schulz (local)
08563c956c
Add vehicle repair automation in DirectorWorker: Implement functionality to automatically repair vehicles based on their condition and region. Update SQL queries to support vehicle selection and repair operations, enhancing the Director's capabilities in managing vehicle maintenance.
2025-12-22 15:07:02 +01:00
Torsten Schulz (local)
fce7400303
Refactor notification handling in Workers: Centralize notification insertion and frontend updates by replacing direct SQL queries with dedicated functions. This improves code maintainability and reduces redundancy across character creation, events, and transport processing.
2025-12-22 13:58:17 +01:00
Torsten Schulz (local)
a82d554494
Enhance SQL query in Worker to include character reputation: Add COALESCE for reputation in the vote count query and adjust the GROUP BY and ORDER BY clauses to incorporate reputation, improving data accuracy in election results.
2025-12-20 23:06:51 +01:00
Torsten Schulz (local)
833202344b
Refactor SQL query in Worker to improve distance calculations: Replace the existing LEFT JOIN with a LATERAL join to enhance the selection of region distances based on transport mode, ensuring more accurate results. Update polling frequency in TransportWorker from once per second to once per minute for better resource management.
2025-12-20 22:20:29 +01:00
Torsten Schulz (local)
cd1b33a474
Update SQL query in Worker to exclude vehicles involved in transport: Modify the vehicle selection query to filter out vehicles that have been used in transport, enhancing data accuracy and integrity.
2025-12-20 21:20:05 +01:00
Torsten Schulz (local)
1719af2344
Refactor revenue and tax calculations in DirectorWorker: Adjust the pricing logic to account for cumulative tax inflation, ensuring accurate revenue and payout calculations. Update SQL query for sell logs to change conflict resolution order for better data integrity.
2025-12-20 15:20:03 +01:00
Torsten Schulz (local)
398e0ba677
Enhance SQL insert query for sell logs and improve error logging in TransportWorker: Add sell_timestamp to the insert statement and refine error messages to include transport details for better debugging.
2025-12-20 14:20:09 +01:00
Torsten Schulz (local)
4fca4b4d75
Enhance SQL queries and logging in TransportWorker and WeatherWorker: Update weather assignment logic to ensure unique weather types per region, improve distance calculations in transport queries, and refine logging for transport processing. Additionally, adjust notification insert queries to include character_id.
2025-12-20 11:17:32 +01:00
80012fec64
Merge pull request 'Configure Renovate' ( #1 ) from renovate/configure into main
...
Reviewed-on: #1
2025-12-19 16:08:08 +01:00
8e92a63895
Add renovate.json
2025-12-19 16:00:14 +01:00
Torsten Schulz (local)
f7710b64c9
Refactor WeatherWorker SQL query: Replace the existing weather update logic with a new query that assigns random weather types to each region, ensuring individual updates. Clean up logging messages for clarity.
2025-12-18 15:34:16 +01:00
Torsten Schulz (local)
6d12c70d84
Entferne Info-Logs aus den Worker-Klassen: Reduziere die Protokollierung in ProduceWorker, DirectorWorker und TransportWorker, um die Ausgabe zu optimieren und nur Fehler zu protokollieren.
2025-12-16 12:58:37 +01:00
Torsten Schulz (local)
d2e253b79a
Füge erweiterte SQL-Abfragen und Logging in ProduceWorker hinzu: Implementiere Update- und Insert-Logik für das Inventar und verbessere die Fehlerausgaben.
2025-12-16 10:52:06 +01:00
Torsten Schulz (local)
74fee2d4c9
Verbessere Fehlerbehandlung in SQL-Abfragen: Füge detaillierte Fehlermeldungen für Vorbereitungs- und Ausführungsfehler in den Director- und Politics-Workern hinzu.
2025-12-16 08:52:08 +01:00
Torsten Schulz (local)
b45990c1b6
Aktualisiere Benachrichtigungsabfragen: Ersetze character_id durch user_id in den Benachrichtigungs-INSERT-Abfragen und optimiere die Abfragen zur Auswahl des Benutzers.
2025-12-16 08:24:46 +01:00
Torsten Schulz (local)
ae90166adb
Aktualisiere Benachrichtigungsabfragen: Ersetze user_id durch character_id und optimiere die Abfragen zur Auswahl des Charakters.
2025-12-15 21:20:30 +01:00
Torsten Schulz (local)
2aa4e7c666
Füge VSCode-Build-Tasks hinzu: Erstelle Aufgaben für den Build-Prozess und Clippy-Überprüfungen.
2025-12-13 23:40:20 +01:00
Torsten Schulz (local)
ce06b1a4f0
Verbessere SQL-Abfragen im Produktionsworker: Optimiere die Abfrage für abgeschlossene Produktionen und verbessere die Lesbarkeit der Preisberechnung.
2025-12-13 12:17:00 +01:00
Torsten Schulz (local)
10bc1e5a52
Refactor SQL queries into a dedicated module
...
- Moved SQL queries from multiple worker files into `src/worker/sql.rs` for better organization and maintainability.
- Updated references in `stockage_manager.rs`, `transport.rs`, `underground.rs`, `user_character.rs`, and `value_recalculation.rs` to use the new centralized SQL queries.
- Improved code readability by replacing `.get(0)` with `.first()` for better clarity when retrieving the first row from query results.
- Cleaned up unnecessary comments and consolidated related SQL queries.
2025-12-13 11:57:28 +01:00
Torsten Schulz (local)
a9d490ce38
Refactor SQL queries into centralized module
...
- Moved various SQL query strings from individual worker files into a new `sql.rs` module for better organization and reusability.
- Updated `events.rs`, `underground.rs`, and `weather.rs` to use the centralized SQL queries.
- Removed redundant query definitions from `events.rs`, `underground.rs`, and `weather.rs`.
2025-12-12 15:18:30 +01:00
Torsten Schulz (local)
eab46f5cdc
Verbessere Preisberechnung im DirectorWorker: Implementiere kumulative Steuerberechnung basierend auf regionalen Büros und deren Befreiungen, um die Genauigkeit der Einnahmen und Auszahlungen zu erhöhen.
2025-12-12 07:52:53 +01:00
Torsten Schulz (local)
1134be0f8d
Enhance tax calculation in DirectorWorker: Integrate DEFAULT_TAX_PERCENT and DEFAULT_TREASURY_USER_ID for improved financial operations during product sales.
2025-12-10 12:57:08 +01:00
Torsten Schulz (local)
433259da74
Refactor WeatherWorker: Improve weather update query to ensure unique random weather selection for each region using LATERAL join.
2025-12-09 13:51:02 +01:00
Torsten Schulz (local)
cddf701af1
Refactor change_falukant_user_money: Remove debug logging for money clamping and update execution to reduce noise, maintaining essential logging only when clipping occurs.
2025-12-09 10:35:33 +01:00
Torsten Schulz (local)
c801e50def
Enhance money history tracking: Implement best-effort creation of money_history table in BaseWorker, EventsWorker, and UndergroundWorker to ensure logging of monetary changes without operation failure.
2025-12-09 08:53:39 +01:00
Torsten Schulz (local)
d740dbbf73
Enhance money history logging: Implement best-effort insert into money_history for UI visibility across BaseWorker, EventsWorker, and UndergroundWorker, improving tracking of monetary changes.
2025-12-09 08:19:42 +01:00
Torsten Schulz (local)
e8c8c5edb1
Refactor EventsWorker: Move EVENT_RATE_SCALE constant to the struct for better encapsulation and clarity in event probability calculations.
2025-12-09 00:09:12 +01:00
Torsten Schulz (local)
a4d1d79e6e
Enhance EventsWorker: Introduce EVENT_RATE_SCALE constant to adjust event frequency, improving control over event triggering rates.
2025-12-09 00:07:55 +01:00
Torsten Schulz (local)
78b5527b15
Enhance change_falukant_user_money: Switch to literal SQL execution for update_money to resolve serialization issues with parameterized calls, improving reliability.
2025-12-08 16:39:57 +01:00
Torsten Schulz (local)
180431b130
Enhance change_falukant_user_money: Implement money clamping logic to ensure updates stay within numeric(10,2) limits, improving data integrity and error handling.
2025-12-08 16:34:57 +01:00
Torsten Schulz (local)
99fbaab816
Enhance change_falukant_user_money: Implement fallback to literal SQL for update_money on failure of parameterized call, improving robustness and error handling.
2025-12-08 16:28:46 +01:00
Torsten Schulz (local)
450497ccd3
Refactor change_falukant_user_money: Update parameter types for database call and enhance logging for better traceability
2025-12-08 16:23:24 +01:00
Torsten Schulz (local)
04a8da8d0c
Enhance logging in change_falukant_user_money: Added type logging for parameters to identify unexpected types during execution, improving debugging capabilities.
2025-12-08 16:15:30 +01:00
Torsten Schulz (local)
688b21581d
Enhance logging in BaseWorker and DirectorWorker: Added detailed debug logs before database calls in change_falukant_user_money, improving traceability of user ID and money change values during production start and sell operations.
2025-12-08 16:07:08 +01:00
Torsten Schulz (local)
f7c4919a2a
Enhance error logging in change_falukant_user_money function: Added detailed logging for parameters before executing the database update and improved error handling for serialization issues, enhancing traceability and debugging capabilities.
2025-12-08 16:01:25 +01:00
Torsten Schulz (local)
ad0033031d
Validate money change input in update_money function: Added checks to ensure the money_change value is finite before executing the database update, preventing potential serialization errors with invalid values.
2025-12-08 15:53:31 +01:00
Torsten Schulz (local)
b4b3b1adcc
Enhance user notification structure in EventsWorker: Updated the notification process to include detailed event information in the database entries. Notifications now contain event ID, type, and effects, improving clarity and data integrity for user alerts.
2025-12-08 13:29:18 +01:00
Torsten Schulz (local)
9b6883ea84
Implement inheritance logic for player characters in EventsWorker: Added functionality to handle character inheritance before deleting child relations. This includes querying for the user ID, determining the heir, and updating the heir's assets accordingly. Enhanced logging for inheritance events to improve traceability.
2025-12-08 13:22:20 +01:00
Torsten Schulz (local)
d078b6b19a
Refactor WebSocket user ID filtering and enhance SQL query security: Updated user ID handling in the WebSocket server to improve filtering logic for numeric user IDs. Implemented parameterized queries in the database operations across multiple worker files to prevent SQL injection vulnerabilities, ensuring safer data handling.
2025-12-08 11:56:04 +01:00