mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MIRROR] Replaces downloading research notes with a new antag objective and station sabotage point. (#8401)
* Replaces downloading research notes with a new antag objective and station sabotage point. (#61685) Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * Replaces downloading research notes with a new antag objective and station sabotage point. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -35,6 +35,11 @@ SUBSYSTEM_DEF(research)
|
||||
var/last_income
|
||||
//^^^^^^^^ ALL OF THESE ARE PER SECOND! ^^^^^^^^
|
||||
|
||||
/// A list of all master servers. If none of these have a source code HDD, research point generation is lowered.
|
||||
var/list/obj/machinery/rnd/server/master/master_servers = list()
|
||||
/// The multiplier to research points when no source code HDD is present.
|
||||
var/no_source_code_income_modifier = 0.5
|
||||
|
||||
//Aiming for 1.5 hours to max R&D
|
||||
//[88nodes * 5000points/node] / [1.5hr * 90min/hr * 60s/min]
|
||||
//Around 450000 points max???
|
||||
@@ -63,15 +68,24 @@ SUBSYSTEM_DEF(research)
|
||||
|
||||
/datum/controller/subsystem/research/fire()
|
||||
var/list/bitcoins = list()
|
||||
for(var/obj/machinery/rnd/server/miner in servers)
|
||||
for(var/obj/machinery/rnd/server/miner as anything in servers)
|
||||
if(miner.working)
|
||||
bitcoins = single_server_income.Copy()
|
||||
break //Just need one to work.
|
||||
|
||||
// Check if any master server has a source code HDD in it or if all master servers have just been plain old blown up.
|
||||
// Start by assuming no source code, then set the modifier to 1 if we find one.
|
||||
var/bitcoin_multiplier = no_source_code_income_modifier
|
||||
for(var/obj/machinery/rnd/server/master/master_server as anything in master_servers)
|
||||
if(master_server.source_code_hdd)
|
||||
bitcoin_multiplier = 1
|
||||
break
|
||||
|
||||
if (!isnull(last_income))
|
||||
var/income_time_difference = world.time - last_income
|
||||
science_tech.last_bitcoins = bitcoins // Doesn't take tick drift into account
|
||||
for(var/i in bitcoins)
|
||||
bitcoins[i] *= income_time_difference / 10
|
||||
bitcoins[i] *= (income_time_difference / 10) * bitcoin_multiplier
|
||||
science_tech.add_point_list(bitcoins)
|
||||
last_income = world.time
|
||||
|
||||
|
||||
Reference in New Issue
Block a user