Fixes ORM scooping bugs. (#50809)

This commit is contained in:
nemvar
2020-05-05 17:26:32 -07:00
committed by GitHub
parent 53671af838
commit a6bbf09898
2 changed files with 10 additions and 1 deletions
+8 -1
View File
@@ -16,7 +16,7 @@
/obj/machinery/mineral/Initialize(mapload)
. = ..()
if(needs_item_input)
if(needs_item_input && anchored)
register_input_turf()
/// Gets the turf in the `input_dir` direction adjacent to the machine, and registers signals for ATOM_ENTERED and ATOM_CREATED. Calls the `pickup_item()` proc when it recieves these signals.
@@ -30,6 +30,13 @@
if(input_turf)
UnregisterSignal(input_turf, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_CREATED))
/obj/machinery/mineral/Moved()
. = ..()
if(!needs_item_input || !anchored)
return
unregister_input_turf()
register_input_turf()
/**
Base proc for all `/mineral` subtype machines to use. Place your item pickup behavior in this proc when you override it for your specific machine.