取决于
-
高级状态
-
纪念碑守望者
-
区域管理器
Works with
-
真正的 PvE
-
图片库
关于 Zone Status
该插件在状态栏中显示玩家的当前区域或纪念碑。依赖于 ZoneManager、MonumentsWatcher 和 AdvancedStatus 插件。
附言每个区域或纪念碑的设置位于 “.\oxide\data\ZoneStatus” 文件夹中。
- 显示玩家当前纪念碑的能力;
- 当玩家切换语言时自动更改纪念碑名称的能力;
- 显示玩家当前区域的能力;
- 启用或禁用每个区域的可见性的能力;
- 能够为每个区域自定义样式(在数据文件中);
- 指定柱线顺序的能力;
- 更改条形高度的能力;
- 自定义背景颜色和透明度的能力;
- 为背景设置材质的能力;
- 在图像的 CuiRawImageComponent 和 CuiImageComponent 之间切换的能力;
- 从本地文件夹获取图像的能力 (*SERVER*\oxide\data\AdvancedStatus\Images);
- 设置自己的图像并自定义图像的颜色和透明度的能力;
- 设置 sprite 而不是图像的能力;
- 能够自定义文本的颜色、大小和字体。
{
"Is it worth deleting all saved Zone bars upon detecting a Wipe?": true,
"Is it worth deleting all saved Monument bars upon detecting a Wipe?": true,
"Is it worth deleting all unused Zones during initialization?": false,
"The name of the zone which has no name": "No name zone",
"Is it worth copying local images for new zones or monuments? Note: If set to true, it may create a lot of unnecessary images": false,
"Is it worth enabling the bar display for new zones?": true,
"Is it worth enabling the bar display for new monuments?": true,
"Default status bar settings for new zones and monuments": {
"Order": 20,
"Height": 26,
"Main_Color(Hex or RGBA)": "#A064A0",
"Main_Transparency": 0.8,
"Main_Material": "",
"Image_Url": "https://i.imgur.com/mn8reWg.png",
"Image_Local(Leave empty to use Image_Url)": "ZoneStatus_Default",
"Image_Sprite(Leave empty to use Image_Local or Image_Url)": "",
"Image_IsRawImage": false,
"Image_Color(Hex or RGBA)": "#A064A0",
"Image_Transparency": 1.0,
"Is it worth enabling an outline for the image?": false,
"Image_Outline_Color(Hex or RGBA)": "0.1 0.3 0.8 0.9",
"Image_Outline_Transparency": 1.0,
"Image_Outline_Distance": "0.75 0.75",
"Text_Size": 12,
"Text_Color(Hex or RGBA)": "1 1 1 1",
"Text_Font(https://umod.org/guides/rust/basic-concepts-of-gui#fonts)": "RobotoCondensed-Bold.ttf",
"Text_Offset_Horizontal": 0,
"Is it worth enabling an outline for the text?": false,
"Text_Outline_Color(Hex or RGBA)": "#000000",
"Text_Outline_Transparency": 1.0,
"Text_Outline_Distance": "0.75 0.75",
"SubText(Leave empty to disable)": "",
"SubText_Size": 12,
"SubText_Color(Hex or RGBA)": "1 1 1 1",
"SubText_Font": "RobotoCondensed-Bold.ttf",
"Is it worth enabling an outline for the sub text?": false,
"SubText_Outline_Color(Hex or RGBA)": "0.5 0.6 0.7 0.5",
"SubText_Outline_Transparency": 1.0,
"SubText_Outline_Distance": "0.75 0.75"
},
"Wipe ID": null,
"Version": {
"Major": 0,
"Minor": 1,
"Patch": 6
}
}
[PluginReference] private Plugin ZoneStatus;
有 1 种方法:
- UpdateZoneSettings
UpdateZoneSettings:
Used to change bar settings for zones from ZoneManager.
To call the UpdateZoneSettings method, you need to pass 3 parameters, 1 of which is optional:
- <string>zoneID – The Id of the zone;
- <object[]>args – Array of objects to update;
- <bool>redraw – Optional. Is it worth redrawing the status bars for players? Defaults to true.
Note: It is not necessary to pass all parameters, but the indices are strictly tied to the parameters.
object[] args = new object[] { true, //0. Display - Is it worth displaying the status bar for this zone? "#A064A0", //1. Background_Color - Primary HEX color of the status bar. 0.8f, //2. Background_Transparency - Opacity of the primary status bar color. "https://i.imgur.com/mn8reWg.png", //3. Image_Url - Url of the status bar icon. "ZoneStatus_Default", //4. Image_Local - Name of the local image for the status bar. Note: The image must exist.(Leave empty to use Image_Url). false, //5. Image_IsRawImage - True for multicolored images, false for monochromatic images. "#A064A0", //6. Image_Color - Color of the status bar icon. For Image_IsRawImage = false. 1f, //7. Image_Transparency - Opacity of the status bar icon. For Image_IsRawImage = false. "#FFFFFF", //8. Text_Color - Primary text color. "#FFFFFF" //9. SubText_Color - Subtext color. }; ZoneStatus?.Call("UpdateZoneSettings", zoneID, args, true); //Call the API method UpdateZoneSettings with all necessary arguments for updating.
Example with incomplete parameters:
object[] args = new object[] { null, //0. Display - Skip index 0, as it is reserved for Display. "#A064A0", //1. Background_Color - Primary HEX color of the status bar. 0.8f, //2. Background_Transparency - Opacity of the primary status bar color. null, //3. Image_Url - Skip index 3, as it is reserved for Image_Url. null, //4. Image_Local - Skip index 4, as it is reserved for Image_Local. false, //5. Image_IsRawImage - True for multicolored images, false for monochromatic images. "#A064A0", //6. Image_Color - Color of the status bar icon. For Image_IsRawImage = false. 1f //7. Image_Transparency - Opacity of the status bar icon. For Image_IsRawImage = false. }; ZoneStatus?.Call("UpdateZoneSettings", zoneID, args, true); //Call the API method UpdateZoneSettings with all necessary arguments for up
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。