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()
|
/area/proc/shuttle_departed()
|
||||||
return TRUE
|
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())
|
if(A && A.has_gravity())
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
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)
|
/atom/movable/proc/adjust_scale(new_scale)
|
||||||
icon_scale = new_scale
|
icon_scale = new_scale
|
||||||
update_transform()
|
update_transform()
|
||||||
|
|
||||||
// Stub for now, override with better things.
|
|
||||||
/atom/movable/proc/drop_location()
|
|
||||||
return loc
|
|
||||||
@@ -724,3 +724,6 @@
|
|||||||
if(open && contents.len)
|
if(open && contents.len)
|
||||||
var/display_item = contents[1]
|
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)
|
/obj/structure/closet/onDropInto(var/atom/movable/AM)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/structure/closet/AllowDrop()
|
||||||
|
return TRUE
|
||||||
|
|||||||
@@ -280,3 +280,6 @@ var/const/enterloopsanity = 100
|
|||||||
if(isliving(AM))
|
if(isliving(AM))
|
||||||
var/mob/living/M = AM
|
var/mob/living/M = AM
|
||||||
M.turf_collision(src, speed)
|
M.turf_collision(src, speed)
|
||||||
|
|
||||||
|
/turf/AllowDrop()
|
||||||
|
return TRUE
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ var/list/slot_equipment_priority = list( \
|
|||||||
if(target)
|
if(target)
|
||||||
I.forceMove(target)
|
I.forceMove(target)
|
||||||
else
|
else
|
||||||
I.dropInto(loc)
|
I.dropInto(drop_location())
|
||||||
I.dropped(src)
|
I.dropped(src)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user