POLARIS: Use drop_location() for things

This commit is contained in:
Arokha Sieyes
2018-03-08 13:03:09 -05:00
committed by Leshana
parent 24ccae5a24
commit 6158cd1d26
6 changed files with 26 additions and 2 deletions

View File

@@ -327,3 +327,9 @@ var/list/mob/living/forced_ambiance_list = new
/area/proc/shuttle_departed()
return TRUE
/area/AllowDrop()
CRASH("Bad op: area/AllowDrop() called")
/area/drop_location()
CRASH("Bad op: area/drop_location() called")

View File

@@ -502,3 +502,12 @@
if(A && A.has_gravity())
return TRUE
return FALSE
/atom/proc/drop_location()
var/atom/L = loc
if(!L)
return null
return L.AllowDrop() ? L : get_turf(L)
/atom/proc/AllowDrop()
return FALSE

View File

@@ -726,3 +726,6 @@
if(open && contents.len)
var/display_item = contents[1]
to_chat(user, "<span class='notice'>\The [src] contains \the [display_item]!</span>")
/obj/item/weapon/storage/AllowDrop()
return TRUE

View File

@@ -415,3 +415,6 @@
/obj/structure/closet/onDropInto(var/atom/movable/AM)
return
/obj/structure/closet/AllowDrop()
return TRUE

View File

@@ -277,3 +277,6 @@ var/const/enterloopsanity = 100
if(isliving(AM))
var/mob/living/M = AM
M.turf_collision(src, speed)
/turf/AllowDrop()
return TRUE

View File

@@ -208,7 +208,7 @@ var/list/slot_equipment_priority = list( \
if(target)
I.forceMove(target)
else
I.dropInto(loc)
I.dropInto(drop_location())
I.dropped(src)
return 1