work to make documentation unified.

This commit is contained in:
Olivier Gagnon
2021-03-12 02:51:56 -05:00
parent a00c253dcb
commit 2ce6ff2041
176 changed files with 1325 additions and 916 deletions
@@ -4,11 +4,7 @@ ascendMember() Netscript Function
.. js:function:: ascendMember(name)
:RAM cost: 4 GB
:param string name: Name of member to ascend
Ascend the specified Gang Member.
:returns: An object with info about the ascension results.
The object has the following structure::
@@ -22,3 +18,5 @@ ascendMember() Netscript Function
agi: Agility multiplier gained from ascending. Decimal form
cha: Charisma multiplier gained from ascending. Decimal form
}
Ascend the specified Gang Member.
@@ -4,5 +4,4 @@ canRecruitMember() Netscript Function
.. js:function:: canRecruitMember()
:RAM cost: 1 GB
:returns: Boolean indicating whether a member can currently be recruited
:returns: ``true`` if a member can be recruited.
@@ -4,12 +4,10 @@ getBonusTime() Netscript Function
.. js:function:: getBonusTime()
:RAM cost: 0 GB
Returns the amount of accumulated "bonus time" (seconds) for the Gang mechanic.
:returns: Bonus time for the Gang mechanic in seconds
"Bonus time" is accumulated when the game is offline or if the game is
inactive in the browser.
"Bonus time" makes the game progress faster, up to 10x the normal speed.
:returns: Bonus time for the Gang mechanic in seconds
@@ -4,8 +4,6 @@ getChanceToWinClash() Netscript Function
.. js:function:: getChanceToWinClash(gangName)
:RAM cost: 4 GB
:param string gangName: Target gang
Returns the chance you have to win a clash with the specified gang. The chance
is returned in decimal form, not percentage
:returns: Chance you have to win a clash with the specified gang. The chance
is returned in decimal form.
@@ -4,11 +4,9 @@ getEquipmentCost() Netscript Function
.. js:function:: getEquipmentCost(equipName)
:RAM cost: 2 GB
:param string equipName: Name of equipment
:returns: Cost to purchase the specified Equipment/Augmentation (number).
Infinity for invalid arguments.
Get the amount of money it takes to purchase a piece of Equipment or an Augmentation.
If an invalid Equipment/Augmentation is specified, this function will return Infinity.
:returns: Cost to purchase the specified Equipment/Augmentation (number). Infinity
for invalid arguments
If an invalid Equipment/Augmentation is specified, this function will return Infinity.
@@ -4,8 +4,8 @@ getEquipmentNames() Netscript Function
.. js:function:: getEquipmentNames()
:RAM cost: 1 GB
:returns: Array of strings of the names of all Equpiment/Augmentations
Get the name of all possible equipment/upgrades you can purchase for your
Gang Members. This includes Augmentations.
:returns: Array of strings of the names of all Equpiment/Augmentations
@@ -1,17 +1,15 @@
getEquipmentStats() Netscript Function
=====================================
======================================
.. js:function:: getEquipmentStats(equipName)
:RAM cost: 2 GB
:param string equipName: Name of equipment
:returns: A dictionary containing the stats of the equipment.
Get the specified equipment stats.
Get the specified equipment stats.::
{
"str":1.04,
"def":1.04
}
{
"str":1.04,
"def":1.04
}
@@ -4,8 +4,8 @@ getEquipmentType() Netscript Function
.. js:function:: getEquipmentType(equipName)
:RAM cost: 2 GB
:param string equipName: Name of equipment
:returns: A string stating the type of the equipment
Get the specified equipment type, which can be one of the following:
@@ -14,5 +14,3 @@ getEquipmentType() Netscript Function
* Vehicle
* Rootkit
* Augmentation
:returns: A string stating the type of the equipment
@@ -4,9 +4,6 @@ getGangInformation() Netscript Function
.. js:function:: getGangInformation()
:RAM cost: 2 GB
Get general information about the gang
:returns: An object with the gang information.
The object has the following structure::
@@ -23,3 +20,5 @@ getGangInformation() Netscript Function
wantedLevel: Gang's wanted level
wantedLevelGainRate: Wanted level gained/lost per second (negative for losses)
}
Get general information about the gang
@@ -4,11 +4,7 @@ getMemberInformation() Netscript Function
.. js:function:: getMemberInformation(name)
:RAM cost: 2 GB
:param string name: Name of member
Get stat and equipment-related information about a Gang Member
:returns: An object with the gang member information.
The object has the following structure::
@@ -36,3 +32,5 @@ getMemberInformation() Netscript Function
strengthAscensionMult: Strength multiplier from ascension. Decimal form
task: Name of currently assigned task
}
Get stat and equipment-related information about a Gang Member
@@ -4,7 +4,6 @@ getMemberNames() Netscript Function
.. js:function:: getMemberNames()
:RAM cost: 1 GB
Get the names of all Gang members
:returns: An array of the names of all Gang members as strings
Get the names of all Gang members
@@ -4,9 +4,6 @@ getOtherGangInformation() Netscript Function
.. js:function:: getOtherGangInformation()
:RAM cost: 2 GB
Get territory and power information about all gangs
:returns: An object with information about all gangs
The object has the following structure::
@@ -26,3 +23,5 @@ getOtherGangInformation() Netscript Function
},
... (for all six gangs)
}
Get territory and power information about all gangs
@@ -4,7 +4,6 @@ getTaskNames() Netscript Function
.. js:function:: getTaskNames()
:RAM cost: 1 GB
Get the name of all valid tasks that Gang members can be assigned to
:returns: Array of strings of all task names
Get the name of all valid tasks that Gang members can be assigned to
+28 -24
View File
@@ -4,32 +4,36 @@ getTaskStats() Netscript Function
.. js:function:: getTaskStats(taskName)
:RAM cost: 1 GB
:param string name: Name of the task.
:returns: Detailed stats of a task.
Get the stats of a gang member stats. This is typically used to evaluate
which action should be executed next.
Examples:
{
name: Terrorism,
desc: "Assign this gang member to commit acts of terrorism
.. code-block:: javascript
Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",
isHacking: false,
isCombat: true,
baseRespect: 0.01,
baseWanted: 6,
baseMoney: 0,
hackWeight: 20,
strWeight: 20,
defWeight: 20,
dexWeight: 20,
agiWeight: 0,
chaWeight: 20,
difficulty: 36,
territory: {
money: 1,
respect: 2,
wanted: 2
{
name: Terrorism,
desc: "Assign this gang member to commit acts of terrorism
Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",
isHacking: false,
isCombat: true,
baseRespect: 0.01,
baseWanted: 6,
baseMoney: 0,
hackWeight: 20,
strWeight: 20,
defWeight: 20,
dexWeight: 20,
agiWeight: 0,
chaWeight: 20,
difficulty: 36,
territory: {
money: 1,
respect: 2,
wanted: 2
}
}
}
Get the stats of a gang task stats. This is typically used to evaluate
which action should be executed next.
@@ -4,11 +4,9 @@ purchaseEquipment() Netscript Function
.. js:function:: purchaseEquipment(memberName, equipName)
:RAM cost: 4 GB
:param string memberName: Name of Gang member to purchase the equipment for
:param string equipName: Name of Equipment/Augmentation to purchase
:returns: ``true`` if the equipment was purchased.
Attempt to purchase the specified Equipment/Augmentation for the specified
Gang member.
:returns: True if the equipment was successfully purchased. False otherwise
@@ -4,8 +4,8 @@ recruitMember() Netscript Function
.. js:function:: recruitMember(name)
:RAM cost: 2 GB
:param string name: Name of member to recruit
:returns: True if the member was successfully recruited. False otherwise
Attempt to recruit a new gang member.
@@ -13,5 +13,3 @@ recruitMember() Netscript Function
* Cannot currently recruit a new member
* There already exists a member with the specified name
:returns: True if the member was successfully recruited. False otherwise
@@ -4,11 +4,10 @@ setMemberTask() Netscript Function
.. js:function:: setMemberTask(memberName, taskName)
:RAM cost: 2 GB
:param string memberName: Name of Gang member to assign
:param string taskName: Task to assign
:returns: True if the Gang Member was successfully assigned to the task. False otherwise
Attempts to assign the specified Gang Member to the specified task.
If an invalid task is specified, the Gang member will be set to idle ("Unassigned")
:returns: True if the Gang Member was successfully assigned to the task. False otherwise
@@ -4,7 +4,6 @@ setTerritoryWarfare() Netscript Function
.. js:function:: setTerritoryWarfare(engage)
:RAM cost: 2 GB
:param bool engage: Whether or not to engage in territory warfare
Set whether or not the gang should engage in territory warfare