1
1
using Celeste . Mod . Entities ;
2
+ using Celeste . Mod . MaxHelpingHand . Module ;
2
3
using Celeste . Mod . MaxHelpingHand . Triggers ;
3
4
using Microsoft . Xna . Framework ;
4
5
using Monocle ;
@@ -82,13 +83,13 @@ public SidewaysLava(EntityData data, Vector2 offset) {
82
83
83
84
if ( lavaMode == LavaMode . LeftToRight ) {
84
85
// one hitbox on the left.
85
- Collider = new Hitbox ( GameplayBuffers . Gameplay . Width + 20f , GameplayBuffers . Gameplay . Height + 20f , - GameplayBuffers . Gameplay . Height - 20f ) ;
86
+ Collider = new Hitbox ( MaxHelpingHandModule . GameplayWidth + 20f , MaxHelpingHandModule . GameplayHeight + 20f , - MaxHelpingHandModule . GameplayHeight - 20f ) ;
86
87
} else if ( lavaMode == LavaMode . RightToLeft ) {
87
88
// one hitbox on the right.
88
- Collider = new Hitbox ( GameplayBuffers . Gameplay . Width + 20f , GameplayBuffers . Gameplay . Height + 20f , GameplayBuffers . Gameplay . Width ) ;
89
+ Collider = new Hitbox ( MaxHelpingHandModule . GameplayWidth + 20f , MaxHelpingHandModule . GameplayHeight + 20f , MaxHelpingHandModule . GameplayWidth ) ;
89
90
} else {
90
91
// hitboxes on both sides, 280px apart.
91
- Collider = new ColliderList ( new Hitbox ( GameplayBuffers . Gameplay . Width + 20f , GameplayBuffers . Gameplay . Height + 20f , - GameplayBuffers . Gameplay . Width - 20f ) , new Hitbox ( GameplayBuffers . Gameplay . Width + 20f , GameplayBuffers . Gameplay . Height + 20f , GameplayBuffers . Gameplay . Width - 40f ) ) ;
92
+ Collider = new ColliderList ( new Hitbox ( MaxHelpingHandModule . GameplayWidth + 20f , MaxHelpingHandModule . GameplayHeight + 20f , - MaxHelpingHandModule . GameplayWidth - 20f ) , new Hitbox ( MaxHelpingHandModule . GameplayWidth + 20f , MaxHelpingHandModule . GameplayHeight + 20f , MaxHelpingHandModule . GameplayWidth - 40f ) ) ;
92
93
}
93
94
94
95
Visible = false ;
@@ -97,7 +98,7 @@ public SidewaysLava(EntityData data, Vector2 offset) {
97
98
Add ( loopSfx = new SoundSource ( ) ) ;
98
99
99
100
// lava can travel at up to 40 px/s * speedMultiplier, and we want it to extend enough so that you don't see it scrolling past the screen.
100
- float lavaWidth = GameplayBuffers . Gameplay . Width + speedMultiplier * 80f ;
101
+ float lavaWidth = MaxHelpingHandModule . GameplayWidth + speedMultiplier * 80f ;
101
102
102
103
if ( lavaMode != LavaMode . RightToLeft ) {
103
104
// add the left lava rect, just off-screen (it is 340px wide)
@@ -108,7 +109,7 @@ public SidewaysLava(EntityData data, Vector2 offset) {
108
109
if ( lavaMode != LavaMode . LeftToRight ) {
109
110
// add the right lava rect, just off-screen (the screen is 320px wide)
110
111
Add ( rightRect = new SidewaysLavaRect ( lavaWidth , 200f , 4 , SidewaysLavaRect . OnlyModes . OnlyRight ) ) ;
111
- rightRect . Position = new Vector2 ( lavaMode == LavaMode . Sandwich ? GameplayBuffers . Gameplay . Width - 40f : GameplayBuffers . Gameplay . Width , 0f ) ;
112
+ rightRect . Position = new Vector2 ( lavaMode == LavaMode . Sandwich ? MaxHelpingHandModule . GameplayWidth - 40f : MaxHelpingHandModule . GameplayWidth , 0f ) ;
112
113
rightRect . SmallWaveAmplitude = 2f ;
113
114
}
114
115
@@ -174,9 +175,9 @@ public override void Added(Scene scene) {
174
175
175
176
} else if ( lavaMode == LavaMode . RightToLeft ) {
176
177
// same, except the lava is offset by 320px. That gives Right - 320 + 16.
177
- X = SceneAs < Level > ( ) . Bounds . Right - GameplayBuffers . Gameplay . Width + 16 ;
178
+ X = SceneAs < Level > ( ) . Bounds . Right - MaxHelpingHandModule . GameplayWidth + 16 ;
178
179
// sound comes from the right side.
179
- loopSfx . Position = new Vector2 ( GameplayBuffers . Gameplay . Width , Height / 2f ) ;
180
+ loopSfx . Position = new Vector2 ( MaxHelpingHandModule . GameplayWidth , Height / 2f ) ;
180
181
181
182
} else {
182
183
// the position should be set on the first Update call, in case the level starts with a room with lava in it
@@ -320,7 +321,7 @@ public override void Update() {
320
321
target = player . X - 32f ;
321
322
} else {
322
323
// stop 32px to the right of the player. since lava is offset by 320px, that gives 320 - 32.
323
- target = player . X - GameplayBuffers . Gameplay . Width + 32 ;
324
+ target = player . X - MaxHelpingHandModule . GameplayWidth + 32 ;
324
325
}
325
326
326
327
if ( ! intro && player != null && player . JustRespawned && ! player . CollideCheck < InstantLavaBlockerTrigger > ( ) ) {
0 commit comments