Allow PlaySound To Work Normally With High IPT World Processor (#10083)

* allow global sound to play more than once per frame

might need an arc pr for the positional

* carhash

* thing

* extra field

* change "check frame" to "limit"

* description

* Update core/assets/bundles/bundle.properties

---------

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
Mythril382
2024-08-06 23:14:29 +08:00
committed by GitHub
parent 548c6961eb
commit bace523de4
3 changed files with 13 additions and 6 deletions

View File

@@ -2127,7 +2127,7 @@ public class LStatements{
@RegisterStatement("playsound")
public static class PlaySoundStatement extends LStatement{
public boolean positional;
public String id = "@sfx-pew", volume = "1", pitch = "1", pan = "0", x = "@thisx", y = "@thisy";
public String id = "@sfx-pew", volume = "1", pitch = "1", pan = "0", x = "@thisx", y = "@thisy", limit = "true";
@Override
public void build(Table table){
@@ -2169,6 +2169,10 @@ public class LStatements{
}else{
fieldst(table, "pan", pan, str -> pan = str);
}
table.row();
fieldst(table, "limit", limit, str -> limit = str);
}
@Override
@@ -2178,7 +2182,7 @@ public class LStatements{
@Override
public LInstruction build(LAssembler builder){
return new PlaySoundI(positional, builder.var(id), builder.var(volume), builder.var(pitch), builder.var(pan), builder.var(x), builder.var(y));
return new PlaySoundI(positional, builder.var(id), builder.var(volume), builder.var(pitch), builder.var(pan), builder.var(x), builder.var(y), builder.var(limit));
}
@Override