diff --git a/code/modules/station_goals/bluespace_tap.dm b/code/modules/station_goals/bluespace_tap.dm index ef69d3f31efc..f293aede17d7 100644 --- a/code/modules/station_goals/bluespace_tap.dm +++ b/code/modules/station_goals/bluespace_tap.dm @@ -175,7 +175,7 @@ radio.follow_target = src radio.config(list("Engineering" = 0)) -/obj/machinery/power/bluespace_tap/post_clean() +/obj/machinery/power/bluespace_tap/cleaning_act(mob/user, atom/cleaner, cleanspeed, text_verb, text_description, text_targetname) . = ..() dirty = FALSE @@ -507,10 +507,18 @@ flick_overlay_view(image(icon, src, "flash", FLY_LAYER)) log_game("Bluespace harvester product spawned at [turf]") +// Highest possible probabilty of an event +#define PROB_CAP 5 +// Higher number means approaching the limit slower +#define PROB_CURVE 250 + /obj/machinery/power/bluespace_tap/proc/try_events() if(!mining_power) return - if(!prob((mining_power / (10 MW)) + (emagged * 5))) // Calculate prob of event based on mining power. Return if no event. + // Calculate prob of event based on mining power. Return if no event. + var/megawatts = mining_power / 1000000 + var/event_prob = (PROB_CAP * megawatts / (megawatts + PROB_CURVE)) + (emagged * 5) + if(!prob(event_prob)) return var/static/list/event_list = list( /datum/engi_event/bluespace_tap_event/dirty, @@ -529,6 +537,8 @@ return event.start_event() +#undef PROB_CAP +#undef PROB_CURVE //UI stuff below /obj/machinery/power/bluespace_tap/ui_act(action, params)