canoe model, cold tweaks, rice

master
Izzy 2018-01-17 23:03:59 -07:00
parent 0131639e7b
commit a80b76d26f
23 changed files with 182 additions and 53 deletions

View File

@ -1,3 +1,15 @@
Forked from minetest_game, the licens for which is below
Any modifications not infected by viral licenses are WTFPL.
Licenses for various 3rd-party modes can be found in their directories.
-----------------------------------------------------------
License and info for minetest_game:
-----------------------------------------------------------
License of media (textures and sounds)
--------------------------------------
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>

View File

@ -1,28 +1,12 @@
Minetest Game [minetest_game]
=============================
The main subgame for the Minetest engine
========================================
Hardmode, a challenging subgame for Minetest
============================================
Fight off hunger, cold, and monsters while unable to carry absurd amounts
of stone in your pockets.
To use this subgame with the Minetest engine, insert this repository as
/games/minetest_game
/games/hardmode
The Minetest engine can be found in:
https://github.com/minetest/minetest/
Compatibility
--------------
The Minetest Game github master HEAD is generally compatible with the github
master HEAD of the Minetest engine.
Additionally, when the Minetest engine is tagged to be a certain version (eg.
0.4.10), Minetest Game is tagged with the version too.
When stable releases are made, Minetest Game is packaged and made available in
http://minetest.net/downloads/
and in case the repository has grown too much, it may be reset. In that sense,
this is not a "real" git repository. (Package maintainers please note!)
Licensing
---------
See LICENSE.txt

View File

@ -1 +1 @@
name = Minetest Game
name = Hardmode

View File

@ -0,0 +1,3 @@
initial_stuff = default:torch 10
tnt_radius = 4

View File

