medicine rework
This commit is contained in:
parent
793e2c0158
commit
e3be7d6d1d
7 changed files with 45 additions and 102 deletions
|
|
@ -12,10 +12,12 @@
|
|||
#### Medical Hazards
|
||||
- Added debuff effects for all medical conditions, so you're immediately notified when carrying something hazardous instead of wondering why you have Hunger II. @Pyritie
|
||||
- The hazard effect that previously instantly killed you (which did not spawn a corpse) now gives you Wither III instead. @Pyritie
|
||||
- Early medicines can now also cure medical conditions! Did you think they wouldn't come with side effects?
|
||||
#### Other
|
||||
- Added two more early game mechanical belts, and rubber+ belts are also now more expensive. @Pyritie
|
||||
- Doubled the durability of all space suits @Pyritie
|
||||
- Added a way to convert between vinegar and acetic acid (#2386) @Epicificator
|
||||
- Added a renderer to the electric greenhouse, so now you can visually see your crops grow! @RubenVerg
|
||||
### Bug fixes
|
||||
- Fixed aged sake, vodka, and whiskey losing their buff effects, but for real this time @Pyritie
|
||||
- Fixed fries and cheese curds not being able to be put on burgers. @Redeix
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ const registerTooltips = (event) => {
|
|||
event.addAdvanced(['create:blaze_burner'], (item, advanced, text) => {
|
||||
text.add(1, Text.translate('tfg.tooltip.blaze_burner'))
|
||||
})
|
||||
event.addAdvanced(['tfg:antipoison_pill'], (item, advanced, text) => {
|
||||
text.add(1, Text.translate('tfg.tooltip.antipoison_pill'))
|
||||
})
|
||||
event.addAdvanced(['tfg:antipoison_tablet'], (item, advanced, text) => {
|
||||
text.add(1, Text.translate('tfg.tooltip.antipoison_tablet'))
|
||||
})
|
||||
event.addAdvanced(['tfg:electric_greenhouse'], (item, advanced, text) => {
|
||||
text.add(1, Text.translate('tfg.tooltip.machine.electric_greenhouse_1'));
|
||||
text.add(2, Text.translate('tfg.tooltip.machine.electric_greenhouse_2'));
|
||||
|
|
|
|||
|
|
@ -14,38 +14,32 @@ const pill_event = [
|
|||
|
||||
pill_event.forEach(pill_event => {
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:${pill_event}_pill`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 100)
|
||||
server.runCommandSilent(`effect give ${player.username} minecraft:${pill_event} 480 0 true`)
|
||||
server.runCommandSilent(`playsound minecraft:item.honey_bottle.drink player ${player.username} ${x} ${y} ${z} 10 1.5 1`)
|
||||
});
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:${pill_event}_tablet`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 100)
|
||||
server.runCommandSilent(`effect give ${player.username} minecraft:${pill_event} 1800 0 true`)
|
||||
server.runCommandSilent(`playsound minecraft:item.honey_bottle.drink player ${player.username} ${x} ${y} ${z} 10 1.5 1`)
|
||||
});
|
||||
});
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:antipoison_pill`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 50)
|
||||
event.player.removeEffect('minecraft:poison')
|
||||
server.runCommandSilent(`playsound minecraft:item.honey_bottle.drink player ${player.username} ${x} ${y} ${z} 10 1.5 1`)
|
||||
});
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:antipoison_tablet`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 50)
|
||||
event.player.removeEffect('minecraft:poison')
|
||||
event.player.removeEffect('minecraft:wither')
|
||||
|
|
@ -70,31 +64,24 @@ const salvo_event = [
|
|||
];
|
||||
|
||||
salvo_event.forEach(salvo_event => {
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:${salvo_event}_salvo`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 100)
|
||||
server.runCommandSilent(`effect give ${player.username} minecraft:${salvo_event} 480 0 true`)
|
||||
server.runCommandSilent(`playsound minecraft:item.glow_ink_sac.use player ${player.username} ${x} ${y} ${z} 10 2 1`)
|
||||
});
|
||||
});
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:absorption_salvo`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 200)
|
||||
server.runCommandSilent(`effect give ${player.username} minecraft:absorption 480 4 true`)
|
||||
server.runCommandSilent(`playsound minecraft:item.glow_ink_sac.use player ${player.username} ${x} ${y} ${z} 10 2 1`)
|
||||
});
|
||||
|
||||
ItemEvents.rightClicked(event => {
|
||||
ItemEvents.foodEaten(event => {
|
||||
const { item, server, player, player: { x, y, z } } = event
|
||||
if (item.id !== `tfg:instant_health_salvo`) return
|
||||
item.count--
|
||||
player.addItemCooldown(item, 100)
|
||||
server.runCommandSilent(`effect give ${player.username} minecraft:instant_health 1 1 true`)
|
||||
server.runCommandSilent(`playsound minecraft:item.glow_ink_sac.use player ${player.username} ${x} ${y} ${z} 10 2 1`)
|
||||
});
|
||||
|
|
@ -570,13 +570,4 @@ function registerTFGMedicineRecipes(event) {
|
|||
.EUt(GTValues.VA[GTValues.LV])
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Paracetamol
|
||||
|
||||
event.recipes.firmalife.mixing_bowl()
|
||||
.ingredients(['tfg:regeneration_pill', 'tfg:weakness_pill', 'tfg:antipoison_pill', 'tfg:slowness_pill'], Fluid.of('tfc:vinegar', 250))
|
||||
.outputItem('4x gtceu:paracetamol_pill')
|
||||
.id(`tfg:mixing_bowl/paracetamol`)
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
|
@ -2,6 +2,33 @@
|
|||
|
||||
function registerTFGMedicineItemTags(event) {
|
||||
|
||||
event.add('tfg:medicine', 'tfg:antipoison_pill')
|
||||
event.add('tfg:medicine', 'tfg:antipoison_tablet')
|
||||
event.add('tfg:medicine', 'tfg:haste_pill')
|
||||
event.add('tfg:medicine', 'tfg:haste_tablet')
|
||||
event.add('tfg:medicine', 'tfg:night_vision_pill')
|
||||
event.add('tfg:medicine', 'tfg:night_vision_tablet')
|
||||
event.add('tfg:medicine', 'tfg:poison_pill')
|
||||
event.add('tfg:medicine', 'tfg:poison_tablet')
|
||||
event.add('tfg:medicine', 'tfg:regeneration_pill')
|
||||
event.add('tfg:medicine', 'tfg:regeneration_tablet')
|
||||
event.add('tfg:medicine', 'tfg:slowness_pill')
|
||||
event.add('tfg:medicine', 'tfg:slowness_tablet')
|
||||
event.add('tfg:medicine', 'tfg:speed_pill')
|
||||
event.add('tfg:medicine', 'tfg:speed_tablet')
|
||||
event.add('tfg:medicine', 'tfg:water_breathing_pill')
|
||||
event.add('tfg:medicine', 'tfg:water_breathing_tablet')
|
||||
event.add('tfg:medicine', 'tfg:weakness_pill')
|
||||
event.add('tfg:medicine', 'tfg:weakness_tablet')
|
||||
event.add('tfg:medicine', 'tfg:absorption_salvo')
|
||||
event.add('tfg:medicine', 'tfg:fire_resistance_salvo')
|
||||
event.add('tfg:medicine', 'tfg:invisibility_salvo')
|
||||
event.add('tfg:medicine', 'tfg:luck_salvo')
|
||||
event.add('tfg:medicine', 'tfg:resistance_salvo')
|
||||
event.add('tfg:medicine', 'tfg:instant_health_salvo')
|
||||
event.add('tfg:medicine', 'gtceu:paracetamol_pill')
|
||||
event.add('tfg:medicine', 'gtceu:rad_away_pill')
|
||||
|
||||
event.add('tfg:antipoison_ingredients', 'tfc:plant/blood_lily')
|
||||
event.add('tfg:antipoison_ingredients', 'tfc:plant/pistia')
|
||||
event.add('tfg:antipoison_ingredients', 'tfc:powder/bismuthinite')
|
||||
|
|
@ -46,6 +73,9 @@ function registerTFGMedicineItemTags(event) {
|
|||
event.add('tfg:night_vision_ingredients', 'tfg:sunflower_product')
|
||||
|
||||
event.add('tfg:invisibility_ingredients', 'tfc:plant/calendula')
|
||||
event.add('tfg:invisibility_ingredients', 'tfc:plant/snapdragon_pink')
|
||||
|
||||
event.add('tfg:absorption_ingredients', 'tfc:plant/poppy')
|
||||
event.add('tfg:absorption_ingredients', 'beneath:burpflower')
|
||||
|
||||
event.add('tfg:fire_resistance_ingredients', 'tfc:plant/cattail')
|
||||
|
|
@ -59,9 +89,6 @@ function registerTFGMedicineItemTags(event) {
|
|||
event.add('tfg:instant_health_ingredients', 'tfc:plant/foxglove')
|
||||
event.add('tfg:instant_health_ingredients', 'tfc:plant/artists_conk')
|
||||
|
||||
event.add('tfg:absorption_ingredients', 'tfc:plant/poppy')
|
||||
event.add('tfg:invisibility_ingredients', 'tfc:plant/snapdragon_pink')
|
||||
|
||||
event.add('tfg:luck_ingredients', 'tfc:plant/goldenrod')
|
||||
event.add('tfg:luck_ingredients', 'tfc:plant/heather')
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
// priority: 0
|
||||
"use strict";
|
||||
|
||||
function registerTFGMedicineItems(event) {
|
||||
const pill = [
|
||||
'haste',
|
||||
'night_vision',
|
||||
'poison',
|
||||
'regeneration',
|
||||
'slowness',
|
||||
'speed',
|
||||
'water_breathing',
|
||||
'weakness'
|
||||
]
|
||||
|
||||
const pill_names = [
|
||||
'Haste',
|
||||
'Night Vision',
|
||||
'Poison',
|
||||
'Regeneration',
|
||||
'Slowness',
|
||||
'Speed',
|
||||
'Water Breathing',
|
||||
'Weakness'
|
||||
]
|
||||
|
||||
pill.forEach((pill_array, index) => {
|
||||
const pill_names_array = pill_names[index];
|
||||
|
||||
event.create(`tfg:${pill_array}_pill`)
|
||||
.tooltip(`§9${pill_names_array} (08:00)`)
|
||||
|
||||
event.create(`tfg:${pill_array}_tablet`)
|
||||
.tooltip(`§9${pill_names_array} (30:00)`)
|
||||
})
|
||||
|
||||
event.create(`tfg:antipoison_pill`)
|
||||
.tooltip(`§9Cures Poison`)
|
||||
|
||||
event.create(`tfg:antipoison_tablet`)
|
||||
.tooltip(`§9Cures All Harmful Effects`)
|
||||
|
||||
//salvos
|
||||
|
||||
const salvo = [
|
||||
'absorption',
|
||||
'fire_resistance',
|
||||
'invisibility',
|
||||
'luck',
|
||||
'resistance'
|
||||
]
|
||||
const salvo_names = [
|
||||
'Absorption',
|
||||
'Fire Resistance',
|
||||
'Invisibility',
|
||||
'Luck',
|
||||
'Resistance'
|
||||
]
|
||||
|
||||
salvo.forEach((salvo_array, index) => {
|
||||
const salvo_names_array = salvo_names[index];
|
||||
|
||||
event.create(`tfg:${salvo_array}_salvo`)
|
||||
.tooltip(`§9${salvo_names_array} (08:00)`)
|
||||
})
|
||||
|
||||
event.create(`tfg:instant_health_salvo`)
|
||||
.tooltip(`§9Instant Health II`)
|
||||
}
|
||||
|
|
@ -11,7 +11,6 @@ const registerTFGItems = (event) => {
|
|||
registerTFGPrimitiveItems(event);
|
||||
registerTFGNuclearItems(event);
|
||||
registerTFGWoodItems(event);
|
||||
registerTFGMedicineItems(event);
|
||||
registerTFGAircraftItems(event);
|
||||
registerTFGSpaceItems(event);
|
||||
registerTFGMarsItems(event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue