Project Zomboid

Project Zomboid

30 个评价
Claim Occupied & Non-Residential Buildings as Admin
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
50.458 KB
2022 年 1 月 21 日 上午 4:34
1 项改动说明 ( 查看 )

订阅以下载
Claim Occupied & Non-Residential Buildings as Admin

描述
This mod is redundant as of game version ≥ 41.68

If you're an admin, you can claim buildings as a safehouse, regardless of them being currently occupied, marked as non-residential, or both.

Compatibility & Troubleshooting
  • This mod is not compatible with Claim Non-Residential Buildings, because it uses the same base code from Fenris_Wolf-tt. This mod is just an expanded version of aforementioned.
  • If your safehouse resets after server's restart, ensure that you shutting it down properly, with the /quit command.
  • If your safehouse resets after your character leaves it, make sure that your SafeHouseRemovalTime server option has a value less than 597. This value uses in-game hours, which is then converted to milliseconds, and the max value of a signed int in Java is 2147483647.
  • Tested with v41.65
How does it work?
引用自 Fenris_Wolf-tt
When you bring up the lua popup menu in a building, the java engine returns a string reason why you can't claim it. It then disables that option in the menu, and sets that reason to the tooltip.
The code in the paste checks all the items in the menu, finds the safehouse claim option and checks what the tooltip is. If the reason is non-residential it re-enables the option.
When the claim is actually done on a building the java engine checks again if that building can be claimed. The bypassClaimChecks() function in the code snippit skips the part of java that performs that and just registers the x/y bounding box of the building which is what java does if the checks pass.
Workshop ID: 2726596901
Mod ID: claimSH
22 条留言
Kafkatrap 2023 年 3 月 31 日 下午 4:51 
@Doppelgänger i believe living in non-residential buildings is a setting included in the vanilla sandbox options now?

However, i don't believe there is a mod that lets you set buildings you can spawn in as safehouses (or at least i haven't found one despite hours of searching) For those of us that use additional spawn point mods, that would be an immensely useful feature.

Perhaps that could be a feature in the next version of this mod, or a new mod? Just an idea.
Mcloutier87 2023 年 2 月 4 日 下午 5:34 
just saying but this is an option in the config so no reason for a mod
inosk0pedjfk 2023 年 1 月 4 日 下午 10:21 
does this work with the fire house or police stations?
SpetsnazSS 2022 年 8 月 21 日 上午 5:51 
Dont seem to work on the latest builds hope you sort it out soonish.
Doppelgänger  [作者] 2022 年 6 月 15 日 下午 6:55 
I believe 41.68 broke this mod. I will revisit it once NPCs or animals come out.
Burbank 2022 年 6 月 15 日 下午 4:01 
Doesn't seem to work, still says occupied.
Talon 2022 年 5 月 30 日 下午 8:04 
Not sure, but doesn't seem to work - trying to claim an elementary school, which is not a spawn (the message is "occupied", not spawn zone).
Bones 2022 年 5 月 3 日 下午 2:32 
Hey, so I've been trying to work this mod for awhile, and cant seem to bypass the functionality of claiming over occupied. I'm still barred on that reason, and cant seem to figure out a bypass.
Martes 2022 年 4 月 25 日 上午 12:45 
Thank you very a lot
Doppelgänger  [作者] 2022 年 4 月 24 日 下午 9:34 
@Tuesday
/setaccesslevel userName admin
More at https://pzwiki.net/wiki/Dedicated_Server