High Tier saws can silk harvest ice (#3019)

* High Tier saws can silk harvest packed ice

* Update changelog
This commit is contained in:
Nebby 2026-02-10 08:53:48 -03:00 committed by GitHub
parent d122cba3f5
commit a7a01a96b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 2 deletions

View file

@ -521,4 +521,16 @@ const registerTooltips = (event) => {
event.addAdvanced(['gtceu:ice_bucket'], (item, advanced, text) => {
text.add(1, Text.translate('tfg.tooltip.cooling_foods'));
})
// Saw can silk harvest ice
//This kinda sucks, but it works. We're basically getting the default "silk_ice" harvesting tooltip, getting the index, then removing it.
//Then, we insert on that index our custom tooltip that tells the player it harvests ALL ice blocks
event.addAdvanced(['#tfg:silk_harvest_ice'], (item, advanced, text) => {
const sculptorKey = "item.gtceu.tool.behavior.silk_ice";
let keyToRemove = text.find(tip => tip.toString().indexOf(sculptorKey) != -1);
let indexOf = text.findIndex(tip => tip.toString().indexOf(sculptorKey) != -1);
text.remove(keyToRemove);
text.add(indexOf, Text.translate("tfg.tooltip.tool_behaviour.silk_ice"));
})
}