Jump to content

Plugin integration changes

Work in Progress 2.6.0 Next Version

Bubbafett
  • Curator
Bubbafett

Posted

Hi! I'm a plugin dev and I am currently using your plugin to provide in game weather data to a player HUD.
I was wondering if you could make your Weather class public instead of internal, and make API_GetCurrentWeatherPreset() public as well.

This allows me to call your API method like this.

// Requires: Weather

namespace Carbon.Plugins;

[Info("MyPlugin", "Bubbafett", "0.0.1")]
[Description("Description")]
public class MyPlugin : CarbonPlugin
{

	[PluginReference]
	public Weather Weather;

	private void Init()
	{
		server.Broadcast($"Current Weather {Weather.API_GetCurrentWeatherPreset()}");
	}

	private void OnNewPresetStart(string presetName)
	{
		server.Broadcast($"Weather preset changing to {presetName}, updating HUDs.");
	}

}
  • Curator
Bubbafett

Posted

I am happy to do this on my local copy, but figured I would make an official request. I'm not sure if you allow edits on your plugins.

tofurahie

Posted

Hey, sure, will put it in the next update 

tofurahie

Posted

Changed Status from Pending to Work in Progress

Changed Fixed In to Next Version

  • Curator
Bubbafett

Posted

Awesome! Thanks! Anything you think might be useful for another plugin to use being public would be great.

2m

Downloads

Total number of downloads.

9.6k

Customers

Total customers served.

139.2k

Files Sold

Total number of files sold.

2.9m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.