master
Nicole Collings 2020-05-10 17:55:01 -07:00
parent 4d49aee57c
commit a9a13b73c6
14 changed files with 255 additions and 0 deletions

View File

@ -0,0 +1,31 @@
local gui = zepha.build_gui(function()
return Gui.Body {
-- background = "#214a21",
background = "#334",
Gui.Text {
position = { 4, 4 },
content = "Minimalminimalmmnal"
},
Gui.Rect {
position = { 64, 64 },
size = { 128 * (16/9), 128 },
background = "zeus_background"
},
Gui.Rect {
position = { 64 + 128, 64 + 64 },
size = { 128 * (16/9), 128 },
background = "zeus_background",
Gui.Text {
content = "What's the fuck it'd going on?"
}
}
}
end)
zepha.set_gui(gui)

View File

@ -0,0 +1,10 @@
zepha.set_gui(zepha.build_gui(function()
return Gui.Body {
background = "#124778",
Gui.Text {
position = { 4, 4 },
content = "Parentheses"
}
}
end))

View File

@ -0,0 +1,65 @@
zepha.register_item("@aurailus:basictools:flint_pickaxe", {
name = "Flint Pick",
textures = {
"@aurailus:basictools:flint_pickaxe"
}
})
crafting.register_recipe({
output = "@aurailus:basictools:flint_pickaxe",
recipe = {
{"zeus:materials:flint_pickaxe_head", "zeus:materials:plant_twine"},
{"zeus:materials:stick", ""}
}
})
zepha.register_item("@aurailus:basictools:flint_hatchet", {
name = "Flint Hatchet",
textures = {
"@aurailus:basictools:flint_hatchet"
}
})
crafting.register_recipe({
output = "@aurailus:basictools:flint_hatchet",
recipe = {
{"zeus:materials:flint_axe_head", "zeus:materials:plant_twine"},
{"zeus:materials:stick", ""}
}
})
zepha.register_item("@aurailus:basictools:flint_shovel", {
name = "Flint Spade",
textures = {
"@aurailus:basictools:flint_shovel"
}
});
crafting.register_recipe({
output = "@aurailus:basictools:flint_shovel",
recipe = {
{"zeus:materials:flint_shovel_head", "zeus:materials:plant_twine"},
{"zeus:materials:stick", ""}
}
})
zepha.register_item("@aurailus:basictools:wooden_pickaxe", {
name = "Wooden Pick",
textures = {
"@aurailus:basictools:wooden_pickaxe"
}
});
zepha.register_item("@aurailus:basictools:wooden_hatchet", {
name = "Wooden Hatchet",
textures = {
"@aurailus:basictools:wooden_hatchet"
}
});
zepha.register_item("@aurailus:basictools:wooden_shovel", {
name = "Wooden Shovel",
textures = {
"@aurailus:basictools:wooden_shovel"
}
});

View File

@ -0,0 +1,60 @@
_G["crafting"] = {}
crafting.registered_recipes = {}
crafting.register_recipe = fn(tbl) {
table.insert(crafting.registered_recipes, tbl)
}
crafting.bind = fn(craft_input, craft_output) {
local width = craft_input.width
local length = craft_input.length
local crafting_changed = fn() {
local items = {}
local matched_any = false
foreach r in crafting.registered_recipes {
local matches = true
for i = 1, length {
local x = (i - 1) % width + 1
local y = math.floor((i - 1) / width) + 1
local recipe_item_name = ""
if (y <= #(r.recipe) and x <= #(r.recipe[y])) {
recipe_item_name = r.recipe[y][x]
}
if (recipe_item_name ~= craft_input:get_stack(i).name) {
matches = false
break
}
}
if (matches) {
craft_output:set_stack(1, {r.output, 1})
matched_any = true
break
}
}
if (not matched_any) {
craft_output:set_stack(1, {"invalid", 0})
}
}
craft_input.on_put = crafting_changed
craft_input.on_take = crafting_changed
craft_output.allow_put = fn() {
return 0
}
craft_output.on_take = fn() {
for i = 1, length {
craft_input:remove_stack(i, 1)
}
crafting_changed()
}
}

View File

@ -0,0 +1,10 @@
if zepha.server then
runfile(_PATH .. "register")
end
if zepha.client then
_G["aurailus_hot_wheel"] = {}
runfile(_PATH .. "ui")
runfile(_PATH .. "keys")
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

View File

@ -0,0 +1,9 @@
runfile("@aurailus:item_collection/dropped_item")
local DROP_ENTITY = true
if (DROP_ENTITY) {
runfile("@aurailus:item_collection/mode/entity")
}
else {
runfile("@aurailus:item_collection/mode/direct")
}

View File

@ -0,0 +1,27 @@
zepha.register_block("@aurailus:tnt:tnt", {
name = "TNT",
model = "base:block",
textures = {
"@aurailus:tnt:tnt_top",
"@aurailus:tnt:tnt_bottom",
"@aurailus:tnt:tnt_side"
},
toughness = {
hand = 3,
shovel = 1,
pick = 2
},
drop = "@aurailus:tnt:tnt",
on_break = fn(pos) {
local amp = 20
for i = -amp, amp {
for j = -amp, amp {
for k = -amp, amp {
if (V(i, j, k):distance(V()) < amp) {
zepha.set_block(pos + offset, "air")
}
}
}
}
}
})

View File

@ -0,0 +1,31 @@
runfile(_PATH .. "blocks/_index")
runfile(_PATH .. "entity/_index")
local chat_down = false
zepha.register_keybind("zeus:default:open_chat", {
description = "Open Chat",
default = zepha.keys.t,
on_press = () => { print "Opened chat!" }
})
## Flying toggles
local fn toggleFlying() {
zepha.player.flying = not zepha.player.flying
}
zepha.register_keybind("zeus:default:toggle_flying", {
description = "Toggle Flying",
default = zepha.keys.f,
on_press = toggleFlying
})
local last_press = -100
zepha.register_keybind("zeus:default:double_jump_fly", {
description = "Double Jump to Toggle Flying",
default = zepha.keys.space,
on_press = () => {
local press = zepha.time.s();
if (press - last_press < 0.25) { toggleFlying() }
last_press = press;
}
})

View File

@ -0,0 +1 @@
runfile("zeus:flowers/flowers")

View File

@ -0,0 +1,2 @@
if (zepha.server) { runfile(_PATH .. "register") }
if (zepha.client) { runfile(_PATH .. "menu") }

View File

@ -0,0 +1,2 @@
runfile("zeus:kinetic/models/axle")
runfile("zeus:kinetic/blocks/axle")

View File

@ -0,0 +1 @@
runfile(_PATH .. "biomes/_index")

View File

@ -0,0 +1,6 @@
runfile("zeus:materials/items/stick")
runfile("zeus:materials/items/rock")
runfile("zeus:materials/items/flint")
runfile("zeus:materials/items/flint_heads")
runfile("zeus:materials/items/plant_fibre")
runfile("zeus:materials/items/plant_twine")