Implement Bay's SSmachinery and power usage updates, further unclogging the toilet (#13910)

This commit is contained in:
Wildkins
2022-05-16 18:50:16 +02:00
committed by GitHub
parent a18d6598e3
commit a4461a17af
296 changed files with 1662 additions and 1778 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
/obj/machinery/mining
icon = 'icons/obj/mining_drill.dmi'
anchored = FALSE
use_power = 0 //The drill takes power directly from a cell.
use_power = POWER_USE_OFF //The drill takes power directly from a cell.
density = TRUE
layer = MOB_LAYER + 0.1 //So it draws over mobs in the tile north of it.
@@ -65,7 +65,7 @@
QDEL_NULL(spark_system)
return ..()
/obj/machinery/mining/drill/machinery_process()
/obj/machinery/mining/drill/process()
if(need_player_check)
return
@@ -570,4 +570,4 @@
connected.supports -= src
connected.check_supports()
connected = null
connected = null
+6 -8
View File
@@ -11,7 +11,6 @@
icon_state = "production_console"
density = FALSE
anchored = TRUE
use_power = 1
idle_power_usage = 15
active_power_usage = 50
@@ -47,7 +46,7 @@
if(!machine)
var/area/A = get_area(src)
var/best_distance = INFINITY
for(var/obj/machinery/mineral/processing_unit/checked_machine in SSmachinery.all_machines)
for(var/obj/machinery/mineral/processing_unit/checked_machine in SSmachinery.machinery)
if(id)
if(checked_machine.id == id)
machine = checked_machine
@@ -327,7 +326,6 @@
var/list/ores_stored[0]
var/static/list/alloy_data
var/active = 0
use_power = 1
idle_power_usage = 15
active_power_usage = 150
@@ -384,7 +382,7 @@
return ..()
/obj/machinery/mineral/processing_unit/machinery_process()
/obj/machinery/mineral/processing_unit/process()
..()
if(!src.output || !src.input)
@@ -444,7 +442,7 @@
if(console)
var/ore/Ore = ore_data[needs_metal]
console.points += Ore.worth
use_power(100)
use_power_oneoff(100)
ores_stored[needs_metal] -= A.requires[needs_metal]
total += A.requires[needs_metal]
total = max(1, round(total * A.product_mod)) //Always get at least one sheet.
@@ -468,7 +466,7 @@
for(var/i = 0, i < can_make, i += 2)
if(console)
console.points += O.worth * 2
use_power(100)
use_power_oneoff(100)
ores_stored[metal] -= 2
sheets += 2
console.output_mats[M] += 1
@@ -484,7 +482,7 @@
for(var/i = 0, i < can_make, i++)
if(console)
console.points += O.worth
use_power(100)
use_power_oneoff(100)
ores_stored[metal] -= 1
sheets++
if(console)
@@ -493,7 +491,7 @@
else
if(console)
console.points -= O.worth * 3 //reee wasting our materials!
use_power(500)
use_power_oneoff(500)
ores_stored[metal] -= 1
sheets++
if(console)
+2 -3
View File
@@ -6,7 +6,6 @@
icon_state = "coinpress0"
density = TRUE
anchored = TRUE
use_power = 1
idle_power_usage = 15
active_power_usage = 50
var/pressing
@@ -50,14 +49,14 @@
src.visible_message(SPAN_NOTICE("\The [src] begins to print out a modsuit."))
pressing = TRUE
update_icon()
use_power(500)
use_power_oneoff(500)
qdel(W)
spawn(300)
ping("\The [src] pings, \"Module successfuly produced!\"")
new outcome_path(get_turf(src))
use_power(500)
use_power_oneoff(500)
pressing = FALSE
update_icon()
+3 -5
View File
@@ -8,7 +8,6 @@
density = FALSE
anchored = TRUE
var/obj/machinery/mineral/stacking_machine/machine
use_power = 1
idle_power_usage = 15
active_power_usage = 50
@@ -37,7 +36,7 @@
if(!machine)
var/area/A = get_area(src)
var/best_distance = INFINITY
for(var/obj/machinery/mineral/stacking_machine/checked_machine in SSmachinery.all_machines)
for(var/obj/machinery/mineral/stacking_machine/checked_machine in SSmachinery.machinery)
if(id)
if(checked_machine.id == id)
machine = checked_machine
@@ -127,7 +126,6 @@
var/list/stack_storage = list()
var/list/stack_paths = list()
var/stack_amt = 50 // Amount to stack before releasing
use_power = 1
idle_power_usage = 15
active_power_usage = 50
@@ -175,7 +173,7 @@
return
return ..()
/obj/machinery/mineral/stacking_machine/machinery_process()
/obj/machinery/mineral/stacking_machine/process()
if(!console)
return
if(stat & BROKEN)
@@ -199,4 +197,4 @@
if(stack_storage[sheet] >= stack_amt)
new sheet(output, stack_amt)
stack_storage[sheet] -= stack_amt
intent_message(MACHINE_SOUND)
intent_message(MACHINE_SOUND)
+1 -2
View File
@@ -7,7 +7,6 @@
icon_state = "unloader"
density = TRUE
anchored = TRUE
use_power = 1
idle_power_usage = 15
active_power_usage = 50
var/turf/input
@@ -48,7 +47,7 @@
return
return ..()
/obj/machinery/mineral/unloading_machine/machinery_process()
/obj/machinery/mineral/unloading_machine/process()
..()
if(src.output && src.input)
if(locate(/obj/structure/ore_box, input))
+1 -1
View File
@@ -978,7 +978,7 @@ var/list/total_extraction_beacons = list()
var/obj/machinery/anti_bluespace/AB = found_inhibitor
if(T.z != AB.z || get_dist(T, AB) > 8 || (AB.stat & (NOPOWER | BROKEN)))
continue
AB.use_power(AB.active_power_usage)
AB.use_power_oneoff(AB.active_power_usage)
to_chat(user, SPAN_WARNING("A nearby bluespace inhibitor interferes with \the [src]!"))
return
to_chat(user, SPAN_NOTICE("You start attaching the pack to \the [A]..."))
+2 -2
View File
@@ -32,7 +32,7 @@
break
START_PROCESSING(SSprocessing, src)
/obj/machinery/mineral/mint/machinery_process()
/obj/machinery/mineral/mint/process()
if(input)
var/obj/item/stack/O
O = locate(/obj/item/stack, get_turf(input))
@@ -204,4 +204,4 @@
processing = FALSE
coinsToProduce = temp_coins
src.updateUsrDialog()
return
return