Commit Graph

12 Commits

Author SHA1 Message Date
Joonas Rikkonen 8cf26e2d7f Fixed null reference exception if a statuseffect removes an item when a round is not running. Closes #385 2018-04-24 18:02:53 +03:00
Joonas Rikkonen 1d98df11a3 PropertyConditionals match if any of the targets match, junction boxes only take damage underwater when therey're powered up (because trying to fix all boxes in a flooded sub before they break again is pain in the ass) 2018-04-23 15:25:46 +03:00
Joonas Rikkonen 9dd9425caa Explosives, chemicals and medical items disappear when their condition falls to 0 (i.e. when they're fully used).
Railgun shells, detonators and depth charges also now "use" their contents instead of destroying them. (See #322)
2018-04-03 22:43:41 +03:00
Joonas Rikkonen c02b8a17fe Reminder to self: press ctrl+s before committing 2018-03-09 18:04:14 +02:00
Joonas Rikkonen a8dda856cc Fixed statuseffect changes in a57bec2 not being added to one of the overloads of the Apply method 2018-03-09 17:55:06 +02:00
Joonas Rikkonen f5af432ad9 Fixed item tags & aliases not being taken into account when determining target validity in StatusEffect.Apply. Closes #316 2018-03-06 11:25:25 +02:00
Joonas Rikkonen a57bec2a27 Made statuseffects stackable by default, fixed statuseffects only being considered the same if they're caused by the same item, applying the same non-stackable statuseffect again refreshes the timer of the existing statuseffect. Closes #309 2018-03-05 16:59:23 +02:00
Joonas Rikkonen ff883ae882 Bunch of fixes to statuseffects:
- Fixed the multi-target StatusEffect.Apply method ignoring target names and always allowing stacking.
- Fixed delayed effects not working if the single-target StatusEffect.Apply method is used.
- Fixed delayed effects ignoring target names.
- Fixed delayed effects comparing the equality of the target lists, not the elements in the list (if the contents of the lists are identical the statuseffects should be considered identical).
2018-02-12 11:25:40 +02:00
Joonas Rikkonen 3956785032 Moved PropertyConditional match checking & status effect cancelling from the StatusEffect class to PropertyConditional. 2018-01-09 16:42:11 +02:00
Joonas Rikkonen 0671dba1b4 Changed PropertyConditional operators from strings to enums 2018-01-09 16:18:05 +02:00
Joonas Rikkonen e21959d0a2 Some PropertyConditional refactoring & fixes:
- Changed the "attribute" field from a string to a more descriptively named enum (TODO: do the same for the operators).
- Changed the "value" field from an object to a string because the value is always a string anyway (might want to make it an object that holds the actual value we're comparing against so there's no need to do any parsing in the Matches method).
- Fixed "!=" operator checking for equality.
- Removed unnecessary property value getting from the Matches method (reflection ain't cheap!)
2018-01-09 16:10:07 +02:00
Joonas Rikkonen c502d9545c Moved StatusEffect related classes to their own folder and PropertyConditional to its own file. 2018-01-09 16:09:59 +02:00