Skip to content

Commit

Permalink
fix(damagetype): initial fixes for sots dlc2 release (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiao921 authored Aug 30, 2024
1 parent 137f3a5 commit 72c6f06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions R2API.DamageType/DamageAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ public enum ModdedDamageType { };

private static bool _hooksEnabled = false;

// TODO: Need to be swapped to DamageTypeExtended most likely.
private static DamageType signalDamageType = ((DamageType)0x80000000u);
// 1 << 11 taken arbitrarily, unused in the enum,
// also, for unknown reasons,
// the DamageTypeExtended enumeration starts using bits on the 18th
private static DamageTypeExtended signalDamageType = (DamageTypeExtended)(1 << 11);

#region Hooks
internal static void SetHooks()
Expand Down Expand Up @@ -96,7 +98,7 @@ internal static void SetHooks()
On.RoR2.OverlapAttack.OverlapAttackMessage.Serialize += OverlapAttackMessageSerialize;
On.RoR2.OverlapAttack.OverlapAttackMessage.Deserialize += OverlapAttackMessageDeserialize;

IL.RoR2.GlobalEventManager.OnHitAll += GlobalEventManagerOnHitAllIL;
IL.RoR2.GlobalEventManager.OnHitAllProcess += GlobalEventManagerOnHitAllIL;

IL.RoR2.HealthComponent.SendDamageDealt += HealthComponentSendDamageDealtIL;
On.RoR2.DamageDealtMessage.Serialize += DamageDealtMessageSerialize;
Expand Down
3 changes: 3 additions & 0 deletions R2API.DamageType/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This is done via the DamageAPI class, which is used for reserving DamageTypes an

## Changelog

### '1.1.1'
* Initial fixes for SOTS DLC2 Release.

### '1.1.0'
* CrocoDamageTypeController support added,allowing better implementations of alt passives for Acrid.

Expand Down
2 changes: 1 addition & 1 deletion R2API.DamageType/thunderstore.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ schemaVersion = "0.0.1"
[package]
namespace = "RiskofThunder"
name = "R2API_DamageType"
versionNumber = "1.1.0"
versionNumber = "1.1.1"
description = "API for registering damage types"
websiteUrl = "https://github.com/risk-of-thunder/R2API"
containsNsfwContent = false
Expand Down

0 comments on commit 72c6f06

Please sign in to comment.