0 of 0

File information

Last updated

Original upload

Created by

lornlynx

Uploaded by

lornlynx

Virus scan

Safe to use

Documentation

Readme

View as plain text

Automatic Doors v3.9


Authors: lornlynx, bk3k


Installation: Move the automaticDoors.pak into your Starbound/mods/ folder (alternatively, just unzip the file to your mods folder).

Steam workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=729599895

Changelog:
v3.9: -fixed Outpost doors (again. I hope...)
v3.8: -fixed apex mission door
v3.7: -fix for new Vanilla automatic doors so they are uninteractable now (see outpost doors)
-tweaked values
-added external file to allow easier change of certain values (like the door opening radius!)
v3.6: -fix for openMaterialSpaces
v3.5: -consolidated some functions for cleanliness and efficiency
-outer door dimensions are calculated from storage.spaces
*horizontal doors are detected by this method
*as well as the true center which serves as the scan radius center(modified for horizontal)
-better support of alternative materials for materialSpaces
-a hook for modders to call their own functions(as long as they list door.lua first)
-use of package for cleaner code
-less lag in colonies by greatly optimizing how doorOccupiesSpace() works by saving the real locations rather than constantly recalculating this
*this also ties into how door calculations are handled
-attribute support for "platformDoor" : true that would make door scan from the center rather than below only on horizontal doors
*this will require the "Platform Hatches" mod author to add this attribute, or I'll throw out a seperate patch if they won't/don't do so.
-the door state will only reflect upon the first output node if multiple exist
-the second output node (if any) will output based off of detecting the entity types it is set to detect aka "player" and "vehicle" by default
v2.9: -npc query radius once more larger to prevent retractable door spasms
-added retractable platforms to exceptions
v2.8: -npc query radius larger to prevent retractable door spasms
-horizontal doors again close immediately if a player jumps through them from bottom up
v2.7: -reverted from 3.1 till other issues are fixed, wired doors now stay open after reloading the game
v2.6: -horizontal doors now wait a second before closing if opened forcefully (avian mission fix)
v2.5: -locked doors stay locked (glitch and hylotl mission fix)
-npcs now also close the doors behind them (disregarding of who opened them)
-better performance
-wired doors should now close when wired initially
v2.4: -all trapdoors and wired doors should finally work now! (fix for missions)
-general code cleanup
v2.1: -trapdoors and hidden doors should again be an exclusion (fix for missions)
v2.0: -updated for 1.0 (bk3k)
-added functionality, revised code (bk3k)
v1.9.1: -added exception for templehiddentrapdoor and dirttrapdoor (thanks to Manjaro for the report)
-fixed a bug where you couldn't open exceptional doors by hand
v1.9: -updated for glad_giraffe beta
v1.8: -fix for lunar base door
v1.7: -updated for upbeat_giraffe beta
-reworked logic slightly, now when you stand in automatic range and close the door manually, it will stay closed until you walk out of range and again
also when an NPC opens the door they will stay open until you entered the opening range once and then they'll close again once you leave
-ditched the old bigger circle/smaller circle principle, now there is only one area that detects players and if no one's in the door closes
-trigger ranges should be a bit more accurate now (god thank the debug functions)
v1.6: -doors remember now if you've opened them automatically, this mainly means that doors that were opened by NPC's won't get automatically
closed when you approach them, but you rather have to interact with them manually once before they become automatic until the next NPC
uses them; this is mainly here so you can walk through a village and leave the doors in the state like the NPC's left them
-NPC detection for horizontal doors deactivated, as they don't use them anyways and it prevented them from closing properly when they
stood underneath them; this is relevant for healthires Better Doors mod, but as it might get added into Vanilla this change is in in advance
-mod is now packed into a .modpack file, if you are interested in the code check the forums for how to unpack or just ask me personally
also had to change directory structure as unorthodox ones are seemingly not supported
v1.5: -added support for "Better Doors" horizontal doors (thanks to healhire for teh help)
-added documentation
v1.4: -added support for MadTulip`s Spaceship mod: automatic function is disabled for horizontal doors
v1.3: -increased scanning height slightly, this should prevent getting stuck in the large doors and remove some other inconsistencies
v1.2.1: -forgot to change version to enraged koala, huh?
-added readme file
v1.2: -doors no longer close automatically when a NPC is standing too near to it (to prevent door-spasming, yes this is a word now)
-now works like a normal door when you wire something to the inbound (blue) node, so you can keep those poor NPCs locked up
v1.1: -no longer triggers for hidden Glitch door and Glitch trap door (for gameplay reasons)
-doors should open in the right direction now (most of the time at least)


Description: Makes all doors open and close automatically!

You come home from a hard and hefty farming day, and then there is it. The door. Doesn't it bother you to ever press that E button open it? Fear no more, citizen, for convenience is here!

This mod makes all doors in the game (all that rely onto doors.lua actually) automatic. This means you'll be able to just walk straight forward against a door and it will open and close without your consent!
Though you should probably be careful when there are monsters at your door, as you will open the door now when you come too close...
It also open automatically ONLY for players, NPCs still have to use doors manually and monsters still can't open them.
Though NPCs also close the doors automatically behind them now, which means that you no longer have to worry that monsters might slip into your house! (Though it is not 100% foolproof if a monster stands right next to the door when the NPC opens it)
Doors should also behave as normal doors when they are locked or wired, wiring a door disables automatic mode while dewiring one enables it again.
If a door behaves funky after you downloaded a new version, walk through it and away from it once and see that the NPCs do the same, also be sure to reload your game!

In case of issues: If you are getting stuck, like in a mission, you can open the chat and type "/admin" followed by "/settileprotection 0 false". This allows you to destroy blocks. Set it to true again after you got through the faulty door so you don't lose the experience. And report the issue to me :)


It is highly recommended that you use the NPC's Aren't Stupid! mod: https://steamcommunity.com/sharedfiles/filedetails/?id=731644566
It revamps NPC AI so they can actually use horizontal doors without getting stuck in a loop. Most issues regarding NPC's can be solved by using this mod!

Should you have ghost doors in your ship, you can use this handy mod to remove them: https://steamcommunity.com/sharedfiles/filedetails/?id=755391531


Also if you recognize any bugs, or have any wishes or future ideas, please feel free to report them to me (us rather), I will try to fix them then.

Discuss the mod here: http://community.playstarbound.com/index.php?threads/automatic-doors.74792/


Copyright:
basic code officially @chucklefish, additional code by lornlynx (with some help from Healthire), greatly reworked and updated by bk3k

code redistribution and free usage is allowed, no credit or permission needed (would still be lovely though)