Skip to content

Commit cb03d1c

Browse files
committed
im gonna go insane
this one thing fixed SO much the thing is in loading state btw
1 parent c3be408 commit cb03d1c

File tree

13 files changed

+89
-49
lines changed

13 files changed

+89
-49
lines changed
2.11 KB
Loading

source/archipelago/APInfo.hx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ class APInfo {
66

77
public static final baseGame:Array<String> =
88
[
9+
'Tutorial',
910
'Bopeebo', 'Fresh', 'Dad Battle',
1011
'Spookeez', 'South', 'Monster',
1112
'Pico', 'Philly Nice', 'Blammed',
1213
'Satin Panties', 'High', 'Milf',
1314
'Cocoa', 'Eggnog', 'Winter Horrorland',
1415
'Senpai', 'Roses', 'Thorns',
1516
'Ugh', 'Guns', 'Stress',
16-
'Darnell', 'Lit Up', '2Hot', 'Blazin',
17-
'Darnell (BF Mix)', 'Tutorial'
17+
'Darnell (BF Mix)'
1818
];
1919

2020
public static final baseErect:Array<String> =
@@ -30,6 +30,7 @@ class APInfo {
3030

3131
public static final basePico:Array<String> =
3232
[
33+
'Darnell', 'Lit Up', '2Hot', 'Blazin',
3334
'Bopeebo (Pico mix)', 'Fresh (Pico mix)', 'Dad Battle (Pico mix)',
3435
'Spookeez (Pico mix)', 'South (Pico mix)',
3536
'Pico (Pico mix)', 'Philly Nice (Pico mix)', 'Blammed (Pico mix)',

source/archipelago/console/MainTab.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class MainTab extends TabSprite {
114114
message.width = Std.int(instance.widthTab);
115115
message.y = lastY = (lastY ?? Lib.application.window.height - instance.chatBg.height) - (message.textHeight + 5);
116116
instance.msgSprite.addChild(message);
117+
message.visible = message.y <= instance.info.y;
117118
}
118119
}
119120

@@ -144,6 +145,10 @@ class MainTab extends TabSprite {
144145
msgSprite.y = 0;
145146
if (msgSprite.y >= msgSprite.height)
146147
msgSprite.y = msgSprite.height;
148+
149+
for (message in messages) {
150+
message.visible = message.y <= info.y;
151+
}
147152
}
148153

149154
override function onShow() {

source/objects/Note.hx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ class Note extends NoteObject
293293
public static var swagWidthAlt:Float = 160; //For ModManager
294294
public static var colArray:Array<String> = ['purple', 'blue', 'green', 'red'];
295295
public static var colArrayAlt:Array<String> = ['purple', 'blue', 'green', 'red', 'white', 'yellow', 'violet', 'black', 'dark'];
296-
public static var defaultNoteSkin(default, never):String = 'noteskins/NOTE_assets';
296+
public static var defaultNoteSkin(default, never):String = 'noteSkins/NOTE_assets';
297297

298298
public var noteSplashData:NoteSplashData = {
299299
disabled: false,
@@ -683,6 +683,8 @@ class Note extends NoteObject
683683
return globalRgbShaders[noteData];
684684
}
685685

686+
public var publicTexture:String = '';
687+
public var publicTextureSus:String = '';
686688
var _lastNoteOffX:Float = 0;
687689
static var _lastValidChecked:String; //optimization
688690
public var originalHeight:Float = 6;
@@ -696,7 +698,7 @@ class Note extends NoteObject
696698
{
697699
skin = PlayState.SONG != null ? PlayState.SONG.arrowSkin : null;
698700
if (skin == null || skin.length < 1)
699-
skin = "noteskins/NOTE_assets" + postfix;
701+
skin = "noteSkins/NOTE_assets" + postfix;
700702
}
701703
else rgbShader.enabled = false;
702704

@@ -734,15 +736,17 @@ class Note extends NoteObject
734736
case 'Fake Heal Note':
735737
loadGraphic(Paths.image("streamervschat/pixelUI/fakehealnote"), false);
736738
default:
739+
publicTexture = 'pixelUI/' + skinPixel + skinPostfix;
740+
publicTextureSus = 'pixelUI/' + skinPixel + 'ENDS' + skinPostfix;
737741
if(isSustainNote) {
738742
var graphic = Paths.image('pixelUI/' + skinPixel + 'ENDS' + skinPostfix);
739-
loadGraphic(graphic, true, Math.floor(graphic.width / Note.pixelNotesDivisionValue[0]), Math.floor(graphic.height / 2));
743+
loadGraphic(graphic, true, Math.floor(graphic.width / pixelNotesDivisionValue[graphic.width == 126 ? 1 : 0]), Math.floor(graphic.height / 2));
740744
originalHeight = graphic.height / 2;
741745
} else {
742746
var graphic = Paths.image('pixelUI/' + skinPixel + skinPostfix);
743-
loadGraphic(graphic, true, Math.floor(graphic.width / Note.pixelNotesDivisionValue[0]), Math.floor(graphic.height / 5));
747+
loadGraphic(graphic, true, Math.floor(graphic.width / pixelNotesDivisionValue[graphic.width == 306 ? 1 : 0]), Math.floor(graphic.height / 5));
744748
}
745-
setGraphicSize(Std.int(width * PlayState.daPixelZoom * Note.pixelScales[PlayState.mania]));
749+
setGraphicSize(Std.int(width * PlayState.daPixelZoom * pixelScales[PlayState.mania]));
746750
loadPixelNoteAnims();
747751
antialiasing = false;
748752
}
@@ -815,11 +819,12 @@ class Note extends NoteObject
815819
function loadPixelNoteAnims() {
816820
for (i in 0...gfxLetter.length)
817821
{
818-
animation.add(gfxLetter[i], [i + pixelNotesDivisionValue[0]]);
822+
var graphic = Paths.image(publicTexture);
823+
animation.add(gfxLetter[i], [i + pixelNotesDivisionValue[graphic.width == 306 ? 1 : 0]]);
819824
if (isSustainNote)
820825
{
821826
animation.add(gfxLetter[i] + ' hold', [i]);
822-
animation.add(gfxLetter[i] + ' tail', [i + pixelNotesDivisionValue[0]]);
827+
animation.add(gfxLetter[i] + ' tail', [i + (pixelNotesDivisionValue[graphic.width == 126 ? 1 : 0] * 2)]);
823828
}
824829
}
825830
}

source/objects/StrumNote.hx

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,7 @@ class StrumNote extends NoteObject
9595
this.noteData = leData;
9696
this.ID = noteData;
9797

98-
var skin:String = null;
99-
if(PlayState.SONG != null && PlayState.SONG.arrowSkin != null && PlayState.SONG.arrowSkin.length > 1) skin = PlayState.SONG.arrowSkin;
100-
else skin = Note.defaultNoteSkin;
101-
102-
if (Note.getNoteSkinPostfix() != '')
103-
{
104-
var customSkin:String = skin + Note.getNoteSkinPostfix();
105-
if(Paths.fileExists('images/$customSkin.png', IMAGE)) skin = customSkin;
106-
}
107-
else {
108-
var customSkin:String = 'NOTE_assets' + Note.getNoteSkinPostfix();
109-
skin = 'noteskins/' + (PlayState.isPixelStage ? customSkin : 'strums');
110-
}
111-
112-
texture = skin; //Load texture and anims
98+
texture = ''; //Load texture and anims
11399
scrollFactor.set();
114100
playAnim('static');
115101
}
@@ -119,14 +105,24 @@ class StrumNote extends NoteObject
119105

120106
public function reloadNote()
121107
{
108+
var skin:String = texture;
109+
if(texture.length < 1)
110+
{
111+
skin = PlayState.SONG != null ? PlayState.SONG.arrowSkin : null;
112+
if ((skin == null || skin.length < 1) && PlayState.isPixelStage)
113+
skin = "noteSkins/NOTE_assets";
114+
else if ((skin == null || skin.length < 1) && !PlayState.isPixelStage)
115+
skin = "noteSkins/strums";
116+
}
117+
122118
var lastAnim:String = null;
123119
if(animation.curAnim != null) lastAnim = animation.curAnim.name;
124-
var br:String = texture;
120+
var br:String = skin;
125121

126122
frames = Paths.getSparrowAtlas(br);
127123

128124
antialiasing = ClientPrefs.data.antialiasing;
129-
setGraphicSize(Std.int(width * 0.7));
125+
setGraphicSize(Std.int(width * Note.scales[PlayState.mania]));
130126

131127
animationArray[0] = Note.keysShit.get(PlayState.mania).get('strumAnims')[column];
132128
animationArray[1] = Note.keysShit.get(PlayState.mania).get('letters')[column];
@@ -135,11 +131,12 @@ class StrumNote extends NoteObject
135131

136132
if(PlayState.isPixelStage)
137133
{
138-
loadGraphic(Paths.image('pixelUI/' + texture));
134+
loadGraphic(Paths.image('pixelUI/' + skin));
135+
pxDV = Note.pixelNotesDivisionValue[width == 306 ? 1 : 0];
139136
width = width / pxDV;
140137
height = height / 5;
141138
antialiasing = false;
142-
loadGraphic(Paths.image('pixelUI/' + texture), true, Math.floor(width), Math.floor(height));
139+
loadGraphic(Paths.image('pixelUI/' + skin), true, Math.floor(width), Math.floor(height));
143140
var daFrames:Array<Int> = Note.keysShit.get(PlayState.mania).get('pixelAnimIndex');
144141

145142
setGraphicSize(Std.int(width * PlayState.daPixelZoom * Note.pixelScales[PlayState.mania]));
@@ -152,7 +149,7 @@ class StrumNote extends NoteObject
152149
}
153150
else
154151
{
155-
frames = Paths.getSparrowAtlas(texture);
152+
frames = Paths.getSparrowAtlas(skin);
156153
antialiasing = ClientPrefs.data.antialiasing;
157154
setGraphicSize(Std.int(width * Note.scales[PlayState.mania]));
158155

source/objects/charting/ChartingStrumNote.hx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ class ChartingStrumNote extends FlxSprite
116116
{
117117
var lastAnim:String = null;
118118
if(animation.curAnim != null) lastAnim = animation.curAnim.name;
119-
var br:String = texture;
120-
121-
frames = Paths.getSparrowAtlas(br);
122-
123-
antialiasing = ClientPrefs.data.antialiasing;
124-
setGraphicSize(Std.int(width * 0.7));
125-
126-
animationArray[0] = Note.keysShit.get(PlayState.mania).get('strumAnims')[noteData];
127-
animationArray[1] = Note.keysShit.get(PlayState.mania).get('letters')[noteData];
128-
animationArray[2] = Note.keysShit.get(PlayState.mania).get('letters')[noteData]; //jic
129119
var pxDV:Int = Note.pixelNotesDivisionValue[1];
130120

131121
if(PlayState.isPixelStage)
@@ -167,7 +157,9 @@ class ChartingStrumNote extends FlxSprite
167157

168158
antialiasing = ClientPrefs.data.antialiasing;
169159
setGraphicSize(Std.int(width * Note.scales[PlayState.mania]));
170-
160+
animationArray[0] = Note.keysShit.get(PlayState.mania).get('strumAnims')[noteData];
161+
animationArray[1] = Note.keysShit.get(PlayState.mania).get('letters')[noteData];
162+
animationArray[2] = Note.keysShit.get(PlayState.mania).get('letters')[noteData]; //jic
171163
switch (Math.abs(noteData))
172164
{
173165
case 0:

source/psychlua/ExtraFunctions.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class ExtraFunctions
105105
}
106106
FunkinLua.luaTrace('initSaveData: Save file already initialized: ' + name);
107107
});
108+
108109
Lua_helper.add_callback(lua, "flushSaveData", function(name:String) {
109110
var variables = MusicBeatState.getVariables();
110111
if(variables.exists('save_$name'))

source/psychlua/HScript.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ class HScript extends Iris
301301
#if LUA_ALLOWED
302302
set('createGlobalCallback', function(name:String, func:Dynamic)
303303
{
304+
if (name == 'makeVideoSprite') return;
304305
for (script in PlayState.instance.luaArray)
305306
if(script != null && script.lua != null && !script.closed)
306307
Lua_helper.add_callback(script.lua, name, func);

source/psychlua/ReflectionFunctions.hx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class ReflectionFunctions
3232
return value;
3333
});
3434
Lua_helper.add_callback(lua, "getPropertyFromClass", function(classVar:String, variable:String, ?allowMaps:Bool = false) {
35+
var trueVar:String = variable;
36+
switch(classVar) {
37+
case "PlayState":
38+
classVar = "states.PlayState";
39+
case "ClientPrefs":
40+
classVar = "backend.ClientPrefs";
41+
variable = 'data.$trueVar';
42+
}
43+
3544
var myClass:Dynamic = Type.resolveClass(classVar);
3645
if(myClass == null)
3746
{
@@ -50,6 +59,15 @@ class ReflectionFunctions
5059
return LuaUtils.getVarInArray(myClass, variable, allowMaps);
5160
});
5261
Lua_helper.add_callback(lua, "setPropertyFromClass", function(classVar:String, variable:String, value:Dynamic, ?allowMaps:Bool = false, ?allowInstances:Bool = false) {
62+
var trueVar:String = variable;
63+
switch(classVar) {
64+
case "PlayState":
65+
classVar = "states.PlayState";
66+
case "ClientPrefs":
67+
classVar = "backend.ClientPrefs";
68+
variable = 'data.$trueVar';
69+
}
70+
5371
var myClass:Dynamic = Type.resolveClass(classVar);
5472
if(myClass == null)
5573
{

source/stages/Tank.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import stages.objects.*;
44
import cutscenes.CutsceneHandler;
55
import substates.GameOverSubstate;
66
import objects.Character;
7+
import stages.PicoCapableStage;
78

8-
class Tank extends BaseStage
9+
class Tank extends PicoCapableStage
910
{
1011
var tankWatchtower:BGSprite;
1112
var tankGround:BackgroundTank;

0 commit comments

Comments
 (0)