REGISTER_SCRIPT_SUBCLASS(SupplyDrop, SpaceObject) { REGISTER_SCRIPT_CLASS_FUNCTION(SupplyDrop, setEnergy); REGISTER_SCRIPT_CLASS_FUNCTION(SupplyDrop, setWeaponStorage); /// Set a function that will be called if a player picks up the supply drop. /// First argument given to the function will be the supply drop, the second the player. REGISTER_SCRIPT_CLASS_FUNCTION(SupplyDrop, onPickUp); }
/// An artifact. /// Can be used for mission scripting. REGISTER_SCRIPT_SUBCLASS(Artifact, SpaceObject) { /// Set the 3D model used for this artifact. /// Example: setModel("artifact6"), setModel("shield_generator"), setModel("ammo_box"). /// Check model_data.lua for all possible options. REGISTER_SCRIPT_CLASS_FUNCTION(Artifact, setModel); /// Have this object explode with a visual explosion. The Artifact is destroyed by this action. REGISTER_SCRIPT_CLASS_FUNCTION(Artifact, explode); /// Set if this artifact can be picked up or not. When it is picked up, this artifact will be destroyed. REGISTER_SCRIPT_CLASS_FUNCTION(Artifact, allowPickup); }
REGISTER_SCRIPT_SUBCLASS(SpaceStation, SpaceObject) { REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setTemplate); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setCallSign); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, getHull); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, getHullMax); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setHull); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setHullMax); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, getShield); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, getShieldMax); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setShield); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setShieldMax); }
/// PlayerSpaceship are the ships that are controlled by the player. REGISTER_SCRIPT_SUBCLASS(PlayerSpaceship, SpaceShip) { REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getWaypoint); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getWaypointCount); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getAlertLevel); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, setShieldsActive); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, addToShipLog); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsInactive); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsOpening); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsBeingHailed); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsBeingHailedByGM); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsFailed); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsBroken); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsClosed); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsChatOpen); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsChatOpenToGM); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsChatOpenToPlayer); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsScriptOpen); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandTargetRotation); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandImpulse); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandWarp); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandJump); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetTarget); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandLoadTube); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandUnloadTube); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandFireTube); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetShields); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandMainScreenSetting); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandScan); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetSystemPowerRequest); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetSystemCoolantRequest); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandDock); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandUndock); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandAbortDock); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandOpenTextComm); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandCloseTextComm); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandAnswerCommHail); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSendComm); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSendCommPlayer); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetAutoRepair); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetBeamFrequency); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetBeamSystemTarget); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetShieldFrequency); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandAddWaypoint); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandRemoveWaypoint); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandActivateSelfDestruct); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandCancelSelfDestruct); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandConfirmDestructCode); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandCombatManeuverBoost); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetScienceLink); ///Return the amount of crew members available in the engineering repair screen REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getRepairCrewCount); ///Set the amount of crew members available in the engineering repair screen. ///This adds new crew at random locations when new crew members need to be created. REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, setRepairCrewCount); }
/// PlayerSpaceship are the ships that are controlled by the player. REGISTER_SCRIPT_SUBCLASS(PlayerSpaceship, SpaceShip) { REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getWaypoint); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getWaypointCount); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, getAlertLevel); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, setShieldsActive); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, addToShipLog); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsInactive); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsOpening); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsBeingHailed); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsBeingHailedByGM); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsFailed); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsBroken); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsChatOpen); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsChatOpenToGM); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsChatOpenToPlayer); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, isCommsScriptOpen); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandTargetRotation); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandImpulse); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandWarp); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandJump); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetTarget); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandLoadTube); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandUnloadTube); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandFireTube); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetShields); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandMainScreenSetting); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandScan); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetSystemPower); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetSystemCoolant); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandDock); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandUndock); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandOpenTextComm); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandCloseTextComm); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandAnswerCommHail); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSendComm); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSendCommPlayer); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetAutoRepair); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetBeamFrequency); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetBeamSystemTarget); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetShieldFrequency); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandAddWaypoint); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandRemoveWaypoint); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandActivateSelfDestruct); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandCancelSelfDestruct); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandConfirmDestructCode); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandCombatManeuverBoost); REGISTER_SCRIPT_CLASS_FUNCTION(PlayerSpaceship, commandSetScienceLink); }
REGISTER_SCRIPT_SUBCLASS(SpaceStation, SpaceObject) { REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setTemplate); REGISTER_SCRIPT_CLASS_FUNCTION(SpaceStation, setCallSign); }
REGISTER_SCRIPT_SUBCLASS_NO_CREATE(ShipTemplateBasedObject, SpaceObject) { /// Set the ship template to be used for this station. Stations use ship-templates to define hull/shields/looks REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setTemplate); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setShipTemplate); /// Set the class name of this object. Normally the class name is copied from the template name (Ex "Cruiser") but you can override it with this function. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setTypeName); REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getTypeName); /// Set a custom callsign for this station. Stations get assigned random callsigns at creation, but you can overrule this from scenario scripts. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setCallSign); /// Get the current amount of hull REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getHull); /// Get the maximum hull value REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getHullMax); /// Set the current hull value, note that setting this to 0 does not destroy the station. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setHull); /// Set the maximum amount of hull for this station. Stations never repair hull damage, so this only effects the percentage displays REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setHullMax); /// Get the current shield level, stations only have a single shield, unlike ships that have a front&back shield REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getShieldLevel); /// Get the amount of shields fit on this object. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getShieldCount); /// Get the maxium shield level. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getShieldMax); /// Set the current amount of shields. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setShields); /// Set the maximum shield level. Note that this does low the current shield level when the max becomes lower, but it does not increase the shield level. /// A seperate call to setShield is needed for that. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setShieldsMax); /// Set the icon to be used for this station on the radar. /// For example, station:setRadarTrace("RadarArrow.png") will show an arrow instead of a dot for this station. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setRadarTrace); /// Are the shields online or not. Currently always returns true except for player ships, as only players can turn off shields. REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getShieldsActive); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getFrontShield); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getFrontShieldMax); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setFrontShield); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setFrontShieldMax); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getRearShield); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, getRearShieldMax); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setRearShield); /// [Depricated] REGISTER_SCRIPT_CLASS_FUNCTION(ShipTemplateBasedObject, setRearShieldMax); }
/// An asteroid in space. Which you can fly into and hit. Will do damage. REGISTER_SCRIPT_SUBCLASS(Asteroid, SpaceObject) { /// Set the size of this asteroid, per default asteroids have a size of 120 REGISTER_SCRIPT_CLASS_FUNCTION(Asteroid, setSize); }
/// ElectricExplosionEffect is a visible electrical explosion, as seen from EMP missiles /// Example: ElectricExplosionEffect():setPosition(500,5000):setSize(20) REGISTER_SCRIPT_SUBCLASS(ElectricExplosionEffect, SpaceObject) { REGISTER_SCRIPT_CLASS_FUNCTION(ElectricExplosionEffect, setSize); }