feat: Allow using GameCondition in EntityVehicleCondition and EntityPassengerCondition #11

Closed
opened 2024-11-24 10:17:00 +00:00 by sylv256 · 4 comments
sylv256 commented 2024-11-24 10:17:00 +00:00 (Migrated from github.com)

I've already found this annoying enough having to implement a RetypedCondition bodge, so this would be much appreciated.

I've already found this annoying enough having to implement a `RetypedCondition` bodge, so this would be much appreciated.
sylv256 commented 2024-11-24 10:20:57 +00:00 (Migrated from github.com)

I'm thinking of messing with InvertedCondition so that it's easier to use without retyping.

I'm thinking of messing with `InvertedCondition` so that it's easier to use without retyping.
sylv256 commented 2024-11-24 20:41:29 +00:00 (Migrated from github.com)

I'm going to make a special Either codec that allows usage of either GameCondition or TypedGameCondition.

I'm going to make a special Either codec that allows usage of either `GameCondition` or `TypedGameCondition`.
sylv256 commented 2024-11-24 22:04:06 +00:00 (Migrated from github.com)

Upon further investigation, this introduced unnecessary amounts of boilerplate. Instead, we're going to find alternative avenues of simplification. I believe the easiest way here would be to merged TypedGameCondition and GameCondition. However, that would present further challenges with regards to Codecs, so the best compromise would be to keep the current system of retyping for the time being.

Upon further investigation, this introduced unnecessary amounts of boilerplate. Instead, we're going to find alternative avenues of simplification. I believe the easiest way here would be to merged `TypedGameCondition` and `GameCondition`. However, that would present further challenges with regards to Codecs, so the best compromise would be to keep the current system of retyping for the time being.
sylv256 commented 2025-02-10 22:42:52 +00:00 (Migrated from github.com)

Fixed in 0.4.0 using MaybeTypedCondition backed by an Either codec.

Fixed in `0.4.0` using `MaybeTypedCondition` backed by an `Either` codec.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Modding/silicate#11
No description provided.