Files
CodenameEngine/source/funkin/menus/credits/CreditsCodename.hx
T
6e23da8e86 Add more stuff from the OG game and more PART 1 (#228)
* senpai fucking dies

* final flash fadeout

* made cutscene not play on restart

* winter horrorland + fixes

* fix for pixel perfect shader

* trail + fixes

* better + shaking

last update about it, i swear

* never fucking mind + repacks + accuracy

* more fixes + chromatic aberration

* i hate how pixel shader fucks everything up

* aberration in the cutscene & its cool twitch

* camera beats when twitching

* tank stuff pt1

now the cutscenes look 99% like og (still gotta freeze the stage animated sprites n stuff)
PS: Deleting the lipSycn function in ugh and guns cutscenes cause its not needed + sometimes breaks the animations so lets just leave it in stress only like it was in og

* week 5 completed + retrocompatibility with altanim

now chrima parents work

* philly train

* gameplay shaders option

better adding it now

* tank stuff pt2

* blue balled text (death counter)

* winter horrorland better rework WIP

colored vignette usable by everyone (you can change its color, amount and strength)
wip cuz i wanna edit the amount/strength based on the zoom, i'll do later, now i dont have time gotta do christmas irl stuff yay

* winter horrorland better rework completed

* seen cutscene variable

finally

* even better cutscenes

* oops

* tank stuff pt3

* tank stuff pt4

WIP running tanks

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>

* tankstuff pt4.5

imma check tmr why do some tankmen spawn too much up

* tank stuff pt4.75

* dumb

* tank stuff pt 4.9

* type on xml sprite type fix and more

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>

---------

Co-authored-by: Ne_Eo <NeeEoo@users.noreply.github.com>
Co-authored-by: lunarcleint <88809950+lunarcleint@users.noreply.github.com>
2024-02-04 00:54:00 -07:00

69 lines
2.2 KiB
Haxe

package funkin.menus.credits;
import funkin.backend.system.github.GitHub;
import funkin.options.type.GithubIconOption;
using StringTools;
class CreditsCodename extends funkin.options.OptionsScreen {
public var error:Bool = false;
public override function new()
{
super("Codename Engine", "All the contributors of the engine! - Press RESET to update the list (One reset per 2 minutes).");
checkUpdate();
displayList();
}
public override function update(elapsed:Float) {
if (funkin.options.PlayerSettings.solo.controls.RESET && checkUpdate()) {
displayList();
updateMenuDesc();
}
super.update(elapsed);
}
public function checkUpdate():Bool {
var curTime:Float = Date.now().getTime();
if(Options.lastUpdated != null && curTime < Options.lastUpdated + 120000) return false; // Fuck you Github rate limits
Options.lastUpdated = curTime;
error = false;
//Main.execAsync(function() {
var idk = GitHub.getContributors("FNF-CNE-Devs", "CodenameEngine", function(e) {
error = true;
var errMsg:String = ~/\d+.\d+.\d+.\d+/.replace(e.message, "[Your IP]"); // Removing sensitive stuff
errMsg = 'Error while trying to download contributors list:\n$errMsg';
Logs.traceColored([Logs.logText(errMsg.replace('\n', ' '), RED)], ERROR);
funkin.backend.utils.NativeAPI.showMessageBox("Codename Engine Warning", errMsg, MSG_WARNING);
});
//});
if(error) return false;
Options.contributors = idk;
trace('List Updated!');
return true;
}
public function displayList() {
//if (curSelected > Options.contributors.length - 1) changeSelection(-(curSelected - (Options.contributors.length - 1)));
if (curSelected > Options.contributors.length - 1) curSelected = Options.contributors.length - 1;
changeSelection(0, true);
while (members.length > 0) {
members[0].destroy();
remove(members[0], true);
}
var totalContributions = 0;
for(c in Options.contributors) totalContributions += c.contributions;
for(c in Options.contributors) {
var opt:GithubIconOption = new GithubIconOption(
c,
'Total Contributions: ${c.contributions} / ${totalContributions} (${FlxMath.roundDecimal(c.contributions / totalContributions * 100, 2)}%) - Select to open GitHub account'
);
add(opt);
}
}
}