You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 15:06:19 +00:00
feat(items): Item.getDisplayName() — furnidata name with public_name fallback
This commit is contained in:
@@ -167,6 +167,17 @@ public class Item implements ISerialize {
|
|||||||
return this.fullName;
|
return this.fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display name for user-facing/log output, sourced from furnidata (by classname).
|
||||||
|
* Falls back to the DB public_name when furnidata has no entry or names are disabled.
|
||||||
|
* Never returns null.
|
||||||
|
*/
|
||||||
|
public String getDisplayName() {
|
||||||
|
FurnitureTextProvider provider = Emulator.getGameEnvironment().getFurnitureTextProvider();
|
||||||
|
String name = (provider != null) ? provider.getName(this.name) : null;
|
||||||
|
return (name != null && !name.isBlank()) ? name : this.fullName;
|
||||||
|
}
|
||||||
|
|
||||||
public FurnitureType getType() {
|
public FurnitureType getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user