Compare commits
10 Commits
2c70bfb5d6
...
e2ffa732a5
Author | SHA1 | Date | |
---|---|---|---|
|
e2ffa732a5 | ||
|
510080bbc1 | ||
|
b3275e6dea | ||
|
5d761b5439 | ||
|
8c28db127a | ||
|
3a498bb357 | ||
|
8410fb85dd | ||
|
0716f235db | ||
|
ce24f9d05f | ||
|
9339038485 |
13
.luacheckrc
Normal file
13
.luacheckrc
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
globals = {
|
||||
"dssssa_ship",
|
||||
"dssssa_player",
|
||||
"dssssa_mapgen",
|
||||
"dssssa_crafting",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
"minetest",
|
||||
"vector",
|
||||
"ItemStack",
|
||||
}
|
14
README.txt
14
README.txt
@ -1,6 +1,14 @@
|
||||
|
||||
# DSSSSA
|
||||
|
||||
Made by DS and cx384.
|
||||
|
||||
For the 2022 Minetest GAME JAM.
|
||||
|
||||
This is not a finished game so don't expect too much.
|
||||
|
||||
A hint if you actually want to play this game. Don't put your rocks into the GPU, it is a wast of rocks. Instead gather all 8 types of different rocks and put them at the same time into your CPU. I think this could work, maybe. Oh and don't forget to toggle your handbreak.
|
||||
|
||||
## License
|
||||
|
||||
### Code
|
||||
@ -13,9 +21,15 @@ MIT (Expat) by DS and cx384
|
||||
by Westbeam (WTFPL) (or based on their art, with trivial changes)
|
||||
https://opengameart.org/content/space-skybox-0
|
||||
|
||||
* drill2 stuff in `mods/dssssm_crafting/textures/*`: by cx384 with modification by DS (both CC-BY-SA-4.0)
|
||||
* everything else in `mods/dssssm_crafting/textures/*`: by cx384 (CC-BY-SA-4.0)
|
||||
|
||||
* `mods/dssssa_rocks/textures/dssssa_rocks_rock*`:
|
||||
by cx384 (CC-BY-SA-4.0)
|
||||
|
||||
* blackbox and gravel mix in `mods/dssssa_rocks/textures/`:
|
||||
by DS (CC-BY-SA-4.0)
|
||||
|
||||
* model and textures in `mods/dssssa_ship`:
|
||||
by DS (CC-BY-SA-4.0)
|
||||
|
||||
|
@ -221,43 +221,43 @@ end)
|
||||
|
||||
-- this should not be here
|
||||
|
||||
minetest.register_tool("dssssa_crafting:drill_stick", {
|
||||
description = "Drill on a stick",
|
||||
inventory_image = "dssssa_crafting_drill_stick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.5,
|
||||
groupcaps={
|
||||
cracky = {times={[1]=0.1, [2]=0.2, [3]=0.3}, uses=30, maxlevel=3},
|
||||
},
|
||||
},
|
||||
})
|
||||
--~ minetest.register_tool("dssssa_crafting:drill_stick", {
|
||||
--~ description = "Drill on a stick",
|
||||
--~ inventory_image = "dssssa_crafting_drill_stick.png",
|
||||
--~ tool_capabilities = {
|
||||
--~ full_punch_interval = 0.5,
|
||||
--~ groupcaps={
|
||||
--~ cracky = {times={[1]=0.1, [2]=0.2, [3]=0.3}, uses=30, maxlevel=3},
|
||||
--~ },
|
||||
--~ },
|
||||
--~ })
|
||||
|
||||
minetest.register_craftitem("dssssa_crafting:stick", {
|
||||
description = "Stick",
|
||||
inventory_image = "dssssa_crafting_stick.png",
|
||||
})
|
||||
--~ minetest.register_craftitem("dssssa_crafting:stick", {
|
||||
--~ description = "Stick",
|
||||
--~ inventory_image = "dssssa_crafting_stick.png",
|
||||
--~ })
|
||||
|
||||
minetest.register_craftitem("dssssa_crafting:drill", {
|
||||
description = "Drill (It has no handle)",
|
||||
inventory_image = "dssssa_crafting_drill.png",
|
||||
})
|
||||
--~ minetest.register_craftitem("dssssa_crafting:drill", {
|
||||
--~ description = "Drill (It has no handle)",
|
||||
--~ inventory_image = "dssssa_crafting_drill.png",
|
||||
--~ })
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "dssssa_crafting:drill_stick",
|
||||
recipe = {"dssssa_crafting:drill", "dssssa_crafting:stick"}
|
||||
})
|
||||
--~ minetest.register_craft({
|
||||
--~ type = "shapeless",
|
||||
--~ output = "dssssa_crafting:drill_stick",
|
||||
--~ recipe = {"dssssa_crafting:drill", "dssssa_crafting:stick"}
|
||||
--~ })
|
||||
|
||||
local modstorage = minetest.get_mod_storage()
|
||||
--~ local modstorage = minetest.get_mod_storage()
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local inv = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
local first_join = modstorage:get("not_first_join") ~= "true"
|
||||
if first_join then
|
||||
inv:add_item("main", "dssssa_crafting:drill")
|
||||
inv:add_item("main", "dssssa_crafting:stick")
|
||||
end
|
||||
end)
|
||||
--~ minetest.register_on_joinplayer(function(player)
|
||||
--~ local inv = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
--~ local first_join = modstorage:get("not_first_join") ~= "true"
|
||||
--~ if first_join then
|
||||
--~ inv:add_item("main", "dssssa_crafting:drill")
|
||||
--~ inv:add_item("main", "dssssa_crafting:stick")
|
||||
--~ end
|
||||
--~ end)
|
||||
|
||||
|
||||
|
||||
|
BIN
mods/dssssa_crafting/textures/dssssa_crafting_drill2.png
Normal file
BIN
mods/dssssa_crafting/textures/dssssa_crafting_drill2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
mods/dssssa_crafting/textures/dssssa_crafting_drill_stick2.png
Normal file
BIN
mods/dssssa_crafting/textures/dssssa_crafting_drill_stick2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
@ -34,18 +34,27 @@ those.
|
||||
]],
|
||||
[[
|
||||
Logbook of the captain, startime today (1):
|
||||
enoguh power => detect signal of blackbox
|
||||
Now, as I've gathered more power, I was able to turn on my sensors, which in turn
|
||||
detected the signal of a blackbox. I should investigate this.
|
||||
]],
|
||||
[[
|
||||
Logbook of the captain, startime today (2):
|
||||
blackbox broken, uses RAID, search more
|
||||
I've brought the blackbox to my ship, however it is heavily damaged. According
|
||||
to the blackbox's manual (I've found them in my ship's database), the information
|
||||
is stored redundantly on multiple blackboxes, so I should be able to reconstruct
|
||||
most of the data if I find more blackboxes. My sensors already detected two more.
|
||||
]],
|
||||
[[
|
||||
Logbook of the captain, startime today (3):
|
||||
found 3 blackboxes
|
||||
cult of "those that seek the approval of Krock the core devourer" came to planet
|
||||
giant crocodile cracked planet like a nutcracker, then sucked up the core
|
||||
have to warn other ppl
|
||||
I have found a total of three blackboxes.
|
||||
The stored information is alarming. It says that some cult, which calls itself
|
||||
"those that seek the approval of Krock, the core devourer" came to
|
||||
Giesela 235 C and demanded the scientists to praise their god. The scientists
|
||||
refused. Some days later a gigantic monster that looked like a crocodile arrived
|
||||
in the system, flew to the planet and cracked it like a nutcracker, it then
|
||||
sucked up the whole planet's core.
|
||||
I have to warn the other planets nearby about my findings! I hope they'll believe
|
||||
me.
|
||||
]],
|
||||
}
|
||||
|
||||
@ -59,7 +68,7 @@ function dssssa_player.get_logbook_text()
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local inv = minetest.get_inventory({type="player", name=player:get_player_name()})
|
||||
local inv = player:get_inventory()
|
||||
inv:set_size("gpu_in", 6)
|
||||
inv:set_size("gpu_out", 6)
|
||||
local meta = player:get_meta()
|
||||
@ -118,7 +127,6 @@ minetest.register_on_joinplayer(function(player)
|
||||
dssssa_ship.ship = assert(minetest.add_entity(player:get_pos(), "dssssa_ship:ship")):get_luaentity()
|
||||
dssssa_ship.into_ship(player)
|
||||
|
||||
local inv = player:get_inventory()
|
||||
assert(inv:set_size("cpu_src", 3*4))
|
||||
assert(inv:set_size("cpu_dst", 2*3))
|
||||
assert(inv:set_size("gpu_src", 3*2))
|
||||
@ -182,6 +190,7 @@ function dssssa_player.set_inventory_formspec(player)
|
||||
fs = fs
|
||||
.."button[4,4;3,0.75;handbreak;Toggle handbreak]"
|
||||
.."button_exit[4,6;3,0.75;leave;Leave ship]"
|
||||
.."button[4,8;3,0.75;jump;Jump]"
|
||||
--~ elseif dssssa_player.current_inv_tab == 7 then -- Ship-AI
|
||||
--~ fs = fs
|
||||
else
|
||||
@ -197,7 +206,7 @@ function dssssa_player.set_inventory_formspec(player)
|
||||
player:set_inventory_formspec(fs)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
minetest.register_on_player_receive_fields(function(player, _formname, fields)
|
||||
--~ minetest.log(formname)
|
||||
--~ minetest.log(dump(fields))
|
||||
local meta = player:get_meta()
|
||||
@ -218,6 +227,18 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
dssssa_ship.ship.handbreak = not dssssa_ship.ship.handbreak
|
||||
end
|
||||
|
||||
if fields.jump then
|
||||
if modstorage:get_int("fuel") < 2000 then
|
||||
minetest.chat_send_player(player:get_player_name(),
|
||||
"Not enough fuel.")
|
||||
elseif modstorage:get_int("story_idx") < 5 then
|
||||
minetest.chat_send_player(player:get_player_name(),
|
||||
"No, you stay here. You have to search for the secrets of the blackboxes.")
|
||||
else
|
||||
minetest.kick_player(player:get_player_name(), "Well done!")
|
||||
end
|
||||
end
|
||||
|
||||
if fields.leave then
|
||||
dssssa_ship.out_of_ship(player)
|
||||
end
|
||||
@ -256,7 +277,7 @@ minetest.register_globalstep(function(dtime)
|
||||
local meta = player:get_meta()
|
||||
local para = meta:get_int("gpu_para")
|
||||
local process_failed = false
|
||||
for i = 1, para, 1 do
|
||||
for _i = 1, para, 1 do -- luacheck: ignore
|
||||
local name
|
||||
local res_all
|
||||
for _, stack in ipairs(inv:get_list("gpu_in")) do
|
||||
@ -310,9 +331,19 @@ end)
|
||||
|
||||
local cpu_time_accum = 0
|
||||
local gpu_time_accum = 0
|
||||
local times_inv_was_weirdly_nil = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
local inv = minetest.get_inventory({type="player", name="singleplayer"})
|
||||
|
||||
if not inv then -- for some reason this can sometimes happen
|
||||
times_inv_was_weirdly_nil = times_inv_was_weirdly_nil + 1
|
||||
if times_inv_was_weirdly_nil == 10 then
|
||||
minetest.log("warning",
|
||||
"minetest.get_inventory keeps failing for some unknown reason, CPU and GPU are probably broken.")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
cpu_time_accum = cpu_time_accum + dtime
|
||||
gpu_time_accum = gpu_time_accum + dtime
|
||||
|
||||
@ -370,11 +401,28 @@ function dssssa_player.add_waypoints(player)
|
||||
if story_idx == 3 then
|
||||
dssssa_player.hud_blackboxes = {assert(player:hud_add({
|
||||
hud_elem_type = "waypoint",
|
||||
name = "blackbox1",
|
||||
text = "Blackbox",
|
||||
name = "Blackbox",
|
||||
text = "",
|
||||
number = 0xF41616,
|
||||
world_pos = dssssa_mapgen.blackbox_poss[1],
|
||||
}))}
|
||||
elseif story_idx == 4 then
|
||||
dssssa_player.hud_blackboxes = {
|
||||
assert(player:hud_add({
|
||||
hud_elem_type = "waypoint",
|
||||
name = "Blackbox",
|
||||
text = "",
|
||||
number = 0xF41616,
|
||||
world_pos = dssssa_mapgen.blackbox_poss[2],
|
||||
})),
|
||||
assert(player:hud_add({
|
||||
hud_elem_type = "waypoint",
|
||||
name = "Blackbox",
|
||||
text = "",
|
||||
number = 0xF41616,
|
||||
world_pos = dssssa_mapgen.blackbox_poss[3],
|
||||
})),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@ -387,3 +435,33 @@ function dssssa_player.remove_waypoints(player)
|
||||
end
|
||||
dssssa_player.hud_blackboxes = {}
|
||||
end
|
||||
|
||||
function dssssa_player.into_ship_hook(player)
|
||||
local inv = minetest.get_inventory({type="player", name="singleplayer"})
|
||||
|
||||
if modstorage:get_int("story_idx") == 3
|
||||
and inv:contains_item("main", "dssssa_rocks:blackbox") then
|
||||
modstorage:set_int("story_idx", 4)
|
||||
|
||||
dssssa_player.set_inventory_formspec(player)
|
||||
|
||||
if dssssa_player.is_in_ship then
|
||||
minetest.show_formspec(player:get_player_name(), "inv", player:get_inventory_formspec())
|
||||
|
||||
dssssa_player.add_waypoints(player)
|
||||
end
|
||||
end
|
||||
|
||||
if modstorage:get_int("story_idx") == 4
|
||||
and inv:contains_item("main", "dssssa_rocks:blackbox 3") then
|
||||
modstorage:set_int("story_idx", 5)
|
||||
|
||||
dssssa_player.set_inventory_formspec(player)
|
||||
|
||||
if dssssa_player.is_in_ship then
|
||||
minetest.show_formspec(player:get_player_name(), "inv", player:get_inventory_formspec())
|
||||
|
||||
dssssa_player.add_waypoints(player)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -103,19 +103,19 @@ minetest.register_craftitem("dssssa_rocks:gravel", {
|
||||
minetest.register_craftitem("dssssa_rocks:drill", {
|
||||
description = "broken Drill\nIt looks like someone (you!) didn't know how to use a drill, and just bonked it against stone as if it was hammer.",
|
||||
groups = {},
|
||||
inventory_image = "dssssa_rocks_drill.png",
|
||||
inventory_image = "dssssa_crafting_drill2.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("dssssa_rocks:stick", {
|
||||
description = "Stick",
|
||||
groups = {},
|
||||
inventory_image = "dssssa_rocks_stick.png",
|
||||
inventory_image = "dssssa_crafting_stick.png",
|
||||
})
|
||||
|
||||
minetest.register_tool("dssssa_rocks:drill_on_stick", {
|
||||
description = "Drill on a Stick",
|
||||
groups = {},
|
||||
inventory_image = "dssssa_rocks_drill_on_stick.png",
|
||||
inventory_image = "dssssa_crafting_drill_stick2.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 0,
|
||||
|
BIN
mods/dssssa_rocks/textures/dssssa_rocks_blackbox.png
Normal file
BIN
mods/dssssa_rocks/textures/dssssa_rocks_blackbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/dssssa_rocks/textures/dssssa_rocks_gravel.png
Normal file
BIN
mods/dssssa_rocks/textures/dssssa_rocks_gravel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
@ -30,6 +30,8 @@ function dssssa_ship.into_ship(player)
|
||||
|
||||
dssssa_player.add_waypoints(player)
|
||||
|
||||
dssssa_player.into_ship_hook(player)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user