Skip to content

Commit

Permalink
sound subtitles and fewer magic strings
Browse files Browse the repository at this point in the history
  • Loading branch information
parzivail committed Jan 11, 2024
1 parent 4f0d3d6 commit b0139a7
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 76 deletions.
39 changes: 39 additions & 0 deletions projects/pswg/src/main/resources/assets/pswg/sounds.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"lightsaber.start.classic": {
"subtitle": "subtitle.pswg.lightsaber.start",
"sounds": [
"pswg:lightsaber/start/classic"
]
},
"lightsaber.stop.classic": {
"subtitle": "subtitle.pswg.lightsaber.stop",
"sounds": [
"pswg:lightsaber/stop/classic"
]
},
"lightsaber.idle.classic": {
"subtitle": "subtitle.pswg.lightsaber.idle",
"sounds": [
{
"name": "pswg:lightsaber/idle/classic",
Expand All @@ -18,172 +21,206 @@
]
},
"blaster.flyby": {
"subtitle": "subtitle.pswg.blaster.flyby",
"sounds": [
"pswg:blaster/flyby/a",
"pswg:blaster/flyby/b"
]
},
"blaster.reload": {
"subtitle": "subtitle.pswg.blaster.reload",
"sounds": [
"pswg:blaster/reload"
]
},
"blaster.dryfire": {
"subtitle": "subtitle.pswg.blaster.dryfire",
"sounds": [
"pswg:blaster/dryfire"
]
},
"blaster.stun": {
"subtitle": "subtitle.pswg.blaster.stun",
"sounds": [
"pswg:blaster/stun"
]
},
"blaster.fire.a280": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/a280"
]
},
"blaster.fire.bike": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/bike"
]
},
"blaster.fire.bowcaster": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/bowcaster"
]
},
"blaster.fire.cycler": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/cycler"
]
},
"blaster.fire.dc15": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dc15"
]
},
"blaster.fire.dc17": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dc17"
]
},
"blaster.fire.dh17": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dh17"
]
},
"blaster.fire.dl18": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dl18"
]
},
"blaster.fire.dl44": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dl44"
]
},
"blaster.fire.dlt19d": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dlt19d"
]
},
"blaster.fire.dlt19": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dlt19"
]
},
"blaster.fire.dlt20a": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/dlt20a"
]
},
"blaster.fire.e11": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/e11"
]
},
"blaster.fire.ee3": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/ee3"
]
},
"blaster.fire.eweb": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/eweb"
]
},
"blaster.fire.ion": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/ion"
]
},
"blaster.fire.rk3": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/rk3"
]
},
"blaster.fire.rt97c": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/rt97c"
]
},
"blaster.fire.se14c": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/se14c"
]
},
"blaster.fire.t21b": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/t21b"
]
},
"blaster.fire.t21": {
"subtitle": "subtitle.pswg.blaster.fire",
"sounds": [
"pswg:blaster/fire/t21"
]
},
"blaster.bypass.primary": {
"subtitle": "subtitle.pswg.blaster.bypass",
"sounds": [
"pswg:blaster/bypass/primary"
]
},
"blaster.bypass.secondary": {
"subtitle": "subtitle.pswg.blaster.bypass",
"sounds": [
"pswg:blaster/bypass/secondary"
]
},
"blaster.bypass.secondary_end": {
"subtitle": "subtitle.pswg.blaster.bypass",
"sounds": [
"pswg:blaster/bypass/secondary_end"
]
},
"blaster.bypass.failed": {
"subtitle": "subtitle.pswg.blaster.bypass",
"sounds": [
"pswg:blaster/bypass/failed"
]
},
"blaster.vent": {
"subtitle": "subtitle.pswg.blaster.vent",
"sounds": [
"pswg:blaster/vent"
]
},
"blaster.overheat": {
"subtitle": "subtitle.pswg.blaster.overheat",
"sounds": [
"pswg:blaster/overheat"
]
},
"blaster.cooling": {
"subtitle": "subtitle.pswg.blaster.cool",
"sounds": [
"pswg:blaster/cooling"
]
},
"blaster.recharge": {
"subtitle": "subtitle.pswg.blaster.recharge",
"sounds": [
"pswg:blaster/recharge"
]
},
"ship.blaster.fire.xwingt65b": {
"subtitle": "subtitle.pswg.ship.blaster",
"sounds": [
{
"name": "pswg:ship/xwing/fire",
Expand All @@ -192,6 +229,7 @@
]
},
"ship.exterior.xwingt65b": {
"subtitle": "subtitle.pswg.ship.exterior.xwingt65b",
"sounds": [
{
"name": "pswg:ship/xwing/exterior",
Expand All @@ -200,6 +238,7 @@
]
},
"door.pneumatic": {
"subtitle": "subtitle.pswg.door.pneumatic",
"sounds": [
"pswg:door/pneumatic"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
import net.minecraft.client.option.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.damage.DamageType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.registry.Registries;
import net.minecraft.registry.RegistryKey;
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.text.TranslatableTextContent;
import net.minecraft.util.Identifier;

import java.util.List;
Expand Down Expand Up @@ -57,11 +53,6 @@ public LanguageBuilder category(String value)
return entry("category").modid().dot(value);
}

public LanguageBuilder cause_of_death(RegistryKey<DamageType> value)
{
return entry("death").dot("attack").modid().dot(value.getValue().getPath());
}

public LanguageBuilder command(String value)
{
return entry("command").modid().dot(value);
Expand Down Expand Up @@ -98,11 +89,6 @@ public LanguageBuilder status(Item item)
return entry(TooltipUtil.getStatusKey(item));
}

public LanguageBuilder itemGroup(ItemGroup value)
{
return new LanguageBuilder(locale, ((TranslatableTextContent)value.getDisplayName().getContent()).getKey());
}

public LanguageBuilder key(KeyBinding key)
{
return new LanguageBuilder(locale, key.getTranslationKey());
Expand Down
Loading

0 comments on commit b0139a7

Please sign in to comment.