Fixes integrated circuit reagent components not working while in mobs, adds new helper procs
This commit is contained in:
committed by
CitadelStationBot
parent
65cc4a2f16
commit
a4129f92df
@@ -122,9 +122,8 @@
|
||||
if(!battery)
|
||||
to_chat(usr, "<span class='warning'>There's no power cell to remove from \the [src].</span>")
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
battery.forceMove(T)
|
||||
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
battery.forceMove(drop_location())
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(usr, "<span class='notice'>You pull \the [battery] out of \the [src]'s power supplier.</span>")
|
||||
battery = null
|
||||
|
||||
@@ -393,6 +392,17 @@
|
||||
return src
|
||||
|
||||
|
||||
// Returns the location to be used for dropping items.
|
||||
// Same as the regular drop_location(), but with checks being run on acting_object if necessary.
|
||||
/obj/item/integrated_circuit/drop_location()
|
||||
var/atom/movable/acting_object = get_object()
|
||||
|
||||
// plz no infinite loops
|
||||
if(acting_object == src)
|
||||
return ..()
|
||||
|
||||
return acting_object.drop_location()
|
||||
|
||||
|
||||
|
||||
/obj/item/device/electronic_assembly/medium
|
||||
|
||||
Reference in New Issue
Block a user