Commit Graph

  • 2d62ba4b51 Enhance income update logic in DirectorWorker: Introduced a nested SQL query to calculate desired income based on title of nobility and knowledge averages. Updated the income setting logic to utilize this calculated desired income, ensuring more accurate adjustments for directors with auto-adjust settings enabled. main Torsten Schulz (local) 2026-05-08 11:28:56 +02:00
  • dd8d8be79b Refactor WebSocket server access control logic for worker schedules: Updated the handling of user permissions in handle_connection to utilize tokio::task::spawn_blocking, improving error handling and debugging information in the WorkerScheduleAccessDebug struct. This change enhances the robustness of access checks and provides clearer feedback when access is denied. Torsten Schulz (local) 2026-05-08 11:15:53 +02:00
  • d27230a0b5 Enhance worker schedule access control with detailed debugging information: Updated the user_can_read_worker_schedules function to return a WorkerScheduleAccessDebug struct, providing detailed error messages and access information. Improved WebSocket server responses to include debug data when access is denied, facilitating better troubleshooting and monitoring of user permissions. Torsten Schulz (local) 2026-05-08 10:45:32 +02:00
  • f7eb53ae90 Add user right for main admin and enhance worker schedule access control: Introduced a new user right mainadmin to improve access management. Updated the logic in user_can_read_worker_schedules to include checks for this new right, enhancing the SQL queries for user permissions and ensuring robust access control for worker schedules. Torsten Schulz (local) 2026-05-08 10:31:22 +02:00
  • 42f71d831f Implement worker schedule access control and runtime tracking: Added a new user right worker_schedule_read to manage access to the getWorkerSchedules WebSocket endpoint. Enhanced the WebSocket server to handle requests for worker schedules, including detailed responses. Introduced runtime tracking for workers, allowing for monitoring of their current state and activity. Updated relevant SQL and Rust structures to support these features. Torsten Schulz (local) 2026-05-08 09:04:21 +02:00
  • b7d7705bbe Enhance satisfaction update logic in DirectorWorker: Introduced an adjusted income calculation to update director incomes based on their wished income and auto-adjust settings. Modified the SQL query for satisfaction updates to include this new logic, ensuring accurate satisfaction calculations while maintaining existing functionality for directors not utilizing auto-adjust income. Torsten Schulz (local) 2026-05-07 13:32:42 +02:00
  • 48a374e3ac Add satisfaction check to DirectorWorker: Introduced a new field for tracking the last satisfaction check and updated the calculation logic to ensure it runs only once every 24 hours. Enhanced SQL query for updating satisfaction to include a salary gap calculation, improving the accuracy of satisfaction updates based on income and title of nobility. Torsten Schulz (local) 2026-05-07 11:30:27 +02:00
  • d0ff6cad68 Add branch and region details to DirectorWorker: Enhanced resignation candidate structure by including branch_id, region_id, and region_label. Updated resignation risk and resignation payloads to incorporate these new fields. Modified SQL query to retrieve branch and region information, ensuring accurate data handling for director resignations. Torsten Schulz (local) 2026-05-07 11:25:48 +02:00
  • 9022b58dc7 Refactor revenue and tax handling in DirectorWorker: Updated logic to separately account for gross revenue and tax deductions during product sales. Enhanced monetary transactions to ensure accurate tax income distribution, particularly when the seller differs from the treasury user, improving financial tracking and compliance. Torsten Schulz (local) 2026-05-06 11:09:42 +02:00
  • 8509a7e171 Update monetary limits for numeric precision in BaseWorker and UserCharacterWorker: Changed maximum absolute values from numeric(10,2) to numeric(14,2) to accommodate larger monetary amounts. Adjusted related comments and clamping logic to reflect the new limits, ensuring accurate handling of monetary values. Torsten Schulz (local) 2026-05-06 11:04:45 +02:00
  • 43eb6ed0ab Refactor event effect handling in EventsWorker: Improved logic for handling empty effect results to prevent unnecessary database writes. Enhanced error handling for retrieving current money, ensuring robust behavior when user data is unavailable. Simplified the response for insufficient funds scenarios in the "theft" event, returning None instead of a detailed JSON response. Torsten Schulz (local) 2026-04-24 10:00:45 +02:00
  • 05f713c5e1 Refactor Falukant certificate processing logic: Introduced a new SQL query to check for the existence of the completion_count column in the production log, allowing for conditional selection of certificate input rows. Added a legacy query for environments lacking this column, enhancing compatibility and robustness in certificate processing. Torsten Schulz (local) 2026-04-21 15:34:58 +02:00
  • 397b612bf1 Implement election candidate table readiness check in character deletion process: Added a new SQL query to verify the existence of the election candidate table before attempting to delete associated records. Updated the deletion logic in both EventsWorker and UserCharacterWorker to conditionally execute the deletion of election candidates based on the table's readiness, improving robustness and preventing errors in environments where the table may not exist. Torsten Schulz (local) 2026-04-21 11:48:53 +02:00
  • a38beadb8e Enhance character deletion process in EventsWorker and UserCharacterWorker: Added SQL queries to delete associated data such as knowledge, debtors prism, political offices, and election candidates upon character deletion. Implemented event publishing for character death and status updates after inheritance changes, improving event handling and UI responsiveness. Torsten Schulz (local) 2026-04-20 15:35:08 +02:00
  • 0892e2db8b Implement political office history logging: Added SQL logic to archive political office records upon expiration and deletion, ensuring historical tracking of office terms. Updated relevant queries to insert records into falukant_log.political_office_history for better compliance with data retention policies. Torsten Schulz (local) 2026-04-17 17:30:40 +02:00
  • 75a1e5b306 Update production log SQL queries to include completion count: Modified the QUERY_INSERT_UPDATE_PRODUCTION_LOG to add a new completion_count field, ensuring accurate tracking of completed productions. Updated related documentation to reflect changes in production counting logic and SQL migrations. Torsten Schulz (local) 2026-04-17 16:59:22 +02:00
  • 48d8e9b293 Enhance event effect handling in EventsWorker: Added logic to store detailed notes for price and production quality changes in notifications. Updated notification JSON structure to include these notes, improving the clarity of event effects communicated to users. Additionally, refined money change logic for the "theft" event to handle insufficient funds scenarios more effectively. Torsten Schulz (local) 2026-04-14 11:39:03 +02:00
  • b0ee0da722 Add logic to prevent multiple births for mothers in a single day: Implemented a new SQL query to check if a mother has already given birth today. Updated the FalukantFamilyWorker and UserCharacterWorker to utilize this check, enhancing the birth registration process and ensuring compliance with the new birth rule. Torsten Schulz (local) 2026-04-14 07:50:56 +02:00
  • 6e931c1069 Implement director resignation processing in DirectorWorker: Added logic to check for director resignations based on satisfaction levels, including new SQL queries for retrieving candidates and deleting directors. Enhanced notification system to alert users of high resignation risks, improving overall management of director statuses. Torsten Schulz (local) 2026-04-13 15:55:34 +02:00
  • 3af0ab1156 Refactor best production SQL query: Simplified and optimized the QUERY_GET_BEST_PRODUCTION by restructuring the query to use a WITH clause for better readability and performance. This change enhances the accuracy of production candidate selection by incorporating additional metrics and calculations. Torsten Schulz (local) 2026-04-13 15:45:05 +02:00
  • 00ce7fc655 Refactor SQL query for candidate selection: Updated the SQL query to include a new FROM candidates clause, ensuring accurate retrieval of the top production candidates based on worth calculations. This change enhances the clarity and functionality of the production selection process. Torsten Schulz (local) 2026-04-13 15:34:28 +02:00
  • cd21293fbd Enhance DirectorWorker logic for tax calculations: Updated the DirectorWorker to compute the cumulative tax percentage for net ranking and adjusted SQL queries to include this new parameter in production selection. Improved logging to capture additional metrics related to tax and net piece calculations, enhancing the traceability of production decisions. Torsten Schulz (local) 2026-04-13 15:29:11 +02:00
  • 2eaea2481c Refactor SQL queries for type consistency: Updated various SQL queries to ensure consistent data types by casting results to text. This change enhances compatibility and improves the handling of JSON data in the application. Torsten Schulz (local) 2026-04-13 15:20:47 +02:00
  • 3df83b507e Add debug functionality for best production selection: Introduced a new SQL query QUERY_GET_BEST_PRODUCTION_DEBUG to retrieve the top 5 production candidates with detailed metrics. Enhanced the DirectorWorker to log debug information during production selection, improving traceability of decision-making processes. Torsten Schulz (local) 2026-04-13 15:13:27 +02:00
  • df092d1790 Add notify module and update notification SQL query: Introduced a new notify module for handling notifications. Updated the SQL query in insert_notification_conn to use QUERY_INSERT_NOTIFICATION instead of QUERY_INSERT_NOTIFICATION_FULL, simplifying the notification insertion process. Torsten Schulz (local) 2026-04-13 15:07:39 +02:00
  • 670ea093d0 Update YpDaemon version to 0.5.0 and change edition to 2024 in Cargo.toml and Cargo.lock for improved compatibility and feature enhancements. Torsten Schulz (local) 2026-04-13 15:05:01 +02:00
  • 8593824a73 Enhance sell log SQL query: Updated the QUERY_ADD_SELL_LOG to include a sell_timestamp field in the conflict resolution clause, ensuring accurate tracking of sell events. This change improves the logging mechanism for sales data in the database. Torsten Schulz (local) 2026-04-13 15:02:52 +02:00
  • 7ca43da52d Refactor product start calculation and SQL query: Updated the documentation for the best product start logic to clarify the ranking criteria and cost calculations. Adjusted the SQL query to enhance the worth calculation by incorporating new logic for category-based costs and headroom discounts, ensuring consistency with the updated pricing strategy. Torsten Schulz (local) 2026-04-13 14:53:08 +02:00
  • 2cca0da750 Update version and edition in Cargo.toml; enhance breakup risk management in FalukantFamilyWorker: Added logic to automatically deactivate low-affection relationships and notify users of high breakup risks. Updated SQL queries to support these changes. Torsten Schulz (local) 2026-04-13 12:21:35 +02:00
  • 10f71ece0e Update deployment script path in workflow: Changed the script executed by the deploy-daemon workflow from deploy-yourpart-bluegreen.sh to actualize-daemon.sh for improved deployment management. Torsten Schulz (local) 2026-04-10 08:50:15 +02:00
  • 7043e8d90c Update production certificate logic for more frequent recalculations: Changed the certificate recalculation interval to approximately once per minute, updated related documentation, and adjusted the FalukantFamilyWorker to reflect these changes. Enhanced the UI WebSocket documentation to clarify the conditions under which production certificates are refreshed. Torsten Schulz (local) 2026-04-10 08:43:19 +02:00
  • 1111377913 Enhance money change event handling: Added a new loss field to the JSON response in the EventsWorker to display the loss amount as a positive value, improving clarity for UI text. Updated the calculation logic to ensure accurate representation of financial changes. Torsten Schulz (local) 2026-04-10 08:39:45 +02:00
  • ebf20c4424 Refactor production cost calculations and SQL query: Updated the QUERY_GET_BEST_PRODUCTION to implement a legacy formula for ranking based on effective market percentage and knowledge levels. Adjusted the calculation logic for costs and clarified documentation to ensure consistency with the new pricing strategy. Enhanced SQL query structure for improved clarity and performance in production worth assessment. Torsten Schulz (local) 2026-04-09 09:36:44 +02:00
  • bb1c1c4133 Refactor production cost calculations and SQL query: Updated the QUERY_GET_BEST_PRODUCTION to align profit calculations with the new logic for selling prices based on knowledge levels. Enhanced documentation to clarify the ranking criteria and the relationship between production costs and pricing strategies. Adjusted related functions in director.rs to ensure consistency across the application. Torsten Schulz (local) 2026-04-09 09:08:53 +02:00
  • dda559cbe7 Refactor SQL query for best production calculation: Updated the QUERY_GET_BEST_PRODUCTION to enhance the worth calculation by incorporating vehicle presence checks and adjusting the logic for market pricing based on regional data. Improved documentation to clarify the new formula for profit per minute and its implications for product evaluation across different regions. Torsten Schulz (local) 2026-04-09 08:57:27 +02:00
  • 7d56f51ec9 Refactor SQL query for best production calculation: Updated the QUERY_GET_BEST_PRODUCTION to incorporate vehicle presence checks for users, adjusting the worth calculation based on regional market data. Enhanced the query structure for improved clarity and performance, ensuring accurate production worth assessment across different regions. Added documentation to clarify the new logic and its implications for product evaluation. Torsten Schulz (local) 2026-04-09 08:48:51 +02:00
  • e460792357 Enhance production certificate logic and SQL queries: Updated the QUERY_UPDATE_FALUKANT_USER_CERTIFICATE to include certificate_productions_count_since for tracking production counts since the last level change. Modified the QUERY_GET_PRODUCTION_CERTIFICATE_INPUT_ROWS to filter completed productions based on this timestamp. Improved documentation for clarity on the new logic and its implications for user progression and data retention. Torsten Schulz (local) 2026-04-09 08:13:17 +02:00
  • 731c39dfa4 Implement daily political salary management: Introduced a new function run_daily_political_salary to calculate and distribute daily salaries for players with active political offices, utilizing configured values or fallback based on office rank. Updated SQL queries to support this functionality, including checks for the readiness of the necessary database column. Enhanced the PoliticsWorker to trigger daily salary processing, ensuring timely updates for users. Improved documentation for clarity on the new salary management features and their integration into the existing political benefits system. Torsten Schulz (local) 2026-04-07 15:24:12 +02:00
  • ac024a8d14 Implement political benefits management in FalukantFamilyWorker and SQL: Introduced a new structure for handling lover relationships, including political slots and reputation ticks. Updated SQL queries to support political benefits, ensuring proper handling of appointments and reputation gains. Enhanced the FalukantFamilyWorker logic to manage free political slots and maintain relationships effectively. Improved documentation for clarity on the new political benefits features and their integration into the existing system. Torsten Schulz (local) 2026-04-02 15:46:37 +02:00
  • 21525ec125 Enhance production certificate and election result handling: Updated the logic in run_daily to improve clarity on level progression based on weighted scores, including detailed logging for cases where players meet minimum requirements but do not advance. Introduced a new function to notify players of election results, integrating SQL queries for efficient data retrieval and notification management. Enhanced documentation for the production certificate process to clarify UI vs. daemon discrepancies. Torsten Schulz (local) 2026-04-02 14:48:39 +02:00
  • 619e5e5123 Refactor death log handling in UserCharacterWorker: Introduced a new function optional_linked_names to streamline the retrieval of linked names (spouses, children, lovers) in the death context. This change enhances error handling and maintains the integrity of the deceased character's data in JSON format. Updated the handle_character_death method to utilize the new function, improving code readability and maintainability. Torsten Schulz (local) 2026-03-31 15:14:01 +02:00
  • b3578c65b8 Enhance production certificate logic and event handling: Updated the daily recalculation process in FalukantFamilyWorker to decouple it from family migration, ensuring consistent execution. Introduced a new mechanism to reset certificates upon succession without heirs, improving user experience. Refined SQL queries for better data retrieval and event publishing, including distinct character selection logic. Enhanced documentation for clarity on the updated processes and their implications. Torsten Schulz (local) 2026-03-31 10:29:05 +02:00
  • 64080211d1 Refactor SSH connection steps in deployment workflow: Updated environment variable names for clarity and added logging for resolved configuration. Enhanced SSH connection commands to utilize the new variable names, improving maintainability and readability of the deployment process. Torsten Schulz (local) 2026-03-31 10:14:25 +02:00
  • 57f3d27eb7 Update deployment workflow for blue-green strategy: Renamed workflow to 'Deploy yourpart (blue-green)' and refactored SSH connection steps to utilize environment variables for host, port, and user. Changed deployment script to align with blue-green deployment practices, enhancing clarity and maintainability. Torsten Schulz (local) 2026-03-31 10:03:04 +02:00
  • a7a6ea1ff9 Refactor planned pregnancy management in UserCharacterWorker and SQL: Updated queries to handle planned births and clear pregnancy records post-birth. Streamlined pregnancy processing logic with readiness checks and improved child relation insertion. Enhanced documentation for better understanding of planned pregnancy features and their integration. Torsten Schulz (local) 2026-03-31 09:58:33 +02:00
  • b1bf96a2ce Implement planned pregnancy management in UserCharacterWorker and SQL: Added new queries for handling planned births and clearing character pregnancy records after birth. Refactored pregnancy processing logic to incorporate checks for planned pregnancy readiness and streamlined the insertion of child relations based on birth context. Enhanced documentation for clarity on the new planned pregnancy features and their integration into the existing system. Torsten Schulz (local) 2026-03-31 09:03:58 +02:00
  • 1258abbb42 Refactor marriage pregnancy logic in UserCharacterWorker and SQL: Updated the conception process to occur daily instead of hourly, simplifying the fertility mechanics. Enhanced documentation for clarity on the new daily conception approach and adjusted related SQL queries to reflect these changes. Introduced a mechanism to track the last fertility date to prevent multiple conceptions in a single day. Torsten Schulz (local) 2026-03-30 10:21:05 +02:00
  • ac7bd1d7ed Enhance marriage pregnancy management in SQL and UserCharacterWorker: Added a new query to clear stale marriage pregnancy records after 30 days. Updated existing queries to include shared children count for more accurate pregnancy probability calculations. Refactored logic in maybe_run_hourly_pregnancies to incorporate the new query and improved documentation for clarity on marriage pregnancy mechanics. Torsten Schulz (local) 2026-03-30 10:16:50 +02:00
  • ac059f688d Integrate death log functionality into character and event processing: Added death context handling in CharacterCreationWorker and EventsWorker to enhance user notifications related to character deaths. Updated SQL queries for retrieving deceased context and modified notification logic to support detailed death notifications. Enhanced user notification methods to accommodate both short event names and JSON payloads for improved clarity in messaging. Torsten Schulz (local) 2026-03-30 10:11:55 +02:00
  • 1013af594d Enhance documentation for production cost calculation: Added clarifications on common misconceptions regarding the cost formula, including the role of certificates and product categories. Updated examples and detailed the calculation process to improve understanding of effective piece costs and headroom discounts. Torsten Schulz (local) 2026-03-26 20:22:47 +01:00
  • 84b32d72aa Update production worth calculation in SQL and documentation: Refined the worth formula to focus on regional revenue per time unit, removing knowledge factors and old cost penalties. Enhanced documentation to clarify the new sorting criteria and its implications for production management. Torsten Schulz (local) 2026-03-26 19:42:24 +01:00
  • 3289a0c129 Refactor production cost calculation in DirectorWorker: Updated the cost formula to depend on product category rather than certificate level, introducing a base cost and headroom discount mechanism. Modified SQL queries to retrieve product category and user certificate for accurate cost assessment. Enhanced documentation for clarity on the new cost structure and its implications for production management. Torsten Schulz (local) 2026-03-25 12:16:52 +01:00
  • 65772fb7de Implement marriage pregnancy management in UserCharacterWorker: Added SQL queries for handling marriage-related births and conception updates. Refactored pregnancy processing logic to accommodate new marriage pregnancy features, including checks for migration readiness and streamlined delivery processing. Enhanced documentation for clarity on marriage pregnancy mechanics. Torsten Schulz (local) 2026-03-25 11:56:25 +01:00
  • 083fa26297 Refactor Falukant certificate management: Consolidated certificate logic into the FalukantFamilyWorker's daily processing, removing the separate FalukantCertificateWorker. Updated SQL queries to include app_user_id and enhanced documentation for clarity on certificate scoring and daily recalculation logic. Torsten Schulz (local) 2026-03-25 11:12:55 +01:00
  • 3b25f8c3a0 Add transport raid functionality to Falukant daemon: Introduced falukant_transport_raid module with SQL queries for managing transport raids, including candidate transports and user reputation updates. Updated documentation to reflect new WebSocket events and integrated the module into the UndergroundWorker for seamless processing of transport-related events. Torsten Schulz (local) 2026-03-23 14:25:21 +01:00
  • df143e2531 Enhance sales and salary processing in DirectorWorker: Introduced a flag for conditional WebSocket message publishing in sell_single_inventory_item, allowing for more flexible event notifications. Refactored salary processing to aggregate total income by employer and ensure unique status updates, improving financial accuracy and reducing redundant notifications. Torsten Schulz (local) 2026-03-23 14:16:34 +01:00
  • c5e78cb87f Refactor production cost handling in DirectorWorker: Update create_single_production to return production costs instead of void, enabling aggregated cost calculations. Implement bundled money deductions for productions initiated by the director, enhancing financial accuracy and efficiency in production management. Torsten Schulz (local) 2026-03-23 14:10:16 +01:00
  • 195bf49d14 Refactor sales processing in DirectorWorker: Aggregate local sales payouts and taxes for improved efficiency. Update sell_single_inventory_item to return payout and tax amounts, ensuring accurate financial updates. Enhance money transfer logic to handle aggregated sales data, streamlining financial interactions. Torsten Schulz (local) 2026-03-23 12:21:23 +01:00
  • e811ec6264 Integrate debt management features into Falukant daemon: Added falukant_debtors module for handling debtor logic, including daily processing and SQL queries for managing debtors' status and actions. Updated FalukantFamilyWorker to incorporate debtor checks and error handling, enhancing financial interactions and family dynamics. Torsten Schulz (local) 2026-03-23 11:56:12 +01:00
  • 9d7f61a329 Enhance church office management in Falukant daemon: Introduced falukantUpdateChurch event for church applications and appointments, updated SQL queries for church office processing, and refactored the PoliticsWorker to streamline daily tasks related to church offices. Improved handling of church application scoring and interim appointments, enhancing overall church dynamics and character interactions. Torsten Schulz (local) 2026-03-23 11:02:19 +01:00
  • 708ffc3eda Refactor Falukant daemon logic for time-based processing: Updated the handling of monthly servant costs and lover installments to align with the new game time model, introducing a unified "Monatstick" concept for cost calculations. Enhanced SQL queries and worker logic to ensure accurate processing every 2 hours, improving financial interactions and family dynamics. Torsten Schulz (local) 2026-03-23 10:11:49 +01:00
  • c82fbc0f7c Implement lover installment logic in FalukantFamilyWorker: Added support for processing lover maintenance payments every 2 hours, including new SQL queries for installment tracking and updates to relationship states. Enhanced WebSocket events to notify UI of installment changes, improving family dynamics and financial interactions. Torsten Schulz (local) 2026-03-23 10:01:34 +01:00
  • fe0361971d Enhance Falukant family and production dynamics: Updated FalukantFamilyWorker to include public stability and household tension calculations, integrating new SQL queries for managing marriage states and household attributes. Added FalukantCertificateWorker for production certificate management, enhancing overall family interaction and production tracking. Torsten Schulz (local) 2026-03-23 09:02:51 +01:00
  • d921dc2f7e Integrate servant management into Falukant family dynamics: Added support for servant-related logic in FalukantFamilyWorker, including daily and monthly processing of servant data. Updated SQL queries to handle servant attributes and integrated servant discretion modifiers into relationship calculations, enhancing family interaction and satisfaction tracking. Torsten Schulz (local) 2026-03-22 10:09:26 +01:00
  • c209c41b52 Implement notification system for character death events: Added a new method in UserCharacterWorker to notify users of character deaths, including directors, relationships, and children. Updated SQL queries to support the insertion of notifications with event types, enhancing user engagement and real-time updates. Torsten Schulz (local) 2026-03-22 09:48:16 +01:00
  • 4086e9a207 Refactor pregnancy handling in UserCharacterWorker: Changed the pregnancy check from a daily to an hourly basis, updating the associated method and SQL query to reflect this new frequency. This adjustment improves the accuracy of pregnancy probability calculations and aligns with the updated family dynamics logic. Torsten Schulz (local) 2026-03-22 09:43:36 +01:00
  • ac5ec3a245 Enhance Falukant family dynamics: Updated the FalukantFamilyWorker to incorporate marriage buffs and detailed age rules for relationships. Added new WebSocket events for real-time updates and expanded SQL queries to support marriage state and buff management, improving overall family interaction and satisfaction tracking. Torsten Schulz (local) 2026-03-20 11:02:28 +01:00
  • 6a5ff4557e Add FalukantFamilyWorker and related SQL queries: Introduced the FalukantFamilyWorker to manage family-related logic, including marriage satisfaction and relationship states. Added new SQL queries for handling lover relationships and marriage updates, enhancing the overall functionality of family dynamics in the application. Torsten Schulz (local) 2026-03-20 10:26:15 +01:00
  • f9c80bbd6b Enhance pregnancy candidate query: Refactored SQL query to calculate pregnancy probabilities based on mother's age, utilizing a common table expression (CTE) for improved clarity and maintainability. The new logic replaces the previous average age calculation with a more detailed age-based probability assessment, ensuring accurate filtering of candidates. Torsten Schulz (local) 2026-03-19 09:13:36 +01:00
  • 6757aa363f Refactor event handling in EventsWorker: Consolidated money change, storage capacity change, and character health change logic into dedicated methods for improved clarity and maintainability. This change enhances the handling of various event effects while preserving existing functionality. Torsten Schulz (local) 2026-03-10 22:04:54 +01:00
  • 9961b91c4f Enhance event handling for money changes in EventsWorker: Introduced special cases for 'windfall' and 'theft' events, allowing for random monetary adjustments based on current user funds. Updated logic to ensure accurate percentage and absolute changes while maintaining existing functionality for standard money change events. Torsten Schulz (local) 2026-03-10 17:07:14 +01:00
  • 5d0dd41c3f Refactor event handling for character death: Updated the EventsWorker to ensure only player characters are notified of sudden child deaths, while NPCs are excluded. Adjusted health update logic to prevent player characters from reaching zero health due to accidents or illnesses. Enhanced SQL queries to filter characters based on user ID, improving clarity and functionality. Torsten Schulz (local) 2026-03-02 00:36:21 +01:00
  • 69dad6854a Enhance money change functionality in EventsWorker: Updated the MoneyChange event effect to include an optional minimum absolute positive value, ensuring that money changes do not result in zero for positive adjustments. Introduced a new SQL query for inserting money history, improving reliability in tracking monetary changes for users. Torsten Schulz (local) 2026-02-06 07:40:25 +01:00
  • 4baf88b0cf Enhance SQL query for character region filtering: Updated the query to use a recursive common table expression (CTE) for retrieving region IDs, allowing for more comprehensive region hierarchy handling. This change improves the accuracy of character selection based on regional relationships while maintaining existing filtering criteria. Torsten Schulz (local) 2026-02-05 23:59:20 +01:00
  • 1e565e6dd9 Refactor money change handling in EventsWorker: Updated the logic for applying money changes to use the current money value for calculations, ensuring accurate adjustments. Introduced a new method to retrieve the current money of a user, enhancing error handling and improving the overall clarity of the code. Torsten Schulz (local) 2026-02-05 08:16:54 +01:00
  • deaf5ac6ca Refactor variable naming in DirectorWorker: Updated variable names to improve code clarity by prefixing with underscores for unused variables. This change enhances readability and maintains functionality without altering logic. Torsten Schulz (local) 2026-02-04 14:50:39 +01:00
  • d94fa791b3 Add child relation deletion by parent query: Introduced a new SQL query to delete child relations where the character is either a father or mother. Updated relevant workers to execute this query before deleting child relations, ensuring proper cleanup of relationships during character deletion. Torsten Schulz (local) 2026-02-04 14:46:57 +01:00
  • 2293c1204b Add SQL query for product price history: Introduced a new query to insert regional product prices into the history table, calculating prices based on sell cost and worth percentage. Updated ValueRecalculationWorker to log current prices for affected regions, enhancing price tracking functionality. Torsten Schulz (local) 2026-02-04 09:10:31 +01:00
  • 00cb97ec57 Enhance logging for sales checks in DirectorWorker: Added detailed logging statements to track the sales verification process, including cases with no items to sell and the number of inventory items found. This improves visibility into the sales workflow and aids in debugging. Torsten Schulz (local) 2026-02-02 15:48:53 +01:00
  • 85b4c73c11 Update user money handling to prevent serialization errors: Adjusted the SQL query to cast money as numeric and modified the UserCharacterWorker to clamp and format the money value before executing the update. This change ensures valid numeric input and enhances error handling for user transactions. Torsten Schulz (local) 2026-02-02 15:29:53 +01:00
  • 658a9034ed Add SQL query to count children by user: Introduced a new query to count distinct children associated with a user across all their characters. Updated UserCharacterWorker to utilize this new query, replacing the previous count query. This enhances user-specific data retrieval capabilities. Torsten Schulz (local) 2026-02-02 15:25:13 +01:00
  • 460310ae89 Refactor error handling in ProduceWorker: Simplify error logging by removing detailed error messages and replacing them with silent error handling. This change streamlines the code and reduces console output during production processing, while maintaining functionality. Torsten Schulz (local) 2026-02-02 15:18:44 +01:00
  • 2f875d6c1c Refactor SQL query for finished productions: Update to use DISTINCT ON for unique production IDs, change JOINs to LEFT JOINs for character and director relationships, and simplify capacity checks to ensure sufficient storage for productions. Adjust ordering for improved query performance. Torsten Schulz (local) 2026-02-02 15:04:56 +01:00
  • 340c658ad1 Implement character death handling and periodic checks: Add logic to process characters with health <= 0 in EventsWorker and UserCharacterWorker, including immediate death handling during health updates and a scheduled death check every 12 hours. Introduce a new SQL query to retrieve characters with zero health. Torsten Schulz (local) 2026-02-02 08:05:12 +01:00
  • 972ef2b714 Reduce probabilities and effects of various random events in EventsWorker: Adjusted the likelihood and impact of events such as character illness, accidents, regional epidemics, and earthquakes to balance gameplay dynamics. Torsten Schulz (local) 2026-01-31 08:58:15 +01:00
  • f6d566427a Add immediate handling for deceased characters in health update: Implement logic to check if a character's health is less than or equal to zero and handle their death accordingly, improving character state management. Torsten Schulz (local) 2026-01-31 08:55:49 +01:00
  • c24aa63f97 Fix SQL query parameter order in inventory update: Swap parameters in the execute call to correctly update inventory quantity based on the new quantity and inventory ID. Add comment for clarity on SQL operation. Torsten Schulz (local) 2026-01-29 16:10:34 +01:00
  • 9f1c54fde9 automatic apply on church jobs Torsten Schulz (local) 2026-01-29 11:20:45 +01:00
  • 55a86f75f1 Improve stock creation logging in StockageManager: Add detailed logging for the number of new stocks created and errors encountered during the stock addition process. Update randomness threshold for stock creation to increase the likelihood of stock generation per town. Torsten Schulz (local) 2026-01-29 08:21:48 +01:00
  • 45287837bc Enhance house creation logging in HouseWorker: Add detailed logging for the number of new buyable houses created and errors encountered during the process. Update SQL query to increase the randomness threshold for house selection, improving the variety of houses retrieved. Torsten Schulz (local) 2026-01-29 08:18:56 +01:00
  • 31998e310c Implement capacity check in ProduceWorker: Add a method to verify available storage before processing finished productions, ensuring that production only occurs if sufficient capacity is present. Update SQL query to reflect the new capacity validation logic for improved reliability in production handling. Torsten Schulz (local) 2026-01-29 08:10:38 +01:00
  • 05e6155e38 Enhance capacity management in DirectorWorker: Retrieve current capacity values directly from the database to prevent race conditions, calculate free capacity based on real-time data, and ensure production only occurs if sufficient storage is available. Update SQL query to check for adequate storage before returning production results. Torsten Schulz (local) 2026-01-28 16:36:30 +01:00
  • 4b4d84b15c Implement overproduction notification handling in ProduceWorker: Add logic to check for existing notifications and update them if necessary, or create a new notification if none exist. Introduce SQL queries for finding and updating overproduction notifications to enhance database interactions. Torsten Schulz (local) 2026-01-28 15:06:48 +01:00
  • 710a2a62b2 Refactor SQL query in DirectorWorker: Remove original_sell_cost from selection and enhance cost resolution logic for improved clarity and efficiency in database interactions. Torsten Schulz (local) 2026-01-28 14:46:57 +01:00
  • 1d9a7ba8a0 Refactor product cost retrieval in DirectorWorker: Simplify the SQL query by removing the original_sell_cost from the selection, and adjust the cost resolution logic to improve clarity and efficiency in database interactions. Torsten Schulz (local) 2026-01-28 14:41:27 +01:00
  • c9e0781b61 Update dependencies and enhance WebSocket server logging: Add 'chrono' and 'android_system_properties' to Cargo.lock, improve error handling and logging in websocket_server.rs, and streamline character creation notifications in worker modules for better clarity and maintainability. Torsten Schulz (local) 2026-01-28 14:21:28 +01:00
  • 2ac474fe0c Refactor relationship type retrieval in user character workers: Simplify the extraction of relationship types in UserCharacterWorker, CharacterCreationWorker, and EventsWorker by replacing and_then with map for improved readability and consistency. Torsten Schulz (local) 2026-01-23 10:52:59 +01:00
  • c8668c59eb Refactor relationship type retrieval in character workers: Simplify the extraction of relationship types in CharacterCreationWorker, EventsWorker, and UserCharacterWorker by streamlining the use of and_then for better readability and maintainability. Torsten Schulz (local) 2026-01-23 10:48:15 +01:00
  • 0399333163 Enhance relationship deletion logging across workers: Implement detailed logging for the number of deleted relationships in CharacterCreationWorker, EventsWorker, and UserCharacterWorker, improving traceability and user awareness during character interactions. Torsten Schulz (local) 2026-01-23 10:46:32 +01:00
  • 7305a71438 Enhance relationship deletion process in character management: Implement detailed logging for deleted relationships, including related user and character IDs, and relationship types. Introduce special notifications for engaged relationships to improve user awareness during character events. Torsten Schulz (local) 2026-01-22 09:35:21 +01:00