[Mod] vacuum [git] [0.1] [vacuum]

Post Reply
User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

[Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

Vacuum mod for minetest
Releases

Version 1.0: Version 0.1:
Goes along great with the jumpdrive mod:
viewtopic.php?f=9&t=20073

Or the spacesuit:
https://git.rudin.io/minetest/spacesuit

Operation

The space/vacuum starts at 1000 blocks in the y axis (configurable)

The mod defines an airlike vacuum:vacuum block which suffocates the player (with drowning=1). An airtank or spacesuit (https://git.rudin.io/minetest/spacesuit) would help to survive in space: https://github.com/minetest-mods/airtanks

Air can be pumped in to any closed structure with an airpump (vacuum:airpump).
The airpump uses filled and empty bottles depending on which height it is placed:
on earth it fills empty steel-bottles with air and in space it empties them and creates an air-bubble around itself.

Configuration in minetest.conf
  • vacuum.space_height defines at which height the vacuum starts, default: 1000
  • vacuum.air_pump_range defines the range (radius) of the air pump, default: 5

Vacuum propagation

The vacuum sucks air out of every structure if there are leaky nodes (doors, wool, wood, etc; defined in abm.lua)

A vacuum node in a pressurized area can suck out the whole structure.

Other nodes in space

Vacuum exposure on nodes:
  • Dirt converts to gravel
  • All plants convert to dry shrubs
  • Leaves disappear
  • Water evaporates
  • Torches and ladders drop (to prevent air bubbles/cheating)
Compatibility

Optional dependencies:
  • Mesecon interaction (execute pump on signal)
Mesecon Protip: Use mesecon-detector to detect vacuum and auto-close areas with sticky pistons (airlock)
Or use a scifi-door from the scifi-nodes mod: viewtopic.php?t=11751

License

Code: LGPL 2.1
Textures: CC0

Screenshots

Airpump:

Image


Hole in the structure:

Image


Hole from outside:

Image
Last edited by BuckarooBanzay on Tue Oct 02, 2018 09:32, edited 4 times in total.
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
false_chicken
Member
Posts: 53
Joined: Wed Feb 04, 2015 23:41
GitHub: falsechicken
In-game: false_chicken
Location: Florida, USA

Re: [Mod] vacuum [git] [vacuum]

by false_chicken » Post

This works really well. I built an airlock using mesecons with sticky pistons and it worked exactly as I expected.
DISCLAIMER: I am probably wrong.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] vacuum [git] [vacuum]

by paramat » Post

Nice, i did something similar in my moonrealm mod https://github.com/paramat/moonrealm

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [vacuum]

by BuckarooBanzay » Post

Yes, i did my research :)
I also looked into the code from mars-survive but the solutions were pretty integrated.

This aims to be a modular, standalone solution for vacuum/space based survival

Did you have time to test it, i'm open for feedback...
paramat wrote:Nice, i did something similar in my moonrealm mod https://github.com/paramat/moonrealm
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] vacuum [git] [vacuum]

by paramat » Post

Not yet, i can see how it works and in some ways it is better than my approach and i can learn from it.

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

Version 0.1:
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Festus1965 » Post

I am interested ... as a solution for the space area.

I think about make all area over 25000 nodes to vacuum items, even without the pump, but would need the other direction to get my spaceship with air to breath ... could even build a real air lock gate to get in or out ... here with hazemat or get a problem.

yes I could use WorldEdit then and set, as using the mod and activate the vacuum item, all areas over 25000 in vacuum.

Yes nice, I like that Idea from the base,
even maybe build safety rooms on the surface, where no one should go in and keep it airfree (vacuum).

What is happening when i open then a normal door between vacuum and air ?
(yes nothing yet ... i guess both items stand on there position)

But maybe some further ideas.

Go on, you get a plus already ! i check it out next.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

Update 1.0
  • Airpump creates an air bubble now (as long as there are enough air-bottles)
  • Optimized Vacuum-propagation and mapgen
This mod is in "productive" deployment on the pandorabox space server: viewtopic.php?f=10&t=20311
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

I just found out this mod is on youtube: https://www.reddit.com/r/Minetest/comme ... ew_vacuum/
Thanks and keep up the good work Nathan Salapat :)
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

