Project Zomboid

Project Zomboid

177 个评价
Accessible Fields
3
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
38.666 KB
2023 年 7 月 9 日 下午 4:06
2024 年 12 月 4 日 下午 6:34
5 项改动说明 ( 查看 )

订阅以下载
Accessible Fields

描述
This mod has been superceded by Starlit Library.

Please develop future mods to depend on it instead, and consider transitioning existing mods to use it instead (no code changes are needed).
AccessibleFields is a library for other mods to use, it doesn't do anything on its own. As an end user, you don't have any reason to install this unless a mod you use requires it.

Modifies the class metatables to allow fields to be accessed with the intuitive object.field syntax we're all used to. While fields can be accessed without this script, the syntax is extremely cumbersome and unnatural.
Usage Example:
local player = getPlayer() player:Say("The closest zombie is " .. player.closestZombie .. " away."

Please be aware that while the syntax resembles a table access, accessing fields still invokes a java method and has the associated performance cost.

View on GitHub[github.com]

Workshop ID: 3001901955
Mod ID: 00AccessibleFields
4 条留言
Burryaga 2024 年 11 月 14 日 上午 2:05 
The page description says it all; you just need to Google the words you don't know from the description above. Only modders need to understand the purpose of this mod, but if you really want to understand, you'll need to educate yourself on basics of Lua programming.

https://www.lua.org/pil/1.html
Timangust 2024 年 10 月 30 日 上午 4:32 
Explain for noobs,please, what is this thing do?
Eizen 2024 年 5 月 27 日 上午 7:05 
can you add it in the ISToolTipInv:render? self.item currently cant access the fields. I don't know if its possible
Dismellion 2023 年 11 月 28 日 下午 4:53 
ez sub