From e8a42be368aa2a15c623a3e877ec39fca33edd8e Mon Sep 17 00:00:00 2001 From: Ritabrata Das Date: Sat, 15 Feb 2025 19:17:52 +0530 Subject: Initial Commit for docs --- plugins/smoke_on_damage/Plugin.py | 48 ------------------------------------- plugins/smoke_on_damage/__init__.py | 2 -- 2 files changed, 50 deletions(-) delete mode 100644 plugins/smoke_on_damage/Plugin.py delete mode 100644 plugins/smoke_on_damage/__init__.py (limited to 'plugins/smoke_on_damage') diff --git a/plugins/smoke_on_damage/Plugin.py b/plugins/smoke_on_damage/Plugin.py deleted file mode 100644 index 08c184b..0000000 --- a/plugins/smoke_on_damage/Plugin.py +++ /dev/null @@ -1,48 +0,0 @@ -"""TThis plugin will cause the aircraft to emit smoke if it's health is below a certain threshold. -It is also an example of a plugin as a folder/module. -This can be used as a basis for more complex plugins that may need multiple files.""" -from lib.PacketManager.packets import FSNETCMD_AIRCMD, FSNETCMD_AIRPLANESTATE, FSNETCMD_TEXTMESSAGE -from logging import debug -from config import SMOKE_LIFE, SMOKE_PLANE -ENABLED = True - -class Plugin: - def __init__(self): - self.plugin_manager = None - - def register(self, plugin_manager): - self.plugin_manager = plugin_manager - self.plugin_manager.register_hook('on_flight_data', self.on_flight_data) - self.plugin_manager.register_hook('on_weapon_config', self.on_weapon_config) - - def on_flight_data(self, data, player,message_to_client, message_to_server): - """After the initial incoming flight packet, check whether - the health is below the threshold, if so add smoke""" - if SMOKE_PLANE and player.aircraft.life