Red_King_Cyclops
Member
Posts: 324
Joined: Sun Jun 16, 2019 20:17
Location: x=123, y=120, z=534

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Red_King_Cyclops » Post

I'm making a space mod that uses vacuum as a dependency. This mod adds in space dimensions similar to your planet_moon and planet_mars mods. I plan to make habitable exoplanet dimensions, and I am wondering if it is possible to cause the vacuum to stop at a certain y-height.
Currently working on new mods.

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

Red_King_Cyclops wrote:I'm making a space mod that uses vacuum as a dependency. This mod adds in space dimensions similar to your planet_moon and planet_mars mods. I plan to make habitable exoplanet dimensions, and I am wondering if it is possible to cause the vacuum to stop at a certain y-height.
You could overwrite the vacuum.is_pos_in_space(pos) function with your own logic, like i did in the planet_mars mod:

https://github.com/pandorabox-io/planet ... vacuum.lua

Code: Select all

local has_vacuum_mod = minetest.get_modpath("vacuum")

local y_start = planet_mars.y_start
local y_height = planet_mars.y_height


if has_vacuum_mod then

	local old_is_pos_in_space = vacuum.is_pos_in_space
	vacuum.is_pos_in_space = function(pos)

		if pos.y < y_start or pos.y > (y_start + (y_height * 0.95)) then
			-- not on mars
			return old_is_pos_in_space(pos)
		end

		-- atmosphere in mars caves
		return false
	end


end
This allows the mars-caves to be filled with air in my case.

Or the air-shell around the planetoids:
https://github.com/pandorabox-io/planet ... vacuum.lua

Just a heads-up: the function is rate-limited but will be called 1000 times per second in the worst case:
https://github.com/thomasrudin-mt/vacuu ... cs.lua#L58

(i need to document that mod a bit more in the future... :/ )
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

Red_King_Cyclops
Member
Posts: 324
Joined: Sun Jun 16, 2019 20:17
Location: x=123, y=120, z=534

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Red_King_Cyclops » Post

BuckarooBanzay wrote:
Red_King_Cyclops wrote:I'm making a space mod that uses vacuum as a dependency. This mod adds in space dimensions similar to your planet_moon and planet_mars mods. I plan to make habitable exoplanet dimensions, and I am wondering if it is possible to cause the vacuum to stop at a certain y-height.
You could overwrite the vacuum.is_pos_in_space(pos) function with your own logic, like i did in the planet_mars mod:

https://github.com/pandorabox-io/planet ... vacuum.lua

Code: Select all

local has_vacuum_mod = minetest.get_modpath("vacuum")

local y_start = planet_mars.y_start
local y_height = planet_mars.y_height


if has_vacuum_mod then

	local old_is_pos_in_space = vacuum.is_pos_in_space
	vacuum.is_pos_in_space = function(pos)

		if pos.y < y_start or pos.y > (y_start + (y_height * 0.95)) then
			-- not on mars
			return old_is_pos_in_space(pos)
		end

		-- atmosphere in mars caves
		return false
	end


end
This allows the mars-caves to be filled with air in my case.

Or the air-shell around the planetoids:
https://github.com/pandorabox-io/planet ... vacuum.lua

Just a heads-up: the function is rate-limited but will be called 1000 times per second in the worst case:
https://github.com/thomasrudin-mt/vacuu ... cs.lua#L58

(i need to document that mod a bit more in the future... :/ )
Thanks, that looks like it should work.

Edit: I modified your code and tested it in my mod. For some reason, from 23500 to 24500, there is no atmosphere. The code looks like it should function, but nothing happens for some reason. Have I made any mistakes?

Code: Select all

--vacuum code

local old_is_pos_in_space = vacuum.is_pos_in_space
vacuum.is_pos_in_space = function(pos)

	if pos.y < 23500 or pos.y > 24500 then
		-- not in the atmosphere of a habitable planet
		return old_is_pos_in_space(pos)
	end

	-- atmosphere on habitable worlds
	return false
end
Second edit: I figured out that the example you provided stopped the vacuum but did not replace it with air. After creating an on_generated function that accompanied the override of is_pos_in_space, my alien planet now has an atmosphere.
Currently working on new mods.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] vacuum [git] [0.1] [vacuum]

