mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 13:46:53 +01:00
SSmachines instancing PR (#9080)
* Consistency Pass #1
Power cells of all types are now considered stock parts
Went through materials.dm and did some copy+paste work make material definitions consistent across the codebase (eg "steel" = 50 -> MAT_STEEL = 50)
* Machines are now instances in SSMachines
* Performance improvements by way of instancing all of SSmachines
* Fixes the powersink
* Revert "Consistency Pass #1"
This reverts commit cbeef1b5db.
* Update machines.dm
Styling changes
* Update machines.dm
* Update machines.dm
forgot to update the doc
This commit is contained in:
@@ -215,11 +215,11 @@
|
||||
else
|
||||
speed_process = !speed_process // switching gears
|
||||
if(speed_process) // high gear
|
||||
STOP_MACHINE_PROCESSING(src)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
end_processing()
|
||||
begin_speed_processing()
|
||||
else // low gear
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
end_speed_processing()
|
||||
begin_processing()
|
||||
for(var/obj/machinery/mineral/unloading_machine/unloader in refinery_area.contents)
|
||||
unloader.toggle_speed()
|
||||
for(var/obj/machinery/conveyor_switch/cswitch in refinery_area.contents)
|
||||
|
||||
@@ -109,11 +109,11 @@
|
||||
else
|
||||
speed_process = !speed_process // switching gears
|
||||
if(speed_process) // high gear
|
||||
STOP_MACHINE_PROCESSING(src)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
end_processing()
|
||||
begin_speed_processing()
|
||||
else // low gear
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
end_speed_processing()
|
||||
begin_processing()
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
if (src.output && src.input)
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
else
|
||||
speed_process = !speed_process // switching gears
|
||||
if(speed_process) // high gear
|
||||
STOP_MACHINE_PROCESSING(src)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
end_processing()
|
||||
begin_speed_processing()
|
||||
else // low gear
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
end_speed_processing()
|
||||
begin_processing()
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/process()
|
||||
if (src.output && src.input)
|
||||
@@ -53,4 +53,4 @@
|
||||
O.loc = src.output.loc
|
||||
else
|
||||
return
|
||||
return
|
||||
return
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
/obj/machinery/am_shielding/proc/setup_core()
|
||||
processing = 1
|
||||
START_MACHINE_PROCESSING(src)
|
||||
begin_processing()
|
||||
if(!control_unit) return
|
||||
control_unit.linked_cores.Add(src)
|
||||
control_unit.reported_core_efficiency += efficiency
|
||||
@@ -199,4 +199,4 @@
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/problem = 0 // If this is not 0 there is some sort of issue in the powernet. Monitors will display warnings.
|
||||
|
||||
/datum/powernet/New()
|
||||
START_PROCESSING_POWERNET(src)
|
||||
START_PROCESSING_MACHINERY(src, SSMACHINES_POWERNETS_LIST)
|
||||
..()
|
||||
|
||||
/datum/powernet/Destroy()
|
||||
@@ -31,7 +31,7 @@
|
||||
for(var/obj/machinery/power/M in nodes)
|
||||
nodes -= M
|
||||
M.powernet = null
|
||||
STOP_PROCESSING_POWERNET(src)
|
||||
STOP_PROCESSING_MACHINERY(src, SSMACHINES_POWERNETS_LIST)
|
||||
return ..()
|
||||
|
||||
//Returns the amount of excess power (before refunding to SMESs) from last tick.
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
else
|
||||
speed_process = !speed_process // switching gears
|
||||
if(speed_process) // high gear
|
||||
STOP_MACHINE_PROCESSING(src)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
end_processing()
|
||||
begin_speed_processing()
|
||||
else // low gear
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
end_speed_processing()
|
||||
begin_processing()
|
||||
|
||||
/obj/machinery/conveyor/proc/setmove()
|
||||
if(operating == FORWARDS)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return
|
||||
if(to_be_processed.len)
|
||||
spawn(1)
|
||||
begin_processing()
|
||||
start_processing()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The processor is empty.</span>")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
@@ -60,7 +60,7 @@
|
||||
AM.forceMove(src)
|
||||
visible_message("<span class='notice'>\the [user] places [AM] inside \the [src].</span>")
|
||||
|
||||
/obj/machinery/processor/proc/begin_processing()
|
||||
/obj/machinery/processor/proc/start_processing()
|
||||
if(processing)
|
||||
return // Already doing it.
|
||||
processing = TRUE
|
||||
@@ -115,4 +115,4 @@
|
||||
/obj/machinery/processor/MouseDrop_T(var/atom/movable/AM, var/mob/living/user)
|
||||
if(user.stat || user.incapacitated(INCAPACITATION_DISABLED) || !istype(user))
|
||||
return
|
||||
insert(AM, user)
|
||||
insert(AM, user)
|
||||
|
||||
Reference in New Issue
Block a user