[MIRROR] Organ harvester output direction selection [MDB IGNORE] (#23431)

* Organ harvester output direction selection (#78013)

## About The Pull Request
The organ harvester now defaults to dropping harvested limbs/organs to
the tile south of it. When the panel is open, you can alt click to cycle
the output between the cardinal directions.

![theHarvest](https://github.com/tgstation/tgstation/assets/44104681/f6792d34-c8d5-4c7c-ad20-e83873e5e792)

~~I also killed some runtime that was happening in
`/obj/item/bodypart/head/update_limb(dropping_limb, is_creating)`
whenever the organ harvester removed a head. As far as I can tell, the
player facing side of this has not changed at all from this.~~
I think someone else did it first, and they probably did it better.
## Why It's Good For The Game
The organ harvester choosing where to output for you and giving no
indiciation of which way it is is very annoying. Whenever I set it up,
it always ends up dropping the organs on the same tile as a vending
machine or on the other side of a directional window. This gives a
little more control over where things get spat out.

## Changelog
🆑
qol: The organ harvester's output is more predictable, and the direction
can be changed by alt-clicking with the panel screwed open.
/🆑

* Organ harvester output direction selection

---------

Co-authored-by: Vladin Heir <44104681+VladinXXV@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-31 12:24:22 -07:00
committed by GitHub
co-authored by Vladin Heir
parent 061770c032
commit e28c9ca696
+9 -12
View File
@@ -13,6 +13,7 @@
var/harvesting = FALSE
var/warming_up = FALSE
var/list/operation_order = list() //Order of wich we harvest limbs.
var/output_dir = SOUTH //Direction to drop the limbs in
var/allow_clothing = FALSE
var/allow_living = FALSE
@@ -58,6 +59,12 @@
/obj/machinery/harvester/AltClick(mob/user)
. = ..()
if(!user.can_perform_action(src))
return
if(panel_open)
output_dir = turn(output_dir, -90)
to_chat(user, span_notice("You change [src]'s output settings, setting the output to [dir2text(output_dir)]."))
return
if(!can_interact(user))
return
if(harvesting || !user || !isliving(user) || state_open)
@@ -121,17 +128,7 @@
if(!LAZYLEN(operation_order)) //The list is empty, so we're done here
end_harvesting(success = TRUE)
return
var/turf/target
for(var/adir in list(EAST,NORTH,SOUTH,WEST))
var/turf/T = get_step(src,adir)
if(!T)
continue
if(isclosedturf(T))
continue
target = T
break
if(!target)
target = get_turf(src)
var/turf/target = get_step(src, output_dir)
for(var/obj/item/bodypart/BP in operation_order) //first we do non-essential limbs
BP.drop_limb()
C.emote("scream")
@@ -219,4 +216,4 @@
else if(!harvesting)
. += span_notice("Alt-click [src] to start harvesting.")
if(in_range(user, src) || isobserver(user))
. += span_notice("The status display reads: Harvest speed at <b>[interval*0.1]</b> seconds per organ.")
. += span_notice("The status display reads: Harvest speed at <b>[interval*0.1]</b> seconds per organ. Outputting to the <b>[dir2text(output_dir)]</b>.")