Fellies/kubejs[vs]/server_scripts/starting_items.js

11 lines
3.6 KiB
JavaScript

events.listen('player.logged_in', function (event) {
// Only trigger if the player is lacking "starting_items".
if (!event.hasGameStage('starting_items')) {
// Give the player a custom Akashic Tome with the manuals for several mods.
event.player.give({item: 'akashictome:tome', nbt: {"akashictome:is_morphing":true,"akashictome:data":{industrialforegoing:{id:"patchouli:guide_book",Count:1,tag:{"akashictome:displayName":{text:"Industrial Foregoing's Manual"},"patchouli:book":"industrialforegoing:industrial_foregoing","akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Industrial Foregoing\'s Manual"}]}'}}},powah:{id:"powah:book",Count:1,tag:{"akashictome:displayName":{text:"Manual (Powah!)"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Manual (Powah!)"}]}'}}},botania:{id:"botania:lexicon",Count:1,tag:{"akashictome:displayName":{text:"Lexica Botania"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Lexica Botania"}]}'}}},mysticalworld:{id:"mysticalworld:encyclopedia",Count:true,tag:{"akashictome:displayName":{text:"Encyclopædia Mysticum"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Encyclopædia Mysticum"}]}'}}},astralsorcery:{id:"astralsorcery:tome",Count:1,tag:{"akashictome:displayName":{text:"Astral Tome"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Astral Tome"}]}'}}},immersiveengineering:{id:"immersiveengineering:manual",Count:1,tag:{"akashictome:displayName":{text:"Engineer's Manual"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Engineer\'s Manual"}]}'}}},psi:{id:"patchouli:guide_book",Count:1,tag:{"akashictome:displayName":{text:"Encyclopaedia Psionica"},"patchouli:book":"psi:encyclopaedia_psionica","akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Encyclopaedia Psionica"}]}'}}},alexsmobs:{id:"alexsmobs:animal_dictionary",Count:true,tag:{"akashictome:displayName":{text:"Animal Dictionary"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Animal Dictionary"}]}'}}},bloodmagic:{id:"patchouli:guide_book",Count:1,tag:{"akashictome:displayName":{text:"Sanguine Scientiem"},"patchouli:book":"bloodmagic:guide","akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Sanguine Scientiem"}]}'}}},eidolon:{id:"eidolon:codex",Count:1,tag:{"akashictome:displayName":{text:"Ars Ecclesia"},"akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Ars Ecclesia"}]}'}}},transport:{id:"patchouli:guide_book",Count:1,tag:{"akashictome:displayName":{text:"Advanced Transport"},"patchouli:book":"transport:guide","akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Advanced Transport"}]}'}}},engineersdecor:{id:"patchouli:guide_book",Count:1,tag:{"akashictome:displayName":{text:"Engineer's Decor"},"patchouli:book":"engineersdecor:engineersdecor_manual","akashictome:is_morphing":true,display:{Name:'{"translate":"akashictome.sudo_name","with":[{"color":"green","text":"Engineer\'s Decor"}]}'}}}}}})
// Add the Game Stage, preventing them getting it again.
event.addGameStage('starting_items')
}
})