Commit Graph

8 Commits

Author SHA1 Message Date
Mysteryem d4b1351c99
Aquaria: Remove BaseException handling from create_item (#4218)
* Aquaria: Remove BaseException handling from create_item

Catching `BaseException` without re-raising the exception should almost
never be done because `BaseException` includes exit exceptions, such as
`SystemExit` and `KeyboardInterrupt`.

Ideally, the caught exception types should be as narrow as possible to
not mask bugs from catching unexpected exceptions. Having narrow
exception types can also help indicate to other developers what
exceptions are expected to be raisable by the code within the `try`
clause.

Similarly, the `try` clause should ideally contain the minimum code
necessary, to avoid masking bugs in the case that code within the `try`
clause that is not expected to raise an exception does so.

In this case, the only expected exception that can occur appears to be
`item_table[name]` that can raise a `KeyError` when `create_item()` is
passed an unexpected `name` argument. So this patch moves the other code
out of the `try` clause and changes the caught exception types to only
`KeyError`.

* Remove try-except

The KeyError that would be raised will be propagated as-is rather than
raising a new exception in its place.

* Remove extra newline

The original code did not have this newline, so it has been removed.
2024-11-21 20:43:37 +01:00
Louis M af0b5f8cf2
Aquaria Fixing some bugs (#4057)
* Fixing some bugs

* Forgot about this one
2024-10-15 23:22:58 +02:00
Louis M 618564c60a
Aquaria: Adding slot data for poptracker (#4056)
* Adds neccessary slot data for Aquaria

* Comma oops

---------

Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com>
2024-10-14 18:53:20 +02:00
Louis M 4054a9f15f
Aquaria: Renaming some locations for consistency (#3533)
* Change 'The Body main area' by 'The Body center area' for consistency

* Renaming some locations for consistency

* Adding a line for standard

* Replacing Cathedral by Mithalas Cathedral and addin Blind goal option

* Client option renaming for consistency

* Fix death link not working

* Removing death link from the option to put it client side

* Changing Left to Right
2024-07-05 22:40:26 +02:00
Louis M 87d24eb38a
Aquaria: Add entrance rule and fix start_inventory_from_pool (#3473) 2024-06-11 17:59:46 -05:00
Louis M f2587d5d27
Aquatia: Locations name changed due to typo's, grammar, or inconsistencies (#3421) 2024-06-01 06:09:34 -05:00
Louis M c792ae76ca
Aquaria: Adding Aquaria to README and some other minors changes (#3313) 2024-05-20 08:58:44 +02:00
Louis M 89a2a3c35b
Aquaria: implement new game (#3197)
This is a new world for the Aquaria game (https://www.bit-blot.com/aquaria/).
2024-05-17 12:29:00 +02:00