mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
Fixed a bug in man.lua when help topic wasn't found.
Moved dig.lua to a loot disk. Added loot disks to creative tab. Won't show in NEI, just classic creative tab, but I'm OK with that.
This commit is contained in:
parent
73cbe3127b
commit
4fdf33a882
@ -2,3 +2,4 @@
|
|||||||
# Each entry is a mapping of folder name to disk label.
|
# Each entry is a mapping of folder name to disk label.
|
||||||
BetterShell=besh
|
BetterShell=besh
|
||||||
OpenIRC=irc
|
OpenIRC=irc
|
||||||
|
TheDig=dig
|
@ -11,7 +11,7 @@ end
|
|||||||
local topic = args[1]
|
local topic = args[1]
|
||||||
for path in string.gmatch(os.getenv("MANPATH"), "[^:]+") do
|
for path in string.gmatch(os.getenv("MANPATH"), "[^:]+") do
|
||||||
path = shell.resolve(fs.concat(path, topic), "man")
|
path = shell.resolve(fs.concat(path, topic), "man")
|
||||||
if fs.exists(path) and not fs.isDirectory(path) then
|
if path and fs.exists(path) and not fs.isDirectory(path) then
|
||||||
os.execute(os.getenv("PAGER") .. " " .. path)
|
os.execute(os.getenv("PAGER") .. " " .. path)
|
||||||
os.exit()
|
os.exit()
|
||||||
end
|
end
|
||||||
|
@ -7,7 +7,7 @@ local unicode = require("unicode")
|
|||||||
local env = {
|
local env = {
|
||||||
EDITOR="/bin/edit",
|
EDITOR="/bin/edit",
|
||||||
HOME="/home",
|
HOME="/home",
|
||||||
MANPATH="/usr/man",
|
MANPATH="/usr/man:.",
|
||||||
PAGER="/bin/more",
|
PAGER="/bin/more",
|
||||||
PATH="/bin:/usr/bin:/home/bin:.",
|
PATH="/bin:/usr/bin:/home/bin:.",
|
||||||
PS1="# ",
|
PS1="# ",
|
||||||
|
@ -8,5 +8,11 @@ object CreativeTab extends CreativeTabs(CreativeTabs.getNextID, "OpenComputers")
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
override def getTabIconItemIndex = Settings.get.blockId2
|
override def getTabIconItemIndex = Settings.get.blockId2
|
||||||
|
|
||||||
|
override def displayAllReleventItems(list: java.util.List[_]) = {
|
||||||
|
def add[T](list: java.util.List[T], value: Any) = list.add(value.asInstanceOf[T])
|
||||||
|
super.displayAllReleventItems(list)
|
||||||
|
Loot.disks.foreach(add(list, _))
|
||||||
|
}
|
||||||
|
|
||||||
override def getTranslatedTabLabel = getTabLabel
|
override def getTranslatedTabLabel = getTabLabel
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user