This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- buttplug.lua | |
-- | |
-- MIT License | |
-- | |
-- Copyright (c) 2021 abbiwyn | |
-- | |
-- Permission is hereby granted, free of charge, to any person obtaining a copy | |
-- of this software and associated documentation files (the "Software"), to deal | |
-- in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0.13", | |
"description": "Plugin and package manager for Lite XL editor.", | |
"homepage": "https://github.com/lite-xl/lite-xl-plugin-manager", | |
"license": "LPM", | |
"architecture": { | |
"64bit": { | |
"url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/v1.0.13/lpm.x86_64-windows.exe#/lpm.exe", | |
"hash": "d2d7e626ddb14c4488765a2518176a1158b30faa8525ea19042f7a1ed641c3c3" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ball_side = "top" | |
local orb_side = "front" | |
local orb = peripheral.wrap(orb_side) or error("Guh") | |
---@return number | |
local function get_orb_item_amount() | |
return #orb.items() | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sides = { | |
barrel = "top", | |
machine = "bottom" | |
} | |
local barrel = peripheral.wrap(sides.barrel) | |
local machine = peripheral.wrap(sides.machine) | |
local input_slots = { | |
2, 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local pperipheral = {custom_names = {}} | |
local oldCall, oldGetType, oldWrap, oldFind = peripheral.call, peripheral.getType, peripheral.wrap, peripheral.find | |
--- Peripheral call method that supports custom names | |
---@param name string The name of the peripheral to invoke the method on. | |
---@param method string The name of the method | |
---@param ... any Additional arguments | |
---@return any? The return values of the peripheral method. | |
function pperipheral.call(name, method, ...) | |
local name = pperipheral.custom_names[name] or name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local energy = { | |
su = { | |
battery_box = {name = "low_voltage_su"}, | |
mfe = {name = "medium_voltage_su"}, | |
mfsu = {name = "high_voltage_su"} | |
}, | |
solar = { | |
basic = {name = "basic_solar_panel"}, | |
advanced = {name = "advanced_solar_panel"}, | |
industrial = {name = "industrial_solar_panel"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local config = require("config") | |
local bee_locations = config.bee_locations | |
local GuiH = require("GuiH") | |
local monitor = peripheral.find("monitor") | |
local gui = GuiH.new(monitor) | |
gui.debug = true | |
local watermarkText = gui.new.text{ | |
text = gui.text{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Tested on ComputerCraft: Restiched v1.101.0 on Minecraft 1.19 | |
local function getChests() | |
local chests = peripheral.getNames() | |
local actual_chests = {} | |
for i, chest in pairs(chests) do | |
if chest:find("chest") or chest:find("barrel") then | |
table.insert(actual_chests, chest) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local modem = peripheral.find("modem") or error("No modem attached", 0) | |
modem.open(80) | |
print("Opened to port 80") | |
modem.transmit(81, 80, "client_request") | |
while true do | |
local event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message") | |
if channel == 80 then |