Starbound

Starbound

1,676 个评价
Automatic Doors
9
7
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
49.931 KB
2016 年 7 月 22 日 下午 3:12
2021 年 9 月 29 日 上午 8:31
30 项改动说明 ( 查看 )

订阅以下载
Automatic Doors

描述
Makes all doors open and close automatically!

Last update: v3.9 -fixed Outpost doors (again. I hope...)

Regarding Outpost Doors: The devs have seemingly made automatic opening an innnate feature of the door-code now, but only the Outpost doors have it activated. I tried to backwards-fit the code to our modded doorcode, but the differences are now so great that some things don't work together, which is why Outpost doors may not work. I have decided to rewrite the code using the new door code, as otherwise things will get only messier. I have to add a few featuers that their code is still lacking, and will upload a new clean version once I have it done.

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://psteamcommunity.yuanyoumao.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://psteamcommunity.yuanyoumao.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/

Credit: bigthanks to healthire for some minor help and especially to bk3k for updating it to 1.0 and greatly updating the code!

Our other mods:
Give me Cotton! - http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=732096973
NPC Killer - http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=761746889
No Heal and Fooditem Drop - http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=764533110
Pipes flow - http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=745399025
bk3k Blocks and Objects - http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=757860462
热门讨论 查看全部(3)
6
2016 年 9 月 15 日 下午 10:13
置顶: For modders - more than just automatic doors
bk3000
0
2021 年 3 月 17 日 下午 1:14
置顶: Basic customization (e.g. detection radius)
lornlynx
346 条留言
lornlynx  [作者] 8 月 1 日 下午 11:36 
Like the stickied post right above
lornlynx  [作者] 8 月 1 日 下午 11:32 
@Time_pug : yes,but only if you change the code yourself. See the posts in the forum.
Time_pug 7 月 21 日 上午 6:24 
Is there any way to decrease the auto open range so doors only open when I'm like 1 tile away?
爱笑的佐巴扬 2 月 19 日 上午 5:50 
This mod seems to cause the elevator in the space station to fall
lornlynx  [作者] 2024 年 12 月 31 日 上午 8:43 
@Bottinator22 yes, it scans for entities and only when it finds a player it opens. Could be added as an exception, or if i ever come to it as a setting
VariableVixen 2024 年 12 月 23 日 下午 6:26 
I don't think I can change it myself, because I'm playing with some friends, and they'd need a copy too. But if the vanilla spawning command will work, then I can at least use those doors in my own builds, as long as they'll stay open until all players and NPCs move away.
bk3000  [作者] 2024 年 12 月 18 日 上午 11:26 
@VariableVixen
Either by making sure it finds no valid target by type, or with setting the radius to 0, it should do what you want. If you know how to spawn custom objects (vanilla item spawning command), you could make custom doors that do what you want.
"queryOpenRadius" : 0

There are other things you can change, if you look at the top pinned thread above.
VariableVixen 2024 年 12 月 14 日 下午 9:01 
I would like to request a feature: automatic door closing without automatic door opening . My initial idea is that the existing mechanism could mostly be reused, so that when no valid scan target is near an open door it will close, but doors will only open when a player or NPC does so manually (or via wire signal). I would personally use this in my own base, so that the full space within rooms I build is "available" without opening the door out.
Bottinator22 2024 年 9 月 26 日 上午 8:33 
Looking at your code, it seems I should probably switch my drones to using openDoor instead for opening doors, since this mod doesn't expect non-players to interact with doors
Bottinator22 2024 年 9 月 26 日 上午 8:28 
It has come to my attention that this mod causes issues with my Support Drones mod, where they open/close doors repeatedly.
My Support Drones mod handles doors this way:
- Drone pathfinder finds a wall and detects it to be a door (via hasCapability("door"))
- Drone, while following the path, checks if the door is closed (via hasCapability("closedDoor")
- If it finds a closed door in its path, it will open it (via calling onInteraction with object {source={mcontroller.facingDirection()}}
The drones are monsters.
I haven't looked at your code, but it might be unable to perceive the possibility of a monster opening a door.
Or it needs an entity id in the table passed to onInteraction. (The data provided by the drone for that call is incomplete)