Skip to content

Commit

Permalink
bugfix: bluespace_tap (#5973)
Browse files Browse the repository at this point in the history
* bugfix: no cringe

* Codestyle.

---------

Co-authored-by: Daeberdir <115735095+Daeberdir@users.noreply.github.com>
Pelmenik123 and Daeberdir authored Oct 3, 2024
1 parent cb4a0e2 commit 07cb5c4
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions code/modules/station_goals/bluespace_tap.dm
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
name = "Bluespace Harvester"
var/goal = 25000


/datum/station_goal/bluespace_tap/get_report()
return {"<b>Bluespace Harvester Experiment</b><br>
Another research station has developed a device called a Bluespace Harvester.
@@ -14,21 +15,29 @@
<br>
Nanotrasen Science Directorate"}


/datum/station_goal/bluespace_tap/on_report()
var/datum/supply_packs/misc/station_goal/bluespace_tap/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/station_goal/bluespace_tap]"]
P.special_enabled = TRUE
supply_list.Add(P)


/datum/station_goal/bluespace_tap/proc/get_highscore()
. = 0

for(var/obj/machinery/power/bluespace_tap/harvester in GLOB.machines)
. = max(., harvester.total_points)


/datum/station_goal/bluespace_tap/check_completion()
if(..())
return TRUE
var/highscore = 0
for(var/obj/machinery/power/bluespace_tap/T in GLOB.machines)
highscore = max(highscore, T.total_points)
return ..() || get_highscore() >= goal


/datum/station_goal/bluespace_tap/print_result()
..()
var/highscore = get_highscore()
to_chat(world, "<b>Bluespace Harvester Highscore</b>: [highscore >= goal ? "<span class='greenannounce'>": "<span class='boldannounceooc'>"][highscore]</span>")
if(highscore >= goal)
return TRUE
return FALSE


//needed for the vending part of it
/datum/data/bluespace_tap_product

0 comments on commit 07cb5c4

Please sign in to comment.