Nerfs Powerator a bit (#27165)

* yes

* Lets try it then.

Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>

* more powerators, bigger penality

---------

Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
This commit is contained in:
Erol509
2024-04-30 03:25:20 +02:00
committed by GitHub
co-authored by Waterpig
parent 6a73414de2
commit 1e01a06b23
4 changed files with 37 additions and 1 deletions
+1
View File
@@ -190,6 +190,7 @@
#define INIT_ORDER_PATH -50
#define INIT_ORDER_MATURITY_GUARD -60 //SKYRAT EDIT ADDITION
#define INIT_ORDER_DECAY -61 //SKYRAT EDIT ADDITION
#define INIT_ORDER_POWERATOR_PENALITY -62 // SKYRAT EDIT ADDITION
#define INIT_ORDER_EXPLOSIONS -69
#define INIT_ORDER_STATPANELS -97
#define INIT_ORDER_BAN_CACHE -98
@@ -66,10 +66,14 @@
/obj/machinery/powerator/Initialize(mapload)
. = ..()
SSpowerator_penality.sum_powerators()
SSpowerator_penality.calculate_penality()
START_PROCESSING(SSobj, src)
/obj/machinery/powerator/Destroy()
STOP_PROCESSING(SSobj, src)
SSpowerator_penality.remove_deled_powerators(src)
SSpowerator_penality.calculate_penality()
attached_cable = null
return ..()
@@ -98,6 +102,8 @@
. += span_notice("Current Power: [display_power(current_power)]/[display_power(max_power)]")
. += span_notice("This machine has made [credits_made] credits from selling power so far.")
if(length(SSpowerator_penality.powerator_list) > 1)
. += span_notice("Multiple powerators detected, total efficiency reduced by [(SSpowerator_penality.diminishing_gains_multiplier)*100]%")
/obj/machinery/powerator/RefreshParts()
. = ..()
@@ -157,7 +163,7 @@
current_power = attached_cable.newavail()
attached_cable.add_delayedload(current_power)
var/money_ratio = round(current_power * divide_ratio)
var/money_ratio = round(current_power * divide_ratio) * SSpowerator_penality.diminishing_gains_multiplier
var/datum/bank_account/synced_bank_account = SSeconomy.get_dep_account(ACCOUNT_CAR)
synced_bank_account.adjust_money(money_ratio)
credits_made += money_ratio
@@ -0,0 +1,28 @@
SUBSYSTEM_DEF(powerator_penality)
name = "Powerator Penalities"
flags = SS_NO_FIRE
init_order = INIT_ORDER_POWERATOR_PENALITY
/// How many powerators we have build on server
var/list/powerator_list = list()
/// Current penality for powerator cash gain
var/diminishing_gains_multiplier = 1
/datum/controller/subsystem/powerator_penality/Initialize()
return SS_INIT_SUCCESS
/datum/controller/subsystem/powerator_penality/proc/sum_powerators()
for(var/obj/machinery/powerator/poweratorc as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/powerator))
powerator_list |= poweratorc
/datum/controller/subsystem/powerator_penality/proc/remove_deled_powerators(src)
powerator_list -= src
return
/datum/controller/subsystem/powerator_penality/proc/calculate_penality()
if(length(powerator_list) > 0)
diminishing_gains_multiplier = min(1, 2 ** log(4, length(powerator_list)) / length(powerator_list))
return diminishing_gains_multiplier
else
diminishing_gains_multiplier = initial(diminishing_gains_multiplier)
+1
View File
@@ -8057,6 +8057,7 @@
#include "modular_skyrat\modules\poly_commands\parrot.dm"
#include "modular_skyrat\modules\positronic_alert_console\code\positronic_alert_console.dm"
#include "modular_skyrat\modules\power\code\powerator.dm"
#include "modular_skyrat\modules\power\code\powerator_subsystem.dm"
#include "modular_skyrat\modules\power\code\teg.dm"
#include "modular_skyrat\modules\primitive_catgirls\code\clothing.dm"
#include "modular_skyrat\modules\primitive_catgirls\code\clothing_vendor.dm"