by sirrobzeroone » Post

Hey
BuckarooBanzay wrote:
I thought we could tag now but I guess not....best I could do was to quote :)

I made some minor changes to push all the external node names into init.lua and global vacuum table. Basically just makes it easier for myself as i want to use vacuum in a non-mtg base type game (ie more customised node names) and easier to switch names in and out if they are centralised somewhere.

I wasn't sure if you'd be intrested in me sending these changes as pull request? Changes nil functionality basically just makes it easier to config for a non-mtg game :).

my fork is here:
https://github.com/sirrobzeroone/vacuum

Most changes in init.lua, but also through the other lua files to grab the values from the global vacuum table, converted from depends to mod.conf and made air bottle optional ie if another node is specified as full air bottle no need to register "vacuum:air_bottle".

Happy to pull request or not just wanted to offer in case it looked useful :).

I did do testing and couldnt pickup any bugs or changes in functionality also swapped bucket:bucket_empty and bucket:bucket_water as subs for empty/full air bottles and everything worked as expected....little odd using water to make air but the test worked :).

c56
Member
Posts: 307
Joined: Wed Apr 21, 2021 03:05
GitHub: tigercoding56
In-game: bm5 or bemo5 also sell_her_on55

Re: [Mod] vacuum [git] [0.1] [vacuum]

by c56 » Post

instead of dropping torches / ladders would it be possible to use a position based system rather than filling the air with vacuum air ?
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

c56 wrote:
Tue Aug 02, 2022 16:18
instead of dropping torches / ladders would it be possible to use a position based system rather than filling the air with vacuum air ?
Can you give me an example of this?
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

c56
Member
Posts: 307
Joined: Wed Apr 21, 2021 03:05
GitHub: tigercoding56
In-game: bm5 or bemo5 also sell_her_on55

Re: [Mod] vacuum [git] [0.1] [vacuum]

by c56 » Post

BuckarooBanzay wrote:
Tue Aug 02, 2022 17:05
c56 wrote:
Tue Aug 02, 2022 16:18
instead of dropping torches / ladders would it be possible to use a position based system rather than filling the air with vacuum air ?
Can you give me an example of this?
i am bad at lua but in python it would look something like this

Code: Select all

  if (currentx > startx and currentx < endx) and (currentY > startY and currentY < endY) and (currentZ > startZ and currentZ < endZ): 
 do whatever  
 
instead of if player.istouching(vacuum:vacuum)
this is a signature not a place to post messages also if i could change my username i would change it to sell_her_on55

Red_King_Cyclops
Member
Posts: 324
Joined: Sun Jun 16, 2019 20:17
Location: x=123, y=120, z=534

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Red_King_Cyclops » Post

