Initial commit

This commit is contained in:
Tony Bark 2025-02-07 14:39:37 -05:00
commit df8714aa1d
171 changed files with 1686 additions and 0 deletions

22
.gitignore vendored Normal file
View file

@ -0,0 +1,22 @@
## Files related to minetest development cycle
/*.patch
# GNU Patch reject file
*.rej
## Editors and Development environments
*~
*.swp
*.bak*
*.orig
# Vim
*.vim
# Kate
.*.kate-swp
.swp.*
# Eclipse (LDT)
.project
.settings/
.buildpath
.metadata
# Idea IDE
.idea/*

121
CC0.txt Normal file
View file

@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

14
COPYING.txt Normal file
View file

@ -0,0 +1,14 @@
All files avalable under cc0, for more information see: https://creativecommons.org/public-domain/cc0/
The following is an acknowledgment of the the contributions of the artists included in this package:
Special thanks to:
Kolevier . . . . . . . . . . Many log hours working on something I never used ;-; (https://kolevier.carrd.co/#three)
Christian Elbrianno . . . . . . . Various tile and item textures, and hours of time.
RedAndFoxy . . . . . . . . . . Various tile and item textures, and their trust in me.
wwwq . . . . . . . . . . . Player sprites, and access to their coding cheat sheet.
drummyfish . . . . . . . . . . thank you mysterious stranger [Hand Painted Pack](wieldhand.png)
Thank you for all the hard work every one of you put in, none of this would have been possible without each and everyone of you.
I'm grateful to have been given the chance to work with such wonderful artist, and I'm truly sorry I couldn't do more.

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# Wishful
RedundantC's barebones Luanti game. This was downloaded from [ContentDB](https://content.luanti.org/packages/RedundantC/wis_side_b/) with the source hosted on here because I couldn't find it on any repository. Like [Minetest](https://git.tonybark.com/archives/minetest), I've assigned this as a template.
## License
This project is under the public domain - see [UNLICENSE](UNLICENSE.txt) and [CC0](CC0.txt) for details.

24
UNLICENSE.txt Normal file
View file

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>

14
game.conf Normal file
View file

@ -0,0 +1,14 @@
#title Intentionally Left Blank, To Disable Engine Rendering On The Menu Screen (Top Left)
title = Wishful
#name is a uid only allows characters [a-z0-9_], not used in enduser side
name = wis_side_b
author = RedundantC
description = A simple game provided under a CC0 LICENSE: for writing & testing, mods and tutorials without a depending on minetest game.
min_minetest_version = 5.6
map_persistent = false
disallowed_mapgens = v6, singlenode
allowed_mapgens = carpathian, flat, fractal, valleys, v5, v7
disallowed_mapgen_settings = mg_flags, mgcarpathian_spflags, mgflat_spflags, mgfractal_spflags, mgvalleys_spflags, mgv5_, mgv6_spflags, mgv7_spflags
#allowed_mapgen_settings = mg_flags, mgcarpathian_spflags, mgflat_spflags, mgfractal_spflags, mgvalleys_spflags, mgv5_spflags, mgv6_spflags, mgv7_spflags
mgv5_spflags = caverns

BIN
menu/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

BIN
menu/header.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
menu/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

11
mods/wisgame/init.lua Normal file
View file

@ -0,0 +1,11 @@
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
-- DIR_DELIM 2345 < is 5 chars shorter, and I hate it!
c.dofolder(modpath .. modpath:match("[\\/]") .. "open", function(filePath)
if filePath:match("^.+%.(.+)$") == "lua" then
dofile(modpath .. modpath:match("[\\/]") .. "open"..modpath:match("[\\/]")..filePath)
end
--print(filePath)
end)

3
mods/wisgame/mod.conf Normal file
View file

@ -0,0 +1,3 @@
#name is a uid that only allows characters [a-z0-9_]
name = wisgame
depends = wislib

View file

@ -0,0 +1,52 @@
local print = c.log
local max_light=math.floor(minetest.LIGHT_MAX/2)
print(max_light)
local breakskybox = function()
minetest.override_item(minetest.get_name_from_content_id(minetest.get_content_id(minetest.get_name_from_content_id(minetest.CONTENT_AIR))), {
drawtype = "nodebox",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
light_source = max_light, --this breaks everything!
use_texture_alpha = "opaque",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
})
end
--print(minetest.LIGHT_MAX, max_light,0)
local fixskybox = function()
minetest.register_on_mods_loaded(function()
core.fix_light(vector.new(-31000, -31000, -31000), vector.new(31000, 31000, 31000))
end)
local chunkSize = tonumber(minetest.settings:get("chunksize")) or 16
local maxBlockSendDistance = tonumber(minetest.settings:get("max_block_send_distance")) or 10
local maxRenderDistance = (chunkSize * ((maxBlockSendDistance * 2) * .25) )
local deltaCount = 0
local deltaLimit = 3
minetest.register_globalstep(function(dtime)
deltaCount = deltaCount + dtime
print(deltaCount)
if not (deltaCount >= deltaLimit) then
return nil
end
deltaCount=deltaCount-deltaLimit
for _, player in ipairs(minetest.get_connected_players()) do
local username = player:get_player_name()
local userpos = player:get_pos()
local currentuserchunk = vector.floor(vector.divide(userpos, maxRenderDistance))
local minp = vector.multiply(currentuserchunk, maxRenderDistance)
local maxp = vector.add(minp, maxRenderDistance - 1)
core.fix_light(vector.new(minp.x, minp.y, minp.z), vector.new(maxp.x, maxp.y, maxp.z))
end
end)
end
breakskybox()
fixskybox()

View file

@ -0,0 +1,29 @@
-- Function to spread grass to nearby dirt
local function spread_grass(pos)
-- Define the positions to check around the current position
local positions = {
{x = pos.x + 1, y = pos.y, z = pos.z},
{x = pos.x - 1, y = pos.y, z = pos.z},
{x = pos.x, y = pos.y, z = pos.z + 1},
{x = pos.x, y = pos.y, z = pos.z - 1},
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x, y = pos.y - 1, z = pos.z},
}
for _, new_pos in ipairs(positions) do
local node = minetest.get_node(new_pos)
if node.name == "default:dirt" then
minetest.set_node(new_pos, {name = "default:dirt_with_grass"})
end
end
end
-- ABM (Active Block Modifier) to spread grass
minetest.register_abm({
nodenames = {"default:dirt_with_grass"},
interval = 10, -- Time in seconds between ABM execution
chance = 50, -- 1 in 50 chance for the ABM to run
action = function(pos, node, active_object_count, active_object_count_wider)
spread_grass(pos)
end,
})

View file

@ -0,0 +1,56 @@
-- Initialize mod storage
-- ASLP (Anti Stupid Lua Polyfill)
local DIR_DELIM = DIR_DELIM or "/"
-- Engine headers
local MODPACK = debug.getinfo(1, "S").source:match("mods[/\\][/\\]?[^/\\]*"):match("[/\\].*$"):sub(2)
local MODNAME = minetest and minetest.get_current_modname() or MODPACK
local MODPATH = minetest and minetest.get_modpath(MODPACK) or debug.getinfo(1, "S").source:match("^(.+)[/\\]"):sub(2)
--locals
--Avoid Using $.get() to get null instead of sane defaults.
local function nilget(key, default)
if not minetest.settings:has(key) then
minetest.settings:set("noclip")
else
return nil
end
end
--Avoid Using $.get() to get null instead of sane defaults.
local function nilset(key, default)
if not minetest.settings:has(key) then
--Race Condition?
minetest.settings:set(key, default)
else
return nil
end
end
-- Nooo! "Attempted to set secure setting."
-- nilset("secure.trusted_mods", "formspec_edit,")
-- At this distance the server will aggressively optimize which blocks are sent to
-- clients.
-- Small values potentially improve performance a lot, at the expense of visible
-- rendering glitches (some blocks will not be rendered under water and in caves,
-- as well as sometimes on land).
-- Setting this to a value greater than max_block_send_distance disables this
-- optimization.
-- Stated in mapblocks (16 nodes).
-- type: int min: 2 max: 32767
--nilset(" block_send_optimize_distance", 32767)
-- If enabled, the server will perform map block occlusion culling based on
-- on the eye position of the player. This can reduce the number of blocks
-- sent to the client by 50-80%. Clients will no longer receive most
-- invisible blocks, so that the utility of noclip mode is reduced.
-- type: bool
--nilset(" server_side_occlusion_culling", "true")

View file

@ -0,0 +1,54 @@
local image08='blank.png^[noalpha^[resize:8x8^[colorize:#000000:255'
local image16='blank.png^[noalpha^[resize:16x16^[colorize:#ffffff:255'
local modname = minetest.get_current_modname()
--why is : the hand, is it legacy support thing or what?
local hardtimes={[1] = 0.00, [2] = 2.00, [3] = 3.0}
minetest.register_item(minetest.get_current_modname()..':hand', {
type = 'none',
wield_image ='wieldhand.png',
--[colorize:#000000:255:0,16=wis_black.png',
wield_scale = {x = 0.5, y = 1, z = 4},
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level = 0,
groupcaps = {
crumbly = {
times = hardtimes,
uses = 0,
maxlevel = 1,
},
snappy = {
times = hardtimes,
uses = 0,
maxlevel = 1,
},
oddly_breakable_by_hand = {
times = hardtimes,
uses = 0,
},
},
damage_groups = {fleshy = 1},
}
})
minetest.register_on_joinplayer(function(player, last_login)
if not player then return end
local inv = player:get_inventory()
inv:set_size("hand",1)
inv:add_item("hand", ItemStack(modname..":hand"))
--minetest.log(dump(inv:get_lists()))
end)
local old_handle_node_drops = core.handle_node_drops
core.handle_node_drops = function(...)
-- flag all drops
old_handle_node_drops(...)
--- minetest.log('old_handle_node_drops')
end
local old_item_drop = core.item_drop
--core.item_drop = function(...) old_item_drop(...) --minetest.log('old_item_drop') end

View file

@ -0,0 +1,81 @@
--Code that modifies information about player including: health totals, movement speeds, and more.
--movment world combat building
--player combat world
local physics_override = {
gravity=1, -- default is 1.0
jump=1, -- default is 1.0
speed=1.5, -- default is 2.0
speed_sprint = 2,
speed_climb=2, -- default is 1.0
speed_crouch=2, -- default is 1.0
acceleration_air=1, -- default is 1.0
acceleration_default=1, -- default is 1.0
liquid_fluidity=1, -- default is 1.0
liquid_fluidity_smooth=1, -- default is 1.0
liquid_sink=1, -- default is 1.0
new_move=true, -- default is true
sneak=true, -- default is true
sneak_glitch=true, -- default is false
}
-- Register a globalstep callback to check for sprinting, and sneaking, and regen health
local function for_each_player(dtime)
for _, player in ipairs(minetest.get_connected_players()) do
player:set_physics_override(physics_override)
local controls = player:get_player_control()
if not controls.aux1 then -- 'aux1' is the default sprint key
--c.log("slow", physics_override.speed)
player:set_physics_override({speed = physics_override.speed}) -- Normal speed
else
--c.log("fast", physics_override.sprint)
player:set_physics_override({speed = physics_override.speed_sprint}) -- Increased speed
end
if not controls.sneak then -- but 'sneak' can have a normal name... you know what whatever!
else
end
end
end
minetest.register_globalstep(for_each_player)
--[[
local function remove_fall_damage()
for _, player in ipairs(minetest.get_connected_players()) do
player:set_armor_groups({fall_damage= 0})
end
end
--]]
local print_physics_command ={
description = "Prints the player's physics override settings to the log",
func = function(name)
local player = minetest.get_player_by_name(name)
if player then
local physics = player:get_physics_override()
for key, value in pairs(physics) do
minetest.log(tostring(key).."="..tostring(value))
end
else
return false, "Player not found."
end
end
}
--minetest.register_chatcommand("print_physics", print_physics_command)
minetest.register_chatcommand("dodmg",
{
description = "Does damage to the player",
func = function(name)
local player = minetest.get_player_by_name(name)
end
}
)

View file

@ -0,0 +1,22 @@
local disable_fall_damage = function(player)
-- it makes puppys, and unicorns -_-
--Editors note: Fuck you, comments are important.
player:set_armor_groups({ fall_damage_add_percent = -100 }) --
--Editors note: you can just use -1, see bellow
--save more bytes by not adding comments.
--Editors note: can convert to emoji 🖕!
end
minetest.register_on_joinplayer(disable_fall_damage)
minetest.register_on_respawnplayer(disable_fall_damage)
--[[
* `fall_damage_add_percent`: modifies the fall damage suffered when hitting
the top of this node. There's also an armor group with the same name.
The final player damage is determined by the following formula:
damage =
collision speed
* ((node_fall_damage_add_percent + 100) / 100) -- node group
* ((player_fall_damage_add_percent + 100) / 100) -- player armor group
- (14) -- constant tolerance
Negative damage values are discarded as no damage.
--]]

View file

@ -0,0 +1,13 @@
local DIR_DELIM = debug.getinfo(1, "S").source:match("[\\/]")
local modname = core.get_current_modname()
local modpath = core.get_modpath(modname)
local print = c.log
c.dofolder(modpath .. modpath:match("[\\/]") .. "open".. modpath:match("[\\/]").. "open_registration", function(filePath)
if filePath:match("^.+%.(.+)$") == "ini" then
--print(filePath:match("^.+%.(.+)$"))
c.registrate_from_file(table.concat({modpath, "open", "open_registration",filePath}, DIR_DELIM ))
--print("end")
end
end)

View file

@ -0,0 +1,24 @@
[biome_plains]
type="biome"
name="plains"
heat_point = 50
humidity_point = 50
;
node_top = "mapgen_dirt_with_grass"
node_top_depth = 1
;depth_top
node_filler = "mapgen_dirt"
node_filler_depth = 5
;depth_filler
node_riverbed = "mapgen_sand"
node_riverbed_depth = 3
;depth_riverbed
;node_substratum="mapgen_sandstone"
;node_substratum_depth=1
;custom
vertical_blend = 0
;y_max = yMax
;y_min = seaLevel+1
dune_line=1
;sea_level=1

View file

@ -0,0 +1,19 @@
;'[colorize:#000000:255:0,16=wis_black.png'
[item_hand]
name = ":"
type = "item"
description = "Open Hand"
description = "Way Of The!"
inventory_image = "wieldhand.png"
wield_image = "wieldhand.png"
;x=horizontal, y=vertical, z=depth
wield_scale = {"x" : 0.5, "y" : 1.5, "z" : 1.0}
tool_capabilities = { "full_punch_interval" : 0.5, "max_drop_level" : 0 }
tool_dig_groups = [ "crumbly", "snappy", "oddly_breakable_by_hand" ]
; = { times = hardtimes, uses = 0, maxlevel = 1 },
tool_dig_times = [1.00, 2.00, 3.00, null]
tool_dig_uses = 0
tool_dig_maxlevel = 1
tool_damage_groups = {"fleshy" : 1}

View file

@ -0,0 +1,123 @@
;dune-line
[mapgen_water]
type="node"
name="water_source"
tiles = ["open_water_source.png^[opacity:127"]
;tiles ={{name :'open_water_source.png^[opacity:127', backface_culling : false}}
;tiles=["open_water_source.png^[mask:open_clump_mask.png^[noalpha^[makealpha:0,0,0^(open_water_source.png^[mask:open_clump_mask.png^[makealpha:0,0,0^[colorize:#000000:70)"]
;^[mask:open_clump_mask.png^[noalpha^[makealpha:0,0,0^(open_dirt.png^[mask:open_clump_mask.png^[makealpha:0,0,0^[colorize:#000000:70)"]
;tiles=["open_clump_mask.png^(wis_green.png^(wis_green.png^[mask:open_clump_mask.png))^[makealpha:0,0,0" ]
alias=["mapgen_water_source", "void_essential:water_source", "8"]
description = "This is a secret message, don't read it"
groups = { "oddly_breakable_by_hand":1}
is_ground_content = false
walkable = false
liquid_move_physics = true
move_resistance = 1
pointable = false
diggable = false
buildable_to = true
liquid_viscosity = 0
liquid_renewable = false
liquid_range = 8
use_texture_alpha = "blend"
drawtype = "liquid"
paramtype = "light"
light_source = 12
[mapgen_river_water]
type="node"
name="river_water_source"
tiles = ["open_water_source.png"]
alias=["mapgen_river_water_source", "void_essential:river_water_source", "9"]
groups = { "oddly_breakable_by_hand":1}
description = "This is secret water, you don't need it"
is_ground_content = false
walkable = false
liquid_move_physics = true
move_resistance = 1
pointable = false
diggable = false
buildable_to = true
liquid_viscosity = 0
liquid_renewable = false
liquid_range = 8
[mapgen_stone]
type="node"
name="stone"
tiles=["open_stone.png"]
tiles=["open_stone.png^wis_beading.png"]
tiles=["open_stone.png"]
alias=["mapgen_stone", "void_essential:stone", "1"]
description="abundant, ubiquitous, and yet fundamentaly essential"
groups = {}
is_ground_content=true
[mapgen_grass]
type="node"
name="grass"
tiles=["open_grass.png","open_dirt.png", "open_dirt.png^(open_grass.png^[mask:open_grass_mask_big.png^[makealpha:0,0,0)" ]
alias=["mapgen_dirt_with_grass","grass", "2"]
description="天叢雲剣"
groups = { "oddly_breakable_by_hand":1, "dirt": 1 }
is_ground_content=true
[mapgen_dirt]
type="node"
name="dirt"
tiles=["open_dirt.png"]
alias=["mapgen_dirt","3"]
groups = { "oddly_breakable_by_hand":1}
[mapgen_sand]
type="node"
name="sand"
tiles=[ "open_sand.png"]
alias=["mapgen_sand","12"]
groups = { "oddly_breakable_by_hand":1}
macros = ["clump", "craftables"]
[mapgen_sandstone]
type="node"
name="sandstone"
tiles=["open_sandstone.png"]
alias=["mapgen_sandstone","24"]
groups = {}
[node_log]
type="node"
name="log"
tiles=["open_oak_log.png","open_oak_log.png", "open_oak_bark.png"]
alias=["log","oak_log"]
groups = { "oddly_breakable_by_hand":1, "tree":1 }
[node_leaves]
type="node"
name="leaves"
tiles=["open_oak_leaf.png"]
alias=["leaves","oak_leaves"]
groups = { "oddly_breakable_by_hand":1}
drawtype = "allfaces_optional"
;Allows transparency
waving = 1
; is go wosh!
paramtype = "light"
sunlight_propagates = true
walkable = true
groups = { "oddly_breakable_by_hand":1, "leafdecay" : 1, "flammable" : 1}
; drop = { max_items = 1, items = { {items = {"sapling"}, rarity = 20}, {items = {"leaves"}} } }
;-- mapgen_water_source mapgen_river_water_source mapgen_stone mapgen_dirt_with_grass mapgen_dirt mapgen_sand
;-- mapgen_sandstone
; mapgen_gravel

View file

@ -0,0 +1,26 @@
-- Define player sikin
local frontTexture = "player.png"
local backTexture = "player_back.png"
-- Number of required textures depends on visual.
-- "sprite" uses 1 texture.
-- "upright_sprite" uses 2 textures: {front, back}.
-- set the player's skin when they join
minetest.register_on_joinplayer(function(player)
player:set_properties({
visual = "upright_sprite",
spritediv = {x = 1, y = 1}, -- declare as a single texture divided into 1x1 sections
initial_sprite_basepos = {x = 0, y = 0}, -- Start at the top-left corner
visual_size = {x = 1, y = 1},
--Thanks to wwwq for fixing this part for me! 0/
eye_height = 0.85,
textures = { frontTexture, backTexture },
visual_size = {x = 1, y = 1, z = 1},
collisionbox = { -0.3, 0, -0.3, 0.3, 0.9, 0.3 },
selectionbox = { -0.5, 0, -0.5, 0.5, 1, 0.5, rotate = false },
});
end)

View file

@ -0,0 +1,31 @@
local noon = 0.5
local midnight = 1.0
local fixedTime = noon
minetest.register_globalstep(function(dtime)
minetest.set_timeofday(fixedTime)
end)
minetest.register_on_joinplayer(function(player)
player:set_sky({
base_color = "#87CEEB", --"#87CEEB", -- Explicitly set color to skyblue
type = "plain",
clouds = false,
})
-- please go away sun
player:set_sun({
visible = false, -- set sun visibility
sunrise = nil, -- god damn sunrisebg.png is still visibe!
sunset = nil, -- "sunset.png", -- sunset texture
texture = "sun.png", -- take a wild guess -__-
})
player:set_moon({
visible = false,
texture = "moon.png",
})
player:set_stars({
visible = false, -- Explicitly setting stars visibility
count = 1000, -- Custom number of stars (if needed)
star_color = "#FFFFFF", -- Custom star color (if needed)
})
end)

View file

@ -0,0 +1,89 @@
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
-- hard coding this is a failure of the game design
local schemapath = modpath .. "/schema/smoltree.mts"
--//mtschemcreate smoltree
--registrate tree spawn params
minetest.register_on_mods_loaded(function()
local postpendstr = "_subterranean"
for name, _ in pairs(minetest.registered_biomes) do
if name:sub(-#postpendstr) ~= postpendstr then
--c.log("Biome name: " .. name)
minetest.register_decoration({
deco_type = "schematic",
place_on = {"group:dirt"},
sidelen = 80,
noise_params = {
offset = 0,
scale = 0.05,
spread = {x = 1024, y = 10, z = 1024},
seed = minetest.get_mapgen_setting("seed"),
octaves = 4,
persistence = 0.5,
lacunarity = 1.0,
},
y_max = minetest.registered_biomes.y_max,
y_min = minetest.registered_biomes.y_min,
schematic = schemapath,
flags = "place_center_x, place_center_z",
rotation = "random",
biomes = {name},
})
end
end
-- leaf decay is a failure of the game design
-- compat: https://forum.minetest.net/viewtopic.php?t=18023
local leafdecaynodes = {}
for name, def in pairs(minetest.registered_nodes) do
if def.groups and def.groups.leafdecay then
table.insert(leafdecaynodes, name)
end
end
local treenodes = {}
for name, def in pairs(minetest.registered_nodes) do
if def.groups and def.groups.tree then
table.insert(treenodes, name)
end
end
--c.log(#treenodes)
local leafdecayradius = 1
minetest.register_abm({
nodenames = leafdecaynodes,
neighbors = {"air"},
interval = 1, -- Time in seconds between ABM execution
chance = 1, -- 1 in $% chance for the ABM to run
action = function(pos, node, active_object_count, active_object_count_wider)
local foundtree = false
for dx = -leafdecayradius, leafdecayradius do
for dy = -leafdecayradius, leafdecayradius do
for dz = -leafdecayradius, leafdecayradius do
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
local n = minetest.get_node(p)
if minetest.registered_nodes[n.name].groups and minetest.registered_nodes[n.name].groups.tree then
foundtree = true
break
end
end
if foundtree then
break
end
end
if foundtree then
break
end
end
if not foundtree then
local spawnableitem = minetest.get_node(pos)
minetest.remove_node(pos)
minetest.spawn_item(pos, spawnableitem)
end
end,
})
end)

Binary file not shown.

View file

@ -0,0 +1 @@

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Some files were not shown because too many files have changed in this diff Show more