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

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai

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

by BuckarooBanzay » Tue May 29, 2018 09:30

Vacuum mod for minetest


Releases

Version 1.0:

Version 0.1:


Goes along great with the jumpdrive mod:
https://forum.minetest.net/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: https://forum.minetest.net/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.
 

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

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

by false_chicken » Tue May 29, 2018 10:13

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: 3414
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat
 

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai

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

by BuckarooBanzay » Sun Jun 03, 2018 19:19

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
 

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

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

by paramat » Sun Jun 03, 2018 22:56

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

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai
 

User avatar
Festus1965
Member
 
Posts: 848
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

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

by Festus1965 » Fri Jun 15, 2018 16:34

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.
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai

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

by BuckarooBanzay » Tue Oct 02, 2018 09:35

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: https://forum.minetest.net/viewtopic.php?f=10&t=20311
 

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai
 

Red_King_Cyclops
Member
 
Posts: 228
Joined: Sun Jun 16, 2019 20:17
Location: Earth

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

by Red_King_Cyclops » Sat Sep 14, 2019 12:27

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.
I'm working on a mod that is essentially Galacticraft for Minetest (with differences).
 

BuckarooBanzay
Member
 
Posts: 281
Joined: Tue Apr 24, 2018 05:58
Location: Switzerland
GitHub: thomasrudin-mt
In-game: BuckarooBanzai

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

by BuckarooBanzay » Sun Sep 15, 2019 18:23

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... :/ )
 

Red_King_Cyclops
Member
 
Posts: 228
Joined: Sun Jun 16, 2019 20:17
Location: Earth

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

by Red_King_Cyclops » Sun Sep 15, 2019 20:46

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.
I'm working on a mod that is essentially Galacticraft for Minetest (with differences).
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 12 guests