POLARIS: Use drop_location() for things

This commit is contained in:
Arokha Sieyes
2018-03-08 13:03:09 -05:00
parent 5c12e69fab
commit 4538a6859f
7 changed files with 26 additions and 6 deletions

View File

@@ -339,3 +339,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

@@ -296,7 +296,3 @@
/atom/movable/proc/adjust_scale(new_scale)
icon_scale = new_scale
update_transform()
// Stub for now, override with better things.
/atom/movable/proc/drop_location()
return loc

View File

@@ -724,3 +724,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

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

View File

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

View File

@@ -209,7 +209,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