mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[MIRROR] Stock Part Datumization Complete [MDB IGNORE] (#18639)
* Stock Part Datumization Complete (#72559) So i accidently reverted all my commits in #72511 when resolving a merge conflict So ummm yeah fuck my bad anyway Finishes what was started in #71693 and completes the [initiative](https://github.com/tgstation/dev-cycles-initiative/issues/1) Except for `obj/item/stock_parts/cell` and its subtypes. All machines now use `datum/stock_part` for its requested components & component parts Not sure if i caught every machine & stuff in the game so merge with caution 🆑 code: datum stock part for every obj stock part refactor: all machines & dependent experiments to use datum stock parts /🆑 * Fixes a teeny tiny Funce mistake :) Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
SyncIt21
GoldenAlpharex
parent
666ec11b53
commit
902caab964
@@ -28,8 +28,8 @@
|
||||
/obj/machinery/power/rtg/RefreshParts()
|
||||
. = ..()
|
||||
var/part_level = 0
|
||||
for(var/obj/item/stock_parts/SP in component_parts)
|
||||
part_level += SP.rating
|
||||
for(var/datum/stock_part/stock_part in component_parts)
|
||||
part_level += stock_part.tier
|
||||
|
||||
power_gen = initial(power_gen) * part_level
|
||||
|
||||
|
||||
@@ -87,15 +87,15 @@
|
||||
var/fire_shoot_delay = 12 SECONDS
|
||||
var/min_fire_delay = 2.4 SECONDS
|
||||
var/power_usage = 350
|
||||
for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
|
||||
max_fire_delay -= 2 SECONDS * laser.rating
|
||||
min_fire_delay -= 0.4 SECONDS * laser.rating
|
||||
fire_shoot_delay -= 2 SECONDS * laser.rating
|
||||
for(var/datum/stock_part/micro_laser/laser in component_parts)
|
||||
max_fire_delay -= 2 SECONDS * laser.tier
|
||||
min_fire_delay -= 0.4 SECONDS * laser.tier
|
||||
fire_shoot_delay -= 2 SECONDS * laser.tier
|
||||
maximum_fire_delay = max_fire_delay
|
||||
minimum_fire_delay = min_fire_delay
|
||||
fire_delay = fire_shoot_delay
|
||||
for(var/obj/item/stock_parts/manipulator/manipulator in component_parts)
|
||||
power_usage -= 50 * manipulator.rating
|
||||
for(var/datum/stock_part/manipulator/manipulator in component_parts)
|
||||
power_usage -= 50 * manipulator.tier
|
||||
update_mode_power_usage(ACTIVE_POWER_USE, power_usage)
|
||||
|
||||
/obj/machinery/power/emitter/examine(mob/user)
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
var/IO = 0
|
||||
var/MC = 0
|
||||
var/C
|
||||
for(var/obj/item/stock_parts/capacitor/CP in component_parts)
|
||||
IO += CP.rating
|
||||
for(var/datum/stock_part/capacitor/capacitor in component_parts)
|
||||
IO += capacitor.tier
|
||||
input_level_max = initial(input_level_max) * IO
|
||||
output_level_max = initial(output_level_max) * IO
|
||||
for(var/obj/item/stock_parts/cell/PC in component_parts)
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
. = ..()
|
||||
var/power_multiplier = 0
|
||||
zap_cooldown = 100
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
power_multiplier += C.rating
|
||||
zap_cooldown -= (C.rating * 20)
|
||||
for(var/datum/stock_part/capacitor/capacitor in component_parts)
|
||||
power_multiplier += capacitor.tier
|
||||
zap_cooldown -= (capacitor.tier * 20)
|
||||
input_power_multiplier = max(1 * (power_multiplier / 8), 0.25) //Max out at 50% efficency.
|
||||
|
||||
/obj/machinery/power/energy_accumulator/tesla_coil/examine(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user