Sorry for necroposting, but I do have a question and a suggestion.
Once again, I am trying to create mods that include vacuum as a dependency. I am also considering including vacuum in a modpack. However, I am confused about the licensing for this mod, and I cannot utilize this mod until I am certain of the licenses it uses. The original post states that the code is licensed under the LGPL-2.1 and the media under CC0, but the Github page (https://github.com/mt-mods/vacuum) includes a license for the GPL-3.0, with no mention of any media license appearing anywhere in the repository. (Also, I noticed that the repository now seems to belong to another user.) So my question is, what is are the licenses for the code and media?
On an unrelated note, it would be helpful if vacuum was posted on ContentDB.

Edit: I realize that the author is no longer active on these forums, but if anyone else has an answer or word of advice then I would like to hear it.
Currently working on new mods.

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Blockhead » Post

Red_King_Cyclops wrote:
Thu Aug 24, 2023 21:16
Edit: I realize that the author is no longer active on these forums, but if anyone else has an answer or word of advice then I would like to hear it.
BuckarooBanzay? He's busy but he responded to a comment on the Pandorabox server thread just the other day. Just expect response times within maybe 3 days or so instead of a few hours. You might also try logging into Pandorabox and asking about this, there's often some of the developers or BB himself on.

My perspective: I agree the licence looks unclear at first, but I think I have it worked out. Vacuum is mostly a library, with just textures for the air pump node. So license.txt licenses the code under GPL v3 or later, and the readme statement licenses all the textures under the MIT license. That covers most of it, but not the sounds or screenshots. The sounds actually have a license.txt inside the sounds directory, which is just a statement of the source of the sound as being CC0 from freesound.org. That leaves the screenshots, and those have no particular licence statement. In that case I would usually say they fall under the main license.txt statement, i.e. GPL v3. However, their authorship (naturefreshmilk) is not Buckaroo Banzay, so I think it's a bit poor. Thankfully I think few people will probably be re-using those screenshots so the lack of clarity is relatively unimportant.

I would say you should open a GitHub issue about the lack of clarity about licensing. It would be better to have a clear license statement for all the parts of the mod and have it all in one file.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Red_King_Cyclops
Member
Posts: 324
Joined: Sun Jun 16, 2019 20:17
Location: x=123, y=120, z=534

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Red_King_Cyclops » Post

Blockhead wrote:
Fri Aug 25, 2023 02:52
Red_King_Cyclops wrote:
Thu Aug 24, 2023 21:16
Edit: I realize that the author is no longer active on these forums, but if anyone else has an answer or word of advice then I would like to hear it.
BuckarooBanzay? He's busy but he responded to a comment on the Pandorabox server thread just the other day. Just expect response times within maybe 3 days or so instead of a few hours. You might also try logging into Pandorabox and asking about this, there's often some of the developers or BB himself on.

My perspective: I agree the licence looks unclear at first, but I think I have it worked out. Vacuum is mostly a library, with just textures for the air pump node. So license.txt licenses the code under GPL v3 or later, and the readme statement licenses all the textures under the MIT license. That covers most of it, but not the sounds or screenshots. The sounds actually have a license.txt inside the sounds directory, which is just a statement of the source of the sound as being CC0 from freesound.org. That leaves the screenshots, and those have no particular licence statement. In that case I would usually say they fall under the main license.txt statement, i.e. GPL v3. However, their authorship (naturefreshmilk) is not Buckaroo Banzay, so I think it's a bit poor. Thankfully I think few people will probably be re-using those screenshots so the lack of clarity is relatively unimportant.

I would say you should open a GitHub issue about the lack of clarity about licensing. It would be better to have a clear license statement for all the parts of the mod and have it all in one file.
Thank you for looking into this for me. I am still a little confused about the airpump textures being licensed under the MIT license, since that's a software license, not a media one.
Currently working on new mods.

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] vacuum [git] [0.1] [vacuum]

by Blockhead » Post

Red_King_Cyclops wrote:
Fri Aug 25, 2023 04:01
Thank you for looking into this for me. I am still a little confused about the airpump textures being licensed under the MIT license, since that's a software license, not a media one.
No problem. I can understand your confusion about the MIT license being used on textures, since it refers to software rather than a generic creative work or an artwork. It can still be used, it's just not preferred. Putting textures under MIT is very similar to a Creative Commons Attribution (CC-BY) licence, plus a warranty disclaimer which is not as useful for art as it is for software.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] vacuum [git] [0.1] [vacuum]

by BuckarooBanzay » Post

However, I am confused about the licensing for this mod, and I cannot utilize this mod until I am certain of the licenses it uses. The original post states that the code is licensed under the LGPL-2.1 and the media under CC0, but the Github page (https://github.com/mt-mods/vacuum) includes a license for the GPL-3.0, with no mention of any media license appearing anywhere in the repository.
Yeah, the license situation is quite a mess and it is even worse: https://github.com/mt-mods/vacuum/issues/26
turns out the airpump textures i copied are originally from a proprietary minecraft mod :(
Anyway: looking for replacements, if you have something let me know.
(Also, I noticed that the repository now seems to belong to another user.)
Same user, different nick at that time :)
On an unrelated note, it would be helpful if vacuum was posted on ContentDB.
Will do when the license situation is solved, this was one of my first mods after all...
Edit: I realize that the author is no longer active on these forums, but if anyone else has an answer or word of advice then I would like to hear it.
Still active on the more reliable medias/platforms (irc, discord and github currently) after the last forum-wipe i'm not overly confident on writing something here, sorry
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests