Jump to content

Minor Mining M-...improvements


bit

Recommended Posts

I haven't been following too much so hopefully this isn't a repeat of something already out there.

 

Safe Mining

If the health of the mining ship is less than 50%, the ship will stop and wait to heal.  It will also send a chat notification to the player, which could be useful if you plan on remote-healing it (select the mining ship, press F, go to Build, then repair the ship; this is a vanilla feature, not a part of the mod; it's also a great way to slave the camera to a ship you control).

 

Note, I made this on the fly to stop my drones from blowing themselves up.  If you decide to use it, I can't guarantee your ship won't succumb to the Kraken or anything else.  Also, please let me know if you find a bug!  It really isn't the Mona Lisa of coding so any feedback would be appreciated.

 

Download and Installation

safemine.lua (./scripts/entity/ai/safemine.lua)

craftorders.lua (./scripts/entity/ai/craftorders.lua)

craftorders.patch - a patchfile for the technologically inclined; I'm playing around with the patch-diff system and figured I might as well include it

 

Upcoming (hopefully, technology and time allowing):

Clear all asteroids: Allows a mining ship to target all asteroids, not just ore-carrying ones

Steady-mining: Tells the ship to stay put when mining

Follow mode: Slaves the user's ship to follow a particular vessel/autonavigate to a point

 

Update (Feb. 6, 2017)

- Added a Mine All command (implements Safe Mining features as well).

    craftorders.lua (entity/ai/craftorders.lua)

    safemine.lua (./scripts/entity/ai/safemine.lua)

    safeallmine.lua (./scripts/entity/ai/safeallmine.lua)

- Re-included standard mining to try to maintain as much compatibility as possible.

 

Unfortunately, the AI which controls the movement of mining ships is not exposed, at least as far as I can see.  It'll take far more effort that initially thought to handle steady-mining.

I'll continue looking into Follow Mode.  It is heavily dependent on how the unexposed code handles user input and AI simultaneously which could cause instability, etc.  No promises.

As per request, I'll also look into Safe Salvaging.  There does already exist a salvaging mod I'll link below, but I'll see if I can add the safety feature to it as well.

Salvaging Mod by Nexus

mining.zip

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...