Skip to content

Commit

Permalink
unfinshed update
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLikesKirby committed Jul 24, 2024
1 parent 601c878 commit d7279f2
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- _________________________ Application Settings _________________________ -->

<app title="Friday Night Funkin' | VS. Dave and Bambi 3.0b | Moddable 2.0.0" file="VsDaveModdable" packageName="dnbteam.daveandbambi" package="dnbteam.daveandbambi" main="Main" version="3.0.0" company="dnbteam"/>
<app title="Friday Night Funkin' | VS. Dave and Bambi 3.0b | Moddable 2.5.0 UNFINSHED" file="VsDaveModdable" packageName="dnbteam.daveandbambi" package="dnbteam.daveandbambi" main="Main" version="3.0.0" company="dnbteam"/>
<app preloader="flixel.system.FlxPreloader"/>

<set name="APP_ID" value="0x0100f6c013bbc000"/>
Expand Down
10 changes: 10 additions & 0 deletions mods/global/UI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"replacements": [
{
"name": "wowtesting",
"ui": "rating",
"image": "wow",
"maxNotes": 1
}
]
}
2 changes: 1 addition & 1 deletion source/DialogueBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class DialogueBox extends FlxSpriteGroup
portraitRight.setPosition(570, 220);
default:
if (FileSystem.exists(TitleState.modFolder + '/data/characters/dialogue/${curCharacter}.json')) {
trace(TitleState.modFolder + '/data/characters/dialogue/${curCharacter}.json');
// trace(TitleState.modFolder + '/data/characters/dialogue/${curCharacter}.json');
rawJsonDial = File.getContent((TitleState.modFolder + '/data/characters/dialogue/${curCharacter}.json'));
jsonDial = cast Json.parse(rawJsonDial);
if (jsonDial.right) {
Expand Down
2 changes: 1 addition & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Main extends Sprite

public static var fps:FpsDisplay;

public static var applicationName:String = "Friday Night Funkin' | VS. Dave and Bambi 3.0b | Moddable 2.0.0";
public static var applicationName:String = "Friday Night Funkin' | VS. Dave and Bambi 3.0b | Moddable 2.5.0 UNFINSHED";

// You can pretty much ignore everything from here on - your code should go in your states.

Expand Down
2 changes: 1 addition & 1 deletion source/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MainMenuState extends MusicBeatState

public static var daRealEngineVer:String = 'Dave';
public static var engineVer:String = '3.0b';
public static var fanmadeEngineVer:String = '2.0.0';
public static var fanmadeEngineVer:String = '2.5.0-U';

public static var engineVers:Array<String> =
[
Expand Down
6 changes: 6 additions & 0 deletions source/ModSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ menuItems.push(new ModOption('Exit'));
{
selectOption();
}

if (controls.BACK)
{
close();
inMods = false;
}
}
function selectOption()
{
Expand Down
2 changes: 2 additions & 0 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2449,8 +2449,10 @@ class PlayState extends MusicBeatState

if (jsonStage.type == 'dark') {
darkLevels.push(bgName);
sunsetLevels.remove(bgName);
} else if (jsonStage.type == 'sunset') {
sunsetLevels.push(bgName);
darkLevels.remove(bgName);
} else {
darkLevels.remove(bgName);
sunsetLevels.remove(bgName);
Expand Down
3 changes: 3 additions & 0 deletions source/SaveDataHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,8 @@ class SaveDataHandler

if (FlxG.save.data.lowQ == null)
FlxG.save.data.lowQ = false;

if (FlxG.save.data.curRS == null)
FlxG.save.data.curRS = '';
}
}
48 changes: 40 additions & 8 deletions source/UISelectState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ import flixel.util.FlxColor;
import flixel.addons.display.FlxBackdrop;
import lime.app.Application;
import options.OptionsMenu;
import haxe.Json;
import sys.io.File;

typedef UIReplace =
{
var replacements:Array<ReplaceJson>;
}

typedef ReplaceJson =
{
var name:String;
var ui:String;
var image:String;
var maxNotes:Int;
}

class UISelectState extends MusicBeatSubstate
{
Expand All @@ -26,16 +41,17 @@ class UISelectState extends MusicBeatSubstate
var bga:FlxSprite;

var menuItems:Array<UIOption> = [];

var menuType:Array<String> = [];
var curSelected:Int = 0;

var expungedSelectWaitTime:Float = 0;
var timeElapsed:Float = 0;
var patienceTime:Float = 0;
public var rawJsonUI:String;
public var jsonUI:UIReplace;

var funnyTexts:FlxTypedGroup<FlxText> = new FlxTypedGroup<FlxText>();
public static var inMods:Bool = false;


public function new()
{
super();
Expand All @@ -45,10 +61,11 @@ var menuItems:Array<UIOption> = [];
{
super.create();

menuItems.push(new UIOption('test'));
menuItems.push(new UIOption('test2'));
menuItems.push(new UIOption('test3'));
menuItems.push(new UIOption('test4'));
rawJsonUI = File.getContent('mods/global/UI.json');
jsonUI = cast Json.parse(rawJsonUI);
for (i in jsonUI.replacements) {
menuItems.push(new UIOption(i.name));
}

bga = new FlxSprite(-80).loadGraphic(MainMenuState.randomizeBG());
bga.scrollFactor.set();
Expand Down Expand Up @@ -86,6 +103,9 @@ var menuItems:Array<UIOption> = [];
var songText:Alphabet = new Alphabet(0, (70 * i) + 30, LanguageManager.getTextString('${menuItems[i].optionName}'), true, false);
songText.isMenuItem = true;
songText.targetY = i;
if (FlxG.save.data.curRS == menuItems[i].optionName) {
songText.color = 0xFF2FFF18;
}
grpMenuShit.add(songText);
}

Expand Down Expand Up @@ -136,6 +156,18 @@ var menuItems:Array<UIOption> = [];
{

default:
for (item in grpMenuShit.members)
{
item.color = 0xFFFFFFFF;
}
if (FlxG.save.data.curRS == daSelected) {
grpMenuShit.members[curSelected].color = 0xFFFFFFFF;
FlxG.save.data.curRS = '';
} else {
grpMenuShit.members[curSelected].color = 0xFF2FFF18;
FlxG.save.data.curRS = daSelected;
}
trace(FlxG.save.data.curRS);
}
}

Expand All @@ -159,7 +191,7 @@ var menuItems:Array<UIOption> = [];
{
item.targetY = bullShit - curSelected;
bullShit++;

item.alpha = 0.6;
// item.setGraphicSize(Std.int(item.width * 0.8));

Expand Down
3 changes: 3 additions & 0 deletions source/options/OptionsMenu.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package options;

import sys.FileSystem;
import flixel.tweens.FlxTween;
import flixel.tweens.FlxEase;
import Controls.KeyboardScheme;
Expand Down Expand Up @@ -165,7 +166,9 @@ class OptionsMenu extends MusicBeatState
});
updateGroupControls(LanguageManager.getTextString('option_change_keybinds'), 0, 'Vertical');
case 2:
if (FileSystem.exists('mods/global/UI.json')) {
FlxG.switchState(new UISelectState());
}
updateGroupControls("UI Selecter", 12, 'Vertical');
case 3:
FlxG.switchState(new GamePlay());
Expand Down

0 comments on commit d7279f2

Please sign in to comment.