mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
POLARIS: Use drop_location() for things
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -723,4 +723,7 @@
|
||||
..()
|
||||
if(open && contents.len)
|
||||
var/display_item = contents[1]
|
||||
to_chat(user, "<span class='notice'>\The [src] contains \the [display_item]!</span>")
|
||||
to_chat(user, "<span class='notice'>\The [src] contains \the [display_item]!</span>")
|
||||
|
||||
/obj/item/weapon/storage/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
@@ -416,3 +416,6 @@
|
||||
|
||||
/obj/structure/closet/onDropInto(var/atom/movable/AM)
|
||||
return
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user