mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
POLARIS: Use drop_location() for things
This commit is contained in:
@@ -327,3 +327,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
|
||||||
|
|||||||
@@ -725,4 +725,7 @@
|
|||||||
..()
|
..()
|
||||||
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
|
||||||
|
|||||||
@@ -415,3 +415,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
|
||||||
|
|||||||
@@ -277,3 +277,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
|
||||||
|
|||||||
@@ -208,7 +208,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