@ -291,9 +291,9 @@ local boat_tin = {
physical = true,
-- Warning: Do not change the position of the collisionbox top surface,
-- lowering it causes the boat to fall through the world if underwater
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
collisionbox = {-0.35, -0.35, -0.35, 0.35, 0.3, 0.35},
visual = "mesh",
mesh = "boats_boat.obj",
mesh = "boats_canoe.obj",
textures = {"default_tin_block.png"},
driver = nil,
@ -388,21 +388,21 @@ function boat_tin.on_step(self, dtime)
local ctrl = self.driver:get_player_control()
local yaw = self.object:getyaw()
if ctrl.up then
self.v = self.v + 0.1
self.v = self.v + 0.2
elseif ctrl.down then
self.v = self.v - 0.1
self.v = self.v - 0.2
end
if ctrl.left then
if self.v < 0 then
self.object:setyaw(yaw - (1 + dtime) * 0.03)
self.object:setyaw(yaw - (1 + dtime) * 0.04)
else
self.object:setyaw(yaw + (1 + dtime) * 0.03)
self.object:setyaw(yaw + (1 + dtime) * 0.04)
end
elseif ctrl.right then
if self.v < 0 then
self.object:setyaw(yaw + (1 + dtime) * 0.03)
self.object:setyaw(yaw + (1 + dtime) * 0.04)
else
self.object:setyaw(yaw - (1 + dtime) * 0.03)
self.object:setyaw(yaw - (1 + dtime) * 0.04)
end
end
end
@ -412,14 +412,14 @@ function boat_tin.on_step(self, dtime)
return
end
local s = get_sign(self.v)
self.v = self.v - 0.02 * s
self.v = self.v - 0.002 * s
if s ~= get_sign(self.v) then
self.object:setvelocity({x = 0, y = 0, z = 0})
self.v = 0
return
end
if math.abs(self.v) > 5 then
self.v = 5 * get_sign(self.v)
if math.abs(self.v) > 15 then
self.v = 15 * get_sign(self.v)
end
local p = self.object:getpos()
@ -444,9 +444,9 @@ function boat_tin.on_step(self, dtime)
if y >= 5 then
y = 5
elseif y < 0 then
new_acce = {x = 0, y = 20, z = 0}
new_acce = {x = 0, y = 3, z = 0} -- float parameters. bigger = bouncier
else
new_acce = {x = 0, y = 5, z = 0}
new_acce = {x = 0, y = 1, z = 0}
end
new_velo = get_velocity(self.v, self.object:getyaw(), y)
self.object:setpos(self.object:getpos())
@ -470,7 +470,7 @@ end
minetest.register_entity("boats:boat_tin", boat)
minetest.register_entity("boats:boat_tin", boat_tin)
minetest.register_craftitem("boats:boat_tin", {

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'boats_canoe.blend'
# Material Count: 1
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

View File

@ -0,0 +1,32 @@
# Blender v2.72 (sub 0) OBJ File: 'boats_canoe.blend'
# www.blender.org
o Cube
v 5.614751 -4.561730 9.532958
v -5.508565 -4.561730 9.716913
v -5.616205 -4.561730 -9.292557
v 5.507113 -4.561730 -9.476509
v 5.614749 4.353601 9.532962
v -5.508569 4.353601 9.716908
v -5.616205 4.353601 -9.292561
v 5.507110 4.353601 -9.476512
v 0.024573 -3.373447 22.390285
v 0.139105 4.353602 24.815599
v 0.025120 -3.234122 -22.997665
v -0.150890 4.571669 -26.399143
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
s off
f 1/1 2/2 3/3 4/4
f 5/1 8/2 7/3 6/4
f 2/1 6/2 7/3 3/4
f 5/1 1/2 4/3 8/4
f 3/1 7/2 12/3 11/4
f 5/1 10/2 9/3 1/4
f 6/1 10/2 5/3
f 2/1 9/2 10/3 6/4
f 1/1 9/2 2/3
f 7/1 8/2 12/3
f 4/1 3/2 11/3
f 8/1 4/2 11/3 12/4

View File

@ -55,16 +55,23 @@ function cold.update_cold(player, new_lvl)
return false
end
-- BUG: math is borked.
local sun = (math.sin(minetest.get_timeofday() * math.pi) * -2) + 1
local sun = (math.sin(minetest.get_timeofday() * math.pi) * -2) + .5
print("tod: " .. sun);
local pos
local ppos = player:getpos()
-- TODO trig this too
local lat = math.abs(ppos.z) / COLD_LAT_DIVISOR
local coldfactor = sun * COLD_SUN_FACTOR + lat
local env = sun * COLD_SUN_FACTOR + lat
print("cold sun: " .. (sun * COLD_SUN_FACTOR))
print("cold lat: " .. lat)
-- TODO need to check if the player is swimming
print("cold env: " .. env)
local coldfactor = -2
-- look for hot things nearby
pos = minetest.find_node_near(ppos, 10, {
@ -72,6 +79,8 @@ function cold.update_cold(player, new_lvl)
"default:furnace_active",
"fire:basic_flame",
"fire:permanent_flame",
"default:lava_souce",
"default:lava_flowing",
})
if pos ~= nil then
@ -100,7 +109,7 @@ function cold.update_cold(player, new_lvl)
end
if minetest.setting_getbool("enable_damage") == false then
cold[name] = 20
cold[name] = 0
return
end
@ -108,13 +117,16 @@ function cold.update_cold(player, new_lvl)
if new_lvl > 0 then
lvl = new_lvl
else
lvl = lvl + (coldfactor * COLD_FACTOR)
lvl = lvl + (coldfactor * COLD_FACTOR) + env
end
if lvl > COLD_MAX then
lvl = COLD_MAX
elseif lvl < 0 then
lvl = 0
end
cold[name].lvl = lvl
print("coldfactor: " .. (coldfactor * COLD_FACTOR))
print("coldness: " ..lvl)
if lvl >= COLD_SHIVER_LVL then
@ -128,7 +140,7 @@ function cold.update_cold(player, new_lvl)
end
end
player:set_hp(hp)
--player:set_hp(hp)
end
hud.change_item(player, "cold", {number = lvl})
@ -160,7 +172,7 @@ if minetest.setting_getbool("enable_damage") then
-- for exhaustion
minetest.register_on_respawnplayer(function(player)
cold.update_cold(player, 20)
cold.update_cold(player, 0)
end)
end

View File

@ -86,20 +86,33 @@ minetest.register_craft({
}
})
-- rice
-- Straw
farming.register_plant("farming:rice", {
description = "Rice Seed",
paramtype2 = "meshoptions",
inventory_image = "farming_rice_seed.png",
steps = 8,
minlight = 13,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {flammable = 4},
place_param2 = 3,
})
-- Straw - uses dry grass not wheat
minetest.register_craft({
output = "farming:straw 3",
recipe = {
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"group:dry_grass", "group:dry_grass", "group:dry_grass"},
{"group:dry_grass", "group:dry_grass", "group:dry_grass"},
{"group:dry_grass", "group:dry_grass", "group:dry_grass"},
}
})
minetest.register_craft({
output = "farming:wheat 3",
output = "default:dry_grass_1 3",
recipe = {
{"farming:straw"},
}

View File

@ -175,16 +175,26 @@ for i = 1, 5 do
minetest.override_item("default:grass_"..i, {drop = {
max_items = 1,
items = {
{items = {'farming:seed_wheat'},rarity = 5},
{items = {'farming:seed_wheat'},rarity = 8},
{items = {'default:grass_1'}},
}
}})
end
for i = 1, 5 do
minetest.override_item("default:dry_grass_"..i, {drop = {
max_items = 1,
items = {
{items = {'farming:seed_cotton'},rarity = 9},
{items = {'default:dry_grass_1'}},
}
}})
end
minetest.override_item("default:junglegrass", {drop = {
max_items = 1,
items = {
{items = {'farming:seed_cotton'},rarity = 8},
{items = {'farming:seed_rice'},rarity = 8},
{items = {'default:junglegrass'}},
}
}})

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

52
todo Normal file
View File

@ -0,0 +1,52 @@
integrate burden into hunger
add flint slot on furnace formspec, revert furnace craft recipe to normal
add big list of item weights to burden
fix up campfire, clean up old stuff from more_fire therein
features:
-----------------------
thirst, must drink fresh water
vomiting (loss of health and food) on chance if drinking dirty water
copper kettle to boil water
large cargo boat with attached chest entity that cannot be picked up once placed
start dropping things randomly if you carry too much
coats, from fiber or hide
boots, from hide
cooking pot (copper) for fire
cook kelp
more farming
rats that come eat things out of exposed chests
mobs
fast rabbits
fast deer
wolves
gophers? (swims in dirt, eats crops, leaves little mounds)
various human attackers
spears
hunger seems very slow
tweak rot, make more nodes rot
nodes:
-----------------------
berries for bushes
campfire * FIX
copper pot
copper kettle
corn