Skip to content

Commit

Permalink
rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolka9144 committed Sep 2, 2024
1 parent af95918 commit 4912f1b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Friday Night Funkin' - P-Slice Engine
This engine was originally meant to be a playground for making Psych Engine compatible with linux, but after some attempts in porting V-Slice content became a crossover between Psych Engine and V-Slice (also known as base game).

# Features

> custom stickers
Mods made for P-Slice now can select which sticker pack and set to use on the next sticker transition.

``setPropertyFromClass("substates.StickerSubState", "STICKER_SET", "sticker-set-1")`` defines which sticker set to use (it's the name of one of the directories in `images/transitionSwag/`)

``setPropertyFromClass("substates.StickerSubState", "STICKER_PACK", "all")`` defines a pack of stickers to use from the current set. If such pack doesn't exist all defined stickers in a ".json" file will be used.

> custom freeplay icons
You can now put V-slice freeplay icons into `images/freeplay/icons/{charId}pixel.png` where {charId} is the name of the character icon.

> custom commercials
If your mod affects entire engine (either is global or loaded as the first mod), you can add additional commercials in `videos/commercials`
2 changes: 1 addition & 1 deletion gitVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1
1.2
8 changes: 7 additions & 1 deletion source/AttractState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ class AttractState extends MusicBeatState
{
//vid.zIndex = 0;
vid.bitmap.onEndReached.add(onAttractEnd);
vid.bitmap.onTextureSetup.add(function()
{
vid.setGraphicSize(FlxG.width);
vid.updateHitbox();
vid.screenCenter();
});

add(vid);
vid.play(filePath, false);
Expand Down Expand Up @@ -160,7 +166,7 @@ class AttractState extends MusicBeatState
vid.destroy();
vid = null;
#end
FlxG.sound.playMusic(Paths.music('freakyMenu'), 0.8);
FlxG.sound.playMusic(Paths.music('freakyMenu'), 0.7);
FlxG.switchState(new TitleState());
}
}
3 changes: 3 additions & 0 deletions source/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ class TitleState extends MusicBeatState
{
if (!skippedIntro)
{
#if VIDEOS_ALLOWED
FlxG.sound.music.onComplete = moveToAttract;
#end
if (playJingle) // Ignore deez
{
var easteregg:String = FlxG.save.data.psychDevsEasterEgg;
Expand Down
2 changes: 1 addition & 1 deletion source/substates/StickerSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class StickerSubState extends MusicBeatSubstate

// get a random sticker
var sticker:String = FlxG.random.getObject(stickerSetCollection);
sticky = new StickerSprite(0, 0, stickers.name, sticker);
sticky = new StickerSprite(0, 0, STICKER_SET, sticker);
}
else {
sticky = new StickerSprite(0, 0, null, "justBf");
Expand Down

0 comments on commit 4912f1b

Please sign in to comment.