260 lines
8.4 KiB
JavaScript
260 lines
8.4 KiB
JavaScript
|
ServerEvents.recipes(event => {
|
||
|
const SatelliteStationStructure =
|
||
|
{
|
||
|
"type": "custommachinery:structure",
|
||
|
"pattern": [
|
||
|
[
|
||
|
"ABBBA",
|
||
|
"ABBBA",
|
||
|
"ABBBA",
|
||
|
"ABBBA",
|
||
|
"BBBBB",
|
||
|
"BNNNB",
|
||
|
"BNONB",
|
||
|
" NNN "
|
||
|
],
|
||
|
[
|
||
|
"CDDDC",
|
||
|
"CFFFC",
|
||
|
"CFFFC",
|
||
|
"CFFFC",
|
||
|
"CDDDC",
|
||
|
"MLLLM",
|
||
|
" BPB ",
|
||
|
" m "
|
||
|
],
|
||
|
[
|
||
|
"EDDDE",
|
||
|
"G G",
|
||
|
"G G",
|
||
|
"G G",
|
||
|
"EDDDE",
|
||
|
" ",
|
||
|
" BPB ",
|
||
|
" "
|
||
|
]
|
||
|
],
|
||
|
"keys": {
|
||
|
"C": "ad_astra:steel_pillar",
|
||
|
"N": "design_decor:cast_iron_boiler_structure",
|
||
|
"G": "design_decor:iron_railing",
|
||
|
"M": "design_decor:cast_iron_boiler",
|
||
|
"B": "create:industrial_iron_block",
|
||
|
"L": "design_decor:industrial_iron_boiler",
|
||
|
"P": "create:metal_girder",
|
||
|
"D": "design_decor:ornate_grate",
|
||
|
"E": "design_decor:andesite_floodlight",
|
||
|
"F": "create:depot",
|
||
|
"A": "ad_astra:steel_plating_slab",
|
||
|
"O": "design_decor:cast_iron_boiler_large"
|
||
|
},
|
||
|
"jei": true
|
||
|
}
|
||
|
const SatelliteStationUp = {
|
||
|
"type": "custommachinery:command",
|
||
|
"phase": "starting",
|
||
|
"command": "/function dut:satellite/set_satellite_station_up",
|
||
|
"log": false,
|
||
|
"permissionlevel": 5
|
||
|
}
|
||
|
const SatelliteStationDown = {
|
||
|
"type": "custommachinery:command",
|
||
|
"phase": "starting",
|
||
|
"delay": 0.6,
|
||
|
"command": "/function dut:satellite/set_satellite_station_down",
|
||
|
"log": false,
|
||
|
"permissionlevel": 5
|
||
|
}
|
||
|
const SatelliteStationBiome = {
|
||
|
"type": "custommachinery:biome",
|
||
|
"filter": ["ad_astra:orbit"],
|
||
|
"blacklist": false
|
||
|
}
|
||
|
const SatelliteStationDataIn = SatelliteStationItem("kubejs:navigate_data_empty", 4, "input")
|
||
|
function SatelliteStationDurability(item, amount, mode,breakable) {
|
||
|
return ({
|
||
|
"type": "custommachinery:durability",
|
||
|
"mode": mode,
|
||
|
"item": item,
|
||
|
"amount": amount,
|
||
|
"break":breakable
|
||
|
})
|
||
|
}
|
||
|
function SatelliteStationFluid(fluid, amount) {
|
||
|
return ({
|
||
|
"type": "custommachinery:fluid",
|
||
|
"mode": "input",
|
||
|
"fluid": fluid,
|
||
|
"amount": amount
|
||
|
})
|
||
|
}
|
||
|
function SatelliteStationItem(item, amount, mode) {
|
||
|
return ({
|
||
|
"type": "custommachinery:item",
|
||
|
"mode": mode,
|
||
|
"item": item,
|
||
|
"amount": amount
|
||
|
})
|
||
|
}
|
||
|
function SatelliteStationItemChance(item, amount, mode, chance) {
|
||
|
return ({
|
||
|
"type": "custommachinery:item",
|
||
|
"mode": mode,
|
||
|
"item": item,
|
||
|
"amount": amount,
|
||
|
"chance": chance
|
||
|
})
|
||
|
}
|
||
|
function SatelliteStationFliter(item) {
|
||
|
return ({
|
||
|
"type": "custommachinery:item_filter",
|
||
|
"ingredient": { "item": item },
|
||
|
"slot": "filter_data"
|
||
|
})
|
||
|
}
|
||
|
function SatelliteStationModule(item) {
|
||
|
return ({
|
||
|
"type": "custommachinery:item",
|
||
|
"mode": "input",
|
||
|
"item": item,
|
||
|
"amount": 1
|
||
|
}, {
|
||
|
"type": "custommachinery:item",
|
||
|
"mode": "output",
|
||
|
"item": item,
|
||
|
"amount": 1
|
||
|
})
|
||
|
}
|
||
|
function SatelliteStationGetData(filter, dataType) {
|
||
|
event.custom({
|
||
|
"type": "custommachinery:custom_machine",
|
||
|
"machine": "dut:satellite_station",
|
||
|
"time": 480,
|
||
|
"priority": 2,
|
||
|
"error": true,
|
||
|
"requirements": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationUp,
|
||
|
SatelliteStationDown,
|
||
|
SatelliteStationDataIn,
|
||
|
SatelliteStationFliter(filter),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_module" , 1, "input"),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_module" , 1, "output"),
|
||
|
SatelliteStationDurability("kubejs:satellite", 1, "input",false),
|
||
|
SatelliteStationDurability("kubejs:brass_hard_disk", 32, "input",true),
|
||
|
SatelliteStationItem("kubejs:navigate_data_" + dataType, 2, "output"),
|
||
|
SatelliteStationItem("kubejs:navigate_data_" + dataType + "_orbit", 2, "output")
|
||
|
],
|
||
|
"jei": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationDataIn,
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_module" , 1, "input"),
|
||
|
SatelliteStationDurability("kubejs:satellite", 1, "input",false),
|
||
|
SatelliteStationDurability("kubejs:brass_hard_disk", 32, "input",true),
|
||
|
SatelliteStationItem("kubejs:navigate_data_" + dataType, 2, "output"),
|
||
|
SatelliteStationItem("kubejs:navigate_data_" + dataType + "_orbit", 2, "output")
|
||
|
]
|
||
|
}).id("dut_create:satellite_station/data_" + filter.split(":")[1])
|
||
|
}
|
||
|
|
||
|
event.custom({
|
||
|
"type": "custommachinery:custom_machine",
|
||
|
"machine": "dut:satellite_station",
|
||
|
"time": 10,
|
||
|
"priority": 1,
|
||
|
"hidden": false,
|
||
|
"error": true,
|
||
|
"requirements": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationDurability("kubejs:satellite", 1, "output",false),
|
||
|
SatelliteStationItem("kubejs:parts_box", 1, "input"),
|
||
|
SatelliteStationItem("kubejs:radiator", 1, "input"),
|
||
|
SatelliteStationFluid("ad_astra:hydrogen", 500)
|
||
|
]
|
||
|
}).id("dut_create:satellite_station/repair")
|
||
|
event.custom({
|
||
|
"type": "custommachinery:custom_machine",
|
||
|
"machine": "dut:satellite_station",
|
||
|
"time": 120,
|
||
|
"priority": 3,
|
||
|
"hidden": false,
|
||
|
"error": true,
|
||
|
"requirements": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationDurability("kubejs:satellite", 12, "output",false),
|
||
|
SatelliteStationItem("kubejs:parts_box", 12, "input"),
|
||
|
SatelliteStationItem("kubejs:radiator", 12, "input"),
|
||
|
SatelliteStationFluid("ad_astra:hydrogen", 6000)
|
||
|
]
|
||
|
}).id("dut_create:satellite_station/repair_full")
|
||
|
//谐振原虫
|
||
|
event.custom({
|
||
|
"type": "custommachinery:custom_machine",
|
||
|
"machine": "dut:satellite_station",
|
||
|
"time": 480,
|
||
|
"priority": 2,
|
||
|
"hidden": false,
|
||
|
"error": true,
|
||
|
"requirements": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationUp,
|
||
|
SatelliteStationDown,
|
||
|
SatelliteStationItem("kubejs:culture_bin" , 1, "input"),
|
||
|
SatelliteStationItem("kubejs:culture_bin" , 1, "output"),
|
||
|
SatelliteStationDurability("kubejs:satellite", 3, "input",false),
|
||
|
SatelliteStationItem("kubejs:resonant_bacteria", 4, "input"),
|
||
|
SatelliteStationItem("kubejs:resonant_bacteria", 8, "output"),
|
||
|
SatelliteStationItemChance("kubejs:resonant_bacteria", 8, "output", 0.5)
|
||
|
],
|
||
|
"jei": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationItem("kubejs:culture_bin" , 1, "input"),
|
||
|
SatelliteStationDurability("kubejs:satellite", 3, "input"),
|
||
|
SatelliteStationItem("kubejs:resonant_bacteria", 4, "input"),
|
||
|
SatelliteStationItem("kubejs:resonant_bacteria", 8, "output"),
|
||
|
SatelliteStationItemChance("kubejs:resonant_bacteria", 8, "output", 0.5)
|
||
|
]
|
||
|
}).id("dut_create:satellite_station/resonant_bacteria")
|
||
|
//测地数据
|
||
|
event.custom({
|
||
|
"type": "custommachinery:custom_machine",
|
||
|
"machine": "dut:satellite_station",
|
||
|
"time": 480,
|
||
|
"priority": 2,
|
||
|
"error": true,
|
||
|
"requirements": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationUp,
|
||
|
SatelliteStationDown,
|
||
|
SatelliteStationItem("kubejs:navigate_data_empty", 1, "input"),
|
||
|
SatelliteStationFliter("createoreexcavation:vein_atlas"),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_module" , 1, "input"),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_module" , 1, "output"),
|
||
|
SatelliteStationDurability("kubejs:satellite", 1, "input",false),
|
||
|
SatelliteStationDurability("kubejs:brass_hard_disk", 512, "input",true),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_data", 1, "output"),
|
||
|
],
|
||
|
"jei": [
|
||
|
SatelliteStationStructure,
|
||
|
SatelliteStationBiome,
|
||
|
SatelliteStationItem("kubejs:navigate_data_empty", 1, "input"),
|
||
|
SatelliteStationFliter("createoreexcavation:vein_atlas"),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_module" , 1, "input"),
|
||
|
SatelliteStationDurability("kubejs:satellite", 1, "input",false),
|
||
|
SatelliteStationDurability("kubejs:brass_hard_disk", 512, "input",true),
|
||
|
SatelliteStationItem("kubejs:satellite_scanning_data", 1, "output"),
|
||
|
]
|
||
|
}).id("dut_create:satellite_station/satellite_scanning_data")
|
||
|
|
||
|
SatelliteStationGetData("supplementaries:globe", "earth")
|
||
|
SatelliteStationGetData("supplementaries:globe_sepia", "earth")
|
||
|
SatelliteStationGetData("ad_astra:earth_globe", "earth")
|
||
|
SatelliteStationGetData("ad_astra:moon_globe", "moon")
|
||
|
})
|