Modding:Active Parts: Difference between revisions

3,372 bytes added ,  22:30, 15 September 2022
add missing parens to constructor definition
m (Add script modding category in addition to normal modding category)
(add missing parens to constructor definition)
 
(7 intermediate revisions by 2 users not shown)
Line 158: Line 158:
|-
|-
| WorksOnEquipper
| WorksOnEquipper
| An object that has the parent object "equipped properly" is a valid subject. For an armor or shield, this means being worn on the appropriate body part. For an implant, this means being implanted. Otherwise, this means being equipped other than as a thrown weapon.
| An object that has the parent object "equipped properly" is a valid subject, which means being bound to a body part or body parts appropriate to the object's design. For an implant, this means being implanted. Other objects can have their body part binding altered, for example by being [[magnetized]], in which case the object is properly equipped when bound in its new fashion (for [[magnetized]] items, this means being in a Floating Nearby slot). Otherwise, specific item categories define proper binding. Armor binds to body parts appopriately to its type. Shields normally bind to hands or arms. Missile weapons normally bind to missile weapon slots. Melee weapons (which anything that doesn't fall into one of these categories is by default) normally bind to hands.
|-
|-
| WorksOnHolder
| WorksOnHolder
| An object that has the parent object equipped in a hand or missile weapon is a valid subject.
| An object that has the parent object equipped in a hand or missile weapon slot is a valid subject.
|-
|-
| WorksOnImplantee
| WorksOnImplantee
Line 226: Line 226:
! Behavior if set
! Behavior if set
! Default
! Default
|-
| IsPowerLoadSensitive
| bool
| If true, the parent object becomes eligible to receive the [[Overloaded]] mod if it was not already, charge consumption processed via <code>IActivePart</code> support methods is increased as standard for that part, and the results of [[#MyPowerLoadBonus()|<code>MyPowerLoadBonus()</code>]] and [[#MyPowerLoadLevel()|<code>MyPowerLoadLevel()</code>]] are adjusted appropriately.
| false
|-
|-
| ReadyColorString
| ReadyColorString
Line 291: Line 296:
     {
     {


         public HealSelfEveryTurn
         public HealSelfEveryTurn()
         {
         {
             WorksOnSelf = true;
             WorksOnSelf = true;
Line 577: Line 582:


<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
public virtual bool ForeachActivePartSubjectWhile(Predicate <GameObject> pProc, bool MayMoveAddOrDestroy = false)
public virtual bool ForeachActivePartSubjectWhile(Predicate<GameObject> pProc, bool MayMoveAddOrDestroy = false)
</syntaxhighlight>
</syntaxhighlight>


Line 690: Line 695:


Returns a readable general description of what objects the part operates on, based on its subject-determining configuration points. Example return values might be "its user" or "itself and its vicinity".
Returns a readable general description of what objects the part operates on, based on its subject-determining configuration points. Example return values might be "its user" or "itself and its vicinity".
====MyPowerLoadBonus()====
<syntaxhighlight lang="csharp">
public override int MyPowerLoadBonus(int Load = int.MinValue, int Baseline = 100, int Divisor = 150)
</syntaxhighlight>
Returns a value intended to be used as a performance bonus based on power load, integrating with IsPowerLoadSensitive and ModOverloaded (and any other future features which may modify power load level). When the Load argument is set to the default int.MinValue, the current power load level will be automatically calculated and used, otherwise the level specified will be used (this is supported so that an already known level may be sent, for efficiency). The return value is ((WorkingLoadValue - Baseline) / Divisor). With IsPowerLoadSensitive set to true and ModOverloaded present, the return value of this method will be 2 (because ModOverloaded increases the power load value from 100 to 400, so ((400 - 100) / 150) = 2). Different Divisor numbers are typically used with different applications depending on what performance characteristics are desired. If IsPowerLoadSensitive is false, this method will return 0.
This method is an overload of the same method present in the base <code>IPart</code>, which normally returns values based on similar logic (without sensitivity to any configuration value like IsPowerLoadSensitive, since <code>IPart</code> has nothing similar).
====MyPowerLoadLevel()====
<syntaxhighlight lang="csharp">
public override int MyPowerLoadLevel()
</syntaxhighlight>
Returns the power load level the part is currently operating under. If IsPowerLoadSensitive is false, it will always be 100. If IsPowerLoadSensitive is true and ModOverloaded is present, it will be 400. Other functionality may potentially result in different power load levels in the future.


==List of active parts==
==List of active parts==
Line 703: Line 726:
|-
|-
| AddsRep
| AddsRep
|-
| AdjustSpecialEffectChances
|-
| AilingQuickness
|-
|-
| AloePorta
| AloePorta
Line 709: Line 736:
|-
|-
| AnimateObject
| AnimateObject
|-
| ArtifactDetection
|-
|-
| ArtificialIntelligence
| ArtificialIntelligence
|-
| AutomatedExternalDefibrillator
|-
|-
| Banner
| Banner
Line 733: Line 764:
|-
|-
| Capacitor
| Capacitor
|-
| CardiacArrestOnHit
|-
|-
| CatacombsExitTeleporter
| CatacombsExitTeleporter
Line 743: Line 776:
|-
|-
| Clockwork
| Clockwork
|-
| CompanionCapacity
|-
|-
| ComputeNode
| ComputeNode
Line 750: Line 785:
| Cursed
| Cursed
|-
|-
| Cybernetics2BiodynamicPowerPlant
| CyberneticsAutomatedInternalDefibrillator
|-
|-
| Cybernetics2MedassistModule
| CyberneticsBiodynamicPowerPlant
|-
|-
| Cybernetics2MicromanipulatorArray
| CyberneticsEffectSuppressor
|-
|-
| Cybernetics2OnboardRecoilerImprinting
| CyberneticsMedassistModule
|-
|-
| Cybernetics2OnboardRecoilerTeleporter
| CyberneticsMicromanipulatorArray
|-
|-
| Cybernetics2PenetratingRadar
| CyberneticsOnboardRecoilerImprinting
|-
| CyberneticsOnboardRecoilerTeleporter
|-
| CyberneticsPenetratingRadar
|-
|-
| CyberneticsTerminal2
| CyberneticsTerminal2
Line 769: Line 808:
|-
|-
| DeploymentMaintainer
| DeploymentMaintainer
|-
| DepositCorpses
|-
|-
| DestroyMe
| DestroyMe
|-
| DiggingTool
|-
|-
| DischargeOnHit
| DischargeOnHit
|-
|-
| DischargeOnStep
| DischargeOnStep
|-
| DismemberAdjacentHostiles
|-
|-
| Displacement
| Displacement
|-
|-
| Displacer
| Displacer
|-
| Drill
|-
| DrinkMagnifier
|-
|-
| ElectricalPowerTransmission
| ElectricalPowerTransmission
|-
|-
| EmergencyTeleporter
| EmergencyTeleporter
|-
| EmitGasOnHit
|-
|-
| Enclosing
| Enclosing
Line 789: Line 840:
|-
|-
| EnergyCell
| EnergyCell
|-
| EnergyCellRack
|-
|-
| EnergyCellSocket
| EnergyCellSocket
Line 803: Line 856:
|-
|-
| Fan
| Fan
|-
| FeelingOnTarget
|-
|-
| FireSuppressionSystem
| FireSuppressionSystem
Line 821: Line 876:
|-
|-
| FugueOnStep
| FugueOnStep
|-
| FungalFortitude
|-
|-
| FusionReactor
| FusionReactor
|-
|-
| Gaslight
| Gaslight
|-
| GasTumbler
|-
|-
| GenericPowerTransmission
| GenericPowerTransmission
Line 835: Line 894:
|-
|-
| GritGateMainframeTerminal
| GritGateMainframeTerminal
|-
| GroundOnHit
|-
| HighBitBonus
|-
|-
| HologramMaterialPrimary
| HologramMaterialPrimary
Line 893: Line 956:
|-
|-
| NavigationBonus
| NavigationBonus
|-
| NightSightInterpolators
|-
|-
| NightVision
| NightVision
Line 902: Line 967:
| PointDefense
| PointDefense
|-
|-
| PowerCord
| Pounder
|-
|-
| PoweredFloating
| PoweredFloating
|-
| PowerOutlet
|-
|-
| PowerSwitch
| PowerSwitch
|-
|-
| ProgrammableRecoiler
| ProgrammableRecoiler
|-
| PsychicMeridian
|-
|-
| RadiusEventSender
| RadiusEventSender
|-
|-
| RealityStabilization
| RealityStabilization
|-
| RealityStabilizeOnHit
|-
|-
| ReclamationCist
| ReclamationCist
Line 937: Line 1,004:
|-
|-
| SaveModifiers
| SaveModifiers
|-
| SlipRing
|-
|-
| SlottedCellCharger
| SlottedCellCharger
Line 945: Line 1,014:
|-
|-
| Stopsvaalinn
| Stopsvaalinn
|-
| StrideMason
|-
|-
| StunOnHit
| StunOnHit
|-
|-
| Suspensor
| Suspensor
|-
| SwapOnHit
|-
|-
| TattooGun
| TattooGun
|-
|-
| Teleporter
| Teleporter
|-
| TeleportGate
|-
|-
| TeleporterPair
| TeleporterPair
Line 959: Line 1,034:
|-
|-
| TemplarPhylactery
| TemplarPhylactery
|-
| ThermalAmp
|-
|-
| Toolbox
| Toolbox
Line 969: Line 1,046:
|-
|-
| VibroWeapon
| VibroWeapon
|-
| Waldopack
|-
| WaterRitualDiscount
|-
|-
| WindTurbine
| WindTurbine
Line 978: Line 1,059:
| ZoneAdjust
| ZoneAdjust
|}
|}
{{Modding Navbox}}


[[Category:Modding]][[Category:Script Modding]]
[[Category:Modding]][[Category:Script Modding]]