Merge pull request #9601 from variableundefined/DropLocation

Adds in drop_location & AllowDrop()
This commit is contained in:
Crazy Lemon
2018-09-26 17:00:11 -07:00
committed by GitHub
13 changed files with 40 additions and 21 deletions
+7 -1
View File
@@ -394,4 +394,10 @@
for(var/obj/machinery/door/airlock/temp_airlock in src)
temp_airlock.prison_open()
for(var/obj/machinery/door/window/temp_windoor in src)
temp_windoor.open()
temp_windoor.open()
/area/AllowDrop()
CRASH("Bad op: area/AllowDrop() called")
/area/drop_location()
CRASH("Bad op: area/drop_location() called")
+10 -4
View File
@@ -204,9 +204,6 @@
/atom/proc/allow_drop()
return 1
/atom/proc/CheckExit()
return 1
@@ -712,4 +709,13 @@ var/list/blood_splatter_icons = list()
.["Jump to turf"] = "?_src_=holder;adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]"
.["Add reagent"] = "?_src_=vars;addreagent=[UID()]"
.["Trigger explosion"] = "?_src_=vars;explode=[UID()]"
.["Trigger EM pulse"] = "?_src_=vars;emp=[UID()]"
.["Trigger EM pulse"] = "?_src_=vars;emp=[UID()]"
/atom/proc/AllowDrop()
return FALSE
/atom/proc/drop_location()
var/atom/L = loc
if(!L)
return null
return L.AllowDrop() ? L : get_turf(L)
+2 -2
View File
@@ -103,8 +103,8 @@
for(var/obj/item/stock_parts/micro_laser/P in component_parts)
damage_coeff = P.rating
/obj/machinery/dna_scannernew/allow_drop()
return 0
/obj/machinery/dna_scannernew/AllowDrop()
return FALSE
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
if(user.stat)
+2 -2
View File
@@ -519,8 +519,8 @@
return
return
/obj/machinery/sleeper/allow_drop()
return 0
/obj/machinery/sleeper/AllowDrop()
return FALSE
/obj/machinery/sleeper/verb/move_inside()
set name = "Enter Sleeper"
+2 -2
View File
@@ -149,8 +149,8 @@
parent.update = 1
/obj/machinery/atmospherics/unary/cryo_cell/allow_drop()
return 0
/obj/machinery/atmospherics/unary/cryo_cell/AllowDrop()
return FALSE
/obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/user as mob)
+2 -2
View File
@@ -109,8 +109,8 @@
/obj/machinery/recharge_station/Bumped(var/mob/AM)
move_inside(AM)
/obj/machinery/recharge_station/allow_drop()
return 0
/obj/machinery/recharge_station/AllowDrop()
return FALSE
/obj/machinery/recharge_station/relaymove(mob/user as mob)
if(user.stat)
@@ -41,8 +41,8 @@
var/inject_amount = 10
salvageable = 0
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/allow_drop()
return 0
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/AllowDrop()
return FALSE
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/Destroy()
for(var/atom/movable/AM in src)
-2
View File
@@ -165,8 +165,6 @@
to_chat(user, "[bicon(ME)] [ME]")
/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
return
/obj/mecha/hear_talk(mob/M, text)
if(M == occupant && radio.broadcasting)
@@ -557,3 +557,6 @@
else
log_runtime(EXCEPTION("Non-list thing found in storage/deserialize."), src, list("Thing: [thing]"))
..()
/obj/item/storage/AllowDrop()
return TRUE
@@ -423,4 +423,7 @@
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/structure/closet/AllowDrop()
return TRUE
+3
View File
@@ -475,3 +475,6 @@
SSair.remove_from_active(T0)
T0.CalculateAdjacentTurfs()
SSair.add_to_active(T0,1)
/turf/AllowDrop()
return TRUE
+2 -2
View File
@@ -83,7 +83,7 @@
//This is probably the main one you need to know :)
//Just puts stuff on the floor for most mobs, since all mobs have hands but putting stuff in the AI/corgi/ghost hand is VERY BAD.
/mob/proc/put_in_hands(obj/item/W)
W.forceMove(get_turf(src))
W.forceMove(drop_location())
W.layer = initial(W.layer)
W.plane = initial(W.plane)
W.dropped()
@@ -137,7 +137,7 @@
if(I)
if(client)
client.screen -= I
I.forceMove(loc)
I.forceMove(drop_location())
I.dropped(src)
if(I)
I.layer = initial(I.layer)
@@ -24,7 +24,7 @@
if(!check_functionality())
return FALSE
var/obj/item/paper/P = new/obj/item/paper(get_turf(holder))
var/obj/item/paper/P = new/obj/item/paper(holder.drop_location())
// Damaged printer causes the resulting paper to be somewhat harder to read.
if(damage > damage_malfunction)