Skip to content

Commit

Permalink
Revert "Disk power buffs (TBA: generator proc caling)"
Browse files Browse the repository at this point in the history
This reverts commit 8986890.
  • Loading branch information
breadhunt committed Apr 21, 2024
1 parent 9ca79a7 commit e4e0bbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
24 changes: 2 additions & 22 deletions code/game/objects/machinery/computer/nuke_disk_generator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
var/start_time = 15 SECONDS
///Time to print a disk
var/printing_time = 15 SECONDS
///How much faster disk generators get while the colony power speed boost is active
var/power_multiplier = 3
///Whether the power boost is active or not
var/power_multiplier_active = false

///Total number of times the hack is required
var/total_segments = 5
Expand Down Expand Up @@ -77,7 +73,7 @@
. = ..()
if(. || !current_timer)
if(running)
seconds_elapsed += power_multiplier_active ? 2*power_multiplier : 2
seconds_elapsed += 2
return

seconds_elapsed = (segment_time/10) * completed_segments
Expand Down Expand Up @@ -165,7 +161,7 @@

busy = FALSE

current_timer = addtimer(CALLBACK(src, PROC_REF(complete_segment)), power_multiplier_active ? (segment_time / power_multiplier) : segment_time, TIMER_STOPPABLE)
current_timer = addtimer(CALLBACK(src, PROC_REF(complete_segment)), segment_time, TIMER_STOPPABLE)
update_minimap_icon()
running = TRUE

Expand All @@ -191,22 +187,6 @@
SSminimaps.remove_marker(src)
SSminimaps.add_marker(src, MINIMAP_FLAG_ALL, image('icons/UI_icons/map_blips_large.dmi', null, "[disk_color]_disk[current_timer ? "_on" : "_off"]", VERY_HIGH_FLOAT_LAYER))

///Applies the overclock boost when colony power is active
/obj/machinery/computer/nuke_disk_generator/proc/start_power_overclocking()
power_multiplier_active = true
if(current_timer)
qdeltimer(current_timer)
var/seconds_remaining = seconds_elapsed - (segment_time/10)*completed_segments
current_timer = addtimer(CALLBACK(src, PROC_REF(complete_segment)), (segment_time-seconds_remaining)/power_multiplier, TIMER_STOPPABLE)

///Stops the overclock boost; called when xenos take down colony power again
/obj/machinery/computer/nuke_disk_generator/proc/stop_power_overclocking()
power_multiplier_active = false
if(current_timer)
qdeltimer(current_timer)
var/seconds_remaining = seconds_elapsed - (segment_time/10)*completed_segments
current_timer = addtimer(CALLBACK(src, PROC_REF(complete_segment)), segment_time-seconds_remaining, TIMER_STOPPABLE)

/obj/machinery/computer/nuke_disk_generator/red
name = "red nuke disk generator"
disk_type = /obj/item/disk/nuclear/red
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/groundmap_geothermal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GLOBAL_VAR_INIT(generators_on_ground, 0)
var/power_gen_percent = 0 //100,000W at full capacity
var/power_generation_max = 100000 //Full capacity
var/buildstate = GEOTHERMAL_HEAVY_DAMAGE //What state of building it are we on, 0-3, 1 is "broken", the default
var/is_on = FALSE T //Is this damn thing on or what?
var/is_on = FALSE //Is this damn thing on or what?
///% chance of failure each fail_tick check
var/fail_rate = 0
var/fail_check_ticks = 100 //Check for failure every this many ticks
Expand Down

0 comments on commit e4e0bbd

Please sign in to comment.