Shillelagh
Shillelagh
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Nw, thanks for the help
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
A generic is clever there
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
That would work
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Ah true
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
No, methods that define how a reagent might react with another. The base class has a react method, overridden by a child.
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Nice. Yes what I have going on is very similar. My previous version used a class in place of an enum (since different reagents have special properties) but was otherwise identical. Previously all combining was done in an addreagent method as well, but I never made on for the slightly newer version
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Whenever a reagent is added a method, CombineLikeReagents() which adds their quantities together
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Wuh oh
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Yes
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
If I move 100% of the reagent yes, otherwise a new reagent instance is necessary.
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Wondering as well if there was another way. In reality I have a reagent clasd which stores properties of the reagent including amount. When I move reagent from one container to another I need to remove the correct quantity from one container (changing its amount variable) and then add a new reagent instance of whatever type the reagent instance is from the first container, set the amount properly and store it I another container
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Ah, I figured
34 replies
CC#
Created by Shillelagh on 8/1/2023 in #help
❔ Create new instance of type unknown at runtime?
Yes
34 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
Poor guy lmao
21 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
Cool
21 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
Ah
21 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
Only did this because new is already a keyword lol
21 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
Ah, nice. Never heard of a named tuple! Didn't want to use a struct for something I was going to use once.
21 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
(With vertical bars representing where the substrings end to make the spaces clear
21 replies
CC#
Created by Shillelagh on 7/30/2023 in #help
❔ Troubles getting all Largest Common Subsequences of two strings.
Desired output: |Old|, | Old| or |Old |, |Old| Current output: |Old |, | Old|
21 replies