Skip to content

Commit

Permalink
multiplayern'n't
Browse files Browse the repository at this point in the history
  • Loading branch information
sk7725 committed Jan 19, 2021
1 parent 4084ea6 commit 369b155
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ stat.dphealth = {0}*payload health*distance(blocks)
# Settings
setting.slimeeffect.name = Animated Slime [lightgray](requires animated shields)[]
setting.correctview.name = Top-down Payload View
setting.accelballs.name = Animated Accelerators

# UI
ui.teamalert = Team {0} was attacked by team {1}!
Expand Down
3 changes: 2 additions & 1 deletion assets/bundles/bundle_ko.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod.betamindy.name = [accent]Beta[][white]Mindy[] [lightgray]\uBCA0\uD0C0\uBBFC\uB514[]
mod.betamindy.short = [#b59e72]\uD63C\uB3C8\uC758 \uB370\uBAA8[]
mod.betamindy.short = [#b59e72]Demo of Chaos Itself[]
mod.betamindy.description = \uCCAB [accent]Java[] \uBAA8\uB4DC \uC2E0\uC791! [cyan]sk7725/Commandblocks[]\uACFC \uBE44\uACAC\uB420 \uB9CC\uD55C \uD63C\uB3C8!\n\n[green]\uAE30\uC5EC\uC790[]: \uC601\uAC10, \uB808\uC774\uD3EC\uC2A4, GlennFolker, EyeofDarkness, Voz-Duh

# Pistons
Expand Down Expand Up @@ -76,6 +76,7 @@ stat.dphealth = {0}x\uD654\uBB3C \uCCB4\uB825x\uBE44\uAC70\uB9AC(\uBE14\uB85D)
# Settings
setting.slimeeffect.name = \uC2AC\uB77C\uC784 \uC560\uB2C8\uBA54\uC774\uC158 \uD6A8\uACFC [lightgray](\uBCF4\uD638\uB9C9 \uC560\uB2C8\uBA54\uC774\uC158 \uD544\uC694)[]
setting.correctview.name = \uC704\uC5D0\uC11C \uBCF8 \uD654\uBB3C
setting.accelballs.name = \uC6C0\uC9C1\uC774\uB294 \uAC00\uC18D\uB3C4\uACC4

# UI
ui.teamalert = \uD300 {0}\uC774 \uD300 {1}\uC5D0\uAC8C \uACF5\uACA9\uB2F9\uD588\uC2B5\uB2C8\uB2E4!
Expand Down
9 changes: 6 additions & 3 deletions src/betamindy/BetaMindy.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

public class BetaMindy extends Mod{
public static final String githubURL = "https://github.com/sk7725/BetaMindy";
public static final String shortName = "[#b59e72]Demo of Chaos Itself[]"; //do not use bundles unless you want to region-lock the multiplayer experience
public static SettingAdder settingAdder = new SettingAdder();
public static XeloUtil pushUtil = new XeloUtil();
public static MobileFunctions mobileUtil = new MobileFunctions();
Expand All @@ -34,7 +35,7 @@ public BetaMindy() {
MindySounds.dispose();
});

Core.settings.defaults("slimeeffect", true, "correctview", false);
Core.settings.defaults("slimeeffect", true, "correctview", false, "accelballs", true);
Events.on(ClientLoadEvent.class, e -> {
settingAdder.init();
});
Expand All @@ -44,16 +45,18 @@ public BetaMindy() {
public void init(){
Vars.enableConsole = true;

LoadedMod mod = Vars.mods.locateMod("betamindy");
if(!Vars.headless){
//Partial credits to ProjectUnity
LoadedMod mod = Vars.mods.locateMod("betamindy");

Func<String, String> stringf = value -> Core.bundle.get("mod." + value);

mod.meta.displayName = stringf.get(mod.meta.name + ".name");
mod.meta.description = stringf.get(mod.meta.name + ".description");
mod.meta.version = mod.meta.version + "\n" + stringf.get(mod.meta.name + ".short");

mod.meta.author = "[royal]" + mod.meta.author + "[]";
}
mod.meta.version = mod.meta.version + "\n" + shortName;
}

@Override
Expand Down
1 change: 1 addition & 0 deletions src/betamindy/content/SettingAdder.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public void init(){
Core.settings.put("uiscalechanged", false);

addGraphicSetting("slimeeffect");
addGraphicSetting("accelballs");
addGraphicSetting("correctview");

Core.settings.put("uiscalechanged", tmp);
Expand Down
10 changes: 7 additions & 3 deletions src/betamindy/world/blocks/power/AccelBlock.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package betamindy.world.blocks.power;

import arc.Core;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.math.geom.Geometry;
Expand Down Expand Up @@ -51,9 +52,12 @@ public class AccelBuild extends Building {
@Override
public void draw(){
Draw.rect(baseRegion[rotation % 2], x, y);
int back = lastback ? 2 : 0;
float off = Mathf.clamp((ballTicks - ballTimer.getTime(ballid)) / ballTicks);
Draw.rect(ballRegion, x + Geometry.d4x[rotation % 2 + back] * 3f * off, y + Geometry.d4y[rotation % 2 + back] * 3f * off);
if(Core.settings.getBool("accelballs")){
int back = lastback ? 2 : 0;
float off = Mathf.clamp((ballTicks - ballTimer.getTime(ballid)) / ballTicks);
Draw.rect(ballRegion, x + Geometry.d4x[rotation % 2 + back] * 3f * off, y + Geometry.d4y[rotation % 2 + back] * 3f * off);
}
else Draw.rect(ballRegion, x, y);
}

public boolean wasMoved(int n){
Expand Down

0 comments on commit 369b155

Please sign in to comment.