mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
Adding basic Player and Server class definitions
This commit is contained in:
parent
3ded0f05c0
commit
9772525263
49
src/Player.js
Normal file
49
src/Player.js
Normal file
@ -0,0 +1,49 @@
|
||||
//Netburner Player class
|
||||
|
||||
netburner.Player = {
|
||||
//Skills and stats
|
||||
hacking_skill: 1,
|
||||
strength: 1,
|
||||
defense: 1,
|
||||
dexterity: 1,
|
||||
agility: 1,
|
||||
|
||||
//Note: "Lifetime" refers to current ascension, "total" refers to the entire game history
|
||||
//Accumulative stats and skills
|
||||
total_hacking: 1,
|
||||
total_strength: 1,
|
||||
total_defense: 1,
|
||||
total_dexterity: 1,
|
||||
total_agility: 1,
|
||||
lifetime_hacking: 1,
|
||||
lifetime_strength: 1,
|
||||
lifetime_defense: 1,
|
||||
lifetime_dexterity: 1,
|
||||
lifetime_agility: 1,
|
||||
|
||||
//Experience and multipliers
|
||||
hacking_exp: 0,
|
||||
strength_exp: 0,
|
||||
defense_exp: 0,
|
||||
dexterity_exp: 0,
|
||||
agility_exp: 0,
|
||||
|
||||
hacking_exp_mult: 1,
|
||||
strength_exp_mult: 1,
|
||||
defense_exp_mult: 1,
|
||||
dexterity_exp_mult: 1,
|
||||
agility_exp_mult: 1,
|
||||
|
||||
//Money
|
||||
money: 0,
|
||||
total_money: 0,
|
||||
lifetime_money: 0,
|
||||
|
||||
//Servers
|
||||
discoveredServers = [],
|
||||
purchasedServers = [],
|
||||
|
||||
//Achievements and achievement progress
|
||||
|
||||
|
||||
};
|
19
src/Server.js
Normal file
19
src/Server.js
Normal file
@ -0,0 +1,19 @@
|
||||
//Netburner Server class
|
||||
// Parent class for a Server object. PlayerServer and NPCServer inherit from this
|
||||
netburner.Server = {
|
||||
//Connection information
|
||||
ip: "0.0.0.0",
|
||||
isOnline: false,
|
||||
|
||||
ownedByPlayer: false,
|
||||
|
||||
//Properties
|
||||
max_ram: 1, //GB
|
||||
ram_used: 0,
|
||||
|
||||
scripts = [];
|
||||
|
||||
//Manual hack state information
|
||||
is_hacking: false,
|
||||
hacking_progress: 0,
|
||||
};
|
Loading…
Reference in New Issue
Block a user