14
14
using Microsoft . Xna . Framework ;
15
15
using Microsoft . Xna . Framework . Graphics ;
16
16
using MonoMod . Cil ;
17
+ using VinkiMod . Module ;
17
18
18
19
namespace Celeste . Mod . VinkiMod ;
19
20
20
21
public class VinkiModModule : EverestModule {
22
+ //ExtendedVariants.Module.ExtendedVariantsModule.Variant=ExtendedVariants.Variants.AlwaysPressGraffitiButton;
21
23
22
24
public static VinkiModModule Instance ; // { get; private set; }
23
25
@@ -30,6 +32,8 @@ public class VinkiModModule : EverestModule {
30
32
public override Type SaveDataType => typeof ( VinkiModSaveData ) ;
31
33
public static VinkiModSaveData SaveData => ( VinkiModSaveData ) Instance . _SaveData ;
32
34
35
+ public static String [ ] graffitiUsers = [ "Vinki_Scug" ] ;
36
+
33
37
//but here's the :hunterglee: (the constants)
34
38
public static String [ ] textureNamespaces = [
35
39
"scenery/car/body" , "decals/1-forsakencity/big_sign_b" , "decals/1-forsakencity/camping_medium" , "decals/1-forsakencity/hanging_sign" , "decals/1-forsakencity/big_sign_e" , //0-4
@@ -77,6 +81,7 @@ public VinkiModModule() {
77
81
}
78
82
private static List < ILHook > hooks = new List < ILHook > ( ) ;
79
83
public override void Load ( ) {
84
+ typeof ( VinkiModInterop ) . ModInterop ( ) ;
80
85
if ( ! Settings . MasterSwitch ) {
81
86
Everest . Events . Level . OnTransitionTo += triggerVinkiGUI1 ;
82
87
Everest . Events . Level . OnEnter += triggerVinkiGUI2 ;
@@ -172,7 +177,7 @@ public static void vinkiButtonPress(On.Celeste.Player.orig_Update orig, Player s
172
177
orig ( self ) ;
173
178
// Then, the graffiti indicator is turned off.
174
179
Session . vinkiRenderIt [ 0 ] = 0 ;
175
- if ( SkinModHelperModule . GetPlayerSkinName ( - 1 ) == "Vinki_Scug" ) {
180
+ if ( Array . IndexOf ( graffitiUsers , SkinModHelperModule . GetPlayerSkinName ( - 1 ) ) != - 1 ) {
176
181
if ( ! Session . sessionStuffLoaded ) {
177
182
if ( Array . IndexOf ( hasArtSpots , self . SceneAs < Level > ( ) . Session . Area . SID + "_" + self . SceneAs < Level > ( ) . Session . Area . Mode . ToString ( ) ) != - 1 ) {
178
183
Session . sessionArtSpots = artSpots [ Array . IndexOf ( hasArtSpots , self . SceneAs < Level > ( ) . Session . Area . SID + "_" + self . SceneAs < Level > ( ) . Session . Area . Mode . ToString ( ) ) ] ;
@@ -200,7 +205,7 @@ public static void vinkiButtonPress(On.Celeste.Player.orig_Update orig, Player s
200
205
}
201
206
// but here's the graffiti indicator
202
207
private static void vinkiRenderer ( Level self ) {
203
- if ( SkinModHelperModule . GetPlayerSkinName ( - 1 ) == "Vinki_Scug" ) {
208
+ if ( Array . IndexOf ( graffitiUsers , SkinModHelperModule . GetPlayerSkinName ( - 1 ) ) != - 1 ) {
204
209
// If Vinki's Skin is enabled, it adds these entities to the level first.
205
210
self . Add ( new GraffitiIndicator ( ) ) ;
206
211
// Also, if you're playing Prologue, the intro car's depth is set to 2. (I think.)
@@ -249,7 +254,7 @@ private static void DrawManipulator(ILContext ctx) {
249
254
private static MTexture TextureReplacer ( MTexture tex ) {
250
255
var among = - 1 ;
251
256
// Check if the player is ingame
252
- if ( SaveData != null && ( SkinModHelperModule . GetPlayerSkinName ( - 1 ) == "Vinki_Scug" || Settings . HideIfNotVinki == 0 ) ) {
257
+ if ( SaveData != null && ( Array . IndexOf ( graffitiUsers , SkinModHelperModule . GetPlayerSkinName ( - 1 ) ) != - 1 || Settings . HideIfNotVinki == 0 ) ) {
253
258
// If so, check if the settingsArtChanged.length is equal to or more than textureNamespaces.Length to prevent errors
254
259
if ( SaveData . settingsArtChanged . Length >= textureNamespaces . Length ) {
255
260
// If so, check each textureNamespace to see if it's changed in the save data.
0 commit comments