- Timestamp:
- 05/05/16 01:34:56 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/Framclipse/com.framsticks.framclipse/res/framscript.xml
r491 r505 133 133 <element name="idleen" type="float"/> 134 134 <element name="energy" type="float"/> 135 <element name="energy_p" type="float"/>136 <element name="energy_m" type="float"/>137 <element name="energy_b" type="float"/>138 135 <element name="perf" type="integer" min="0" max="2"> 139 136 <description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description> … … 323 320 </arguments> 324 321 </element> 322 <element name="transferEnergyTo" function="true" type="float" flags="32"> 323 <description><![CDATA[Transfers at most the requested_amount_of_energy from this creature to the recipient. Returns the amount of energy actually transferred. 324 The function will only transfer positive amounts and will not transfer more energy than this creature has, so the function is equivalent to: 325 if (this.energy>0 && requested_amount_of_energy>0) 326 { 327 var amount = Math.min(requested_amount_of_energy, this.energy); 328 recipient.energy += amount; 329 this.energy -= amount; 330 }]]></description> 331 <arguments> 332 <argument name="recipient" type="Creature"/> 333 <argument name="requested_amount_of_energy" type="float"/> 334 </arguments> 335 </element> 325 336 </type> 326 337 <type name="CreatureSettings" context="Global context"> … … 411 422 <element name="idleen" type="float"/> 412 423 <element name="energy" type="float"/> 413 <element name="energy_p" type="float"/>414 <element name="energy_m" type="float"/>415 <element name="energy_b" type="float"/>416 424 <element name="perf" type="integer" min="0" max="2"> 417 425 <description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description> … … 5539 5547 <element name="idleen" type="float"/> 5540 5548 <element name="energy" type="float"/> 5541 <element name="energy_p" type="float"/>5542 <element name="energy_m" type="float"/>5543 <element name="energy_b" type="float"/>5544 5549 <element name="perf" type="integer" min="0" max="2"> 5545 5550 <description><![CDATA[Initial value of this property is taken from Population.enableperf]]></description> … … 5727 5732 <arguments> 5728 5733 <argument name="mask" type="integer"/> 5734 </arguments> 5735 </element> 5736 <element name="transferEnergyTo" function="true" type="float" flags="32"> 5737 <description><![CDATA[Transfers at most the requested_amount_of_energy from this creature to the recipient. Returns the amount of energy actually transferred. 5738 The function will only transfer positive amounts and will not transfer more energy than this creature has, so the function is equivalent to: 5739 if (this.energy>0 && requested_amount_of_energy>0) 5740 { 5741 var amount = Math.min(requested_amount_of_energy, this.energy); 5742 recipient.energy += amount; 5743 this.energy -= amount; 5744 }]]></description> 5745 <arguments> 5746 <argument name="recipient" type="Creature"/> 5747 <argument name="requested_amount_of_energy" type="float"/> 5729 5748 </arguments> 5730 5749 </element>
Note: See TracChangeset
for help on using the changeset viewer.