Skip to content

Commit

Permalink
Oracle Refactor (#549)
Browse files Browse the repository at this point in the history
# Description
Refactors the oracle system and component, making them more customizable
and less trash.

- Most of the nyano shitcode was rewritten in accordance with the new
standards and in a less hardcoded manner (all features were preserved,
with some changes).
- Replaced the accumulator field pattern with the "nextX" pattern for
things oracle does on certain intervals.
- Removed some code duplication and bloat. 
- Gave oracle a 75% chance to request technology and 25% to request a
plant.
- When requesting a technology, oracle will only request what's either
already researched, or can be researched soon (that is, the
prerequisites of the research are complete and the research isn't locked
for any reason).
- If there's no research server at the moment when oracle demands an
item, it will only demand a plant
- When dispensing rewards, oracle can now spawn 1, 3, or 5 crystals at
once, and research disks worth 5k, 10k, and 20k research points. Each
one of those have different probabilities (3 crystals and 5k points
still prevail, but occasionally you can get the more expensive rewards).
- When dispensing rewards, oracle now throws them at the person who
fulfilled the request instead of simply spawning them at their feet.

Almost every oracle thing (except for throwing and the amount of liquid
dispensed) can now be configured in the yaml prototype of the oracle.

# TODO
Forget it

<details><summary><h1>Media</h1></summary><p>


https://github.com/user-attachments/assets/9d4be44f-37d5-4072-a6e6-f194764f7ff6


![image](https://github.com/user-attachments/assets/011761d4-8d73-4d65-ba9c-92b25a28e95f)

</p></details>

---

# Changelog
:cl:
- tweak: Oracle requests are now more likely to be aligned with the
current research.
  • Loading branch information
Mnemotechnician authored Aug 5, 2024
1 parent 1bd9cd8 commit c976bfa
Show file tree
Hide file tree
Showing 10 changed files with 469 additions and 462 deletions.
72 changes: 0 additions & 72 deletions Content.IntegrationTests/Tests/Nyanotrasen/Oracle/OracleTest.cs

This file was deleted.

87 changes: 0 additions & 87 deletions Content.Server/Nyanotrasen/Research/Oracle/OracleComponent.cs

This file was deleted.

Loading

0 comments on commit c976bfa

Please sign in to comment.