mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
doc for sleeve api
This commit is contained in:
committed by
danielyxie
parent
f8f4299ed5
commit
b132efbded
11
doc/source/netscript/sleeveapi/commitCrime.rst
Normal file
11
doc/source/netscript/sleeveapi/commitCrime.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
commitCrime() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: commitCrime(sleeveNumber, name)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to start commiting crime.
|
||||
:param string name: Name of the crime. Must be an exact match.
|
||||
|
||||
Return a boolean indicating whether or not this action was set successfully.
|
||||
|
||||
Returns false if an invalid action is specified.
|
||||
65
doc/source/netscript/sleeveapi/getInformation.rst
Normal file
65
doc/source/netscript/sleeveapi/getInformation.rst
Normal file
@@ -0,0 +1,65 @@
|
||||
getInformation() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: getInformation(sleeveNumber)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to retrieve information.
|
||||
|
||||
Return a struct containing tons of information about this sleeve
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
city: location of the sleeve,
|
||||
hp: current hp of the sleeve,
|
||||
maxHp: max hp of the sleeve,
|
||||
jobs: jobs available to the sleeve,
|
||||
jobTitle: job titles available to the sleeve,
|
||||
tor: does this sleeve have access to the tor router,
|
||||
mult: {
|
||||
agility: agility multiplier,
|
||||
agilityExp: agility exp multiplier,
|
||||
companyRep: company reputation multiplier,
|
||||
crimeMoney: crime money multiplier,
|
||||
crimeSuccess: crime success chance multiplier,
|
||||
defense: defense multiplier,
|
||||
defenseExp: defense exp multiplier,
|
||||
dexterity: dexterity multiplier,
|
||||
dexterityExp: dexterity exp multiplier,
|
||||
factionRep: faction reputation multiplier,
|
||||
hacking: hacking skill multiplier,
|
||||
hackingExp: hacking exp multiplier,
|
||||
strength: strength multiplier,
|
||||
strengthExp: strength exp multiplier,
|
||||
workMoney: work money multiplier,
|
||||
},
|
||||
timeWorked: time spent on the current task in milliseconds,
|
||||
earningsForSleeves : { earnings synchronized to other sleeves
|
||||
workHackExpGain: hacking exp gained from work,
|
||||
workStrExpGain: strength exp gained from work,
|
||||
workDefExpGain: defense exp gained from work,
|
||||
workDexExpGain: dexterity exp gained from work,
|
||||
workAgiExpGain: agility exp gained from work,
|
||||
workChaExpGain: charisma exp gained from work,
|
||||
workMoneyGain: money gained from work,
|
||||
},
|
||||
earningsForPlayer : { earnings synchronized to the player
|
||||
workHackExpGain: hacking exp gained from work,
|
||||
workStrExpGain: strength exp gained from work,
|
||||
workDefExpGain: defense exp gained from work,
|
||||
workDexExpGain: dexterity exp gained from work,
|
||||
workAgiExpGain: agility exp gained from work,
|
||||
workChaExpGain: charisma exp gained from work,
|
||||
workMoneyGain: money gained from work,
|
||||
},
|
||||
earningsForTask : { earnings for this sleeve
|
||||
workHackExpGain: hacking exp gained from work,
|
||||
workStrExpGain: strength exp gained from work,
|
||||
workDefExpGain: defense exp gained from work,
|
||||
workDexExpGain: dexterity exp gained from work,
|
||||
workAgiExpGain: agility exp gained from work,
|
||||
workChaExpGain: charisma exp gained from work,
|
||||
workMoneyGain: money gained from work,
|
||||
},
|
||||
workRepGain: sl.getRepGain(),
|
||||
}
|
||||
6
doc/source/netscript/sleeveapi/getNumSleeves.rst
Normal file
6
doc/source/netscript/sleeveapi/getNumSleeves.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
getNumSleeves() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: getNumSleeves()
|
||||
|
||||
Return the number of duplicate sleeves the player has.
|
||||
21
doc/source/netscript/sleeveapi/getStats.rst
Normal file
21
doc/source/netscript/sleeveapi/getStats.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
getStats() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: getStatus(sleeveNumber)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to get stats of.
|
||||
|
||||
Return a structure containing the stats of the sleeve
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
shock: current shock of the sleeve [0-1],
|
||||
sync: current sync of the sleeve [0-1],
|
||||
hacking_skill: current hacking skill of the sleeve,
|
||||
strength: current strength of the sleeve,
|
||||
defense: current defense of the sleeve,
|
||||
dexterity: current dexterity of the sleeve,
|
||||
agility: current agility of the sleeve,
|
||||
charisma: current charisma of the sleeve,
|
||||
}
|
||||
18
doc/source/netscript/sleeveapi/getTask.rst
Normal file
18
doc/source/netscript/sleeveapi/getTask.rst
Normal file
@@ -0,0 +1,18 @@
|
||||
getTask() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: getTask(sleeveNumber)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to retrieve task from.
|
||||
|
||||
Return the current task that the sleeve is performing. type is set to "Idle" if the sleeve isn't doing anything
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
task: number, // task type
|
||||
crime: number, // crime currently attempting, if any
|
||||
location: number, // location of the task, if any
|
||||
gymStatType: number, // stat being trained at the gym, if any
|
||||
factionWorkType: number, // faction work type being performed, if any
|
||||
}
|
||||
8
doc/source/netscript/sleeveapi/shockRecovery.rst
Normal file
8
doc/source/netscript/sleeveapi/shockRecovery.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
shockRecovery() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: shockRecovery(sleeveNumber)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to start recovery.
|
||||
|
||||
Return a boolean indicating whether or not this action was set successfully.
|
||||
8
doc/source/netscript/sleeveapi/synchronize.rst
Normal file
8
doc/source/netscript/sleeveapi/synchronize.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
synchronize() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: synchronize(sleeveNumber)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to start synchronizing.
|
||||
|
||||
Return a boolean indicating whether or not this action was set successfully.
|
||||
10
doc/source/netscript/sleeveapi/takeUniversityCourse.rst
Normal file
10
doc/source/netscript/sleeveapi/takeUniversityCourse.rst
Normal file
@@ -0,0 +1,10 @@
|
||||
takeUniversityCourse() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: takeUniversityCourse(sleeveNumber, university, className)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to start taking class.
|
||||
:param string university: name of the university to attend.
|
||||
:param string className: name of the class to follow.
|
||||
|
||||
Return a boolean indicating whether or not this action was set successfully.
|
||||
9
doc/source/netscript/sleeveapi/travel.rst
Normal file
9
doc/source/netscript/sleeveapi/travel.rst
Normal file
@@ -0,0 +1,9 @@
|
||||
travel() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: travel(sleeveNumber, cityName)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to travel.
|
||||
:param string cityName: name of the destination city.
|
||||
|
||||
Return a boolean indicating whether or not the sleeve reached destination.
|
||||
9
doc/source/netscript/sleeveapi/workForCompany.rst
Normal file
9
doc/source/netscript/sleeveapi/workForCompany.rst
Normal file
@@ -0,0 +1,9 @@
|
||||
workForCompany() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: workForCompany(sleeveNumber, companyName)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to work for the company.
|
||||
:param string companyName: name of the company to work for.
|
||||
|
||||
Return a boolean indicating whether or not the sleeve started working or this company.
|
||||
10
doc/source/netscript/sleeveapi/workForFaction.rst
Normal file
10
doc/source/netscript/sleeveapi/workForFaction.rst
Normal file
@@ -0,0 +1,10 @@
|
||||
workForFaction() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: workForFaction(sleeveNumber, factionName, factionWorkType)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to work for the faction.
|
||||
:param string factionName: name of the faction to work for.
|
||||
:param string factionWorkType: name of the action to perform for this faction.
|
||||
|
||||
Return a boolean indicating whether or not the sleeve started working or this faction.
|
||||
10
doc/source/netscript/sleeveapi/workoutAtGym.rst
Normal file
10
doc/source/netscript/sleeveapi/workoutAtGym.rst
Normal file
@@ -0,0 +1,10 @@
|
||||
workoutAtGym() Netscript Function
|
||||
=======================================
|
||||
|
||||
.. js:function:: workoutAtGym(sleeveNumber, gymName, stat)
|
||||
|
||||
:param int sleeveNumber: index of the sleeve to workout at the gym.
|
||||
:param string gymName: name of the gym.
|
||||
:param string stat: name of the stat to train.
|
||||
|
||||
Return a boolean indicating whether or not the sleeve started working out.
|
||||
Reference in New Issue
Block a user